]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/aclocal.m4
ncurses 5.9 - patch 20120608
[ncurses.git] / test / aclocal.m4
index 74f354d41a302354998d6fee8bba3689e2b82b96..0b3a3ac1fbd108220decd5c6379d52d38afe12fc 100644 (file)
@@ -1,5 +1,5 @@
 dnl***************************************************************************
-dnl Copyright (c) 2003-2010,2011 Free Software Foundation, Inc.              *
+dnl Copyright (c) 2003-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            *
@@ -26,7 +26,7 @@ dnl sale, use or other dealings in this Software without prior written       *
 dnl authorization.                                                           *
 dnl***************************************************************************
 dnl
-dnl $Id: aclocal.m4,v 1.71 2011/11/13 02:11:59 tom Exp $
+dnl $Id: aclocal.m4,v 1.75 2012/04/01 00:14:58 tom Exp $
 dnl
 dnl Author: Thomas E. Dickey
 dnl
@@ -1414,7 +1414,7 @@ if test "$GCC" = yes ; then
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_GCC_WARNINGS version: 27 updated: 2010/10/23 15:52:32
+dnl CF_GCC_WARNINGS version: 28 updated: 2012/03/31 20:10:46
 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:
@@ -1512,6 +1512,13 @@ then
                                        continue;;
                                esac
                                ;;
+                       Wpointer-arith) #(vi
+                               case $GCC_VERSION in
+                               [[12]].*)
+                                       CF_VERBOSE(feature is broken in gcc $GCC_VERSION)
+                                       continue;;
+                               esac
+                               ;;
                        esac
                        EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
                fi
@@ -1913,7 +1920,7 @@ printf("old\n");
        ,[$1=no])
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_NCURSES_CONFIG version: 8 updated: 2010/07/08 05:17:30
+dnl CF_NCURSES_CONFIG version: 9 updated: 2011/11/26 15:42:05
 dnl -----------------
 dnl Tie together the configure-script macros for ncurses.
 dnl Prefer the "-config" script from ncurses 6.x, to simplify analysis.
@@ -1925,7 +1932,10 @@ AC_DEFUN([CF_NCURSES_CONFIG],
 cf_ncuconfig_root=ifelse($1,,ncurses,$1)
 
 echo "Looking for ${cf_ncuconfig_root}-config"
-AC_PATH_PROGS(NCURSES_CONFIG,${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config,none)
+
+CF_ACVERSION_CHECK(2.52,
+       [AC_CHECK_TOOLS(NCURSES_CONFIG, ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config, none)],
+       [AC_PATH_PROGS(NCURSES_CONFIG, ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config, none)])
 
 if test "$NCURSES_CONFIG" != none ; then
 
@@ -2356,13 +2366,15 @@ case ".[$]$1" in #(vi
 esac
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_PDCURSES_X11 version: 11 updated: 2011/01/15 18:45:38
+dnl CF_PDCURSES_X11 version: 12 updated: 2011/11/26 15:42:05
 dnl ---------------
 dnl Configure for PDCurses' X11 library
 AC_DEFUN([CF_PDCURSES_X11],[
 AC_REQUIRE([CF_X_ATHENA])
 
-AC_PATH_PROGS(XCURSES_CONFIG,xcurses-config,none)
+CF_ACVERSION_CHECK(2.52,
+       [AC_CHECK_TOOLS(XCURSES_CONFIG, xcurses-config, none)],
+       [AC_PATH_PROGS(XCURSES_CONFIG, xcurses-config, none)])
 
 if test "$XCURSES_CONFIG" != none ; then
 
@@ -3097,6 +3109,60 @@ if test "$with_dmalloc" = yes ; then
        AC_CHECK_HEADER(dmalloc.h,
                [AC_CHECK_LIB(dmalloc,[dmalloc_debug]ifelse([$1],,[],[,$1]))])
 fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_NCURSES_ETC version: 2 updated: 2012/01/13 10:49:00
+dnl -------------------
+dnl Use this macro for programs which use any variant of "curses", e.g.,
+dnl "ncurses", and "PDCurses".  Programs that can use curses and some unrelated
+dnl library (such as slang) should use a "--with-screen=XXX" option.
+dnl
+dnl This does not use AC_DEFUN, because that would tell autoconf to run each
+dnl of the macros inside this one - before this macro.
+define([CF_WITH_NCURSES_ETC],[
+CF_WITH_CURSES_DIR
+
+cf_cv_screen=curses
+
+AC_MSG_CHECKING(for specified curses library type)
+AC_ARG_WITH(ncursesw,
+       [  --with-ncursesw         use wide ncurses-libraries],
+       [cf_cv_screen=ncursesw],[
+
+AC_ARG_WITH(ncurses,
+       [  --with-ncurses          use ncurses-libraries],
+       [cf_cv_screen=ncurses],[
+
+AC_ARG_WITH(pdcurses,
+       [  --with-pdcurses         compile/link with pdcurses X11 library],
+       [cf_cv_screen=pdcurses],[
+
+AC_ARG_WITH(curses-colr,
+       [  --with-curses-colr      compile/link with HPUX 10.x color-curses],
+       [cf_cv_screen=curses_colr],[
+
+AC_ARG_WITH(curses-5lib,
+       [  --with-curses-5lib      compile/link with SunOS 5lib curses],
+       [cf_cv_screen=curses_5lib])])])])])
+
+AC_MSG_RESULT($cf_cv_screen)
+
+case $cf_cv_screen in #(vi
+curses|curses_*) #(vi
+       CF_CURSES_CONFIG
+       ;;
+ncurses) #(vi
+       CF_NCURSES_CONFIG
+       ;;
+ncursesw) #(vi
+       CF_UTF8_LIB
+       CF_NCURSES_CONFIG(ncursesw)
+       ;;
+pdcurses)
+       CF_PDCURSES_X11
+       ;;
+esac
+
 ])dnl
 dnl ---------------------------------------------------------------------------
 dnl CF_WITH_VALGRIND version: 1 updated: 2006/12/14 18:00:21
@@ -3146,7 +3212,7 @@ AC_TRY_LINK([
 test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
 ])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,
@@ -3173,6 +3239,7 @@ darwin[[0-8]].*) #(vi
        ;;
 darwin*) #(vi
        cf_xopen_source="-D_DARWIN_C_SOURCE"
+       cf_XOPEN_SOURCE=
        ;;
 freebsd*|dragonfly*) #(vi
        # 5.x headers associate
@@ -3190,6 +3257,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
@@ -3204,6 +3272,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