diff options
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 285 |
1 files changed, 181 insertions, 104 deletions
diff --git a/aclocal.m4 b/aclocal.m4 index c74a4d87..5416337f 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,11 +1,11 @@ -dnl $LynxId: aclocal.m4,v 1.171 2010/09/26 14:24:45 tom Exp $ +dnl $LynxId: aclocal.m4,v 1.175 2010/11/26 20:15:56 tom Exp $ dnl Macros for auto-configure script. dnl by T.E.Dickey <dickey@invisible-island.net> dnl and Jim Spath <jspath@mail.bcpl.lib.md.us> dnl and Philippe De Muyter <phdm@macqel.be> dnl dnl Created: 1997/1/28 -dnl Updated: 2010/9/23 +dnl Updated: 2010/11/26 dnl dnl The autoconf used in Lynx development is GNU autoconf 2.13 or 2.52, patched dnl by Thomas Dickey. See your local GNU archives, and this URL: @@ -796,6 +796,19 @@ dnl $1 = libraries to add, with the "-l", etc. dnl $2 = variable to update (default $LIBS) AC_DEFUN([CF_ADD_LIBS],[ifelse($2,,LIBS,[$2])="$1 [$]ifelse($2,,LIBS,[$2])"])dnl dnl --------------------------------------------------------------------------- +dnl CF_ADD_LIB_AFTER version: 2 updated: 2010/11/08 20:33:46 +dnl ---------------- +dnl Add a given library after another, e.g., following the one it satisfies a +dnl dependency for. +dnl +dnl $1 = the first library +dnl $2 = its dependency +AC_DEFUN([CF_ADD_LIB_AFTER],[ +CF_VERBOSE(...before $LIBS) +LIBS=`echo "$LIBS" | sed -e "s/[[ ]][[ ]]*/ /g" -e "s,$1 ,$1 $2 ," -e 's/ / /g'` +CF_VERBOSE(...after $LIBS) +])dnl +dnl --------------------------------------------------------------------------- dnl CF_ADD_OPTIONAL_PATH version: 1 updated: 2007/07/29 12:33:33 dnl -------------------- dnl Add an optional search-path to the compile/link variables. @@ -867,7 +880,7 @@ ifelse([$5],NONE,,[(test $5 = NONE || test "$4" != "$5") &&]) { } ])dnl dnl --------------------------------------------------------------------------- -dnl CF_ALT_CHAR_SET version: 6 updated: 1998/11/18 14:45:34 +dnl CF_ALT_CHAR_SET version: 7 updated: 2010/10/23 15:54:49 dnl --------------- dnl Check for existence of alternate-character-set support in curses, so we dnl can decide to use it for box characters. @@ -879,7 +892,7 @@ AC_CACHE_VAL(cf_cv_alt_char_set,[ for mapname in acs_map _acs_map do AC_TRY_LINK([ -#include <${cf_cv_ncurses_header-curses.h}> +#include <${cf_cv_ncurses_header:-curses.h}> ],[chtype x = $mapname['l']; $mapname['m'] = 0], [cf_cv_alt_char_set=$mapname break], @@ -890,13 +903,13 @@ AC_MSG_RESULT($cf_cv_alt_char_set) test $cf_cv_alt_char_set != no && AC_DEFINE_UNQUOTED(ALT_CHAR_SET,$cf_cv_alt_char_set) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_ANSI_CC_CHECK version: 9 updated: 2001/12/30 17:53:34 +dnl CF_ANSI_CC_CHECK version: 10 updated: 2010/10/23 15:52:32 dnl ---------------- dnl This is adapted from the macros 'fp_PROG_CC_STDC' and 'fp_C_PROTOTYPES' dnl in the sharutils 4.2 distribution. AC_DEFUN([CF_ANSI_CC_CHECK], [ -AC_CACHE_CHECK(for ${CC-cc} option to accept ANSI C, cf_cv_ansi_cc,[ +AC_CACHE_CHECK(for ${CC:-cc} option to accept ANSI C, cf_cv_ansi_cc,[ cf_cv_ansi_cc=no cf_save_CFLAGS="$CFLAGS" cf_save_CPPFLAGS="$CPPFLAGS" @@ -1048,7 +1061,7 @@ fi AC_SUBST(ARFLAGS) ]) dnl --------------------------------------------------------------------------- -dnl CF_BOOL_DEFS version: 3 updated: 1998/04/27 20:32:33 +dnl CF_BOOL_DEFS version: 4 updated: 2010/10/23 15:54:49 dnl ------------ dnl Check if curses.h defines TRUE/FALSE (it does under SVr4). AC_DEFUN([CF_BOOL_DEFS], @@ -1056,7 +1069,7 @@ AC_DEFUN([CF_BOOL_DEFS], AC_MSG_CHECKING(if TRUE/FALSE are defined) AC_CACHE_VAL(cf_cv_bool_defs,[ AC_TRY_COMPILE([ -#include <${cf_cv_ncurses_header-curses.h}> +#include <${cf_cv_ncurses_header:-curses.h}> #include <stdio.h>],[int x = TRUE, y = FALSE], [cf_cv_bool_defs=yes], [cf_cv_bool_defs=no])]) @@ -1158,7 +1171,7 @@ AC_SUBST(BUILD_EXEEXT) AC_SUBST(BUILD_OBJEXT) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_BUNDLED_INTL version: 15 updated: 2010/09/19 15:09:44 +dnl CF_BUNDLED_INTL version: 16 updated: 2010/10/23 15:55:05 dnl --------------- dnl Top-level macro for configuring an application with a bundled copy of dnl the intl and po directories for gettext. @@ -1192,7 +1205,7 @@ dnl rather than $LC_ALL test -z "$ALL_LINGUAS" && ALL_LINGUAS=`test -d $srcdir/po && cd $srcdir/po && echo *.po|sed -e 's/\.po//g' -e 's/*//'` # Allow override of "config.h" definition: -: ${CONFIG_H=config.h} +: ${CONFIG_H:=config.h} AC_SUBST(CONFIG_H) if test -z "$PACKAGE" ; then @@ -1528,7 +1541,7 @@ if test $ac_cv_type_$1 = no; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_COLOR_CURSES version: 6 updated: 2002/10/27 18:21:42 +dnl CF_COLOR_CURSES version: 7 updated: 2010/10/23 15:54:49 dnl --------------- dnl Check if curses supports color. (Note that while SVr3 curses supports dnl color, it does this differently from SVr4 curses; more work would be needed @@ -1539,7 +1552,7 @@ AC_DEFUN([CF_COLOR_CURSES], AC_MSG_CHECKING(if curses supports color attributes) AC_CACHE_VAL(cf_cv_color_curses,[ AC_TRY_LINK([ -#include <${cf_cv_ncurses_header-curses.h}> +#include <${cf_cv_ncurses_header:-curses.h}> ], [chtype x = COLOR_BLUE; has_colors(); @@ -1558,21 +1571,21 @@ if test $cf_cv_color_curses = yes ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_CHTYPE version: 6 updated: 2003/11/06 19:59:57 +dnl CF_CURSES_CHTYPE version: 7 updated: 2010/10/23 15:54:49 dnl ---------------- dnl Test if curses defines 'chtype' (usually a 'long' type for SysV curses). AC_DEFUN([CF_CURSES_CHTYPE], [ AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl AC_CACHE_CHECK(for chtype typedef,cf_cv_chtype_decl,[ - AC_TRY_COMPILE([#include <${cf_cv_ncurses_header-curses.h}>], + AC_TRY_COMPILE([#include <${cf_cv_ncurses_header:-curses.h}>], [chtype foo], [cf_cv_chtype_decl=yes], [cf_cv_chtype_decl=no])]) if test $cf_cv_chtype_decl = yes ; then AC_DEFINE(HAVE_TYPE_CHTYPE) AC_CACHE_CHECK(if chtype is scalar or struct,cf_cv_chtype_type,[ - AC_TRY_COMPILE([#include <${cf_cv_ncurses_header-curses.h}>], + AC_TRY_COMPILE([#include <${cf_cv_ncurses_header:-curses.h}>], [chtype foo; long x = foo], [cf_cv_chtype_type=scalar], [cf_cv_chtype_type=struct])]) @@ -1619,7 +1632,7 @@ CF_CURSES_HEADER CF_TERM_HEADER ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_FUNCS version: 14 updated: 2009/07/16 19:34:55 +dnl CF_CURSES_FUNCS version: 15 updated: 2010/10/23 15:52:32 dnl --------------- dnl Curses-functions are a little complicated, since a lot of them are macros. AC_DEFUN([CF_CURSES_FUNCS], @@ -1639,7 +1652,7 @@ do [ #ifndef ${cf_func} long foo = (long)(&${cf_func}); -${cf_cv_main_return-return}(foo == 0); +${cf_cv_main_return:-return}(foo == 0); #endif ], [cf_result=yes], @@ -1685,7 +1698,7 @@ fi AC_CHECK_HEADERS($cf_cv_ncurses_header) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_LIBS version: 30 updated: 2010/06/20 09:24:28 +dnl CF_CURSES_LIBS version: 31 updated: 2010/10/23 15:54:49 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. @@ -1693,7 +1706,7 @@ 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}>], +AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], [initscr(); tgoto("?", 0,0)], cf_result=yes, cf_result=no) @@ -1733,7 +1746,7 @@ if test ".$ac_cv_func_initscr" != .yes ; then cf_term_lib="" cf_curs_lib="" - if test ".${cf_cv_ncurses_version-no}" != .no + if test ".${cf_cv_ncurses_version:-no}" != .no then cf_check_list="ncurses curses cursesX" else @@ -1760,7 +1773,7 @@ if test ".$ac_cv_func_initscr" != .yes ; then LIBS="-l$cf_curs_lib $cf_save_LIBS" if test "$cf_term_lib" = unknown ; then AC_MSG_CHECKING(if we can link with $cf_curs_lib library) - AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>], + AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], [initscr()], [cf_result=yes], [cf_result=no]) @@ -1770,12 +1783,12 @@ if test ".$ac_cv_func_initscr" != .yes ; then : elif test "$cf_term_lib" != predefined ; then AC_MSG_CHECKING(if we need both $cf_curs_lib and $cf_term_lib libraries) - AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>], + AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], [initscr(); tgoto((char *)0, 0, 0);], [cf_result=no], [ LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS" - AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>], + AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], [initscr()], [cf_result=yes], [cf_result=error]) @@ -1787,7 +1800,7 @@ fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_TERM_H version: 7 updated: 2010/01/24 18:40:06 +dnl CF_CURSES_TERM_H version: 8 updated: 2010/10/23 15:54:49 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, @@ -1802,11 +1815,11 @@ AC_CACHE_CHECK(for term.h, cf_cv_term_header,[ # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look # for <term.h> if we do not find the variant. for cf_header in \ - `echo ${cf_cv_ncurses_header-curses.h} | sed -e 's%/.*%/%'`term.h \ + `echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%/.*%/%'`term.h \ term.h do AC_TRY_COMPILE([ -#include <${cf_cv_ncurses_header-curses.h}> +#include <${cf_cv_ncurses_header:-curses.h}> #include <${cf_header}>], [WINDOW *x], [cf_cv_term_header=$cf_header @@ -1821,7 +1834,7 @@ no) for cf_header in ncurses/term.h ncursesw/term.h do AC_TRY_COMPILE([ -#include <${cf_cv_ncurses_header-curses.h}> +#include <${cf_cv_ncurses_header:-curses.h}> #ifdef NCURSES_VERSION #include <${cf_header}> #else @@ -1849,7 +1862,7 @@ ncursesw/term.h) esac ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURS_PERFORMANCE version: 3 updated: 1998/04/27 20:32:33 +dnl CF_CURS_PERFORMANCE version: 4 updated: 2010/10/23 15:54:49 dnl ------------------- dnl Solaris 2.x curses provides a "performance" tradeoff according to whether dnl CURS_PERFORMANCE is defined. If defined, the implementation defines macros @@ -1860,7 +1873,7 @@ AC_MSG_CHECKING([for curses performance tradeoff]) AC_CACHE_VAL(cf_cv_curs_performance,[ cf_cv_curs_performance=no AC_TRY_COMPILE([ -#include <${cf_cv_ncurses_header-curses.h}>],[ +#include <${cf_cv_ncurses_header:-curses.h}>],[ #if defined(wbkgdset) && defined(clearok) && defined(getbkgd) int x = ERR; #else @@ -1869,7 +1882,7 @@ AC_CACHE_VAL(cf_cv_curs_performance,[ ],[ AC_TRY_COMPILE([ #define CURS_PERFORMANCE -#include <${cf_cv_ncurses_header-curses.h}>],[ +#include <${cf_cv_ncurses_header:-curses.h}>],[ #if defined(wbkgdset) && defined(clearok) && defined(getbkgd) int x = ; /* force an error */ #else @@ -1880,7 +1893,7 @@ AC_MSG_RESULT($cf_cv_curs_performance) test $cf_cv_curs_performance = yes && AC_DEFINE(CURS_PERFORMANCE) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURS_TOUCHLINE version: 2 updated: 2001/05/13 13:42:46 +dnl CF_CURS_TOUCHLINE version: 3 updated: 2010/10/23 15:54:49 dnl ----------------- dnl Check for the flavor of the touchline function, to distinguish between BSD dnl and SYSV. This is needed on NetBSD 1.5 which has a partial implementation @@ -1888,11 +1901,11 @@ dnl of SVR4 curses. AC_DEFUN([CF_CURS_TOUCHLINE],[ AC_CACHE_CHECK(for curses touchline function,cf_cv_curs_touchline,[ AC_TRY_LINK([ -#include <${cf_cv_ncurses_header-curses.h}>], +#include <${cf_cv_ncurses_header:-curses.h}>], [touchline(stdscr, 1,2,3);], [cf_cv_curs_touchline=bsd], [AC_TRY_LINK([ -#include <${cf_cv_ncurses_header-curses.h}>], +#include <${cf_cv_ncurses_header:-curses.h}>], [touchline(stdscr, 1,2);], [cf_cv_curs_touchline=sysv], [cf_cv_curs_touchline=bsd])])]) @@ -1996,14 +2009,14 @@ AC_DEFUN([CF_ERRNO], CF_CHECK_ERRNO(errno) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_FANCY_CURSES version: 4 updated: 2002/10/27 18:21:42 +dnl CF_FANCY_CURSES version: 5 updated: 2010/10/23 15:54:49 dnl --------------- AC_DEFUN([CF_FANCY_CURSES], [ AC_MSG_CHECKING(if curses supports fancy attributes) AC_CACHE_VAL(cf_cv_fancy_curses,[ AC_TRY_LINK([ -#include <${cf_cv_ncurses_header-curses.h}> +#include <${cf_cv_ncurses_header:-curses.h}> ], [attrset(A_UNDERLINE|A_BOLD|A_REVERSE); wattrset(stdscr, A_BLINK|A_DIM); @@ -2388,7 +2401,7 @@ AC_TRY_LINK([ test "$cf_cv_fionbio" = "fcntl" && AC_DEFINE(USE_FCNTL) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_FUNC_CURSES_VERSION version: 4 updated: 2007/04/28 09:15:55 +dnl CF_FUNC_CURSES_VERSION version: 5 updated: 2010/10/23 15:54:49 dnl ---------------------- dnl Solaris has a data item 'curses_version', which confuses AC_CHECK_FUNCS. dnl It's a character string "SVR4", not documented. @@ -2396,12 +2409,12 @@ AC_DEFUN([CF_FUNC_CURSES_VERSION], [ AC_CACHE_CHECK(for function curses_version, cf_cv_func_curses_version,[ AC_TRY_RUN([ -#include <${cf_cv_ncurses_header-curses.h}> +#include <${cf_cv_ncurses_header:-curses.h}> int main() { char temp[1024]; sprintf(temp, "%s\n", curses_version()); - ${cf_cv_main_return-return}(0); + ${cf_cv_main_return:-return}(0); }] ,[cf_cv_func_curses_version=yes] ,[cf_cv_func_curses_version=no] @@ -2410,7 +2423,7 @@ rm -f core]) test "$cf_cv_func_curses_version" = yes && AC_DEFINE(HAVE_CURSES_VERSION) ]) dnl --------------------------------------------------------------------------- -dnl CF_FUNC_GETADDRINFO version: 6 updated: 2007/04/28 09:15:55 +dnl CF_FUNC_GETADDRINFO version: 7 updated: 2010/10/23 15:52:32 dnl ------------------- dnl Look for a working version of getaddrinfo(), for IPV6 support. AC_DEFUN([CF_FUNC_GETADDRINFO],[ @@ -2483,12 +2496,12 @@ int main() if (aitop) freeaddrinfo(aitop); - ${cf_cv_main_return-return}(0); + ${cf_cv_main_return:-return}(0); bad: if (aitop) freeaddrinfo(aitop); - ${cf_cv_main_return-return}(1); + ${cf_cv_main_return:-return}(1); } ], [cf_cv_getaddrinfo=yes], @@ -2586,7 +2599,7 @@ if test $cf_cv_type_unionwait = yes; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GCC_ATTRIBUTES version: 13 updated: 2009/08/11 20:19:56 +dnl CF_GCC_ATTRIBUTES version: 14 updated: 2010/10/23 15:52:32 dnl ----------------- dnl Test for availability of useful gcc __attribute__ directives to quiet dnl compiler warnings. Though useful, not all are supported -- and contrary @@ -2613,7 +2626,7 @@ if test "$GCC" = yes then AC_CHECKING([for $CC __attribute__ directives]) cat > conftest.$ac_ext <<EOF -#line __oline__ "${as_me-configure}" +#line __oline__ "${as_me:-configure}" #include "confdefs.h" #include "conftest.h" #include "conftest.i" @@ -2710,7 +2723,7 @@ if test "$GCC" = yes ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GCC_WARNINGS version: 26 updated: 2010/08/14 18:25:37 +dnl CF_GCC_WARNINGS version: 27 updated: 2010/10/23 15:52:32 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: @@ -2735,7 +2748,7 @@ AC_REQUIRE([CF_GCC_VERSION]) CF_INTEL_COMPILER(GCC,INTEL_COMPILER,CFLAGS) cat > conftest.$ac_ext <<EOF -#line __oline__ "${as_me-configure}" +#line __oline__ "${as_me:-configure}" int main(int argc, char *argv[[]]) { return (argv[[argc-1]] == 0) ; } EOF @@ -3267,7 +3280,7 @@ AC_MSG_RESULT($cf_cv_locale) test $cf_cv_locale = yes && { ifelse($1,,AC_DEFINE(LOCALE),[$1]) } ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MAKE_TAGS version: 5 updated: 2010/04/03 20:07:32 +dnl CF_MAKE_TAGS version: 6 updated: 2010/10/23 15:52:32 dnl ------------ dnl Generate tags/TAGS targets for makefiles. Do not generate TAGS if we have dnl a monocase filesystem. @@ -3277,10 +3290,10 @@ AC_REQUIRE([CF_MIXEDCASE_FILENAMES]) AC_CHECK_PROGS(CTAGS, exctags ctags) AC_CHECK_PROGS(ETAGS, exetags etags) -AC_CHECK_PROG(MAKE_LOWER_TAGS, ${CTAGS-ctags}, yes, no) +AC_CHECK_PROG(MAKE_LOWER_TAGS, ${CTAGS:-ctags}, yes, no) if test "$cf_cv_mixedcase" = yes ; then - AC_CHECK_PROG(MAKE_UPPER_TAGS, ${ETAGS-etags}, yes, no) + AC_CHECK_PROG(MAKE_UPPER_TAGS, ${ETAGS:-etags}, yes, no) else MAKE_UPPER_TAGS=no fi @@ -3358,15 +3371,15 @@ fi test "$cf_cv_mixedcase" = yes && AC_DEFINE(MIXEDCASE_FILENAMES) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MSG_LOG version: 4 updated: 2007/07/29 09:55:12 +dnl CF_MSG_LOG version: 5 updated: 2010/10/23 15:52:32 dnl ---------- dnl Write a debug message to config.log, along with the line number in the dnl configure script. AC_DEFUN([CF_MSG_LOG],[ -echo "${as_me-configure}:__oline__: testing $* ..." 1>&AC_FD_CC +echo "${as_me:-configure}:__oline__: testing $* ..." 1>&AC_FD_CC ])dnl dnl --------------------------------------------------------------------------- -dnl CF_NCURSES_BROKEN version: 6 updated: 1998/04/27 20:32:34 +dnl CF_NCURSES_BROKEN version: 7 updated: 2010/10/23 15:54:49 dnl ----------------- dnl Check for pre-1.9.9g ncurses (among other problems, the most obvious is dnl that color combinations don't work). @@ -3377,7 +3390,7 @@ if test "$cf_cv_ncurses_version" != no ; then AC_MSG_CHECKING(for obsolete/broken version of ncurses) AC_CACHE_VAL(cf_cv_ncurses_broken,[ AC_TRY_COMPILE([ -#include <${cf_cv_ncurses_header-curses.h}>],[ +#include <${cf_cv_ncurses_header:-curses.h}>],[ #if defined(NCURSES_VERSION) && defined(wgetbkgd) make an error #else @@ -3468,7 +3481,7 @@ CF_NCURSES_LIBS(ifelse($1,,ncurses,$1)) fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_NCURSES_CPPFLAGS version: 19 updated: 2007/07/29 13:35:20 +dnl CF_NCURSES_CPPFLAGS version: 20 updated: 2010/11/20 17:02:38 dnl ------------------- dnl Look for the SVr4 curses clone 'ncurses' in the standard places, adjusting dnl the CPPFLAGS variable so we can include its header. @@ -3497,7 +3510,7 @@ cf_ncuhdr_root=ifelse($1,,ncurses,$1) test -n "$cf_cv_curses_dir" && \ test "$cf_cv_curses_dir" != "no" && { \ - CF_ADD_INCDIR($cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root) + CF_ADD_INCDIR($cf_cv_curses_dir/include/$cf_ncuhdr_root) } AC_CACHE_CHECK(for $cf_ncuhdr_root header in include-path, cf_cv_ncurses_h,[ @@ -3585,7 +3598,7 @@ esac ])dnl dnl --------------------------------------------------------------------------- -dnl CF_NCURSES_LIBS version: 14 updated: 2010/06/20 09:24:28 +dnl CF_NCURSES_LIBS version: 16 updated: 2010/11/20 17:02:38 dnl --------------- dnl Look for the ncurses library. This is a little complicated on Linux, dnl because it may be linked with the gpm (general purpose mouse) library. @@ -3625,11 +3638,10 @@ CF_ADD_LIBS($cf_ncurses_LIBS) if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" ) then - CF_ADD_LIBDIR($cf_cv_curses_dir/lib) CF_ADD_LIBS(-l$cf_nculib_root) else CF_FIND_LIBRARY($cf_nculib_root,$cf_nculib_root, - [#include <${cf_cv_ncurses_header-curses.h}>], + [#include <${cf_cv_ncurses_header:-curses.h}>], [initscr()], initscr) fi @@ -3643,7 +3655,7 @@ if test -n "$cf_ncurses_LIBS" ; then LIBS="$q" fi done - AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>], + AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], [initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no) @@ -3654,7 +3666,7 @@ CF_UPPER(cf_nculib_ROOT,HAVE_LIB$cf_nculib_root) AC_DEFINE_UNQUOTED($cf_nculib_ROOT) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_NCURSES_VERSION version: 12 updated: 2007/04/28 09:15:55 +dnl CF_NCURSES_VERSION version: 13 updated: 2010/10/23 15:54:49 dnl ------------------ dnl Check for the version of ncurses, to aid in reporting bugs, etc. dnl Call CF_CURSES_CPPFLAGS first, or CF_NCURSES_CPPFLAGS. We don't use @@ -3667,7 +3679,7 @@ AC_CACHE_CHECK(for ncurses version, cf_cv_ncurses_version,[ cf_tempfile=out$$ rm -f $cf_tempfile AC_TRY_RUN([ -#include <${cf_cv_ncurses_header-curses.h}> +#include <${cf_cv_ncurses_header:-curses.h}> #include <stdio.h> int main() { @@ -3685,14 +3697,14 @@ int main() make an error # endif #endif - ${cf_cv_main_return-return}(0); + ${cf_cv_main_return:-return}(0); }],[ cf_cv_ncurses_version=`cat $cf_tempfile`],,[ # This will not work if the preprocessor splits the line after the # Autoconf token. The 'unproto' program does that. cat > conftest.$ac_ext <<EOF -#include <${cf_cv_ncurses_header-curses.h}> +#include <${cf_cv_ncurses_header:-curses.h}> #undef Autoconf #ifdef NCURSES_VERSION Autoconf NCURSES_VERSION @@ -4014,7 +4026,7 @@ ifelse([$1],,,[$1=$PATH_SEPARATOR]) AC_SUBST(PATH_SEPARATOR) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_PATH_PROG version: 7 updated: 2009/01/11 20:34:16 +dnl CF_PATH_PROG version: 8 updated: 2010/10/23 16:12:25 dnl ------------ dnl Check for a given program, defining corresponding symbol. dnl $1 = environment variable, which is suffixed by "_PATH" in the #define. @@ -4033,7 +4045,7 @@ AC_PATH_PROGS($1,[$]$1 $2 $3,[$]$1) cf_path_prog="" cf_path_args="" -IFS="${IFS= }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR" +IFS="${IFS:- }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR" for cf_temp in $ac_cv_path_$1 do if test -z "$cf_path_prog" ; then @@ -4479,7 +4491,7 @@ CF_VERBOSE(...checked $1 [$]$1) AC_SUBST(EXTRA_LDFLAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_SET_ERRNO version: 3 updated: 2007/04/28 09:15:55 +dnl CF_SET_ERRNO version: 4 updated: 2010/10/23 15:52:32 dnl ------------ dnl Check if 'errno' is declared in a fashion that lets us set it. AC_DEFUN([CF_SET_ERRNO], @@ -4490,7 +4502,7 @@ AC_TRY_RUN([ int main() { errno = 255; - ${cf_cv_main_return-return}(errno != 255); + ${cf_cv_main_return:-return}(errno != 255); }], [cf_cv_set_errno=yes], [cf_cv_set_errno=no], @@ -5302,7 +5314,7 @@ if test "$cf_cv_termlib" = none; then fi ])])dnl dnl --------------------------------------------------------------------------- -dnl CF_TERMIO_AND_CURSES version: 3 updated: 2000/12/31 19:47:37 +dnl CF_TERMIO_AND_CURSES version: 4 updated: 2010/10/23 15:54:49 dnl -------------------- dnl Check if including termio.h with <curses.h> dies like on sysv68 dnl FIXME: this is too Lynx-specific @@ -5310,7 +5322,7 @@ AC_DEFUN([CF_TERMIO_AND_CURSES], [ AC_CACHE_CHECK(if we can include termio.h with curses,cf_cv_termio_and_curses,[ cf_save_CFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -DHAVE_CONFIG_H -I. -I${srcdir-.} -I${srcdir-.}/src -I${srcdir-.}/WWW/Library/Implementation" + CPPFLAGS="$CPPFLAGS -DHAVE_CONFIG_H -I. -I${srcdir:-.} -I${srcdir:-.}/src -I${srcdir:-.}/WWW/Library/Implementation" touch lynx_cfg.h AC_TRY_COMPILE([ #include <$1> @@ -5346,7 +5358,7 @@ AC_MSG_RESULT($cf_cv_termio_and_termios) test $cf_cv_termio_and_termios = no && AC_DEFINE(TERMIO_AND_TERMIOS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_TERM_HEADER version: 1 updated: 2005/12/31 13:26:39 +dnl CF_TERM_HEADER version: 2 updated: 2010/10/23 15:54:49 dnl -------------- dnl Look for term.h, which is part of X/Open curses. It defines the interface dnl to terminfo database. Usually it is in the same include-path as curses.h, @@ -5365,7 +5377,7 @@ esac for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h" do AC_TRY_COMPILE([#include <stdio.h> -#include <${cf_cv_ncurses_header-curses.h}> +#include <${cf_cv_ncurses_header:-curses.h}> #include <$cf_test> ],[int x = auto_left_margin],[ cf_cv_term_header="$cf_test"],[ @@ -5471,13 +5483,13 @@ else fi ]) dnl --------------------------------------------------------------------------- -dnl CF_TTYTYPE version: 4 updated: 2002/10/27 18:21:42 +dnl CF_TTYTYPE version: 5 updated: 2010/10/23 15:54:49 dnl ---------- AC_DEFUN([CF_TTYTYPE], [ AC_MSG_CHECKING(if ttytype is declared in curses library) AC_CACHE_VAL(cf_cv_have_ttytype,[ - AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>], + AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], [char *x = &ttytype[1]; *x = 1], [cf_cv_have_ttytype=yes], [cf_cv_have_ttytype=no]) @@ -5853,7 +5865,7 @@ fi fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WIDEC_CURSES version: 3 updated: 2001/11/18 20:52:38 +dnl CF_WIDEC_CURSES version: 4 updated: 2010/10/23 15:54:49 dnl --------------- dnl Check for curses implementations that can handle wide-characters AC_DEFUN([CF_WIDEC_CURSES], @@ -5861,7 +5873,7 @@ AC_DEFUN([CF_WIDEC_CURSES], AC_CACHE_CHECK(if curses supports wide characters,cf_cv_widec_curses,[ AC_TRY_LINK([ #include <stdlib.h> -#include <${cf_cv_ncurses_header-curses.h}>],[ +#include <${cf_cv_ncurses_header:-curses.h}>],[ wchar_t temp[2]; wchar_t wch = 'A'; temp[0] = wch; @@ -5878,13 +5890,13 @@ if test "$cf_cv_widec_curses" = yes ; then AC_CACHE_CHECK(if we must include wchar.h to declare mbstate_t,cf_cv_widec_mbstate,[ AC_TRY_COMPILE([ #include <stdlib.h> -#include <${cf_cv_ncurses_header-curses.h}>], +#include <${cf_cv_ncurses_header:-curses.h}>], [mbstate_t state], [cf_cv_widec_mbstate=no], [AC_TRY_COMPILE([ #include <stdlib.h> #include <wchar.h> -#include <${cf_cv_ncurses_header-curses.h}>], +#include <${cf_cv_ncurses_header:-curses.h}>], [mbstate_t state], [cf_cv_widec_mbstate=yes], [cf_cv_widec_mbstate=unknown])])]) @@ -5916,16 +5928,28 @@ AC_DEFUN([CF_WITH_BZLIB],[ ],bz2,,,bzlib) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_CURSES_DIR version: 2 updated: 2002/11/10 14:46:59 +dnl CF_WITH_CURSES_DIR version: 3 updated: 2010/11/20 17:02:38 dnl ------------------ dnl Wrapper for AC_ARG_WITH to specify directory under which to look for curses dnl libraries. AC_DEFUN([CF_WITH_CURSES_DIR],[ + +AC_MSG_CHECKING(for specific curses-directory) AC_ARG_WITH(curses-dir, [ --with-curses-dir=DIR directory in which (n)curses is installed], - [CF_PATH_SYNTAX(withval) - cf_cv_curses_dir=$withval], + [cf_cv_curses_dir=$withval], [cf_cv_curses_dir=no]) +AC_MSG_RESULT($cf_cv_curses_dir) + +if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" ) +then + CF_PATH_SYNTAX(withval) + if test -d "$cf_cv_curses_dir" + then + CF_ADD_INCDIR($cf_cv_curses_dir/include) + CF_ADD_LIBDIR($cf_cv_curses_dir/lib) + fi +fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_WITH_DBMALLOC version: 7 updated: 2010/06/21 17:26:47 @@ -5958,7 +5982,7 @@ if test "$with_dmalloc" = yes ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_IDNA version: 7 updated: 2010/05/05 20:27:55 +dnl CF_WITH_IDNA version: 8 updated: 2010/11/26 15:10:07 dnl ------------ dnl Check for libidn, use it if found. dnl @@ -5972,14 +5996,14 @@ AC_DEFUN([CF_WITH_IDNA],[ ],[ char *output = 0; int code = idna_to_ascii_8z("name", &output, IDNA_USE_STD3_ASCII_RULES); -],idn) +],idn,,,,[$LIBICONV]) if test "x$cf_cv_find_linkage_idn" = xyes ; then AC_DEFINE(USE_IDNA) fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_PATH version: 9 updated: 2010/05/26 05:38:42 +dnl CF_WITH_PATH version: 10 updated: 2010/10/23 15:44:18 dnl ------------ dnl Wrapper for AC_ARG_WITH to ensure that user supplies a pathname, not just dnl defaulting to yes/no. @@ -5992,7 +6016,7 @@ dnl $5 = default value, if it's an expression & cannot be in the help-message dnl AC_DEFUN([CF_WITH_PATH], [AC_ARG_WITH($1,[$2 ](default: ifelse([$4],,empty,[$4])),, -ifelse([$4],,[withval="${$3}"],[withval="${$3-ifelse([$5],,[$4],[$5])}"]))dnl +ifelse([$4],,[withval="${$3}"],[withval="${$3:-ifelse([$5],,[$4],[$5])}"]))dnl if ifelse([$5],,true,[test -n "$5"]) ; then CF_PATH_SYNTAX(withval) fi @@ -6013,7 +6037,7 @@ AC_DEFUN([CF_WITH_ZLIB],[ ],z,,,zlib) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_XOPEN_CURSES version: 9 updated: 2010/04/28 06:02:16 +dnl CF_XOPEN_CURSES version: 10 updated: 2010/10/23 15:54:49 dnl --------------- dnl Test if we should define X/Open source for curses, needed on Digital Unix dnl 4.x, to see the extended functions, but breaks on IRIX 6.x. @@ -6026,7 +6050,7 @@ AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl AC_CACHE_CHECK(if we must define _XOPEN_SOURCE_EXTENDED,cf_cv_need_xopen_extension,[ AC_TRY_LINK([ #include <stdlib.h> -#include <${cf_cv_ncurses_header-curses.h}>],[ +#include <${cf_cv_ncurses_header:-curses.h}>],[ #if defined(NCURSES_VERSION_PATCH) if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403) make an error @@ -6039,7 +6063,7 @@ if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403) [AC_TRY_LINK([ #define _XOPEN_SOURCE_EXTENDED #include <stdlib.h> -#include <${cf_cv_ncurses_header-curses.h}>],[ +#include <${cf_cv_ncurses_header:-curses.h}>],[ #ifdef NCURSES_VERSION cchar_t check; int check2 = curs_set((int)sizeof(check)); @@ -6154,14 +6178,14 @@ if test -n "$cf_xopen_source" ; then fi ]) dnl --------------------------------------------------------------------------- -dnl CF_X_ATHENA version: 16 updated: 2010/06/14 17:42:30 +dnl CF_X_ATHENA version: 20 updated: 2010/11/09 05:18:02 dnl ----------- dnl Check for Xaw (Athena) libraries dnl dnl Sets $cf_x_athena according to the flavor of Xaw which is used. AC_DEFUN([CF_X_ATHENA], [ -cf_x_athena=${cf_x_athena-Xaw} +cf_x_athena=${cf_x_athena:-Xaw} AC_MSG_CHECKING(if you want to link with Xaw 3d library) withval= @@ -6212,6 +6236,27 @@ if test "$PKG_CONFIG" != none ; then cf_x_athena_lib="$cf_pkgconfig_libs" CF_UPPER(cf_x_athena_LIBS,HAVE_LIB_$cf_x_athena) AC_DEFINE_UNQUOTED($cf_x_athena_LIBS) + +AC_CACHE_CHECK(for usable $cf_x_athena/Xmu package,cf_cv_xaw_compat,[ +AC_TRY_LINK([ +#include <X11/Xmu/CharSet.h> +],[ +int check = XmuCompareISOLatin1("big", "small") +],[cf_cv_xaw_compat=yes],[cf_cv_xaw_compat=no])]) + + if test "$cf_cv_xaw_compat" = no + then + # workaround for broken ".pc" files... + case "$cf_x_athena_lib" in #(vi + *-lXmu*) #(vi + ;; + *) + CF_VERBOSE(work around broken package) + CF_TRY_PKG_CONFIG(xmu,,[CF_ADD_LIB_AFTER(-lXt,-lXmu)]) + ;; + esac + fi + break]) done fi @@ -6331,7 +6376,7 @@ CF_TRY_PKG_CONFIG(Xext,,[ [CF_ADD_LIB(Xext)])]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_X_TOOLKIT version: 15 updated: 2010/06/14 17:42:30 +dnl CF_X_TOOLKIT version: 20 updated: 2010/11/19 05:43:04 dnl ------------ dnl Check for X Toolkit libraries dnl @@ -6344,22 +6389,54 @@ cf_have_X_LIBS=no CF_TRY_PKG_CONFIG(xt,[ - # workaround for broken ".pc" files used for X Toolkit. - case "x$X_PRE_LIBS" in #(vi - *-lICE*) - case "x$LIBS" in #(vi - *-lICE*) #(vi - ;; - *) - CF_VERBOSE(work around broken package) - CF_VERBOSE(...before $LIBS) - LIBS=`echo "$LIBS" | sed -e "s/[[ ]][[ ]]*/ /g" -e "s,-lXt ,-lXt $X_PRE_LIBS ," -e 's/ / /g'` - CF_VERBOSE(...after $LIBS) - ;; - esac + case "x$LIBS" in #(vi + *-lX11*) #(vi + ;; + *) +# we have an "xt" package, but it may omit Xt's dependency on X11 +AC_CACHE_CHECK(for usable X dependency,cf_cv_xt_x11_compat,[ +AC_TRY_LINK([ +#include <X11/Xlib.h> +],[ + int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0); + int rc2 = XClearWindow((Display*) 0, (Window) 0); + int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0); + int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0); +],[cf_cv_xt_x11_compat=yes],[cf_cv_xt_x11_compat=no])]) + if test "$cf_cv_xt_x11_compat" = no + then + CF_VERBOSE(work around broken X11 dependency) + # 2010/11/19 - good enough until a working Xt on Xcb is delivered. + CF_TRY_PKG_CONFIG(x11,,[CF_ADD_LIB_AFTER(-lXt,-lX11)]) + fi ;; esac +AC_CACHE_CHECK(for usable X Toolkit package,cf_cv_xt_ice_compat,[ +AC_TRY_LINK([ +#include <X11/Shell.h> +],[int num = IceConnectionNumber(0) +],[cf_cv_xt_ice_compat=yes],[cf_cv_xt_ice_compat=no])]) + + if test "$cf_cv_xt_ice_compat" = no + then + # workaround for broken ".pc" files used for X Toolkit. + case "x$X_PRE_LIBS" in #(vi + *-lICE*) + case "x$LIBS" in #(vi + *-lICE*) #(vi + ;; + *) + CF_VERBOSE(work around broken ICE dependency) + CF_TRY_PKG_CONFIG(ice, + [CF_TRY_PKG_CONFIG(sm)], + [CF_ADD_LIB_AFTER(-lXt,$X_PRE_LIBS)]) + ;; + esac + ;; + esac + fi + cf_have_X_LIBS=yes ],[ @@ -6387,7 +6464,7 @@ to makefile.]) fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF__CURSES_HEAD version: 1 updated: 2009/07/16 19:32:31 +dnl CF__CURSES_HEAD version: 2 updated: 2010/10/23 15:54:49 dnl --------------- dnl Define a reusable chunk which includes <curses.h> and <term.h> when they dnl are both available. @@ -6396,7 +6473,7 @@ define([CF__CURSES_HEAD],[ #include <xcurses.h> char * XCursesProgramName = "test"; #else -#include <${cf_cv_ncurses_header-curses.h}> +#include <${cf_cv_ncurses_header:-curses.h}> #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H) #include <ncursesw/term.h> #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H) |