X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=Ada95%2Faclocal.m4;h=3249c1a8b4aaa8dda11a1b6b020b2b218504609f;hp=f9fdb9f866a60868638f7639e6e3dd103313c8f1;hb=bd75bb126bdbd8300fe73e8e8b2fe97bd07eef75;hpb=cecf06633520e80b392644f66fe362009583fedb diff --git a/Ada95/aclocal.m4 b/Ada95/aclocal.m4 index f9fdb9f8..3249c1a8 100644 --- a/Ada95/aclocal.m4 +++ b/Ada95/aclocal.m4 @@ -28,7 +28,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey dnl -dnl $Id: aclocal.m4,v 1.26 2011/05/07 15:35:16 tom Exp $ +dnl $Id: aclocal.m4,v 1.29 2011/06/05 00:44:26 tom Exp $ dnl Macros used in NCURSES Ada95 auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -39,6 +39,31 @@ dnl See http://invisible-island.net/autoconf/ for additional information. dnl dnl --------------------------------------------------------------------------- dnl --------------------------------------------------------------------------- +dnl CF_ACVERSION_CHECK version: 2 updated: 2011/05/08 11:22:03 +dnl ------------------ +dnl Conditionally generate script according to whether we're using a given autoconf. +dnl +dnl $1 = version to compare against +dnl $2 = code to use if AC_ACVERSION is at least as high as $1. +dnl $3 = code to use if AC_ACVERSION is older than $1. +define(CF_ACVERSION_CHECK, +[ +ifdef([m4_version_compare], +[m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2])], +[CF_ACVERSION_COMPARE( +AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), +AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)), AC_ACVERSION, [$2], [$3])])])dnl +dnl --------------------------------------------------------------------------- +dnl CF_ACVERSION_COMPARE version: 2 updated: 2011/04/14 20:56:50 +dnl -------------------- +dnl CF_ACVERSION_COMPARE(MAJOR1, MINOR1, TERNARY1, +dnl MAJOR2, MINOR2, TERNARY2, +dnl PRINTABLE2, not FOUND, FOUND) +define(CF_ACVERSION_COMPARE, +[ifelse(builtin([eval], [$2 < $5]), 1, +[ifelse([$8], , ,[$8])], +[ifelse([$9], , ,[$9])])])dnl +dnl --------------------------------------------------------------------------- dnl CF_ADA_INCLUDE_DIRS version: 6 updated: 2010/02/26 19:52:07 dnl ------------------- dnl Construct the list of include-options for the C programs in the Ada95 @@ -504,7 +529,7 @@ AC_SUBST(BUILD_EXEEXT) AC_SUBST(BUILD_OBJEXT) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CFG_DEFAULTS version: 7 updated: 2005/09/24 16:15:00 +dnl CF_CFG_DEFAULTS version: 8 updated: 2011/06/04 20:09:13 dnl --------------- dnl Determine the default configuration into which we'll install ncurses. This dnl can be overridden by the user's command-line options. There's two items to @@ -522,7 +547,7 @@ AC_MSG_CHECKING(for prefix) if test "x$prefix" = "xNONE" ; then case "$cf_cv_system_name" in # non-vendor systems don't have a conflict - openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu) + openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu) prefix=/usr ;; *) prefix=$ac_default_prefix @@ -1070,53 +1095,6 @@ AC_SUBST(cf_compile_generics) AC_SUBST(cf_generic_objects) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GNAT_SIGINT version: 1 updated: 2011/03/27 20:07:59 -dnl -------------- -dnl Check if gnat supports SIGINT, and presumably tasking. For the latter, it -dnl is noted that gnat may compile a tasking unit even for configurations which -dnl fail at runtime. -AC_DEFUN([CF_GNAT_SIGINT],[ -AC_CACHE_CHECK(if GNAT supports SIGINT,cf_cv_gnat_sigint,[ -CF_GNAT_TRY_LINK([with Ada.Interrupts.Names; - -package ConfTest is - - pragma Warnings (Off); -- the next pragma exists since 3.11p - pragma Unreserve_All_Interrupts; - pragma Warnings (On); - - protected Process is - procedure Stop; - function Continue return Boolean; - pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT); - private - Done : Boolean := False; - end Process; - -end ConfTest;], -[package body ConfTest is - protected body Process is - procedure Stop is - begin - Done := True; - end Stop; - function Continue return Boolean is - begin - return not Done; - end Continue; - end Process; -end ConfTest;], - [cf_cv_gnat_sigint=yes], - [cf_cv_gnat_sigint=no])]) - -if test $cf_cv_gnat_sigint = yes ; then - USE_GNAT_SIGINT="" -else - USE_GNAT_SIGINT="#" -fi -AC_SUBST(USE_GNAT_SIGINT) -])dnl -dnl --------------------------------------------------------------------------- dnl CF_GNAT_PRAGMA_UNREF version: 1 updated: 2010/06/19 15:22:18 dnl -------------------- dnl Check if the gnat pragma "Unreferenced" works. @@ -1253,6 +1231,53 @@ AC_SUBST(USE_GNAT_PROJECTS) AC_SUBST(USE_GNAT_LIBRARIES) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_GNAT_SIGINT version: 1 updated: 2011/03/27 20:07:59 +dnl -------------- +dnl Check if gnat supports SIGINT, and presumably tasking. For the latter, it +dnl is noted that gnat may compile a tasking unit even for configurations which +dnl fail at runtime. +AC_DEFUN([CF_GNAT_SIGINT],[ +AC_CACHE_CHECK(if GNAT supports SIGINT,cf_cv_gnat_sigint,[ +CF_GNAT_TRY_LINK([with Ada.Interrupts.Names; + +package ConfTest is + + pragma Warnings (Off); -- the next pragma exists since 3.11p + pragma Unreserve_All_Interrupts; + pragma Warnings (On); + + protected Process is + procedure Stop; + function Continue return Boolean; + pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT); + private + Done : Boolean := False; + end Process; + +end ConfTest;], +[package body ConfTest is + protected body Process is + procedure Stop is + begin + Done := True; + end Stop; + function Continue return Boolean is + begin + return not Done; + end Continue; + end Process; +end ConfTest;], + [cf_cv_gnat_sigint=yes], + [cf_cv_gnat_sigint=no])]) + +if test $cf_cv_gnat_sigint = yes ; then + USE_GNAT_SIGINT="" +else + USE_GNAT_SIGINT="#" +fi +AC_SUBST(USE_GNAT_SIGINT) +])dnl +dnl --------------------------------------------------------------------------- dnl CF_GNAT_TRY_LINK version: 3 updated: 2011/03/19 14:47:45 dnl ---------------- dnl Verify that a test program compiles/links with GNAT. @@ -1518,7 +1543,7 @@ ifdef([AC_FUNC_FSEEKO],[ ]) ]) dnl --------------------------------------------------------------------------- -dnl CF_LD_RPATH_OPT version: 3 updated: 2010/06/02 05:03:05 +dnl CF_LD_RPATH_OPT version: 4 updated: 2011/06/04 20:09:13 dnl --------------- dnl For the given system and compiler, find the compiler flags to pass to the dnl loader to use the "rpath" feature. @@ -1539,7 +1564,7 @@ irix*) #(vi linux*|gnu*|k*bsd*-gnu) #(vi LD_RPATH_OPT="-Wl,-rpath," ;; -openbsd[[2-9]].*) #(vi +openbsd[[2-9]].*|mirbsd*) #(vi LD_RPATH_OPT="-Wl,-rpath," ;; freebsd*) #(vi @@ -2546,7 +2571,7 @@ case ".[$]$1" in #(vi esac ])dnl dnl --------------------------------------------------------------------------- -dnl CF_PKG_CONFIG version: 6 updated: 2011/04/17 06:36:21 +dnl CF_PKG_CONFIG version: 7 updated: 2011/04/29 04:53:22 dnl ------------- dnl Check for the package-config program, unless disabled by command-line. AC_DEFUN([CF_PKG_CONFIG], @@ -2563,7 +2588,9 @@ no) #(vi PKG_CONFIG=none ;; yes) #(vi - AC_PATH_TOOL(PKG_CONFIG, pkg-config, none) + CF_ACVERSION_CHECK(2.52, + [AC_PATH_TOOL(PKG_CONFIG, pkg-config, none)], + [AC_PATH_PROG(PKG_CONFIG, pkg-config, none)]) ;; *) PKG_CONFIG=$withval @@ -2831,7 +2858,7 @@ define([CF_REMOVE_LIB], $1=`echo "$2" | sed -e 's/-l$3[[ ]]//g' -e 's/-l$3[$]//'` ])dnl dnl --------------------------------------------------------------------------- -dnl CF_SHARED_OPTS version: 64 updated: 2010/06/05 16:51:16 +dnl CF_SHARED_OPTS version: 66 updated: 2011/06/04 20:09:13 dnl -------------- dnl -------------- dnl Attempt to determine the appropriate CC/LD options for creating a shared @@ -2962,6 +2989,16 @@ CF_EOF # readonly to exploit a quirk in the memory manager. INSTALL_LIB="-m 555" ;; + interix*) + test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel + if test "$cf_cv_shlib_version" = rel; then + cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}' + else + cf_shared_soname='`basename $@`' + fi + CC_SHARED_OPTS= + MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${libdir} -Wl,-h,'$cf_shared_soname' -o $@' + ;; irix*) #(vi if test "$cf_cv_enable_rpath" = yes ; then EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS" @@ -2986,7 +3023,7 @@ CF_EOF CF_SHARED_SONAME MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]' ;; - openbsd[[2-9]].*) #(vi + openbsd[[2-9]].*|mirbsd*) #(vi if test "$DFT_LWR_MODEL" = "shared" ; then LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)" LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"