X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=Ada95%2Faclocal.m4;h=3019a073c8800a57824499822625240742cb16c8;hp=3128844138e33cb1bbb17f298772378457f28850;hb=30d31dfbacb0efb3fe5d31567410ede093f9e221;hpb=275aeb5889b10a51796b311f3773aeaea4d0a754 diff --git a/Ada95/aclocal.m4 b/Ada95/aclocal.m4 index 31288441..3019a073 100644 --- a/Ada95/aclocal.m4 +++ b/Ada95/aclocal.m4 @@ -1,5 +1,5 @@ dnl*************************************************************************** -dnl Copyright (c) 2010 Free Software Foundation, Inc. * +dnl Copyright (c) 2010,2011 Free Software Foundation, Inc. * dnl * dnl Permission is hereby granted, free of charge, to any person obtaining a * dnl copy of this software and associated documentation files (the * @@ -28,7 +28,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey dnl -dnl $Id: aclocal.m4,v 1.16 2010/09/04 21:41:53 tom Exp $ +dnl $Id: aclocal.m4,v 1.30 2011/07/02 19:51:20 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 @@ -290,13 +315,34 @@ ifelse([$5],NONE,,[(test $5 = NONE || test "$4" != "$5") &&]) { } ])dnl dnl --------------------------------------------------------------------------- -dnl CF_ANSI_CC_CHECK version: 9 updated: 2001/12/30 17:53:34 +dnl CF_ANSI_CC_CHECK version: 11 updated: 2011/07/01 19:47:45 dnl ---------------- -dnl This is adapted from the macros 'fp_PROG_CC_STDC' and 'fp_C_PROTOTYPES' -dnl in the sharutils 4.2 distribution. +dnl This was originally adapted from the macros 'fp_PROG_CC_STDC' and +dnl 'fp_C_PROTOTYPES' in the sharutils 4.2 distribution. AC_DEFUN([CF_ANSI_CC_CHECK], [ -AC_CACHE_CHECK(for ${CC-cc} option to accept ANSI C, cf_cv_ansi_cc,[ +# This should have been defined by AC_PROG_CC +: ${CC:=cc} + +# Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content +# into CC. This will not help with broken scripts that wrap the compiler with +# options, but eliminates a more common category of user confusion. +AC_MSG_CHECKING(\$CC variable) +case "$CC" in #(vi +*[[\ \ ]]-[[IUD]]*) + AC_MSG_RESULT(broken) + AC_MSG_WARN(your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options) + # humor him... + cf_flags=`echo "$CC" | sed -e 's/^[[^ ]]*[[ ]]//'` + CC=`echo "$CC" | sed -e 's/[[ ]].*//'` + CF_ADD_CFLAGS($cf_flags) + ;; +*) + AC_MSG_RESULT(ok) + ;; +esac + +AC_CACHE_CHECK(for ${CC:-cc} option to accept ANSI C, cf_cv_ansi_cc,[ cf_cv_ansi_cc=no cf_save_CFLAGS="$CFLAGS" cf_save_CPPFLAGS="$CPPFLAGS" @@ -504,7 +550,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 +568,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 @@ -593,7 +639,7 @@ if test ".$system_name" != ".$cf_cv_system_name" ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_HEADER version: 2 updated: 2010/04/28 06:02:16 +dnl CF_CURSES_HEADER version: 3 updated: 2011/05/01 19:47:45 dnl ---------------- dnl Find a "curses" header file, e.g,. "curses.h", or one of the more common dnl variations of ncurses' installs. @@ -603,10 +649,10 @@ AC_DEFUN([CF_CURSES_HEADER],[ AC_CACHE_CHECK(if we have identified curses headers,cf_cv_ncurses_header,[ cf_cv_ncurses_header=none for cf_header in ifelse($1,,,[ \ - $1/curses.h \ - $1/ncurses.h]) \ - curses.h \ - ncurses.h ifelse($1,,[ncurses/curses.h ncurses/ncurses.h]) + $1/ncurses.h \ + $1/curses.h]) \ + ncurses.h \ + curses.h ifelse($1,,[ncurses/ncurses.h ncurses/curses.h]) do AC_TRY_COMPILE([#include <${cf_header}>], [initscr(); tgoto("?", 0,0)], @@ -807,7 +853,7 @@ ifelse([$5],,AC_MSG_WARN(Cannot find $3 library),[$5]) fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GCC_ATTRIBUTES version: 13 updated: 2009/08/11 20:19:56 +dnl CF_GCC_ATTRIBUTES version: 14 updated: 2010/10/23 15:52:32 dnl ----------------- dnl Test for availability of useful gcc __attribute__ directives to quiet dnl compiler warnings. Though useful, not all are supported -- and contrary @@ -834,7 +880,7 @@ if test "$GCC" = yes then AC_CHECKING([for $CC __attribute__ directives]) cat > conftest.$ac_ext < conftest.$ac_ext <>library.gpr <>confpackage.ads <>confpackage.adb <&AC_FD_CC 2>&1 ) ; then + cf_gnat_projects=yes + fi + cd .. + if test -f conftest.lib/confpackage.ali + then + cf_gnat_libraries=yes + fi + rm -rf conftest* *~conftest* + ;; + esac + ;; +esac +AC_MSG_RESULT($cf_gnat_projects) + +if test $cf_gnat_projects = yes +then + AC_MSG_CHECKING(if GNAT supports libraries) + AC_MSG_RESULT($cf_gnat_libraries) +fi + +if test "$cf_gnat_projects" = yes +then + USE_OLD_MAKERULES="#" + USE_GNAT_PROJECTS="" +else + USE_OLD_MAKERULES="" + USE_GNAT_PROJECTS="#" +fi + +if test "$cf_gnat_libraries" = yes +then + USE_GNAT_LIBRARIES="" +else + USE_GNAT_LIBRARIES="#" +fi + +AC_SUBST(USE_OLD_MAKERULES) +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. dnl $cf_ada_make is set to the program that compiles/links @@ -1081,7 +1311,7 @@ dnl $3 is the shell command to execute if successful dnl $4 is the shell command to execute if not successful AC_DEFUN([CF_GNAT_TRY_LINK], [ -rm -rf conftest* +rm -rf conftest* *~conftest* cat >>conftest.ads <>conftest.ads <&1 | grep '[[0-9]].[[0-9]][[0-9]]*' |\ - sed -e '2,$d' -e 's/[[^0-9 \.]]//g' -e 's/^[[ ]]*//' -e 's/ .*//'` +cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \ + grep '[[0-9]].[[0-9]][[0-9]]*' |\ + sed -e '2,$d' -e 's/[[^0-9 \.]]//g' -e 's/^[[ ]]*//' -e 's/ .*//'` AC_MSG_RESULT($cf_gnat_version) -case $cf_gnat_version in - 3.1[[1-9]]*|3.[[2-9]]*|[[4-9]].*) - cf_cv_prog_gnat_correct=yes - ;; - *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding. - cf_cv_prog_gnat_correct=no - ;; -esac - -case $cf_gnat_version in - 3.[[1-9]]*|[[4-9]].*) - cf_compile_generics=generics - cf_generic_objects="\${GENOBJS}" - ;; - *) cf_compile_generics= - cf_generic_objects= - ;; -esac - -case $cf_gnat_version in - 3.[[0-9]]*) - USE_OLD_MAKERULES="" - USE_GNAT_PROJECTS="#" - ;; - *) - USE_OLD_MAKERULES="#" - USE_GNAT_PROJECTS="" - ;; +case $cf_gnat_version in #(vi +3.1[[1-9]]*|3.[[2-9]]*|[[4-9]].*) #(vi + cf_cv_prog_gnat_correct=yes + ;; +*) + AC_MSG_WARN(Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding.) + cf_cv_prog_gnat_correct=no + ;; esac - -AC_SUBST(cf_compile_generics) -AC_SUBST(cf_generic_objects) - -AC_SUBST(USE_OLD_MAKERULES) -AC_SUBST(USE_GNAT_PROJECTS) ]) dnl --------------------------------------------------------------------------- dnl CF_GNU_SOURCE version: 6 updated: 2005/07/09 13:23:07 @@ -1359,7 +1564,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. @@ -1380,7 +1585,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 @@ -1496,7 +1701,7 @@ fi ]) ]) dnl --------------------------------------------------------------------------- -dnl CF_LIB_SUFFIX version: 16 updated: 2008/12/27 12:30:03 +dnl CF_LIB_SUFFIX version: 17 updated: 2011/07/02 15:36:04 dnl ------------- dnl Compute the library file-suffix from the given model name dnl $1 = model name @@ -1525,7 +1730,7 @@ AC_DEFUN([CF_LIB_SUFFIX], ;; shared) #(vi case $cf_cv_system_name in - aix[[56]]*) #(vi + aix[[5-7]]*) #(vi $2='.a' $3=[$]$2 ;; @@ -1708,7 +1913,7 @@ AC_DEFUN([CF_MAIN_RETURN], cf_cv_main_return=return ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MAKEFLAGS version: 12 updated: 2006/10/21 08:27:03 +dnl CF_MAKEFLAGS version: 14 updated: 2011/03/31 19:29:46 dnl ------------ dnl Some 'make' programs support ${MAKEFLAGS}, some ${MFLAGS}, to pass 'make' dnl options to lower-levels. It's very useful for "make -n" -- if we have it. @@ -1725,10 +1930,10 @@ SHELL = /bin/sh all : @ echo '.$cf_option' CF_EOF - cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[[ ]]*$,,'` + cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[[ ]]*$,,'` case "$cf_result" in .*k) - cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null` + cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null` case "$cf_result" in .*CC=*) cf_cv_makeflags= ;; @@ -1748,7 +1953,7 @@ CF_EOF AC_SUBST(cf_cv_makeflags) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MAKE_TAGS version: 5 updated: 2010/04/03 20:07:32 +dnl CF_MAKE_TAGS version: 6 updated: 2010/10/23 15:52:32 dnl ------------ dnl Generate tags/TAGS targets for makefiles. Do not generate TAGS if we have dnl a monocase filesystem. @@ -1758,10 +1963,10 @@ AC_REQUIRE([CF_MIXEDCASE_FILENAMES]) AC_CHECK_PROGS(CTAGS, exctags ctags) AC_CHECK_PROGS(ETAGS, exetags etags) -AC_CHECK_PROG(MAKE_LOWER_TAGS, ${CTAGS-ctags}, yes, no) +AC_CHECK_PROG(MAKE_LOWER_TAGS, ${CTAGS:-ctags}, yes, no) if test "$cf_cv_mixedcase" = yes ; then - AC_CHECK_PROG(MAKE_UPPER_TAGS, ${ETAGS-etags}, yes, no) + AC_CHECK_PROG(MAKE_UPPER_TAGS, ${ETAGS:-etags}, yes, no) else MAKE_UPPER_TAGS=no fi @@ -1865,15 +2070,15 @@ if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; th fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MSG_LOG version: 4 updated: 2007/07/29 09:55:12 +dnl CF_MSG_LOG version: 5 updated: 2010/10/23 15:52:32 dnl ---------- dnl Write a debug message to config.log, along with the line number in the dnl configure script. AC_DEFUN([CF_MSG_LOG],[ -echo "${as_me-configure}:__oline__: testing $* ..." 1>&AC_FD_CC +echo "${as_me:-configure}:__oline__: testing $* ..." 1>&AC_FD_CC ])dnl dnl --------------------------------------------------------------------------- -dnl CF_NCURSES_ADDON version: 2 updated: 2010/02/27 18:27:44 +dnl CF_NCURSES_ADDON version: 4 updated: 2011/03/27 17:10:13 dnl ---------------- dnl Configure an ncurses add-on, built outside the ncurses tree. AC_DEFUN([CF_NCURSES_ADDON],[ @@ -1898,8 +2103,8 @@ if test "$NCURSES_CONFIG" != none ; then cf_version=`$NCURSES_CONFIG --version` NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'` -NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[[0-9]]\+\.//' -e 's/\..*//'` -NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[[0-9]]\+\.[[0-9]]\+\.//'` +NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[[0-9]][[0-9]]*\.//' -e 's/\..*//'` +NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\.//'` # ABI version is not available from headers cf_cv_abi_version=`$NCURSES_CONFIG --abi-version` @@ -1909,16 +2114,16 @@ else for cf_name in MAJOR MINOR PATCH do cat >conftest.$ac_ext < +#include <${cf_cv_ncurses_header:-curses.h}> AUTOCONF_$cf_name NCURSES_VERSION_$cf_name CF_EOF cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out" AC_TRY_EVAL(cf_try) if test -f conftest.out ; then - cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[[ ]]\+//"` - eval NCURSES_$cf_name=$cf_result - cat conftest.$ac_ext - cat conftest.out + cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[[ ]][[ ]]*//"` + eval NCURSES_$cf_name=\"$cf_result\" + # cat conftest.$ac_ext + # cat conftest.out fi done @@ -2022,7 +2227,7 @@ CF_NCURSES_LIBS(ifelse($1,,ncurses,$1)) fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_NCURSES_CPPFLAGS version: 19 updated: 2007/07/29 13:35:20 +dnl CF_NCURSES_CPPFLAGS version: 20 updated: 2010/11/20 17:02:38 dnl ------------------- dnl Look for the SVr4 curses clone 'ncurses' in the standard places, adjusting dnl the CPPFLAGS variable so we can include its header. @@ -2051,7 +2256,7 @@ cf_ncuhdr_root=ifelse($1,,ncurses,$1) test -n "$cf_cv_curses_dir" && \ test "$cf_cv_curses_dir" != "no" && { \ - CF_ADD_INCDIR($cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root) + CF_ADD_INCDIR($cf_cv_curses_dir/include/$cf_ncuhdr_root) } AC_CACHE_CHECK(for $cf_ncuhdr_root header in include-path, cf_cv_ncurses_h,[ @@ -2139,7 +2344,7 @@ esac ])dnl dnl --------------------------------------------------------------------------- -dnl CF_NCURSES_LIBS version: 14 updated: 2010/06/20 09:24:28 +dnl CF_NCURSES_LIBS version: 16 updated: 2010/11/20 17:02:38 dnl --------------- dnl Look for the ncurses library. This is a little complicated on Linux, dnl because it may be linked with the gpm (general purpose mouse) library. @@ -2179,11 +2384,10 @@ CF_ADD_LIBS($cf_ncurses_LIBS) if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" ) then - CF_ADD_LIBDIR($cf_cv_curses_dir/lib) CF_ADD_LIBS(-l$cf_nculib_root) else CF_FIND_LIBRARY($cf_nculib_root,$cf_nculib_root, - [#include <${cf_cv_ncurses_header-curses.h}>], + [#include <${cf_cv_ncurses_header:-curses.h}>], [initscr()], initscr) fi @@ -2197,7 +2401,7 @@ if test -n "$cf_ncurses_LIBS" ; then LIBS="$q" fi done - AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>], + AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], [initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no) @@ -2208,7 +2412,7 @@ CF_UPPER(cf_nculib_ROOT,HAVE_LIB$cf_nculib_root) AC_DEFINE_UNQUOTED($cf_nculib_ROOT) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_NCURSES_VERSION version: 12 updated: 2007/04/28 09:15:55 +dnl CF_NCURSES_VERSION version: 13 updated: 2010/10/23 15:54:49 dnl ------------------ dnl Check for the version of ncurses, to aid in reporting bugs, etc. dnl Call CF_CURSES_CPPFLAGS first, or CF_NCURSES_CPPFLAGS. We don't use @@ -2221,7 +2425,7 @@ AC_CACHE_CHECK(for ncurses version, cf_cv_ncurses_version,[ cf_tempfile=out$$ rm -f $cf_tempfile AC_TRY_RUN([ -#include <${cf_cv_ncurses_header-curses.h}> +#include <${cf_cv_ncurses_header:-curses.h}> #include int main() { @@ -2239,14 +2443,14 @@ int main() make an error # endif #endif - ${cf_cv_main_return-return}(0); + ${cf_cv_main_return:-return}(0); }],[ cf_cv_ncurses_version=`cat $cf_tempfile`],,[ # This will not work if the preprocessor splits the line after the # Autoconf token. The 'unproto' program does that. cat > conftest.$ac_ext < +#include <${cf_cv_ncurses_header:-curses.h}> #undef Autoconf #ifdef NCURSES_VERSION Autoconf NCURSES_VERSION @@ -2388,7 +2592,7 @@ case ".[$]$1" in #(vi esac ])dnl dnl --------------------------------------------------------------------------- -dnl CF_PKG_CONFIG version: 3 updated: 2009/01/25 10:55:09 +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], @@ -2405,7 +2609,9 @@ no) #(vi PKG_CONFIG=none ;; yes) #(vi - AC_PATH_PROG(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 @@ -2673,7 +2879,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: 67 updated: 2011/07/02 15:36:04 dnl -------------- dnl -------------- dnl Attempt to determine the appropriate CC/LD options for creating a shared @@ -2748,10 +2954,14 @@ AC_DEFUN([CF_SHARED_OPTS], cf_cv_shlib_version_infix=no case $cf_cv_system_name in #(vi - aix[[56]]*) #(vi + aix4.[3-9]*|aix[[5-7]]*) #(vi if test "$GCC" = yes; then CC_SHARED_OPTS= - MK_SHARED_LIB='$(CC) -shared' + MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${libdir}:/usr/lib -o [$]@' + else + # CC_SHARED_OPTS='-qpic=large -G' + # perhaps "-bM:SRE -bnoentry -bexpall" + MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${libdir}:/usr/lib -o [$]@' fi ;; beos*) #(vi @@ -2804,6 +3014,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" @@ -2828,7 +3048,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" @@ -3039,7 +3259,7 @@ AC_MSG_RESULT([$]$2) ]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_TERM_HEADER version: 1 updated: 2005/12/31 13:26:39 +dnl CF_TERM_HEADER version: 2 updated: 2010/10/23 15:54:49 dnl -------------- dnl Look for term.h, which is part of X/Open curses. It defines the interface dnl to terminfo database. Usually it is in the same include-path as curses.h, @@ -3058,7 +3278,7 @@ esac for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h" do AC_TRY_COMPILE([#include -#include <${cf_cv_ncurses_header-curses.h}> +#include <${cf_cv_ncurses_header:-curses.h}> #include <$cf_test> ],[int x = auto_left_margin],[ cf_cv_term_header="$cf_test"],[ @@ -3233,19 +3453,31 @@ AC_SUBST(ADA_SHAREDLIB) AC_SUBST(MAKE_ADA_SHAREDLIB) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_CURSES_DIR version: 2 updated: 2002/11/10 14:46:59 +dnl CF_WITH_CURSES_DIR version: 3 updated: 2010/11/20 17:02:38 dnl ------------------ dnl Wrapper for AC_ARG_WITH to specify directory under which to look for curses dnl libraries. AC_DEFUN([CF_WITH_CURSES_DIR],[ + +AC_MSG_CHECKING(for specific curses-directory) AC_ARG_WITH(curses-dir, [ --with-curses-dir=DIR directory in which (n)curses is installed], - [CF_PATH_SYNTAX(withval) - cf_cv_curses_dir=$withval], + [cf_cv_curses_dir=$withval], [cf_cv_curses_dir=no]) +AC_MSG_RESULT($cf_cv_curses_dir) + +if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" ) +then + CF_PATH_SYNTAX(withval) + if test -d "$cf_cv_curses_dir" + then + CF_ADD_INCDIR($cf_cv_curses_dir/include) + CF_ADD_LIBDIR($cf_cv_curses_dir/lib) + fi +fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_PATH version: 9 updated: 2010/05/26 05:38:42 +dnl CF_WITH_PATH version: 10 updated: 2010/10/23 15:44:18 dnl ------------ dnl Wrapper for AC_ARG_WITH to ensure that user supplies a pathname, not just dnl defaulting to yes/no. @@ -3258,7 +3490,7 @@ dnl $5 = default value, if it's an expression & cannot be in the help-message dnl AC_DEFUN([CF_WITH_PATH], [AC_ARG_WITH($1,[$2 ](default: ifelse([$4],,empty,[$4])),, -ifelse([$4],,[withval="${$3}"],[withval="${$3-ifelse([$5],,[$4],[$5])}"]))dnl +ifelse([$4],,[withval="${$3}"],[withval="${$3:-ifelse([$5],,[$4],[$5])}"]))dnl if ifelse([$5],,true,[test -n "$5"]) ; then CF_PATH_SYNTAX(withval) fi @@ -3303,7 +3535,7 @@ if test "$with_pthread" != no ; then fi ]) dnl --------------------------------------------------------------------------- -dnl CF_XOPEN_SOURCE version: 34 updated: 2010/05/26 05:38:42 +dnl CF_XOPEN_SOURCE version: 36 updated: 2011/07/02 15:36:04 dnl --------------- dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions, dnl or adapt to the vendor's definitions to get equivalent functionality, @@ -3319,9 +3551,12 @@ cf_POSIX_C_SOURCE=ifelse([$2],,199506L,[$2]) cf_xopen_source= case $host_os in #(vi -aix[[456]]*) #(vi +aix[[4-7]]*) #(vi cf_xopen_source="-D_ALL_SOURCE" ;; +cygwin) #(vi + cf_XOPEN_SOURCE=600 + ;; darwin[[0-8]].*) #(vi cf_xopen_source="-D_APPLE_C_SOURCE" ;;