X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Faclocal.m4;h=e4bd329a81e845e783f845a988589ff21cfdf635;hp=788c1bbd64b2853389f4659b8ee6739ff82e6493;hb=f3ec084eb66ba14feb6357b674fb85dd474933d8;hpb=47d2fb4537d9ad5bb14f4810561a327930ca4280 diff --git a/test/aclocal.m4 b/test/aclocal.m4 index 788c1bbd..e4bd329a 100644 --- a/test/aclocal.m4 +++ b/test/aclocal.m4 @@ -27,7 +27,7 @@ dnl sale, use or other dealings in this Software without prior written * dnl authorization. * dnl*************************************************************************** dnl -dnl $Id: aclocal.m4,v 1.176 2020/02/09 02:02:53 tom Exp $ +dnl $Id: aclocal.m4,v 1.179 2020/03/20 00:23:48 tom Exp $ dnl dnl Author: Thomas E. Dickey dnl @@ -43,7 +43,7 @@ dnl https://invisible-island.net/autoconf/my-autoconf.html dnl dnl --------------------------------------------------------------------------- dnl --------------------------------------------------------------------------- -dnl AM_LANGINFO_CODESET version: 4 updated: 2015/04/18 08:56:57 +dnl AM_LANGINFO_CODESET version: 5 updated: 2020/03/10 18:53:47 dnl ------------------- dnl Inserted as requested by gettext 0.10.40 dnl File from /usr/share/aclocal @@ -56,7 +56,7 @@ AC_DEFUN([AM_LANGINFO_CODESET], [ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, [AC_TRY_LINK([#include ], - [char* cs = nl_langinfo(CODESET);], + [char* cs = nl_langinfo(CODESET); (void)cs], am_cv_langinfo_codeset=yes, am_cv_langinfo_codeset=no) ]) @@ -600,7 +600,7 @@ cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments" fi ]) dnl --------------------------------------------------------------------------- -dnl CF_CONST_X_STRING version: 3 updated: 2020/01/11 18:39:22 +dnl CF_CONST_X_STRING version: 4 updated: 2020/03/10 18:53:47 dnl ----------------- dnl The X11R4-X11R6 Xt specification uses an ambiguous String type for most dnl character-strings. @@ -630,7 +630,7 @@ AC_TRY_COMPILE( #include #include ], -[String foo = malloc(1)],[ +[String foo = malloc(1); (void)foo],[ AC_CACHE_CHECK(for X11/Xt const-feature,cf_cv_const_x_string,[ AC_TRY_COMPILE( @@ -1000,7 +1000,7 @@ fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_TERM_H version: 11 updated: 2015/04/15 19:08:48 +dnl CF_CURSES_TERM_H version: 12 updated: 2020/03/19 20:23:48 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, @@ -1029,7 +1029,7 @@ do AC_TRY_COMPILE([ #include <${cf_cv_ncurses_header:-curses.h}> #include <${cf_header}>], - [WINDOW *x], + [WINDOW *x; (void)x], [cf_cv_term_header=$cf_header break], [cf_cv_term_header=no]) @@ -1048,7 +1048,7 @@ case $cf_cv_term_header in #else make an error #endif], - [WINDOW *x], + [WINDOW *x; (void)x], [cf_cv_term_header=$cf_header break], [cf_cv_term_header=no]) @@ -1070,7 +1070,7 @@ case $cf_cv_term_header in esac ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_UNCTRL_H version: 4 updated: 2015/04/15 19:08:48 +dnl CF_CURSES_UNCTRL_H version: 5 updated: 2020/03/19 20:23:48 dnl ------------------ 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 @@ -1099,7 +1099,7 @@ do AC_TRY_COMPILE([ #include <${cf_cv_ncurses_header:-curses.h}> #include <${cf_header}>], - [WINDOW *x], + [WINDOW *x; (void)x], [cf_cv_unctrl_header=$cf_header break], [cf_cv_unctrl_header=no]) @@ -1125,7 +1125,7 @@ case $cf_cv_unctrl_header in esac ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_WACS_MAP version: 6 updated: 2012/10/06 08:57:51 +dnl CF_CURSES_WACS_MAP version: 7 updated: 2020/03/19 20:23:48 dnl ------------------ dnl Check for likely values of wacs_map[]. AC_DEFUN([CF_CURSES_WACS_MAP], @@ -1139,7 +1139,7 @@ AC_CACHE_CHECK(for wide alternate character set array, cf_cv_curses_wacs_map,[ #define _XOPEN_SOURCE_EXTENDED #endif #include <${cf_cv_ncurses_header:-curses.h}>], - [void *foo = &($name['k'])], + [void *foo = &($name['k']); (void)foo], [cf_cv_curses_wacs_map=$name break]) done]) @@ -1147,7 +1147,7 @@ AC_CACHE_CHECK(for wide alternate character set array, cf_cv_curses_wacs_map,[ test "$cf_cv_curses_wacs_map" != unknown && AC_DEFINE_UNQUOTED(CURSES_WACS_ARRAY,$cf_cv_curses_wacs_map,[Define to name of (n)curses wide-character array]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_WACS_SYMBOLS version: 2 updated: 2012/10/06 08:57:51 +dnl CF_CURSES_WACS_SYMBOLS version: 3 updated: 2020/03/19 20:23:48 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 @@ -1166,7 +1166,7 @@ then #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_map['k'] = *WACS_PLUS; (void)foo], [cf_cv_curses_wacs_symbols=yes]) else AC_TRY_LINK([ @@ -1174,7 +1174,7 @@ else #define _XOPEN_SOURCE_EXTENDED #endif #include <${cf_cv_ncurses_header:-curses.h}>], - [cchar_t *foo = WACS_PLUS], + [cchar_t *foo = WACS_PLUS; (void)foo], [cf_cv_curses_wacs_symbols=yes]) fi ]) @@ -1557,7 +1557,7 @@ AC_CACHE_CHECK(for openpty header,cf_cv_func_openpty,[ ]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GCC_ATTRIBUTES version: 17 updated: 2015/04/12 15:39:00 +dnl CF_GCC_ATTRIBUTES version: 18 updated: 2020/03/10 18:53:47 dnl ----------------- dnl Test for availability of useful gcc __attribute__ directives to quiet dnl compiler warnings. Though useful, not all are supported -- and contrary @@ -1601,7 +1601,7 @@ cat > conftest.$ac_ext <], + [initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);], + [AC_TRY_RUN([#include <${cf_cv_ncurses_header:-curses.h}> + int main(void) + { char *xx = curses_version(); return (xx == 0); }], + [cf_test_ncuconfig=yes], + [cf_test_ncuconfig=no], + [cf_test_ncuconfig=maybe])], + [cf_test_ncuconfig=no]) + + CFLAGS="$cf_save_CFLAGS" + CPPFLAGS="$cf_save_CPPFLAGS" + LIBS="$cf_save_LIBS" + + if test "x$cf_test_ncuconfig" != xyes; then + cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[[^ ]]*//g'` + cf_pkg_cflags="$cf_temp" + cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[[^ ]]*//g'` + cf_pkg_libs="$cf_temp" + fi + ;; + esac + + CF_ADD_CFLAGS($cf_pkg_cflags) + CF_ADD_LIBS($cf_pkg_libs) AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], [initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);], @@ -3290,7 +3326,7 @@ do done ])dnl dnl --------------------------------------------------------------------------- -dnl CF_SIGWINCH version: 2 updated: 2019/03/23 19:54:44 +dnl CF_SIGWINCH version: 3 updated: 2020/03/10 18:53:47 dnl ----------- dnl Use this macro after CF_XOPEN_SOURCE, but do not require it (not all dnl programs need this test). @@ -3305,7 +3341,7 @@ AC_CACHE_CHECK(if SIGWINCH is defined,cf_cv_define_sigwinch,[ AC_TRY_COMPILE([ #include #include -],[int x = SIGWINCH], +],[int x = SIGWINCH; (void)x], [cf_cv_define_sigwinch=yes], [AC_TRY_COMPILE([ #undef _XOPEN_SOURCE @@ -3313,7 +3349,7 @@ AC_CACHE_CHECK(if SIGWINCH is defined,cf_cv_define_sigwinch,[ #undef _POSIX_C_SOURCE #include #include -],[int x = SIGWINCH], +],[int x = SIGWINCH; (void)x], [cf_cv_define_sigwinch=maybe], [cf_cv_define_sigwinch=no]) ]) @@ -3335,7 +3371,7 @@ do #if SIGWINCH != $cf_sigwinch make an error #endif -int x = SIGWINCH], +int x = SIGWINCH; (void)x], [cf_cv_fixup_sigwinch=$cf_sigwinch break]) @@ -3349,7 +3385,7 @@ done fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_SIG_ATOMIC_T version: 4 updated: 2020/01/18 12:30:44 +dnl CF_SIG_ATOMIC_T version: 5 updated: 2020/03/10 18:53:47 dnl --------------- dnl signal handler, but there are some gcc dependencies in that recommendation. dnl Try anyway. @@ -3371,6 +3407,7 @@ extern $cf_type x; $cf_type x; static void handler(int sig) { + (void)sig; x = 5; }], [signal(SIGINT, handler); @@ -3431,7 +3468,7 @@ AC_MSG_RESULT($cf_cv_sys_time_select) test "$cf_cv_sys_time_select" = yes && AC_DEFINE(HAVE_SYS_TIME_SELECT,1,[Define to 1 if we can include with ]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_TERM_HEADER version: 4 updated: 2015/04/15 19:08:48 +dnl CF_TERM_HEADER version: 5 updated: 2020/03/19 20:23:48 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, @@ -3452,7 +3489,7 @@ do AC_TRY_COMPILE([#include #include <${cf_cv_ncurses_header:-curses.h}> #include <$cf_test> -],[int x = auto_left_margin],[ +],[int x = auto_left_margin; (void)x],[ cf_cv_term_header="$cf_test"],[ cf_cv_term_header=unknown ]) @@ -3760,6 +3797,35 @@ if test "$with_dmalloc" = yes ; then fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_WITH_LIB_BASENAME version: 1 updated: 2020/03/07 20:05:14 +dnl -------------------- +dnl Allow for overriding the basename of a library, i.e., the part to which +dnl prefixes/suffixes are attached. +dnl +dnl $1 = variable to set +dnl $2 = option name +dnl $3 = default basename for library, if omitted use $2 +AC_DEFUN([CF_WITH_LIB_BASENAME], +[ +AC_MSG_CHECKING(for desired basename for $2 library) +AC_ARG_WITH($2-libname, + [ --with-$2-libname=XXX override ifelse($3,,$2,$3) basename of library], + [with_lib_basename=$withval], + [with_lib_basename=ifelse($3,,$2,$3)]) +$1="$with_lib_basename" + +case "x[$]$1" in +(x|xno|xnone|xyes) + $1=ifelse($3,,$2,$3) + ;; +(*) + ;; +esac + +AC_MSG_RESULT([$]$1) +AC_SUBST($1) +])dnl +dnl --------------------------------------------------------------------------- dnl CF_WITH_NCURSES_ETC version: 5 updated: 2016/02/20 19:23:20 dnl ------------------- dnl Use this macro for programs which use any variant of "curses", e.g., @@ -3917,7 +3983,7 @@ fi AC_SUBST(no_x11_rgb) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_XOPEN_CURSES version: 14 updated: 2018/06/20 20:23:13 +dnl CF_XOPEN_CURSES version: 15 updated: 2020/03/19 20:23:48 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. @@ -3943,7 +4009,14 @@ AC_TRY_LINK([ #endif long x = winnstr(stdscr, "", 0); int x1, y1; - getbegyx(stdscr, y1, x1)], +#ifdef NCURSES_VERSION + (void)check2; +#endif + getbegyx(stdscr, y1, x1); + (void)x; + (void)y1; + (void)x1; + ], [cf_cv_need_xopen_extension=none], [ for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR @@ -3958,7 +4031,14 @@ AC_TRY_LINK([ #endif long x = winnstr(stdscr, "", 0); int x1, y1; - getbegyx(stdscr, y1, x1)], + getbegyx(stdscr, y1, x1); +#ifdef NCURSES_VERSION + (void)check2; +#endif + (void)x; + (void)y1; + (void)x1; + ], [cf_cv_need_xopen_extension=$cf_try_xopen_extension; break]) done ]) @@ -4103,7 +4183,7 @@ fi fi # cf_cv_posix_visible ]) dnl --------------------------------------------------------------------------- -dnl CF_X_ATHENA version: 23 updated: 2015/04/12 15:39:00 +dnl CF_X_ATHENA version: 24 updated: 2020/03/10 18:53:47 dnl ----------- dnl Check for Xaw (Athena) libraries dnl @@ -4179,7 +4259,8 @@ AC_CACHE_CHECK(for usable $cf_x_athena/Xmu package,cf_cv_xaw_compat,[ AC_TRY_LINK([ #include ],[ -int check = XmuCompareISOLatin1("big", "small") +int check = XmuCompareISOLatin1("big", "small"); +(void)check; ],[cf_cv_xaw_compat=yes],[cf_cv_xaw_compat=no])]) if test "$cf_cv_xaw_compat" = no @@ -4331,7 +4412,7 @@ CF_TRY_PKG_CONFIG(Xext,,[ [CF_ADD_LIB(Xext)])]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_X_TOOLKIT version: 24 updated: 2019/03/23 19:54:44 +dnl CF_X_TOOLKIT version: 25 updated: 2020/03/10 17:26:15 dnl ------------ dnl Check for X Toolkit libraries AC_DEFUN([CF_X_TOOLKIT], @@ -4351,6 +4432,8 @@ then CF_TRY_PKG_CONFIG(ice,,[AC_MSG_WARN(unable to find ICE library)]) CF_TRY_PKG_CONFIG(sm,,[AC_MSG_WARN(unable to find SM library)]) CF_TRY_PKG_CONFIG(xt,,[AC_MSG_WARN(unable to find Xt library)]) +else + LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS" fi cf_have_X_LIBS=no @@ -4383,7 +4466,7 @@ AC_TRY_LINK([ AC_CACHE_CHECK(for usable X Toolkit package,cf_cv_xt_ice_compat,[ AC_TRY_LINK([ #include -],[int num = IceConnectionNumber(0) +],[int num = IceConnectionNumber(0); (void) num ],[cf_cv_xt_ice_compat=yes],[cf_cv_xt_ice_compat=no])]) if test "$cf_cv_xt_ice_compat" = no @@ -4413,15 +4496,13 @@ AC_TRY_LINK([ AC_CHECK_FUNC(XOpenDisplay,,[ AC_CHECK_LIB(X11,XOpenDisplay, - [CF_ADD_LIB(X11)],, - [$X_PRE_LIBS $LIBS $X_EXTRA_LIBS])]) + [CF_ADD_LIB(X11)])]) AC_CHECK_FUNC(XtAppInitialize,,[ AC_CHECK_LIB(Xt, XtAppInitialize, [AC_DEFINE(HAVE_LIBXT,1,[Define to 1 if we can compile with the Xt library]) cf_have_X_LIBS=Xt - LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"],, - [$X_PRE_LIBS $LIBS $X_EXTRA_LIBS])]) + LIBS="-lXt $LIBS"])]) ]) if test $cf_have_X_LIBS = no ; then