]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/aclocal.m4
ncurses 6.4 - patch 20240420
[ncurses.git] / test / aclocal.m4
index 440d99fe73860f8d16b15279e147e1b9e813cb7d..fdab359ae5f1c6048c116eaf5091d27d0e751594 100644 (file)
@@ -1,5 +1,5 @@
 dnl***************************************************************************
-dnl Copyright 2018-2022,2023 Thomas E. Dickey                                *
+dnl Copyright 2018-2023,2024 Thomas E. Dickey                                *
 dnl Copyright 2003-2017,2018 Free Software Foundation, Inc.                  *
 dnl                                                                          *
 dnl Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -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.215 2023/04/15 20:01:23 tom Exp $
+dnl $Id: aclocal.m4,v 1.221 2024/01/19 18:27:20 tom Exp $
 dnl
 dnl Author: Thomas E. Dickey
 dnl
@@ -697,7 +697,7 @@ if test "x$ifelse([$2],,CLANG_COMPILER,[$2])" = "xyes" ; then
 fi
 ])
 dnl ---------------------------------------------------------------------------
-dnl CF_CONST_X_STRING version: 7 updated: 2021/06/07 17:39:17
+dnl CF_CONST_X_STRING version: 8 updated: 2023/12/01 17:22:50
 dnl -----------------
 dnl The X11R4-X11R6 Xt specification uses an ambiguous String type for most
 dnl character-strings.
@@ -732,6 +732,7 @@ AC_TRY_COMPILE(
 AC_CACHE_CHECK(for X11/Xt const-feature,cf_cv_const_x_string,[
        AC_TRY_COMPILE(
                [
+#undef  _CONST_X_STRING
 #define _CONST_X_STRING        /* X11R7.8 (perhaps) */
 #undef  XTSTRINGDEFINES        /* X11R5 and later */
 #include <stdlib.h>
@@ -1097,7 +1098,7 @@ fi
 
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_CURSES_TERM_H version: 15 updated: 2021/01/02 09:31:20
+dnl CF_CURSES_TERM_H version: 16 updated: 2024/01/07 06:34:16
 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,
@@ -1143,7 +1144,7 @@ case "$cf_cv_term_header" in
 #ifdef NCURSES_VERSION
 #include <${cf_header}>
 #else
-make an error
+#error expected NCURSES_VERSION to be defined
 #endif],
                        [WINDOW *x; (void)x],
                        [cf_cv_term_header=$cf_header
@@ -1711,7 +1712,7 @@ AC_CHECK_LIB(bsd, gettimeofday,
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_FUNC_OPENPTY version: 6 updated: 2021/01/01 13:31:04
+dnl CF_FUNC_OPENPTY version: 7 updated: 2023/12/03 09:21:34
 dnl ---------------
 dnl Check for openpty() function, along with <pty.h> header.  It may need the
 dnl "util" library as well.
@@ -1728,6 +1729,7 @@ AC_CACHE_CHECK(for openpty header,cf_cv_func_openpty,[
 ],[
        int x = openpty((int *)0, (int *)0, (char *)0,
                                   (struct termios *)0, (struct winsize *)0);
+       (void)x;
 ],[
                cf_cv_func_openpty=$cf_header
                break
@@ -2182,7 +2184,7 @@ AC_DEFUN([CF_INHERIT_SCRIPT],
 test -f $1 || ( test -f ../$1 && cp ../$1 ./ )
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_INSTALL_OPTS version: 2 updated: 2018/08/18 12:19:21
+dnl CF_INSTALL_OPTS version: 3 updated: 2023/06/03 15:17:30
 dnl ---------------
 dnl prompt for/fill-in useful install-program options
 AC_DEFUN([CF_INSTALL_OPTS],
@@ -2190,6 +2192,7 @@ AC_DEFUN([CF_INSTALL_OPTS],
 CF_INSTALL_OPT_S
 CF_INSTALL_OPT_P
 CF_INSTALL_OPT_O
+CF_INSTALL_OPT_STRIP_PROG
 ])dnl
 dnl ---------------------------------------------------------------------------
 dnl CF_INSTALL_OPT_O version: 3 updated: 2020/12/31 20:19:42
@@ -2276,6 +2279,72 @@ fi
 AC_SUBST(INSTALL_OPT_S)
 ])dnl
 dnl ---------------------------------------------------------------------------
+dnl CF_INSTALL_OPT_STRIP_PROG version: 1 updated: 2023/06/03 15:17:30
+dnl -------------------------
+dnl Provide an option for overriding the strip program used in install "-s"
+dnl
+dnl coreutils install provides a --strip-program option
+dnl FreeBSD uses STRIPBIN environment variable, while NetBSD and OpenBSD use
+dnl STRIP environment variable.  Other versions of install do not support this.
+AC_DEFUN([CF_INSTALL_OPT_STRIP_PROG],
+[
+AC_REQUIRE([CF_INSTALL_OPT_S])
+if test -n "$INSTALL_OPT_S"
+then
+       AC_MSG_CHECKING(if you want to specify strip-program)
+       AC_ARG_WITH(strip-program,
+               [  --with-strip-program=XX specify program to use when stripping in install],
+               [with_strip_program=$withval],
+               [with_strip_program=no])
+       AC_MSG_RESULT($with_strip_program)
+       if test "$with_strip_program" != no
+       then
+               AC_MSG_CHECKING(if strip-program is supported with this installer)
+               cf_install_program=`echo "$INSTALL" | sed -e 's%[[ ]]*[[ ]]-.%%'`
+               check_install_strip=no
+               if test -f "$cf_install_program"
+               then
+                       check_install_version=`"$cf_install_program" --version 2>/dev/null | head -n 1 | grep coreutils`
+                       if test -n "$check_install_version"
+                       then
+                               check_install_strip="option"
+                       else
+                               for check_strip_variable in STRIPBIN STRIP
+                               do
+                                       if strings "$cf_install_program" | grep "^$check_strip_variable[$]" >/dev/null
+                                       then
+                                               check_install_strip="environ"
+                                               break
+                                       fi
+                               done
+                       fi
+               fi
+               AC_MSG_RESULT($check_install_strip)
+               case "$check_install_strip" in
+               (no)
+                       AC_MSG_WARN($cf_install_program does not support strip program option)
+                       with_strip_program=no
+                       ;;
+               (environ)
+                       cat >install.tmp <<-CF_EOF
+                       #! $SHELL
+                       STRIPBIN="$with_strip_program" \\
+                       STRIP="$with_strip_program" \\
+                       $INSTALL "[$]@"
+                       CF_EOF
+                       INSTALL="`pwd`/install.tmp"
+                       chmod +x "$INSTALL"
+                       CF_VERBOSE(created $INSTALL)
+                       ;;
+               (option)
+                       INSTALL_OPT_S="$INSTALL_OPT_S --strip-program=\"$with_strip_program\""
+                       ;;
+               esac
+       fi
+fi
+AC_SUBST(INSTALL_OPT_S)
+])dnl
+dnl ---------------------------------------------------------------------------
 dnl CF_INTEL_COMPILER version: 9 updated: 2023/02/18 17:41:25
 dnl -----------------
 dnl Check if the given compiler is really the Intel compiler for Linux.  It
@@ -3005,7 +3074,7 @@ then
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_NCURSES_VERSION version: 17 updated: 2023/01/05 18:54:02
+dnl CF_NCURSES_VERSION version: 18 updated: 2024/01/07 06:34:16
 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
@@ -3035,7 +3104,7 @@ int main(void)
 # ifdef __NCURSES_H
        fprintf(fp, "old\\n");
 # else
-       make an error
+       #error expected ncurses header to define __NCURSES_H
 # endif
 #endif
        ${cf_cv_main_return:-return}(0);
@@ -3245,7 +3314,7 @@ else
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_PKG_CONFIG version: 12 updated: 2021/10/10 20:18:09
+dnl CF_PKG_CONFIG version: 13 updated: 2023/10/28 11:59:01
 dnl -------------
 dnl Check for the package-config program, unless disabled by command-line.
 dnl
@@ -3254,7 +3323,7 @@ AC_DEFUN([CF_PKG_CONFIG],
 [
 AC_MSG_CHECKING(if you want to use pkg-config)
 AC_ARG_WITH(pkg-config,
-       [  --with-pkg-config{=path} enable/disable use of pkg-config],
+       [[  --with-pkg-config[=CMD] enable/disable use of pkg-config and its name CMD]],
        [cf_pkg_config=$withval],
        [cf_pkg_config=yes])
 AC_MSG_RESULT($cf_pkg_config)
@@ -4009,7 +4078,7 @@ AC_DEFUN([CF_VERBOSE],
 CF_MSG_LOG([$1])
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_WCHAR_TYPE version: 4 updated: 2012/10/06 16:39:58
+dnl CF_WCHAR_TYPE version: 5 updated: 2023/12/03 09:21:34
 dnl -------------
 dnl Check if type wide-character type $1 is declared, and if so, which header
 dnl file is needed.  The second parameter is used to set a shell variable when
@@ -4026,7 +4095,7 @@ AC_TRY_COMPILE([
 #ifdef HAVE_LIBUTF8_H
 #include <libutf8.h>
 #endif],
-       [$1 state],
+       [$1 state; (void)state],
        [cf_cv_$1=no],
        [AC_TRY_COMPILE([
 #include <stdlib.h>
@@ -4036,7 +4105,7 @@ AC_TRY_COMPILE([
 #ifdef HAVE_LIBUTF8_H
 #include <libutf8.h>
 #endif],
-       [$1 value],
+       [$1 value; (void) value],
        [cf_cv_$1=yes],
        [cf_cv_$1=unknown])])])
 
@@ -4113,7 +4182,7 @@ if test "$with_dmalloc" = yes ; then
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_WITH_LIB_BASENAME version: 1 updated: 2020/03/07 20:05:14
+dnl CF_WITH_LIB_BASENAME version: 2 updated: 2023/11/22 20:48:30
 dnl --------------------
 dnl Allow for overriding the basename of a library, i.e., the part to which
 dnl prefixes/suffixes are attached.
@@ -4125,7 +4194,7 @@ 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-$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"
@@ -4231,7 +4300,7 @@ CF_NO_LEAKS_OPTION(valgrind,
        [USE_VALGRIND])
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_WITH_X11_RGB version: 2 updated: 2019/12/31 08:53:54
+dnl CF_WITH_X11_RGB version: 3 updated: 2023/10/28 11:59:01
 dnl ---------------
 dnl Handle configure option "--with-x11-rgb", setting these shell
 dnl variables:
@@ -4271,7 +4340,7 @@ dnl       /usr/X11/lib/X11/rgb.txt
 AC_DEFUN([CF_WITH_X11_RGB],[
 AC_MSG_CHECKING(for X11 rgb file)
 AC_ARG_WITH(x11-rgb,
-       [  --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)],
+       [  --with-x11-rgb=FILE     obtain X11 color definitions from FILE (default: EPREFIX/lib/X11/rgb.txt)],
        [RGB_PATH=$withval],
        [RGB_PATH=auto])
 
@@ -4317,7 +4386,7 @@ fi
 AC_SUBST(no_x11_rgb)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_XOPEN_CURSES version: 18 updated: 2023/01/11 04:05:23
+dnl CF_XOPEN_CURSES version: 20 updated: 2024/01/07 06:54:12
 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.
@@ -4334,15 +4403,16 @@ $ac_includes_default
 #include <${cf_cv_ncurses_header:-curses.h}>],[
 #if defined(NCURSES_VERSION_PATCH)
 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
-       make an error
+       #error disallow ncurses versions between 2020/04/03 and 2010/05/01
 #endif
 #endif
 #ifdef NCURSES_WIDECHAR
-make an error  /* prefer to fall-through on the second checks */
+#error prefer to fall-through on the second checks
 #endif
+       static char dummy[10];
        cchar_t check;
        int check2 = curs_set((int)sizeof(check));
-       long x = winnstr(stdscr, "", 0);
+       long x = winnstr(stdscr, dummy, 5);
        int x1, y1;
        (void)check2;
        getbegyx(stdscr, y1, x1);
@@ -4358,9 +4428,10 @@ make an error    /* prefer to fall-through on the second checks */
 #define $cf_try_xopen_extension 1
 $ac_includes_default
 #include <${cf_cv_ncurses_header:-curses.h}>],[
+               static char dummy[10];
                cchar_t check;
                int check2 = curs_set((int)sizeof(check));
-               long x = winnstr(stdscr, "", 0);
+               long x = winnstr(stdscr, dummy, 5);
                int x1, y1;
                getbegyx(stdscr, y1, x1);
                (void)check2;
@@ -4381,7 +4452,7 @@ esac
 
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_XOPEN_SOURCE version: 66 updated: 2023/04/03 04:19:37
+dnl CF_XOPEN_SOURCE version: 67 updated: 2023/09/06 18:55:27
 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,
@@ -4441,7 +4512,7 @@ case "$host_os" in
        cf_xopen_source="-D_SGI_SOURCE"
        cf_XOPEN_SOURCE=
        ;;
-(linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*)
+(linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc)
        CF_GNU_SOURCE($cf_XOPEN_SOURCE)
        ;;
 (minix*)