]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/aclocal.m4
ncurses 5.9 - patch 20110514
[ncurses.git] / test / aclocal.m4
index 82f19c2bf84867a5ae5e6f5317723224445e4191..a2458869f2a6e8c0202926a6cb3615a94e03bc10 100644 (file)
@@ -26,7 +26,7 @@ dnl sale, use or other dealings in this Software without prior written       *
 dnl authorization.                                                           *
 dnl***************************************************************************
 dnl
 dnl authorization.                                                           *
 dnl***************************************************************************
 dnl
-dnl $Id: aclocal.m4,v 1.60 2011/05/07 15:34:44 tom Exp $
+dnl $Id: aclocal.m4,v 1.62 2011/05/14 20:46:00 tom Exp $
 dnl
 dnl Author: Thomas E. Dickey
 dnl
 dnl
 dnl Author: Thomas E. Dickey
 dnl
@@ -40,6 +40,31 @@ dnl See http://invisible-island.net/autoconf/ for additional information.
 dnl
 dnl ---------------------------------------------------------------------------
 dnl ---------------------------------------------------------------------------
 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_ADD_CFLAGS version: 10 updated: 2010/05/26 05:38:42
 dnl -------------
 dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS
 dnl CF_ADD_CFLAGS version: 10 updated: 2010/05/26 05:38:42
 dnl -------------
 dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS
@@ -564,7 +589,7 @@ CF_CURSES_HEADER
 CF_TERM_HEADER
 ])dnl
 dnl ---------------------------------------------------------------------------
 CF_TERM_HEADER
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_CURSES_FUNCS version: 16 updated: 2011/04/09 18:19:55
+dnl CF_CURSES_FUNCS version: 17 updated: 2011/05/14 16:07:29
 dnl ---------------
 dnl Curses-functions are a little complicated, since a lot of them are macros.
 AC_DEFUN([CF_CURSES_FUNCS],
 dnl ---------------
 dnl Curses-functions are a little complicated, since a lot of them are macros.
 AC_DEFUN([CF_CURSES_FUNCS],
@@ -585,7 +610,8 @@ do
                        [
 #ifndef ${cf_func}
 long foo = (long)(&${cf_func});
                        [
 #ifndef ${cf_func}
 long foo = (long)(&${cf_func});
-${cf_cv_main_return:-return}(foo == 0);
+if (foo + 1234 > 5678)
+       ${cf_cv_main_return:-return}(foo);
 #endif
                        ],
                        [cf_result=yes],
 #endif
                        ],
                        [cf_result=yes],
@@ -2279,7 +2305,7 @@ else
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
 fi
 ])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],
 dnl -------------
 dnl Check for the package-config program, unless disabled by command-line.
 AC_DEFUN([CF_PKG_CONFIG],
@@ -2296,7 +2322,9 @@ no) #(vi
        PKG_CONFIG=none
        ;;
 yes) #(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
        ;;
 *)
        PKG_CONFIG=$withval