]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/aclocal.m4
ncurses 6.2 - patch 20200523
[ncurses.git] / test / aclocal.m4
index d3a395f190860e00ef44a9f170e1071b89f4b822..a293b26142073b4c43165d0f0e4a8db9206cef9e 100644 (file)
@@ -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.177 2020/02/27 10:21:59 tom Exp $
+dnl $Id: aclocal.m4,v 1.180 2020/04/04 20:16:13 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 <langinfo.h>],
-       [char* cs = nl_langinfo(CODESET);],
+       [char* cs = nl_langinfo(CODESET); (void)cs],
        am_cv_langinfo_codeset=yes,
        am_cv_langinfo_codeset=no)
        ])
@@ -92,10 +92,11 @@ define([CF_ACVERSION_COMPARE],
 [ifelse([$8], , ,[$8])],
 [ifelse([$9], , ,[$9])])])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_ADD_CFLAGS version: 13 updated: 2017/02/25 18:57:40
+dnl CF_ADD_CFLAGS version: 14 updated: 2020/04/04 16:16:13
 dnl -------------
 dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS
-dnl The second parameter if given makes this macro verbose.
+dnl $1 = flags to add
+dnl $2 = if given makes this macro verbose.
 dnl
 dnl Put any preprocessor definitions that use quoted strings in $EXTRA_CPPFLAGS,
 dnl to simplify use of $CPPFLAGS in compiler checks, etc., that are easily
@@ -600,7 +601,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 +631,7 @@ AC_TRY_COMPILE(
 #include <stdlib.h>
 #include <X11/Intrinsic.h>
 ],
-[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 +1001,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 +1030,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 +1049,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 +1071,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 +1100,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 +1126,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 +1140,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 +1148,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 +1167,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 +1175,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 +1558,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 +1602,7 @@ cat > conftest.$ac_ext <<EOF
 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
 extern void foo(void) GCC_NORETURN;
-int main(int argc GCC_UNUSED, char *argv[[]] GCC_UNUSED) { return 0; }
+int main(int argc GCC_UNUSED, char *argv[[]] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
 EOF
        cf_printf_attribute=no
        cf_scanf_attribute=no
@@ -3326,7 +3327,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).
@@ -3341,7 +3342,7 @@ AC_CACHE_CHECK(if SIGWINCH is defined,cf_cv_define_sigwinch,[
        AC_TRY_COMPILE([
 #include <sys/types.h>
 #include <sys/signal.h>
-],[int x = SIGWINCH],
+],[int x = SIGWINCH; (void)x],
        [cf_cv_define_sigwinch=yes],
        [AC_TRY_COMPILE([
 #undef _XOPEN_SOURCE
@@ -3349,7 +3350,7 @@ AC_CACHE_CHECK(if SIGWINCH is defined,cf_cv_define_sigwinch,[
 #undef _POSIX_C_SOURCE
 #include <sys/types.h>
 #include <sys/signal.h>
-],[int x = SIGWINCH],
+],[int x = SIGWINCH; (void)x],
        [cf_cv_define_sigwinch=maybe],
        [cf_cv_define_sigwinch=no])
 ])
@@ -3371,7 +3372,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])
 
@@ -3385,7 +3386,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.
@@ -3407,6 +3408,7 @@ extern $cf_type x;
 $cf_type x;
 static void handler(int sig)
 {
+       (void)sig;
        x = 5;
 }],
                [signal(SIGINT, handler);
@@ -3467,7 +3469,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 <sys/time.h> with <sys/select.h>])
 ])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,
@@ -3488,7 +3490,7 @@ do
 AC_TRY_COMPILE([#include <stdio.h>
 #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
        ])
@@ -3796,6 +3798,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.,
@@ -3953,7 +3984,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.
@@ -3979,7 +4010,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
@@ -3994,7 +4032,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
        ])
@@ -4139,7 +4184,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
@@ -4215,7 +4260,8 @@ 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")
+int check = XmuCompareISOLatin1("big", "small");
+(void)check;
 ],[cf_cv_xaw_compat=yes],[cf_cv_xaw_compat=no])])
 
                        if test "$cf_cv_xaw_compat" = no
@@ -4367,7 +4413,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],
@@ -4387,6 +4433,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
@@ -4419,7 +4467,7 @@ AC_TRY_LINK([
 AC_CACHE_CHECK(for usable X Toolkit package,cf_cv_xt_ice_compat,[
 AC_TRY_LINK([
 #include <X11/Shell.h>
-],[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
@@ -4449,15 +4497,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