]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - aclocal.m4
ncurses 5.9 - patch 20120218
[ncurses.git] / aclocal.m4
index 982d5724a71ccfa251eb7a6699164027de98f15b..3ce9ffe5cf6520e233fbab2a59ef1bc09881f780 100644 (file)
@@ -1,5 +1,5 @@
 dnl***************************************************************************
-dnl Copyright (c) 1998-2010,2011 Free Software Foundation, Inc.              *
+dnl Copyright (c) 1998-2011,2012 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 1995-on
 dnl
-dnl $Id: aclocal.m4,v 1.589 2011/12/03 21:59:31 tom Exp $
+dnl $Id: aclocal.m4,v 1.605 2012/02/18 23:06:14 tom Exp $
 dnl Macros used in NCURSES auto-configuration script.
 dnl
 dnl These macros are maintained separately from NCURSES.  The copyright on
@@ -1259,7 +1259,7 @@ if test "$cf_disable_rpath_hack" = no ; then
 fi
 ])
 dnl ---------------------------------------------------------------------------
-dnl CF_ENABLE_PC_FILES version: 6 updated: 2011/09/10 16:31:04
+dnl CF_ENABLE_PC_FILES version: 7 updated: 2011/12/10 18:58:47
 dnl ------------------
 dnl This is the "--enable-pc-files" option, which is available if there is a
 dnl pkg-config configuration on the local machine.
@@ -1267,7 +1267,7 @@ AC_DEFUN([CF_ENABLE_PC_FILES],[
 AC_REQUIRE([CF_PKG_CONFIG])
 AC_REQUIRE([CF_WITH_PKG_CONFIG_LIBDIR])
 
-if test "$PKG_CONFIG" != no ; then
+if test "$PKG_CONFIG" != none ; then
        if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
                AC_MSG_CHECKING(if we should install .pc files for $PKG_CONFIG)
                AC_ARG_ENABLE(pc-files,
@@ -1306,7 +1306,7 @@ AC_DEFUN([CF_ERRNO],
 CF_CHECK_ERRNO(errno)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_ETIP_DEFINES version: 4 updated: 2011/12/03 16:54:03
+dnl CF_ETIP_DEFINES version: 5 updated: 2012/02/18 17:51:07
 dnl ---------------
 dnl Test for conflicting definitions of exception in gcc 2.8.0, etc., between
 dnl math.h and builtin.h, only for ncurses
@@ -1334,7 +1334,7 @@ AC_TRY_COMPILE([
        test -n "$cf_math" && AC_DEFINE_UNQUOTED(ETIP_NEEDS_${cf_math})
        test -n "$cf_excp" && AC_DEFINE_UNQUOTED(ETIP_NEEDS_${cf_excp})
        cf_result="$cf_math $cf_excp"
-       break
+       break 2
 ],[])
 done
 done
@@ -1600,7 +1600,7 @@ AC_CACHE_CHECK(for openpty header,cf_cv_func_openpty,[
 ])
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_FUNC_POLL version: 4 updated: 2006/12/16 12:33:30
+dnl CF_FUNC_POLL version: 5 updated: 2012/01/25 17:55:38
 dnl ------------
 dnl See if the poll function really works.  Some platforms have poll(), but
 dnl it does not work for terminals or files.
@@ -1617,10 +1617,29 @@ int main() {
        struct pollfd myfds;
        int ret;
 
-       myfds.fd = 0;
+       /* check for Darwin bug with respect to "devices" */
+       myfds.fd = open("/dev/null", 1);
+       if (myfds.fd < 0)
+               myfds.fd = 0;
        myfds.events = POLLIN;
+       myfds.revents = 0;
 
        ret = poll(&myfds, 1, 100);
+
+       if (ret < 0 || (myfds.revents & POLLNVAL)) {
+               ret = -1;
+       } else {
+
+               /* also check with standard input */
+               myfds.fd = 0;
+               myfds.events = POLLIN;
+               myfds.revents = 0;
+
+               ret = poll(&myfds, 1, 100);
+               if (ret < 0) {
+                       ret = 0;
+               }
+       }
        ${cf_cv_main_return:-return}(ret != 0);
 }],
        [cf_cv_working_poll=yes],
@@ -2230,7 +2249,7 @@ fi
 rm -rf conftest* *~conftest*
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_GNAT_VERSION version: 17 updated: 2011/03/23 20:24:41
+dnl CF_GNAT_VERSION version: 18 updated: 2012/01/21 19:28:10
 dnl ---------------
 dnl Verify version of GNAT.
 AC_DEFUN([CF_GNAT_VERSION],
@@ -2242,7 +2261,7 @@ cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
 AC_MSG_RESULT($cf_gnat_version)
 
 case $cf_gnat_version in #(vi
-3.1[[1-9]]*|3.[[2-9]]*|[[4-9]].*) #(vi
+3.1[[1-9]]*|3.[[2-9]]*|[[4-9]].*|20[[0-9]][[0-9]]) #(vi
        cf_cv_prog_gnat_correct=yes
        ;;
 *)
@@ -2956,11 +2975,11 @@ CF_SUBDIR_PATH($1,$2,lib)
 $1="$cf_library_path_list [$]$1"
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_LIB_PREFIX version: 8 updated: 2008/09/13 11:34:16
+dnl CF_LIB_PREFIX version: 9 updated: 2012/01/21 19:28:10
 dnl -------------
 dnl Compute the library-prefix for the given host system
 dnl $1 = variable to set
-AC_DEFUN([CF_LIB_PREFIX],
+define([CF_LIB_PREFIX],
 [
        case $cf_cv_system_name in #(vi
        OS/2*|os2*) #(vi
@@ -2973,7 +2992,7 @@ ifelse($1,,,[$1=$LIB_PREFIX])
        AC_SUBST(LIB_PREFIX)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_LIB_RULES version: 61 updated: 2010/10/23 16:10:30
+dnl CF_LIB_RULES version: 63 updated: 2012/01/21 19:28:10
 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
@@ -2988,7 +3007,7 @@ dnl       lib<name>.so.<major>    ->
 dnl    lib<name>.so.<maj>.<minor>
 AC_DEFUN([CF_LIB_RULES],
 [
-CF_LIB_PREFIX(cf_prefix)
+cf_prefix=$LIB_PREFIX
 AC_REQUIRE([CF_SUBST_NCURSES_VERSION])
 
 if test $cf_cv_shlib_version = cygdll ; then
@@ -3210,6 +3229,7 @@ do
                                prefix=$cf_prefix \
                                suffix=$cf_suffix \
                                subset=$cf_subset \
+                               driver=$cf_cv_term_driver \
                                SymLink="$LN_S" \
                                TermlibRoot=$TINFO_NAME \
                                TermlibSuffix=$TINFO_SUFFIX \
@@ -4393,7 +4413,7 @@ fi
 test "$cf_cv_mixedcase" = yes && AC_DEFINE(MIXEDCASE_FILENAMES)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_MKSTEMP version: 7 updated: 2010/08/14 18:25:37
+dnl CF_MKSTEMP version: 8 updated: 2012/02/13 20:34:56
 dnl ----------
 dnl Check for a working mkstemp.  This creates two files, checks that they are
 dnl successfully created and distinct (AmigaOS apparently fails on the last).
@@ -4435,9 +4455,11 @@ int main()
 }
 ],[cf_cv_func_mkstemp=yes
 ],[cf_cv_func_mkstemp=no
-],[AC_CHECK_FUNC(mkstemp)
-])
+],[cf_cv_func_mkstemp=maybe])
 ])
+if test "x$cf_cv_func_mkstemp" = xmaybe ; then
+       AC_CHECK_FUNC(mkstemp)
+fi
 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
        AC_DEFINE(HAVE_MKSTEMP)
 fi
@@ -4971,7 +4993,7 @@ AC_MSG_RESULT($cf_prog_ln_sf)
 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_REGEX version: 8 updated: 2010/08/07 14:09:44
+dnl CF_REGEX version: 9 updated: 2012/01/07 15:08:24
 dnl --------
 dnl Attempt to determine if we've got one of the flavors of regular-expression
 dnl code that we can support.
@@ -4983,7 +5005,7 @@ cf_regex_func=no
 cf_regex_libs="regex re"
 case $host_os in #(vi
 mingw*)
-       cf_regex_libs="regex.dll $cf_regex_libs"
+       cf_regex_libs="gnurx $cf_regex_libs"
        ;;
 esac
 
@@ -5701,7 +5723,7 @@ if test "$cf_cv_sizechange" != no ; then
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_SRC_MODULES version: 23 updated: 2011/11/26 16:35:15
+dnl CF_SRC_MODULES version: 26 updated: 2012/01/07 15:08:24
 dnl --------------
 dnl For each parameter, test if the source-directory exists, and if it contains
 dnl a 'modules' file.  If so, add to the list $cf_cv_src_modules which we'll
@@ -5724,7 +5746,7 @@ else
        TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
 fi
 
-PC_MODULES_TO_MAKE="ncurses"
+PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
 cf_cv_src_modules=
 for cf_dir in $1
 do
@@ -5763,7 +5785,7 @@ do
                                TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
                                TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
                        fi
-                       PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}"
+                       PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
                fi
        fi
 done
@@ -5792,10 +5814,13 @@ if test "x$cf_with_tests" != "xno" ; then
 fi
 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
 if test "$cf_with_cxx_binding" != no; then
-       PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++"
+       PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
        SRC_SUBDIRS="$SRC_SUBDIRS c++"
 fi
 
+test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
+test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
+
 AC_SUBST(PC_MODULES_TO_MAKE)
 
 ADA_SUBDIRS=
@@ -6596,6 +6621,32 @@ AC_SUBST(LIB_LINK)
 AC_SUBST(LIB_INSTALL)
 AC_SUBST(LIB_UNINSTALL)
 
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_LIB_PREFIX version: 1 updated: 2012/01/21 19:28:10
+dnl ------------------
+dnl Allow the library-prefix to be overridden.  OS/2 EMX originally had no
+dnl "lib" prefix, e.g., because it used the dll naming convention.
+dnl
+dnl $1 = variable to set
+AC_DEFUN([CF_WITH_LIB_PREFIX],
+[
+AC_MSG_CHECKING(if you want to have a library-prefix)
+AC_ARG_WITH(lib-prefix,
+       [  --with-lib-prefix       override library-prefix],
+       [with_lib_prefix=$withval],
+       [with_lib_prefix=auto])
+AC_MSG_RESULT($with_lib_prefix)
+
+if test $with_lib_prefix = auto
+then
+       CF_LIB_PREFIX($1)
+elif test $with_lib_prefix = no
+then
+       LIB_PREFIX=
+else
+       LIB_PREFIX=$with_lib_prefix
+fi
 ])dnl
 dnl ---------------------------------------------------------------------------
 dnl CF_WITH_PATH version: 10 updated: 2010/10/23 15:44:18
@@ -6661,11 +6712,11 @@ AC_SUBST($3)dnl
 
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_WITH_PKG_CONFIG_LIBDIR version: 1 updated: 2011/09/10 16:20:21
+dnl CF_WITH_PKG_CONFIG_LIBDIR version: 2 updated: 2011/12/10 18:58:47
 dnl -------------------------
 dnl Allow the choice of the pkg-config library directory to be overridden.
 AC_DEFUN([CF_WITH_PKG_CONFIG_LIBDIR],[
-if test "$PKG_CONFIG" != no ; then
+if test "$PKG_CONFIG" != none ; then
        AC_MSG_CHECKING(for $PKG_CONFIG library directory)
        AC_ARG_WITH(pkg-config-libdir,
                [  --with-pkg-config-libdir=XXX use given directory for installing pc-files],
@@ -6704,7 +6755,7 @@ fi
 AC_SUBST(PKG_CONFIG_LIBDIR)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_WITH_PTHREAD version: 4 updated: 2011/11/12 21:08:44
+dnl CF_WITH_PTHREAD version: 5 updated: 2011/12/10 19:01:56
 dnl ---------------
 dnl Check for POSIX thread library.
 AC_DEFUN([CF_WITH_PTHREAD],
@@ -6728,7 +6779,8 @@ if test "$with_pthread" != no ; then
            AC_TRY_LINK([
 #include <pthread.h>
 ],[
-           int rc = pthread_create(0,0,0,0);
+               int rc = pthread_create(0,0,0,0);
+               int r2 = pthread_mutexattr_settype(0, 0);
 ],[with_pthread=yes],[with_pthread=no])
            LIBS="$cf_save_LIBS"
            AC_MSG_RESULT($with_pthread)
@@ -6808,7 +6860,7 @@ CF_NO_LEAKS_OPTION(valgrind,
        [USE_VALGRIND])
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_XOPEN_SOURCE version: 40 updated: 2011/11/12 21:08:44
+dnl CF_XOPEN_SOURCE version: 42 updated: 2012/01/07 08:26:49
 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,
@@ -6835,6 +6887,7 @@ darwin[[0-8]].*) #(vi
        ;;
 darwin*) #(vi
        cf_xopen_source="-D_DARWIN_C_SOURCE"
+       cf_XOPEN_SOURCE=
        ;;
 freebsd*|dragonfly*) #(vi
        # 5.x headers associate
@@ -6852,6 +6905,7 @@ hpux*) #(vi
        ;;
 irix[[56]].*) #(vi
        cf_xopen_source="-D_SGI_SOURCE"
+       cf_XOPEN_SOURCE=
        ;;
 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
        CF_GNU_SOURCE
@@ -6866,6 +6920,7 @@ netbsd*) #(vi
        ;;
 openbsd[[4-9]]*) #(vi
        # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
+       cf_xopen_source="-D_BSD_SOURCE"
        cf_XOPEN_SOURCE=600
        ;;
 openbsd*) #(vi