]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - aclocal.m4
ncurses 5.7 - patch 20101113
[ncurses.git] / aclocal.m4
index d73d5eaa34dfd5f4fd036dd803bbfd13e5b2dcba..0eff80b9a4ee974cac7c6cfa24c104dcb0a1c92b 100644 (file)
@@ -28,7 +28,7 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey 1995-on
 dnl
-dnl $Id: aclocal.m4,v 1.544 2010/09/04 23:25:24 tom Exp $
+dnl $Id: aclocal.m4,v 1.547 2010/11/13 19:17:50 tom Exp $
 dnl Macros used in NCURSES auto-configuration script.
 dnl
 dnl These macros are maintained separately from NCURSES.  The copyright on
@@ -313,13 +313,13 @@ 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: 10 updated: 2010/10/23 15:52:32
 dnl ----------------
 dnl This is adapted from the macros 'fp_PROG_CC_STDC' and 'fp_C_PROTOTYPES'
 dnl 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,[
+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"
@@ -1536,7 +1536,7 @@ esac
 
 ])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
@@ -1563,7 +1563,7 @@ if test "$GCC" = yes
 then
        AC_CHECKING([for $CC __attribute__ directives])
 cat > conftest.$ac_ext <<EOF
-#line __oline__ "${as_me-configure}"
+#line __oline__ "${as_me:-configure}"
 #include "confdefs.h"
 #include "conftest.h"
 #include "conftest.i"
@@ -1660,7 +1660,7 @@ if test "$GCC" = yes ; then
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_GCC_WARNINGS version: 26 updated: 2010/08/14 18:25:37
+dnl CF_GCC_WARNINGS version: 27 updated: 2010/10/23 15:52:32
 dnl ---------------
 dnl Check if the compiler supports useful warning options.  There's a few that
 dnl we don't use, simply because they're too noisy:
@@ -1685,7 +1685,7 @@ AC_REQUIRE([CF_GCC_VERSION])
 CF_INTEL_COMPILER(GCC,INTEL_COMPILER,CFLAGS)
 
 cat > conftest.$ac_ext <<EOF
-#line __oline__ "${as_me-configure}"
+#line __oline__ "${as_me:-configure}"
 int main(int argc, char *argv[[]]) { return (argv[[argc-1]] == 0) ; }
 EOF
 
@@ -1769,6 +1769,34 @@ rm -rf conftest*
 AC_SUBST(EXTRA_CFLAGS)
 ])dnl
 dnl ---------------------------------------------------------------------------
+dnl CF_GNAT_GENERICS version: 1 updated: 2010/11/13 14:15:18
+dnl ----------------
+AC_DEFUN([CF_GNAT_GENERICS],
+[
+AC_MSG_CHECKING(if GNAT supports generics)
+case $cf_gnat_version in #(vi
+3.[[1-9]]*|[[4-9]].*) #(vi
+       cf_gnat_generics=yes
+       ;;
+*)
+       cf_gnat_generics=no
+       ;;
+esac
+AC_MSG_RESULT($cf_gnat_generics)
+
+if test "$cf_gnat_generics" = yes
+then
+       cf_compile_generics=generics
+       cf_generic_objects="\${GENOBJS}"
+else
+       cf_compile_generics=
+       cf_generic_objects=
+fi
+
+AC_SUBST(cf_compile_generics)
+AC_SUBST(cf_generic_objects)
+])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.
@@ -1798,6 +1826,41 @@ fi
 AC_SUBST(PRAGMA_UNREF)
 ])dnl
 dnl ---------------------------------------------------------------------------
+dnl CF_GNAT_PROJECTS version: 1 updated: 2010/11/13 14:15:18
+dnl ----------------
+AC_DEFUN([CF_GNAT_PROJECTS],
+[
+AC_MSG_CHECKING(if GNAT supports project files)
+case $cf_gnat_version in #(vi
+3.[[0-9]]*) #(vi
+       cf_gnat_projects=no
+       ;;
+*)
+       case $cf_cv_system_name in #(vi
+       cygwin*) #(vi
+               cf_gnat_projects=no
+               ;;
+       *)
+               cf_gnat_projects=yes
+               ;;
+       esac
+       ;;
+esac
+AC_MSG_RESULT($cf_gnat_projects)
+
+if test "$cf_gnat_projects" = yes
+then
+       USE_OLD_MAKERULES="#"
+       USE_GNAT_PROJECTS=""
+else
+       USE_OLD_MAKERULES=""
+       USE_GNAT_PROJECTS="#"
+fi
+
+AC_SUBST(USE_OLD_MAKERULES)
+AC_SUBST(USE_GNAT_PROJECTS)
+])dnl
+dnl ---------------------------------------------------------------------------
 dnl CF_GNAT_TRY_LINK version: 2 updated: 2010/08/14 18:25:37
 dnl ----------------
 dnl Verify that a test program compiles/links with GNAT.
@@ -1856,51 +1919,29 @@ fi
 rm -rf conftest*
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_GNAT_VERSION version: 14 updated: 2010/07/03 17:45:09
+dnl CF_GNAT_VERSION version: 16 updated: 2010/11/13 14:15:18
 dnl ---------------
 dnl Verify version of GNAT.
 AC_DEFUN([CF_GNAT_VERSION],
 [
 AC_MSG_CHECKING(for gnat version)
-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/ .*//'`
+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)
+CF_GNAT_GENERICS
+CF_GNAT_PROJECTS
 ])
 dnl ---------------------------------------------------------------------------
 dnl CF_GNU_SOURCE version: 6 updated: 2005/07/09 13:23:07
@@ -1977,7 +2018,7 @@ if test "$GXX" = yes; then
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_GXX_VERSION version: 5 updated: 2005/08/27 09:53:42
+dnl CF_GXX_VERSION version: 6 updated: 2010/10/23 15:44:18
 dnl --------------
 dnl Check for version of g++
 AC_DEFUN([CF_GXX_VERSION],[
@@ -1985,7 +2026,7 @@ AC_REQUIRE([AC_PROG_CPP])
 GXX_VERSION=none
 if test "$GXX" = yes; then
        AC_MSG_CHECKING(version of g++)
-       GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`"
+       GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`"
        test -z "$GXX_VERSION" && GXX_VERSION=unknown
        AC_MSG_RESULT($GXX_VERSION)
 fi
@@ -2422,7 +2463,7 @@ ifdef([AC_FUNC_FSEEKO],[
 ])
 ])
 dnl ---------------------------------------------------------------------------
-dnl CF_LDFLAGS_STATIC version: 7 updated: 2009/04/04 18:31:04
+dnl CF_LDFLAGS_STATIC version: 8 updated: 2010/10/23 14:39:56
 dnl -----------------
 dnl Check for compiler/linker flags used to temporarily force usage of static
 dnl libraries.  This depends on the compiler and platform.  Use this to help
@@ -2468,6 +2509,48 @@ else
        esac
 fi
 
+if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
+then
+       AC_MSG_CHECKING(if linker supports switching between static/dynamic)
+
+       rm -f libconftest.a
+       cat >conftest.$ac_ext <<EOF
+#line __oline__ "configure"
+#include <stdio.h>
+int cf_ldflags_static(FILE *fp) { return fflush(fp); }
+EOF
+       if AC_TRY_EVAL(ac_compile) ; then
+               ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&AC_FD_CC 1>/dev/null
+               ( eval $RANLIB libconftest.a ) 2>&AC_FD_CC >/dev/null
+       fi
+       rm -f conftest.*
+
+       cf_save_LIBS="$LIBS"
+
+       LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
+       AC_TRY_LINK([
+#line __oline__ "configure"
+#include <stdio.h>
+int cf_ldflags_static(FILE *fp);
+],[
+       return cf_ldflags_static(stdin);
+],[cf_ldflags_static=yes],[cf_ldflags_static=no])
+
+       rm -f libconftest.*
+       LIBS="$cf_save_LIBS"
+
+       AC_MSG_RESULT($cf_ldflags_static)
+
+       if test $cf_ldflags_static != yes
+       then
+               LDFLAGS_STATIC=
+               LDFLAGS_SHARED=
+       fi
+else
+       LDFLAGS_STATIC=
+       LDFLAGS_SHARED=
+fi
+
 AC_SUBST(LDFLAGS_STATIC)
 AC_SUBST(LDFLAGS_SHARED)
 ])
@@ -2572,7 +2655,7 @@ ifelse($1,,,[$1=$LIB_PREFIX])
        AC_SUBST(LIB_PREFIX)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_LIB_RULES version: 59 updated: 2010/09/04 19:24:20
+dnl CF_LIB_RULES version: 61 updated: 2010/10/23 16:10:30
 dnl ------------
 dnl Append definitions and rules for the given models to the subdirectory
 dnl Makefiles, and the recursion rule for the top-level Makefile.  If the
@@ -2814,7 +2897,7 @@ do
                                TermlibSuffix=$TINFO_SUFFIX \
                                ShlibVer=$cf_cv_shlib_version \
                                ShlibVerInfix=$cf_cv_shlib_version_infix \
-                               ReLink=${cf_cv_do_relink-no} \
+                               ReLink=${cf_cv_do_relink:-no} \
                                DoLinks=$cf_cv_do_symlinks \
                                rmSoLocs=$cf_cv_rm_so_locs \
                                ldconfig="$LDCONFIG" \
@@ -2963,8 +3046,8 @@ done
 DST=\[$]1
 REF=\[$]2
 SRC=\[$]3
-TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
-TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
+TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
+TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
 echo installing \$SRC in \$DST
 CF_EOF
 
@@ -3303,7 +3386,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: 13 updated: 2010/10/23 15:52:32
 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.
@@ -3320,10 +3403,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 | 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=
                                ;;
@@ -3343,7 +3426,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.
@@ -3353,10 +3436,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
@@ -3380,7 +3463,7 @@ AC_SUBST(MAKE_UPPER_TAGS)
 AC_SUBST(MAKE_LOWER_TAGS)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_MANPAGE_FORMAT version: 8 updated: 2009/01/11 20:30:50
+dnl CF_MANPAGE_FORMAT version: 9 updated: 2010/10/23 16:10:30
 dnl -----------------
 dnl Option to allow user to override automatic configuration of manpage format.
 dnl There are several special cases:
@@ -3422,7 +3505,7 @@ unknown)
   cf_catonly=yes
   cf_example=date
 
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
+  IFS="${IFS:-         }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
   for cf_dir in $MANPATH; do
     test -z "$cf_dir" && cf_dir=/usr/man
     for cf_name in $cf_dir/man*/$cf_example.[[01]]* $cf_dir/cat*/$cf_example.[[01]]* $cf_dir/man*/$cf_example $cf_dir/cat*/$cf_example
@@ -3598,7 +3681,7 @@ AC_ARG_WITH(manpage-tbl,
 AC_MSG_RESULT($MANPAGE_TBL)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_MAN_PAGES version: 38 updated: 2010/07/24 17:12:40
+dnl CF_MAN_PAGES version: 39 updated: 2010/10/23 15:44:18
 dnl ------------
 dnl Try to determine if the man-pages on the system are compressed, and if
 dnl so, what format is used.  Use this information to construct a script that
@@ -3669,7 +3752,7 @@ INSTALL_DATA="$INSTALL_DATA"
 
 transform="$program_transform_name"
 
-TMP=\${TMPDIR-/tmp}/man\$\$
+TMP=\${TMPDIR:=/tmp}/man\$\$
 trap "rm -f \$TMP" 0 1 2 5 15
 
 form=\[$]1
@@ -4033,12 +4116,12 @@ 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_ABI_6 version: 1 updated: 2005/09/17 18:42:49
@@ -5954,7 +6037,7 @@ if test "$with_gpm" != no ; then
 fi
 ])
 dnl ---------------------------------------------------------------------------
-dnl CF_WITH_LIBTOOL version: 25 updated: 2010/05/15 15:45:59
+dnl CF_WITH_LIBTOOL version: 26 updated: 2010/10/23 15:55:24
 dnl ---------------
 dnl Provide a configure option to incorporate libtool.  Define several useful
 dnl symbols for the makefile rules.
@@ -5983,7 +6066,7 @@ dnl       rm -f $ORIG
 dnl    mv $LOCAL $ORIG
 dnl
 dnl    # sed the LIBTOOL= assignment to omit the current directory?
-dnl    sed -e 's/^LIBTOOL=.*/LIBTOOL=${LIBTOOL-libtool}/' $ACLOCAL/libtool.m4 >>$LOCAL
+dnl    sed -e 's/^LIBTOOL=.*/LIBTOOL=${LIBTOOL:-libtool}/' $ACLOCAL/libtool.m4 >>$LOCAL
 dnl    cat $ORIG >>$LOCAL
 dnl
 dnl    autoconf-257 $*
@@ -6095,7 +6178,7 @@ AC_SUBST(LIB_UNINSTALL)
 
 ])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.
@@ -6108,7 +6191,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
@@ -6116,7 +6199,7 @@ $3="$withval"
 AC_SUBST($3)dnl
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_WITH_PATHLIST version: 6 updated: 2009/01/11 20:30:23
+dnl CF_WITH_PATHLIST version: 7 updated: 2010/10/23 16:10:30
 dnl ----------------
 dnl Process an option specifying a list of colon-separated paths.
 dnl
@@ -6130,9 +6213,9 @@ dnl
 AC_DEFUN([CF_WITH_PATHLIST],[
 AC_REQUIRE([CF_PATHSEP])
 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
 
-IFS="${IFS   }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
+IFS="${IFS:-   }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
 cf_dst_path=
 for cf_src_path in $withval
 do