X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Faclocal.m4;h=a2458869f2a6e8c0202926a6cb3615a94e03bc10;hp=6f8d522e652fea2a9f38c48fee510604bcf5ceff;hb=3f20704179ae1f625bd7bc75829929ccf46b25c3;hpb=92e599aba4bcf8d73fb3a5320bde206839c99acc diff --git a/test/aclocal.m4 b/test/aclocal.m4 index 6f8d522e..a2458869 100644 --- a/test/aclocal.m4 +++ b/test/aclocal.m4 @@ -1,5 +1,5 @@ dnl*************************************************************************** -dnl Copyright (c) 2003-2009,2010 Free Software Foundation, Inc. * +dnl Copyright (c) 2003-2010,2011 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.45 2010/11/20 22:07:06 tom Exp $ +dnl $Id: aclocal.m4,v 1.62 2011/05/14 20:46:00 tom Exp $ 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 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 @@ -455,22 +480,34 @@ done test "$cf_cv_curses_acs_map" != unknown && AC_DEFINE_UNQUOTED(CURSES_ACS_ARRAY,$cf_cv_curses_acs_map) ]) dnl --------------------------------------------------------------------------- -dnl CF_CURSES_CHECK_DATA version: 3 updated: 2010/10/23 15:54:49 +dnl CF_CURSES_CHECK_DATA version: 4 updated: 2011/01/15 16:39:24 dnl -------------------- dnl Check if curses.h defines the given data/variable. dnl Use this after CF_NCURSES_CONFIG or CF_CURSES_CONFIG. AC_DEFUN([CF_CURSES_CHECK_DATA], [ AC_MSG_CHECKING(for data $1 declaration in ${cf_cv_ncurses_header:-curses.h}) + AC_TRY_COMPILE(CF__CURSES_HEAD,[ void *foo = &($1) ],cf_result=yes,cf_result=no) AC_MSG_RESULT($cf_result) + if test $cf_result = yes ; then CF_UPPER(cf_result,have_curses_data_$1) AC_DEFINE_UNQUOTED($cf_result) else AC_MSG_CHECKING(for data $1 in library) + # BSD linkers insist on making weak linkage, but resolve at runtime. + AC_TRY_RUN(CF__CURSES_HEAD +[ +extern char $1; +int main(void) +{ + void *foo = &($1); + ${cf_cv_main_return:-return}(foo == 0); +}],[cf_result=yes],[cf_result=no],[ + # cross-compiling AC_TRY_LINK(CF__CURSES_HEAD [extern char $1;],[ do { @@ -478,6 +515,7 @@ else ${cf_cv_main_return:-return}(foo == 0); } while (0) ],[cf_result=yes],[cf_result=no]) +]) AC_MSG_RESULT($cf_result) if test $cf_result = yes ; then CF_UPPER(cf_result,decl_curses_data_$1) @@ -520,7 +558,7 @@ CF_NCURSES_VERSION CF_CURSES_LIBS ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_CPPFLAGS version: 10 updated: 2009/01/06 19:34:11 +dnl CF_CURSES_CPPFLAGS version: 11 updated: 2011/04/09 14:51:08 dnl ------------------ dnl Look for the curses headers. AC_DEFUN([CF_CURSES_CPPFLAGS],[ @@ -529,13 +567,19 @@ AC_CACHE_CHECK(for extra include directories,cf_cv_curses_incdir,[ cf_cv_curses_incdir=no case $host_os in #(vi hpux10.*) #(vi - test -d /usr/include/curses_colr && \ - cf_cv_curses_incdir="-I/usr/include/curses_colr" + if test "x$cf_cv_screen" = "xcurses_colr" + then + test -d /usr/include/curses_colr && \ + cf_cv_curses_incdir="-I/usr/include/curses_colr" + fi ;; sunos3*|sunos4*) - test -d /usr/5lib && \ - test -d /usr/5include && \ - cf_cv_curses_incdir="-I/usr/5include" + if test "x$cf_cv_screen" = "xcurses_5lib" + then + test -d /usr/5lib && \ + test -d /usr/5include && \ + cf_cv_curses_incdir="-I/usr/5include" + fi ;; esac ]) @@ -545,7 +589,7 @@ CF_CURSES_HEADER CF_TERM_HEADER ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_FUNCS version: 15 updated: 2010/10/23 15:52:32 +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], @@ -553,6 +597,7 @@ AC_DEFUN([CF_CURSES_FUNCS], AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl AC_REQUIRE([CF_XOPEN_CURSES]) AC_REQUIRE([CF_CURSES_TERM_H]) +AC_REQUIRE([CF_CURSES_UNCTRL_H]) for cf_func in $1 do CF_UPPER(cf_tr_func,$cf_func) @@ -565,7 +610,8 @@ do [ #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], @@ -582,7 +628,7 @@ ${cf_cv_main_return:-return}(foo == 0); done ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_HEADER version: 2 updated: 2010/04/28 06:02:16 +dnl CF_CURSES_HEADER version: 3 updated: 2011/05/01 19:47:45 dnl ---------------- dnl Find a "curses" header file, e.g,. "curses.h", or one of the more common dnl variations of ncurses' installs. @@ -592,10 +638,10 @@ AC_DEFUN([CF_CURSES_HEADER],[ AC_CACHE_CHECK(if we have identified curses headers,cf_cv_ncurses_header,[ cf_cv_ncurses_header=none for cf_header in ifelse($1,,,[ \ - $1/curses.h \ - $1/ncurses.h]) \ - curses.h \ - ncurses.h ifelse($1,,[ncurses/curses.h ncurses/ncurses.h]) + $1/ncurses.h \ + $1/curses.h]) \ + ncurses.h \ + curses.h ifelse($1,,[ncurses/ncurses.h ncurses/curses.h]) do AC_TRY_COMPILE([#include <${cf_header}>], [initscr(); tgoto("?", 0,0)], @@ -611,7 +657,7 @@ fi AC_CHECK_HEADERS($cf_cv_ncurses_header) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_LIBS version: 31 updated: 2010/10/23 15:54:49 +dnl CF_CURSES_LIBS version: 34 updated: 2011/04/09 14:51:08 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. @@ -631,24 +677,46 @@ freebsd*) #(vi AC_CHECK_LIB(mytinfo,tgoto,[CF_ADD_LIBS(-lmytinfo)]) ;; hpux10.*) #(vi - AC_CHECK_LIB(cur_colr,initscr,[ - CF_ADD_LIBS(-lcur_colr) - ac_cv_func_initscr=yes - ],[ - AC_CHECK_LIB(Hcurses,initscr,[ - # HP's header uses __HP_CURSES, but user claims _HP_CURSES. - CF_ADD_LIBS(-lHcurses) - CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES" - ac_cv_func_initscr=yes - ])]) + # 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 + # Hcurses; the subdirectory curses_colr has the headers (curses.h and + # term.h) for cur_colr + if test "x$cf_cv_screen" = "xcurses_colr" + then + AC_CHECK_LIB(cur_colr,initscr,[ + CF_ADD_LIBS(-lcur_colr) + ac_cv_func_initscr=yes + ],[ + AC_CHECK_LIB(Hcurses,initscr,[ + # HP's header uses __HP_CURSES, but user claims _HP_CURSES. + CF_ADD_LIBS(-lHcurses) + CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES" + ac_cv_func_initscr=yes + ])]) + fi ;; -linux*) # Suse Linux does not follow /usr/lib convention - CF_ADD_LIBDIR(/lib) +linux*) + case `arch 2>/dev/null` in + x86_64) + if test -d /lib64 + then + CF_ADD_LIBDIR(/lib64) + else + CF_ADD_LIBDIR(/lib) + fi + ;; + *) + CF_ADD_LIBDIR(/lib) + ;; + esac ;; sunos3*|sunos4*) - if test -d /usr/5lib ; then - CF_ADD_LIBDIR(/usr/5lib) - CF_ADD_LIBS(-lcurses -ltermcap) + if test "x$cf_cv_screen" = "xcurses_5lib" + then + if test -d /usr/5lib ; then + CF_ADD_LIBDIR(/usr/5lib) + CF_ADD_LIBS(-lcurses -ltermcap) + fi fi ac_cv_func_initscr=yes ;; @@ -713,7 +781,7 @@ fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_TERM_H version: 8 updated: 2010/10/23 15:54:49 +dnl CF_CURSES_TERM_H version: 9 updated: 2011/04/09 18:19:55 dnl ---------------- dnl SVr4 curses should have term.h as well (where it puts the definitions of dnl the low-level interface). This may not be true in old/broken implementations, @@ -727,9 +795,17 @@ AC_CACHE_CHECK(for term.h, cf_cv_term_header,[ # If we found , look for , but always look # for if we do not find the variant. -for cf_header in \ - `echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%/.*%/%'`term.h \ - term.h + +cf_header_list="term.h ncurses/term.h ncursesw/term.h" + +case ${cf_cv_ncurses_header:-curses.h} in #(vi +*/*) + cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h + cf_header_list="$cf_header_item $cf_header_list" + ;; +esac + +for cf_header in $cf_header_list do AC_TRY_COMPILE([ #include <${cf_cv_ncurses_header:-curses.h}> @@ -775,25 +851,117 @@ ncursesw/term.h) esac ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_WACS_MAP version: 4 updated: 2010/10/23 15:54:49 +dnl CF_CURSES_UNCTRL_H version: 1 updated: 2011/04/09 18:19:55 dnl ------------------ -dnl Check for likely values of wacs_map[]: +dnl Any X/Open curses implementation must have unctrl.h, but ncurses packages +dnl may put it in a subdirectory (along with ncurses' other headers, of +dnl course). Packages which put the headers in inconsistent locations are +dnl broken). +AC_DEFUN([CF_CURSES_UNCTRL_H], +[ +AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl + +AC_CACHE_CHECK(for unctrl.h, cf_cv_unctrl_header,[ + +# If we found , look for , but always look +# for if we do not find the variant. + +cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h" + +case ${cf_cv_ncurses_header:-curses.h} in #(vi +*/*) + cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h + cf_header_list="$cf_header_item $cf_header_list" + ;; +esac + +for cf_header in $cf_header_list +do + AC_TRY_COMPILE([ +#include <${cf_cv_ncurses_header:-curses.h}> +#include <${cf_header}>], + [WINDOW *x], + [cf_cv_unctrl_header=$cf_header + break], + [cf_cv_unctrl_header=no]) +done + +case $cf_cv_unctrl_header in #(vi +no) + AC_MSG_WARN(unctrl.h header not found) + ;; +esac +]) + +case $cf_cv_unctrl_header in #(vi +unctrl.h) #(vi + AC_DEFINE(HAVE_UNCTRL_H) + ;; +ncurses/unctrl.h) #(vi + AC_DEFINE(HAVE_NCURSES_UNCTRL_H) + ;; +ncursesw/unctrl.h) + AC_DEFINE(HAVE_NCURSESW_UNCTRL_H) + ;; +esac +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_CURSES_WACS_MAP version: 5 updated: 2011/01/15 11:28:59 +dnl ------------------ +dnl Check for likely values of wacs_map[]. AC_DEFUN([CF_CURSES_WACS_MAP], [ AC_CACHE_CHECK(for wide alternate character set array, cf_cv_curses_wacs_map,[ cf_cv_curses_wacs_map=unknown - for name in wacs_map _wacs_map __wacs_map _nc_wacs + for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char do AC_TRY_LINK([ #ifndef _XOPEN_SOURCE_EXTENDED #define _XOPEN_SOURCE_EXTENDED #endif #include <${cf_cv_ncurses_header:-curses.h}>], - [$name['k'] = *WACS_PLUS], + [void *foo = &($name['k'])], [cf_cv_curses_wacs_map=$name break]) done]) + +test "$cf_cv_curses_wacs_map" != unknown && AC_DEFINE_UNQUOTED(CURSES_WACS_ARRAY,$cf_cv_curses_wacs_map) +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_CURSES_WACS_SYMBOLS version: 1 updated: 2011/01/15 11:28:59 +dnl ---------------------- +dnl Do a check to see if the WACS_xxx constants are defined compatibly with +dnl X/Open Curses. In particular, NetBSD's implementation of the WACS_xxx +dnl constants is broken since those constants do not point to cchar_t's. +AC_DEFUN([CF_CURSES_WACS_SYMBOLS], +[ +AC_REQUIRE([CF_CURSES_WACS_MAP]) + +AC_CACHE_CHECK(for wide alternate character constants, cf_cv_curses_wacs_symbols,[ +cf_cv_curses_wacs_symbols=no +if test "$cf_cv_curses_wacs_map" != unknown +then + AC_TRY_LINK([ +#ifndef _XOPEN_SOURCE_EXTENDED +#define _XOPEN_SOURCE_EXTENDED +#endif +#include <${cf_cv_ncurses_header:-curses.h}>], + [cchar_t *foo = WACS_PLUS; + $cf_cv_curses_wacs_map['k'] = *WACS_PLUS], + [cf_cv_curses_wacs_symbols=yes]) +else + AC_TRY_LINK([ +#ifndef _XOPEN_SOURCE_EXTENDED +#define _XOPEN_SOURCE_EXTENDED +#endif +#include <${cf_cv_ncurses_header:-curses.h}>], + [cchar_t *foo = WACS_PLUS], + [cf_cv_curses_wacs_symbols=yes]) +fi ]) + +test "$cf_cv_curses_wacs_symbols" != no && AC_DEFINE(CURSES_WACS_SYMBOLS) +])dnl dnl --------------------------------------------------------------------------- dnl CF_DIRNAME version: 4 updated: 2002/12/21 19:25:52 dnl ---------- @@ -1315,6 +1483,29 @@ rm -rf conftest* AC_SUBST(EXTRA_CFLAGS) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_GETOPT_HEADER version: 4 updated: 2009/08/31 20:07:52 +dnl ---------------- +dnl Check for getopt's variables which are commonly defined in stdlib.h, +dnl unistd.h or (nonstandard) in getopt.h +AC_DEFUN([CF_GETOPT_HEADER], +[ +AC_HAVE_HEADERS(unistd.h getopt.h) +AC_CACHE_CHECK(for header declaring getopt variables,cf_cv_getopt_header,[ +cf_cv_getopt_header=none +for cf_header in stdio.h stdlib.h unistd.h getopt.h +do +AC_TRY_COMPILE([ +#include <$cf_header>], +[int x = optind; char *y = optarg], +[cf_cv_getopt_header=$cf_header + break]) +done +]) +if test $cf_cv_getopt_header != none ; then + AC_DEFINE(HAVE_GETOPT_HEADER) +fi +])dnl +dnl --------------------------------------------------------------------------- dnl CF_GNU_SOURCE version: 6 updated: 2005/07/09 13:23:07 dnl ------------- dnl Check if we must define _GNU_SOURCE to get a reasonable value for @@ -1966,6 +2157,45 @@ AC_MSG_RESULT($NCURSES_WRAP_PREFIX) AC_SUBST(NCURSES_WRAP_PREFIX) ]) dnl --------------------------------------------------------------------------- +dnl CF_NETBSD_FORM_H version: 1 updated: 2011/01/15 14:59:18 +dnl ---------------- +dnl Check for NetBSD's form.h, which is incompatible with SVr4 and ncurses. +dnl Some workarounds are needed in client programs to allow them to compile. +AC_DEFUN([CF_NETBSD_FORM_H],[ +AC_CACHE_CHECK(for NetBSD form.h,cf_cv_netbsd_form_h,[ +AC_TRY_COMPILE([ +#include <${cf_cv_ncurses_header:-curses.h}> +#include +],[ + FORM *form; + int y = current_field(form)->cursor_ypos; + int x = current_field(form)->cursor_xpos; +],[cf_cv_netbsd_form_h=yes +],[cf_cv_netbsd_form_h=no]) +]) + +test "$cf_cv_netbsd_form_h" = yes && AC_DEFINE(HAVE_NETBSD_FORM_H) +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_NETBSD_MENU_H version: 1 updated: 2011/01/15 14:59:18 +dnl ---------------- +dnl Check for NetBSD's menu.h, which is incompatible with SVr4 and ncurses. +dnl Some workarounds are needed in client programs to allow them to compile. +AC_DEFUN([CF_NETBSD_MENU_H],[ +AC_CACHE_CHECK(for NetBSD menu.h,cf_cv_netbsd_menu_h,[ +AC_TRY_COMPILE([ +#include <${cf_cv_ncurses_header:-curses.h}> +#include +],[ + MENU *menu; + int y = menu->max_item_width; +],[cf_cv_netbsd_menu_h=yes +],[cf_cv_netbsd_menu_h=no]) +]) + +test "$cf_cv_netbsd_menu_h" = yes && AC_DEFINE(HAVE_NETBSD_MENU_H) +])dnl +dnl --------------------------------------------------------------------------- dnl CF_NO_LEAKS_OPTION version: 4 updated: 2006/12/16 14:24:05 dnl ------------------ dnl see CF_WITH_NO_LEAKS @@ -2032,7 +2262,7 @@ case ".[$]$1" in #(vi esac ])dnl dnl --------------------------------------------------------------------------- -dnl CF_PDCURSES_X11 version: 10 updated: 2010/06/20 09:24:28 +dnl CF_PDCURSES_X11 version: 11 updated: 2011/01/15 18:45:38 dnl --------------- dnl Configure for PDCurses' X11 library AC_DEFUN([CF_PDCURSES_X11],[ @@ -2069,13 +2299,13 @@ fi if test $cf_cv_lib_XCurses = yes ; then AC_DEFINE(UNIX) AC_DEFINE(XCURSES) - AC_DEFINE(HAVE_XCURSES) + AC_CHECK_HEADER(xcurses.h, AC_DEFINE(HAVE_XCURSES)) else AC_MSG_ERROR(Cannot link with XCurses) fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_PKG_CONFIG version: 3 updated: 2009/01/25 10:55:09 +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], @@ -2092,7 +2322,9 @@ no) #(vi PKG_CONFIG=none ;; yes) #(vi - AC_PATH_PROG(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 @@ -2394,6 +2626,50 @@ ncursesw/term.h) esac ])dnl dnl --------------------------------------------------------------------------- +dnl CF_TPUTS_PROTO version: 2 updated: 2011/04/23 19:25:50 +dnl -------------- +dnl Check for type of function-pointer passed to tputs. Some old +dnl implementations used functions that had different prototypes, making it +dnl hard to compile portable programs using tputs. +AC_DEFUN([CF_TPUTS_PROTO],[ +CF_CURSES_FUNCS(tputs) +if test x$cf_cv_func_tputs = xyes +then + cf_done=no + for cf_arg in int char + do + for cf_ret in int void + do + if test $cf_ret = void + then + cf_return="/* nothing */" + else + cf_return="return value" + fi + AC_TRY_COMPILE([ +#include <${cf_cv_ncurses_header:-curses.h}> +#include <$cf_cv_term_header> + +static $cf_ret outc($cf_arg value) { $cf_return; } +],[ + tputs("hello", 0, outc); + ${cf_cv_main_return:-return}(0); +],[ + CF_VERBOSE([prototype $cf_ret func($cf_arg value)]) + cat >>confdefs.h < #include <${cf_cv_ncurses_header:-curses.h}>],[ #if defined(NCURSES_VERSION_PATCH) -if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403) +#if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403) make an error #endif #endif @@ -2613,7 +2889,7 @@ if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403) test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED" ])dnl dnl --------------------------------------------------------------------------- -dnl CF_XOPEN_SOURCE version: 34 updated: 2010/05/26 05:38:42 +dnl CF_XOPEN_SOURCE version: 35 updated: 2011/02/20 20:37:37 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, @@ -2632,6 +2908,9 @@ case $host_os in #(vi aix[[456]]*) #(vi cf_xopen_source="-D_ALL_SOURCE" ;; +cygwin) #(vi + cf_XOPEN_SOURCE=600 + ;; darwin[[0-8]].*) #(vi cf_xopen_source="-D_APPLE_C_SOURCE" ;; @@ -2853,7 +3132,7 @@ elif test "$cf_x_athena_inc" != default ; then fi ]) dnl --------------------------------------------------------------------------- -dnl CF_X_ATHENA_LIBS version: 9 updated: 2010/06/02 05:03:05 +dnl CF_X_ATHENA_LIBS version: 10 updated: 2011/02/13 13:31:33 dnl ---------------- dnl Normally invoked by CF_X_ATHENA, with $1 set to the appropriate flavor of dnl the Athena widgets, e.g., Xaw, Xaw3d, neXtaw. @@ -2883,7 +3162,11 @@ do CF_ADD_LIBS($cf_lib) AC_MSG_CHECKING(for $cf_test in $cf_lib) fi - AC_TRY_LINK([],[$cf_test()], + AC_TRY_LINK([ +#include +#include +],[ +$cf_test((XtAppContext) 0)], [cf_result=yes], [cf_result=no]) AC_MSG_RESULT($cf_result)