X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Faclocal.m4;h=d4f72400729338faa0abbc250d605de58a18a1bd;hp=2d404f30874e4453efa17a749e63cffcfdfd9356;hb=b11cef1e315b58820ea0cde239ebf2f741ef8948;hpb=be512fa073c00c2d52567c973d16b121414870da diff --git a/test/aclocal.m4 b/test/aclocal.m4 index 2d404f30..d4f72400 100644 --- a/test/aclocal.m4 +++ b/test/aclocal.m4 @@ -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.113 2015/05/01 00:39:44 tom Exp $ +dnl $Id: aclocal.m4,v 1.122 2015/10/17 23:06:10 tom Exp $ dnl dnl Author: Thomas E. Dickey dnl @@ -154,7 +154,7 @@ AC_SUBST(EXTRA_CPPFLAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_ADD_INCDIR version: 13 updated: 2010/05/26 16:44:57 +dnl CF_ADD_INCDIR version: 14 updated: 2015/05/25 20:53:04 dnl ------------- dnl Add an include-directory to $CPPFLAGS. Don't add /usr/include, since it's dnl redundant. We don't normally need to add -I/usr/local/include for gcc, @@ -205,6 +205,8 @@ if test -n "$1" ; then else break fi + else + break fi done done @@ -328,7 +330,7 @@ dnl Allow user to enable a normally-off option. AC_DEFUN([CF_ARG_ENABLE], [CF_ARG_OPTION($1,[$2],[$3],[$4],no)])dnl dnl --------------------------------------------------------------------------- -dnl CF_ARG_OPTION version: 4 updated: 2010/05/26 05:38:42 +dnl CF_ARG_OPTION version: 5 updated: 2015/05/10 19:52:14 dnl ------------- dnl Restricted form of AC_ARG_ENABLE that ensures user doesn't give bogus dnl values. @@ -341,15 +343,15 @@ dnl $4 = action if perform if option is default dnl $5 = default option value (either 'yes' or 'no') AC_DEFUN([CF_ARG_OPTION], [AC_ARG_ENABLE([$1],[$2],[test "$enableval" != ifelse([$5],no,yes,no) && enableval=ifelse([$5],no,no,yes) - if test "$enableval" != "$5" ; then + if test "$enableval" != "$5" ; then ifelse([$3],,[ :]dnl ,[ $3]) ifelse([$4],,,[ - else - $4]) - fi],[enableval=$5 ifelse([$4],,,[ - $4 + else + $4]) + fi],[enableval=$5 ifelse([$4],,,[ + $4 ])dnl - ])])dnl +])])dnl dnl --------------------------------------------------------------------------- dnl CF_CC_ENV_FLAGS version: 2 updated: 2015/04/12 15:39:00 dnl --------------- @@ -679,7 +681,7 @@ fi AC_CHECK_HEADERS($cf_cv_ncurses_header) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_LIBS version: 38 updated: 2015/04/15 19:08:48 +dnl CF_CURSES_LIBS version: 39 updated: 2015/05/10 19:52:14 dnl -------------- dnl Look for the curses libraries. Older curses implementations may require dnl termcap/termlib to be linked as well. Call CF_CURSES_CPPFLAGS first. @@ -688,16 +690,16 @@ AC_DEFUN([CF_CURSES_LIBS],[ AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl AC_MSG_CHECKING(if we have identified curses libraries) AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], - [initscr(); tgoto("?", 0,0)], - cf_result=yes, - cf_result=no) + [initscr(); tgoto("?", 0,0)], + cf_result=yes, + cf_result=no) AC_MSG_RESULT($cf_result) if test "$cf_result" = no ; then case $host_os in (freebsd*) - AC_CHECK_LIB(mytinfo,tgoto,[CF_ADD_LIBS(-lmytinfo)]) - ;; + AC_CHECK_LIB(mytinfo,tgoto,[CF_ADD_LIBS(-lmytinfo)]) + ;; (hpux10.*) # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr # next (1998), and xcurses "newer" (2000). There is no header file for @@ -739,9 +741,9 @@ case $host_os in CF_ADD_LIBDIR(/usr/5lib) CF_ADD_LIBS(-lcurses -ltermcap) fi - fi - ac_cv_func_initscr=yes - ;; + fi + ac_cv_func_initscr=yes + ;; esac if test ".$ac_cv_func_initscr" != .yes ; then @@ -1295,6 +1297,34 @@ rm -f core]) test "$cf_cv_func_curses_version" = yes && AC_DEFINE(HAVE_CURSES_VERSION,1,[Define to 1 if we have curses_version function]) ]) dnl --------------------------------------------------------------------------- +dnl CF_FUNC_OPENPTY version: 5 updated: 2015/09/12 14:46:50 +dnl --------------- +dnl Check for openpty() function, along with header. It may need the +dnl "util" library as well. +AC_DEFUN([CF_FUNC_OPENPTY], +[ +AC_CHECK_LIB(util,openpty,cf_cv_lib_util=yes,cf_cv_lib_util=no) +AC_CACHE_CHECK(for openpty header,cf_cv_func_openpty,[ + cf_save_LIBS="$LIBS" + test $cf_cv_lib_util = yes && { CF_ADD_LIB(util) } + for cf_header in pty.h libutil.h util.h + do + AC_TRY_LINK([ +#include <$cf_header> +],[ + int x = openpty((int *)0, (int *)0, (char *)0, + (struct termios *)0, (struct winsize *)0); +],[ + cf_cv_func_openpty=$cf_header + break +],[ + cf_cv_func_openpty=no +]) + done + LIBS="$cf_save_LIBS" +]) +])dnl +dnl --------------------------------------------------------------------------- dnl CF_GCC_ATTRIBUTES version: 17 updated: 2015/04/12 15:39:00 dnl ----------------- dnl Test for availability of useful gcc __attribute__ directives to quiet @@ -1910,7 +1940,7 @@ printf("old\n"); ,[$1=no]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_NCURSES_CONFIG version: 13 updated: 2015/04/26 18:06:58 +dnl CF_NCURSES_CONFIG version: 17 updated: 2015/07/07 04:22:07 dnl ----------------- dnl Tie together the configure-script macros for ncurses, preferring these in dnl order: @@ -1924,7 +1954,7 @@ AC_REQUIRE([CF_PKG_CONFIG]) cf_ncuconfig_root=ifelse($1,,ncurses,$1) cf_have_ncuconfig=no -if test "x$PKG_CONFIG" != xnone; then +if test "x${PKG_CONFIG:=none}" != xnone; then AC_MSG_CHECKING(pkg-config for $cf_ncuconfig_root) if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then AC_MSG_RESULT(yes) @@ -1944,10 +1974,11 @@ if test "x$PKG_CONFIG" != xnone; then int main(void) { char *xx = curses_version(); return (xx == 0); }], [cf_have_ncuconfig=yes], - [cf_have_ncuconfig=no])], + [cf_have_ncuconfig=no], + [cf_have_ncuconfig=maybe])], [cf_have_ncuconfig=no]) - AC_MSG_RESULT($cf_have_ncuconfig) + test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes if test "$cf_have_ncuconfig" != "yes" then CPPFLAGS="$cf_save_CPPFLAGS" @@ -3275,7 +3306,7 @@ AC_TRY_LINK([ test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED" ])dnl dnl --------------------------------------------------------------------------- -dnl CF_XOPEN_SOURCE version: 49 updated: 2015/04/12 15:39:00 +dnl CF_XOPEN_SOURCE version: 50 updated: 2015/10/17 19:03:33 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, @@ -3345,6 +3376,9 @@ case $host_os in (openbsd*) # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw ;; +(os2*) + cf_XOPEN_SOURCE= + ;; (osf[[45]]*) cf_xopen_source="-D_OSF_SOURCE" ;;