]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - Ada95/aclocal.m4
ncurses 6.4 - patch 20240414
[ncurses.git] / Ada95 / aclocal.m4
index 1c0f02888ec2c5b1ff5b2c07f3999e6d586c0075..6fe1f946e7e6a9ee195ff4f25ca0eb4387ed29db 100644 (file)
@@ -1,5 +1,5 @@
 dnl***************************************************************************
-dnl Copyright 2018-2020,2021 Thomas E. Dickey                                *
+dnl Copyright 2018-2023,2024 Thomas E. Dickey                                *
 dnl Copyright 2010-2017,2018 Free Software Foundation, Inc.                  *
 dnl                                                                          *
 dnl Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -29,7 +29,7 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey
 dnl
-dnl $Id: aclocal.m4,v 1.183 2021/09/05 21:33:34 tom Exp $
+dnl $Id: aclocal.m4,v 1.210 2024/03/30 22:17:13 tom Exp $
 dnl Macros used in NCURSES Ada95 auto-configuration script.
 dnl
 dnl These macros are maintained separately from NCURSES.  The copyright on
@@ -477,7 +477,7 @@ fi
 AC_SUBST(ARFLAGS)
 ])
 dnl ---------------------------------------------------------------------------
-dnl CF_BUILD_CC version: 9 updated: 2021/01/02 09:31:20
+dnl CF_BUILD_CC version: 11 updated: 2022/12/04 15:40:08
 dnl -----------
 dnl If we're cross-compiling, allow the user to override the tools and their
 dnl options.  The configure script is oriented toward identifying the host
@@ -543,7 +543,32 @@ if test "$cross_compiling" = yes ; then
 
        : ${BUILD_CC:='${CC}'}
 
-       if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
+       AC_MSG_CHECKING(if the build-compiler "$BUILD_CC" works)
+
+       cf_save_crossed=$cross_compiling
+       cf_save_ac_link=$ac_link
+       cross_compiling=no
+       cf_build_cppflags=$BUILD_CPPFLAGS
+       test "$cf_build_cppflags" = "#" && cf_build_cppflags=
+       ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $cf_build_cppflags $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&AS_MESSAGE_LOG_FD'
+
+       AC_TRY_RUN([#include <stdio.h>
+               int main(int argc, char *argv[])
+               {
+                       ${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0);
+               }
+       ],
+               cf_ok_build_cc=yes,
+               cf_ok_build_cc=no,
+               cf_ok_build_cc=unknown)
+
+       cross_compiling=$cf_save_crossed
+       ac_link=$cf_save_ac_link
+
+       AC_MSG_RESULT($cf_ok_build_cc)
+
+       if test "$cf_ok_build_cc" != yes
+       then
                AC_MSG_ERROR([Cross-build requires two compilers.
 Use --with-build-cc to specify the native compiler.])
        fi
@@ -569,7 +594,7 @@ AC_SUBST(BUILD_EXEEXT)
 AC_SUBST(BUILD_OBJEXT)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_C11_NORETURN version: 3 updated: 2021/03/28 11:36:23
+dnl CF_C11_NORETURN version: 4 updated: 2023/02/18 17:41:25
 dnl ---------------
 AC_DEFUN([CF_C11_NORETURN],
 [
@@ -583,8 +608,7 @@ AC_MSG_RESULT($enable_stdnoreturn)
 if test $enable_stdnoreturn = yes; then
 AC_CACHE_CHECK([for C11 _Noreturn feature], cf_cv_c11_noreturn,
        [AC_TRY_COMPILE([
-#include <stdio.h>
-#include <stdlib.h>
+$ac_includes_default
 #include <stdnoreturn.h>
 static _Noreturn void giveup(void) { exit(0); }
        ],
@@ -608,7 +632,7 @@ AC_SUBST(HAVE_STDNORETURN_H)
 AC_SUBST(STDC_NORETURN)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_CC_ENV_FLAGS version: 10 updated: 2020/12/31 18:40:20
+dnl CF_CC_ENV_FLAGS version: 11 updated: 2023/02/20 11:15:46
 dnl ---------------
 dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
 dnl into CC.  This will not help with broken scripts that wrap the compiler
@@ -649,7 +673,7 @@ case "$CC" in
        AC_MSG_WARN(your environment uses the CC variable to hold CFLAGS/CPPFLAGS options)
        # humor him...
        cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[[ ]]* / /g' -e 's/[[ ]]*[[ ]]-[[^ ]].*//'`
-       cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", [substr]([$]0,1+length(prog))); }'`
+       cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"`
        CC="$cf_prog"
        for cf_arg in $cf_flags
        do
@@ -778,7 +802,38 @@ case "$cf_cv_gnat_version" in
 esac
 ])
 dnl ---------------------------------------------------------------------------
-dnl CF_CLANG_COMPILER version: 8 updated: 2021/01/01 13:31:04
+dnl CF_CHECK_LIBSSP version: 1 updated: 2021/10/30 10:40:19
+dnl ---------------
+dnl Check if libssp is needed, e.g., to work around misconfigured libraries
+dnl used in cross-compiling to MinGW.
+AC_DEFUN([CF_CHECK_LIBSSP],[
+AC_CACHE_CHECK(if ssp library is needed,cf_cv_need_libssp,[
+AC_TRY_LINK([
+#include <sys/types.h>
+#include <dirent.h>
+],[
+       DIR *dp = opendir(".");
+],cf_cv_need_libssp=no,[
+       cf_save_LIBS="$LIBS"
+       LIBS="$LIBS -lssp"
+       AC_TRY_LINK([
+#include <sys/types.h>
+#include <dirent.h>
+       ],[
+                  DIR *dp = opendir(".");
+       ],cf_cv_need_libssp=yes,
+         cf_cv_need_libssp=maybe)
+       LIBS="$cf_save_LIBS"
+])dnl
+])
+
+if test "x$cf_cv_need_libssp" = xyes
+then
+       CF_ADD_LIB(ssp)
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_CLANG_COMPILER version: 9 updated: 2023/02/18 17:41:25
 dnl -----------------
 dnl Check if the given compiler is really clang.  clang's C driver defines
 dnl __GNUC__ (fooling the configure script into setting $GCC to yes) but does
@@ -800,7 +855,7 @@ if test "$ifelse([$1],,[$1],GCC)" = yes ; then
        AC_TRY_COMPILE([],[
 #ifdef __clang__
 #else
-make an error
+#error __clang__ is not defined
 #endif
 ],[ifelse([$2],,CLANG_COMPILER,[$2])=yes
 ],[])
@@ -846,7 +901,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.
@@ -881,6 +936,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>
@@ -906,7 +962,7 @@ esac
 ])
 ])dnl
 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.
@@ -941,6 +997,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>
@@ -966,7 +1023,7 @@ esac
 ])
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_CURSES_HEADER version: 5 updated: 2015/04/23 20:35:30
+dnl CF_CURSES_HEADER version: 6 updated: 2022/12/02 20:06:52
 dnl ----------------
 dnl Find a "curses" header file, e.g,. "curses.h", or one of the more common
 dnl variations of ncurses' installs.
@@ -980,7 +1037,7 @@ for cf_header in \
        curses.h ifelse($1,,,[$1/curses.h]) ifelse($1,,[ncurses/ncurses.h ncurses/curses.h])
 do
 AC_TRY_COMPILE([#include <${cf_header}>],
-       [initscr(); tgoto("?", 0,0)],
+       [initscr(); endwin()],
        [cf_cv_ncurses_header=$cf_header; break],[])
 done
 ])
@@ -1298,7 +1355,7 @@ AC_DEFUN([CF_FIXUP_ADAFLAGS],[
        AC_MSG_RESULT($ADAFLAGS)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_FIX_WARNINGS version: 3 updated: 2020/12/31 18:40:20
+dnl CF_FIX_WARNINGS version: 4 updated: 2021/12/16 18:22:31
 dnl ---------------
 dnl Warning flags do not belong in CFLAGS, CPPFLAGS, etc.  Any of gcc's
 dnl "-Werror" flags can interfere with configure-checks.  Those go into
@@ -1310,11 +1367,13 @@ if test "$GCC" = yes || test "$GXX" = yes
 then
        case [$]$1 in
        (*-Werror=*)
-               CF_VERBOSE(repairing $1: [$]$1)
                cf_temp_flags=
                for cf_temp_scan in [$]$1
                do
                        case "x$cf_temp_scan" in
+                       (x-Werror=format*)
+                               CF_APPEND_TEXT(cf_temp_flags,$cf_temp_scan)
+                               ;;
                        (x-Werror=*)
                                CF_APPEND_TEXT(EXTRA_CFLAGS,$cf_temp_scan)
                                ;;
@@ -1323,15 +1382,46 @@ then
                                ;;
                        esac
                done
-               $1="$cf_temp_flags"
-               CF_VERBOSE(... fixed [$]$1)
-               CF_VERBOSE(... extra $EXTRA_CFLAGS)
+               if test "x[$]$1" != "x$cf_temp_flags"
+               then
+                       CF_VERBOSE(repairing $1: [$]$1)
+                       $1="$cf_temp_flags"
+                       CF_VERBOSE(... fixed [$]$1)
+                       CF_VERBOSE(... extra $EXTRA_CFLAGS)
+               fi
                ;;
        esac
 fi
 AC_SUBST(EXTRA_CFLAGS)
 ])dnl
 dnl ---------------------------------------------------------------------------
+dnl CF_FUNC_GETTIME version: 2 updated: 2023/02/25 08:45:56
+dnl ---------------
+dnl Check for gettimeofday or clock_gettime.  In 2023, the former is still more
+dnl widely supported, but "deprecated" (2008), so we will use the latter if it
+dnl is available, to reduce compiler warnings.
+AC_DEFUN([CF_FUNC_GETTIME],[
+AC_CACHE_CHECK(for clock_gettime,cf_cv_func_clock_gettime,[
+               AC_TRY_LINK([#include <time.h>],
+               [struct timespec ts;
+               int rc = clock_gettime(CLOCK_REALTIME, &ts); (void) rc; (void)ts],
+               [cf_cv_func_clock_gettime=yes],
+               [cf_cv_func_clock_gettime=no])
+])
+
+if test "$cf_cv_func_clock_gettime" = yes
+then
+       AC_DEFINE(HAVE_CLOCK_GETTIME,1,[Define to 1 if we have clock_gettime function])
+else
+AC_CHECK_FUNC(gettimeofday,
+       AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define to 1 if we have gettimeofday function]),[
+
+AC_CHECK_LIB(bsd, gettimeofday,
+       AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define to 1 if we have gettimeofday function])
+       CF_ADD_LIB(bsd))])dnl CLIX: bzero, select, gettimeofday
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
 dnl CF_GCC_ATTRIBUTES version: 24 updated: 2021/03/20 12:00:25
 dnl -----------------
 dnl Test for availability of useful gcc __attribute__ directives to quiet
@@ -1362,6 +1452,7 @@ then
        AC_CHECKING([for $CC __attribute__ directives])
 cat > "conftest.$ac_ext" <<EOF
 #line __oline__ "${as_me:-configure}"
+#include <stdio.h>
 #include "confdefs.h"
 #include "conftest.h"
 #include "conftest.i"
@@ -1444,7 +1535,7 @@ rm -rf ./conftest*
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_GCC_VERSION version: 8 updated: 2019/09/07 13:38:36
+dnl CF_GCC_VERSION version: 9 updated: 2023/03/05 14:30:13
 dnl --------------
 dnl Find version of gcc, and (because icc/clang pretend to be gcc without being
 dnl compatible), attempt to determine if icc/clang is actually used.
@@ -1453,7 +1544,7 @@ AC_REQUIRE([AC_PROG_CC])
 GCC_VERSION=none
 if test "$GCC" = yes ; then
        AC_MSG_CHECKING(version of $CC)
-       GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[[^)]]*) //' -e 's/^.*(Debian[[^)]]*) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`"
+       GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[[^(]]*([[^)]][[^)]]*) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`"
        test -z "$GCC_VERSION" && GCC_VERSION=unknown
        AC_MSG_RESULT($GCC_VERSION)
 fi
@@ -2037,7 +2128,7 @@ CPPFLAGS="-I. $CPPFLAGS"
 AC_SUBST(CPPFLAGS)
 ])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],
@@ -2045,6 +2136,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
@@ -2131,7 +2223,73 @@ fi
 AC_SUBST(INSTALL_OPT_S)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_INTEL_COMPILER version: 8 updated: 2021/01/01 16:53:59
+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
 dnl tries to imitate gcc, but does not return an error when it finds a mismatch
@@ -2157,7 +2315,7 @@ if test "$ifelse([$1],,[$1],GCC)" = yes ; then
                AC_TRY_COMPILE([],[
 #ifdef __INTEL_COMPILER
 #else
-make an error
+#error __INTEL_COMPILER is not defined
 #endif
 ],[ifelse([$2],,INTEL_COMPILER,[$2])=yes
 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
@@ -2169,7 +2327,7 @@ cf_save_CFLAGS="$cf_save_CFLAGS -we147"
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_LARGEFILE version: 12 updated: 2020/03/19 20:23:48
+dnl CF_LARGEFILE version: 13 updated: 2023/12/03 19:09:59
 dnl ------------
 dnl Add checks for large file support.
 AC_DEFUN([CF_LARGEFILE],[
@@ -2203,11 +2361,15 @@ ifdef([AC_FUNC_FSEEKO],[
 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
 #include <sys/types.h>
 #include <dirent.h>
+
+#ifndef __REDIRECT
+/* if transitional largefile support is setup, this is true */
+extern struct dirent64 * readdir(DIR *);
+#endif
                ],[
-               /* if transitional largefile support is setup, this is true */
-               extern struct dirent64 * readdir(DIR *);
-               struct dirent64 *x = readdir((DIR *)0);
-               struct dirent *y = readdir((DIR *)0);
+               DIR *dp = opendir(".");
+               struct dirent64 *x = readdir(dp);
+               struct dirent *y = readdir(dp);
                int z = x - y;
                (void)z;
                ],
@@ -2438,7 +2600,7 @@ AC_DEFUN([CF_LIB_TYPE],
        test -n "$LIB_SUFFIX" && $2="${LIB_SUFFIX}[$]{$2}"
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_LINK_DATAONLY version: 13 updated: 2020/02/08 15:59:30
+dnl CF_LINK_DATAONLY version: 15 updated: 2023/12/03 10:03:10
 dnl ----------------
 dnl Some systems have a non-ANSI linker that doesn't pull in modules that have
 dnl only data (i.e., no functions), for example NeXT.  On those systems we'll
@@ -2460,17 +2622,21 @@ EOF
        rm -f conftest.$ac_ext data.o
        cat >conftest.$ac_ext <<EOF
 #line __oline__ "configure"
+extern int testfunc(void);
+#if defined(NeXT)
 int    testfunc(void)
 {
-#if defined(NeXT)
        ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
+}
 #else
-       extern int testdata[[3]];
+extern int testdata[[3]];
+int    testfunc(void)
+{
        return testdata[[0]] == 123
           &&  testdata[[1]] == 456
           &&  testdata[[2]] == 789;
-#endif
 }
+#endif
 EOF
        if AC_TRY_EVAL(ac_compile); then
                mv conftest.o func.o && \
@@ -2481,9 +2647,9 @@ EOF
        cf_saveLIBS="$LIBS"
        LIBS="conftest.a $LIBS"
        AC_TRY_RUN([
+       extern int testfunc(void);
        int main(void)
        {
-               extern int testfunc();
                ${cf_cv_main_return:-return} (!testfunc());
        }
        ],
@@ -2695,7 +2861,7 @@ fi
 test "$cf_cv_mixedcase" = yes && AC_DEFINE(MIXEDCASE_FILENAMES,1,[Define to 1 if filesystem supports mixed-case filenames.])
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_MKSTEMP version: 11 updated: 2021/01/01 13:31:04
+dnl CF_MKSTEMP version: 13 updated: 2023/12/01 17:22:50
 dnl ----------
 dnl Check for a working mkstemp.  This creates two files, checks that they are
 dnl successfully created and distinct (AmigaOS apparently fails on the last).
@@ -2706,17 +2872,11 @@ unistd.h \
 AC_CACHE_CHECK(for working mkstemp, cf_cv_func_mkstemp,[
 rm -rf ./conftest*
 AC_TRY_RUN([
-#include <sys/types.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/stat.h>
+$ac_includes_default
+
 int main(void)
 {
-       char *tmpl = "conftestXXXXXX";
+       static char tmpl[] = "conftestXXXXXX";
        char name[2][80];
        int n;
        int result = 0;
@@ -2851,7 +3011,7 @@ AC_SUBST(cf_cv_type_of_bool)dnl
 
 ])
 dnl ---------------------------------------------------------------------------
-dnl CF_NCURSES_CC_CHECK version: 5 updated: 2020/12/31 20:19:42
+dnl CF_NCURSES_CC_CHECK version: 6 updated: 2023/02/18 17:47:58
 dnl -------------------
 dnl Check if we can compile with ncurses' header file
 dnl $1 is the cache variable to set
@@ -2868,7 +3028,7 @@ AC_DEFUN([CF_NCURSES_CC_CHECK],[
 #ifdef NCURSES_VERSION
 ]ifelse($3,ncursesw,[
 #ifndef WACS_BSSB
-       make an error
+       #error WACS_BSSB is not defined
 #endif
 ])[
 printf("%s\\n", NCURSES_VERSION);
@@ -2876,7 +3036,7 @@ printf("%s\\n", NCURSES_VERSION);
 #ifdef __NCURSES_H
 printf("old\\n");
 #else
-       make an error
+       #error __NCURSES_H is not defined
 #endif
 #endif
        ]
@@ -3199,7 +3359,7 @@ CF_UPPER(cf_nculib_ROOT,HAVE_LIB$cf_nculib_root)
 AC_DEFINE_UNQUOTED($cf_nculib_ROOT)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_NCURSES_VERSION version: 16 updated: 2020/12/31 20:19:42
+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
@@ -3212,8 +3372,10 @@ AC_CACHE_CHECK(for ncurses version, cf_cv_ncurses_version,[
        cf_tempfile=out$$
        rm -f "$cf_tempfile"
        AC_TRY_RUN([
+$ac_includes_default
+
 #include <${cf_cv_ncurses_header:-curses.h}>
-#include <stdio.h>
+
 int main(void)
 {
        FILE *fp = fopen("$cf_tempfile", "w");
@@ -3227,7 +3389,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);
@@ -3334,14 +3496,16 @@ case ".[$]$1" in
 esac
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_PKG_CONFIG version: 11 updated: 2021/01/01 13:31:04
+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
+dnl Sets $PKG_CONFIG to the pathname of the pkg-config program.
 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)
@@ -3370,7 +3534,7 @@ fi
 AC_SUBST(PKG_CONFIG)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_POSIX_C_SOURCE version: 11 updated: 2018/12/31 20:46:17
+dnl CF_POSIX_C_SOURCE version: 12 updated: 2023/02/18 17:41:25
 dnl -----------------
 dnl Define _POSIX_C_SOURCE to the given level, and _POSIX_SOURCE if needed.
 dnl
@@ -3401,7 +3565,7 @@ AC_CACHE_CHECK(if we should define _POSIX_C_SOURCE,cf_cv_posix_c_source,[
        CF_MSG_LOG(if the symbol is already defined go no further)
        AC_TRY_COMPILE([#include <sys/types.h>],[
 #ifndef _POSIX_C_SOURCE
-make an error
+#error _POSIX_C_SOURCE is not defined
 #endif],
        [cf_cv_posix_c_source=no],
        [cf_want_posix_source=no
@@ -3420,7 +3584,7 @@ make an error
         if test "$cf_want_posix_source" = yes ; then
                AC_TRY_COMPILE([#include <sys/types.h>],[
 #ifdef _POSIX_SOURCE
-make an error
+#error _POSIX_SOURCE is defined
 #endif],[],
                cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE")
         fi
@@ -3431,7 +3595,7 @@ make an error
         CF_MSG_LOG(if the second compile does not leave our definition intact error)
         AC_TRY_COMPILE([#include <sys/types.h>],[
 #ifndef _POSIX_C_SOURCE
-make an error
+#error _POSIX_C_SOURCE is not defined
 #endif],,
         [cf_cv_posix_c_source=no])
         CFLAGS="$cf_save_CFLAGS"
@@ -3819,7 +3983,7 @@ do
 done
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_SHARED_OPTS version: 107 updated: 2021/09/04 06:47:34
+dnl CF_SHARED_OPTS version: 111 updated: 2024/03/29 20:08:49
 dnl --------------
 dnl --------------
 dnl Attempt to determine the appropriate CC/LD options for creating a shared
@@ -3865,9 +4029,9 @@ AC_DEFUN([CF_SHARED_OPTS],
        cf_ld_rpath_opt=
        test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
 
-       AC_MSG_CHECKING(if release/abi version should be used for shared libs)
+       AC_MSG_CHECKING(whether to use release or ABI version in shared library file names)
        AC_ARG_WITH(shlib-version,
-       [  --with-shlib-version=X  Specify rel or abi version for shared libs],
+       [[  --with-shlib-version[={rel|abi}] use release or ABI version in shared library file names]],
        [test -z "$withval" && withval=auto
        case "$withval" in
        (yes)
@@ -3909,7 +4073,7 @@ AC_DEFUN([CF_SHARED_OPTS],
                for CC_SHARED_OPTS in -fPIC -fpic ''
                do
                        CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
-                       AC_TRY_COMPILE([#include <stdio.h>],[int x = 1],[break],[])
+                       AC_TRY_COMPILE([#include <stdio.h>],[int x = 1; (void)x],[break],[])
                done
                AC_MSG_RESULT($CC_SHARED_OPTS)
                CFLAGS="$cf_save_CFLAGS"
@@ -4279,11 +4443,11 @@ CF_EOF
                # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
                # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
                if test "$DFT_LWR_MODEL" = "shared" ; then
-                       LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
+                       LOCAL_LDFLAGS="-R\$(LOCAL_LIBDIR):\${libdir}"
                        LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
                fi
                if test "$cf_cv_enable_rpath" = yes ; then
-                       EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
+                       EXTRA_LDFLAGS="-R\${libdir} $EXTRA_LDFLAGS"
                fi
                CF_SHARED_SONAME
                if test "$GCC" != yes; then
@@ -4295,9 +4459,9 @@ CF_EOF
                        done
                        CFLAGS="$cf_save_CFLAGS"
                        CC_SHARED_OPTS=$cf_shared_opts
-                       MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -'$cf_cv_shared_soname' -o $[@]'
+                       MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -Wl,-h,'$cf_cv_shared_soname' -o $[@]'
                else
-                       MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -'$cf_cv_shared_soname' -o $[@]'
+                       MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -Wl,-h,'$cf_cv_shared_soname' -o $[@]'
                fi
                ;;
        (sysv5uw7*|unix_sv*)
@@ -4484,34 +4648,20 @@ top_builddir=ifelse($1,,`pwd`,$1)
 AC_SUBST(top_builddir)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_TRY_XOPEN_SOURCE version: 3 updated: 2021/08/28 15:20:37
+dnl CF_TRY_XOPEN_SOURCE version: 4 updated: 2022/09/10 15:16:16
 dnl -------------------
 dnl If _XOPEN_SOURCE is not defined in the compile environment, check if we
 dnl can define it successfully.
 AC_DEFUN([CF_TRY_XOPEN_SOURCE],[
 AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[
-       AC_TRY_COMPILE([
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-],[
-#ifndef _XOPEN_SOURCE
-make an error
-#endif],
+       AC_TRY_COMPILE(CF__XOPEN_SOURCE_HEAD,CF__XOPEN_SOURCE_BODY,
        [cf_cv_xopen_source=no],
        [cf_save="$CPPFLAGS"
         CF_APPEND_TEXT(CPPFLAGS,-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE)
-        AC_TRY_COMPILE([
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-],[
-#ifdef _XOPEN_SOURCE
-make an error
-#endif],
-       [cf_cv_xopen_source=no],
-       [cf_cv_xopen_source=$cf_XOPEN_SOURCE])
-       CPPFLAGS="$cf_save"
+        AC_TRY_COMPILE(CF__XOPEN_SOURCE_HEAD,CF__XOPEN_SOURCE_BODY,
+               [cf_cv_xopen_source=no],
+               [cf_cv_xopen_source=$cf_XOPEN_SOURCE])
+               CPPFLAGS="$cf_save"
        ])
 ])
 
@@ -4532,7 +4682,7 @@ AC_DEFUN([CF_UPPER],
 $1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_UTF8_LIB version: 9 updated: 2021/05/19 19:35:25
+dnl CF_UTF8_LIB version: 10 updated: 2023/01/11 04:05:23
 dnl -----------
 dnl Check for multibyte support, and if not found, utf8 compatibility library
 AC_DEFUN([CF_UTF8_LIB],
@@ -4541,8 +4691,7 @@ AC_HAVE_HEADERS(wchar.h)
 AC_CACHE_CHECK(for multibyte character support,cf_cv_utf8_lib,[
        cf_save_LIBS="$LIBS"
        AC_TRY_LINK([
-#include <stdlib.h>
-#include <stdio.h>
+$ac_includes_default
 #ifdef HAVE_WCHAR_H
 #include <wchar.h>
 #endif
@@ -4598,26 +4747,26 @@ weak_symbol(fopen);
 ])
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_WITH_ADA_COMPILER version: 2 updated: 2010/06/26 17:35:58
+dnl CF_WITH_ADA_COMPILER version: 3 updated: 2023/10/28 11:59:01
 dnl --------------------
 dnl Command-line option to specify the Ada95 compiler.
 AC_DEFUN([CF_WITH_ADA_COMPILER],[
-AC_MSG_CHECKING(for ada-compiler)
+AC_MSG_CHECKING(for Ada95 compiler)
 AC_ARG_WITH(ada-compiler,
-       [  --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)],
+       [[  --with-ada-compiler[=CMD] use CMD as Ada95 compiler (default: gnatmake)]],
        [cf_ada_compiler=$withval],
        [cf_ada_compiler=gnatmake])
 AC_SUBST(cf_ada_compiler)
 AC_MSG_RESULT($cf_ada_compiler)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_WITH_ADA_INCLUDE version: 2 updated: 2010/06/26 17:35:58
+dnl CF_WITH_ADA_INCLUDE version: 3 updated: 2023/10/28 11:59:01
 dnl -------------------
 dnl Command-line option to specify where Ada includes will install.
 AC_DEFUN([CF_WITH_ADA_INCLUDE],[
-AC_MSG_CHECKING(for ada-include)
+AC_MSG_CHECKING(for Ada95 include directory)
 CF_WITH_PATH(ada-include,
-   [  --with-ada-include=DIR  Ada includes are in DIR],
+   [  --with-ada-include=DIR  find Ada95 includes in DIR],
    ADA_INCLUDE,
    PREFIX/share/ada/adainclude,
    [$]prefix/share/ada/adainclude)
@@ -4625,16 +4774,16 @@ AC_SUBST(ADA_INCLUDE)
 AC_MSG_RESULT($ADA_INCLUDE)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_WITH_ADA_LIBNAME version: 1 updated: 2019/09/07 18:59:41
+dnl CF_WITH_ADA_LIBNAME version: 3 updated: 2023/11/22 20:48:30
 dnl -------------------
 dnl CF_WITH_ADA_LIBNAME
 dnl -------------------
 dnl Command-line option to specify how to name the resulting Ada library.
 dnl $1 = default value
 AC_DEFUN([CF_WITH_ADA_LIBNAME],[
-AC_MSG_CHECKING(for ada-libname)
+AC_MSG_CHECKING(for Ada95 curses library name)
 AC_ARG_WITH(ada-libname,
-   [  --with-ada-libname=XXX  override default Ada library-name],
+   [[  --with-ada-libname[=XXX]  use XXX as Ada95 library name]],
    ADA_LIBNAME=[$]withval,
    ADA_LIBNAME=$1)
 case "x$ADA_LIBNAME" in
@@ -4646,13 +4795,13 @@ AC_SUBST(ADA_LIBNAME)
 AC_MSG_RESULT($ADA_LIBNAME)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_WITH_ADA_OBJECTS version: 2 updated: 2010/06/26 17:35:58
+dnl CF_WITH_ADA_OBJECTS version: 3 updated: 2023/10/28 11:59:01
 dnl -------------------
 dnl Command-line option to specify where Ada objects will install.
 AC_DEFUN([CF_WITH_ADA_OBJECTS],[
-AC_MSG_CHECKING(for ada-objects)
+AC_MSG_CHECKING(for Ada95 object directory)
 CF_WITH_PATH(ada-objects,
-   [  --with-ada-objects=DIR  Ada objects are in DIR],
+   [  --with-ada-objects=DIR  find Ada95 objects in DIR],
    ADA_OBJECTS,
    PREFIX/lib/ada/adalib,
    [$]prefix/lib/ada/adalib)
@@ -4660,28 +4809,34 @@ AC_SUBST(ADA_OBJECTS)
 AC_MSG_RESULT($ADA_OBJECTS)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_WITH_ADA_SHAREDLIB version: 5 updated: 2018/07/21 19:10:35
+dnl CF_WITH_ADA_SHAREDLIB version: 6 updated: 2023/10/28 11:59:01
 dnl ---------------------
-dnl Command-line option to specify if an Ada95 shared-library should be built,
+dnl Command-line option to specify if an Ada95 shared library should be built,
 dnl and optionally what its soname should be.
 AC_DEFUN([CF_WITH_ADA_SHAREDLIB],[
 AC_REQUIRE([CF_GNAT_PROJECTS])
-AC_MSG_CHECKING(if an Ada95 shared-library should be built)
+AC_MSG_CHECKING(whether to build an Ada95 shared library)
 AC_ARG_WITH(ada-sharedlib,
-       [  --with-ada-sharedlib=soname build shared-library (requires GNAT projects)],
+       [  --with-ada-sharedlib    build Ada95 shared library; requires GNAT project support],
        [with_ada_sharedlib=$withval],
        [with_ada_sharedlib=no])
-AC_MSG_RESULT($with_ada_sharedlib)
+cf_ada_sharedlib_warn=no
 
 if test "x$with_ada_sharedlib" != xno
 then
        if test "x$cf_gnat_projects" != xyes
        then
-               AC_MSG_WARN(disabling shared-library since GNAT projects are not supported)
                with_ada_sharedlib=no
+               cf_ada_sharedlib_warn=yes
        fi
 fi
 
+AC_MSG_RESULT($with_ada_sharedlib)
+if test "x$cf_ada_sharedlib_warn" != xno
+then
+       AC_MSG_WARN(disabling Ada95 shared library since GNAT projects are not supported)
+fi
+
 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
 MAKE_ADA_SHAREDLIB="#"
 
@@ -4769,9 +4924,19 @@ eval $3="$withval"
 AC_SUBST($3)dnl
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_WITH_PKG_CONFIG_LIBDIR version: 11 updated: 2021/01/01 16:16:30
+dnl CF_WITH_PKG_CONFIG_LIBDIR version: 23 updated: 2023/11/22 20:48:30
 dnl -------------------------
 dnl Allow the choice of the pkg-config library directory to be overridden.
+dnl
+dnl pkg-config uses a search-list built from these colon-separated lists of
+dnl directories:
+dnl a) $PKG_CONFIG_PATH (tested first, added if set)
+dnl b) $PKG_CONFIG_LIBDIR (tested second, added if set)
+dnl c) builtin-list (added if $PKG_CONFIG_LIBDIR is not set)
+dnl
+dnl pkgconf (used with some systems such as FreeBSD in place of pkg-config)
+dnl optionally ignores $PKG_CONFIG_LIBDIR.  Very old versions of pkg-config,
+dnl e.g., Solaris 10 also do not recognize $PKG_CONFIG_LIBDIR.
 AC_DEFUN([CF_WITH_PKG_CONFIG_LIBDIR],[
 
 case "$PKG_CONFIG" in
@@ -4783,68 +4948,119 @@ case "$PKG_CONFIG" in
        ;;
 esac
 
-PKG_CONFIG_LIBDIR=no
+# if $PKG_CONFIG_LIBDIR is set, try to use that
+if test -n "$PKG_CONFIG_PATH"; then
+       cf_search_path=`echo "$PKG_CONFIG_PATH" | sed -e 's/:/ /g' -e 's,^[[    ]]*,,' -e 's,[[         ]]*$,,'`
+elif test -n "$PKG_CONFIG_LIBDIR"; then
+       cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[[  ]]*,,' -e 's,[[         ]]*$,,'`
+else
+       cf_search_path=auto
+fi
+
+# if the option is used, let that override.  otherwise default to "libdir"
 AC_ARG_WITH(pkg-config-libdir,
-       [  --with-pkg-config-libdir=XXX use given directory for installing pc-files],
-       [PKG_CONFIG_LIBDIR=$withval],
-       [test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes])
+       [[  --with-pkg-config-libdir[=XXX] use given directory for installing pc-files]],
+       [cf_search_path=$withval],
+       [test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir])
 
-case x$PKG_CONFIG_LIBDIR in
+case "x$cf_search_path" in
+(xlibdir)
+       PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
+       AC_MSG_RESULT($PKG_CONFIG_LIBDIR)
+       cf_search_path=
+       ;;
+(x)
+       ;;
+(x/*\ *)
+       PKG_CONFIG_LIBDIR=
+       ;;
 (x/*)
+       PKG_CONFIG_LIBDIR="$cf_search_path"
+       AC_MSG_RESULT($PKG_CONFIG_LIBDIR)
+       cf_search_path=
        ;;
-(xyes)
+(xyes|xauto)
+       AC_MSG_RESULT(auto)
+       cf_search_path=
        # Look for the library directory using the same prefix as the executable
-       if test "x$PKG_CONFIG" = xnone
+       AC_MSG_CHECKING(for search-list)
+       if test "x$PKG_CONFIG" != xnone
        then
-               cf_path=$prefix
-       else
-               cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[[^/]]*/[[^/]]*$,,'`
+               # works for pkg-config since version 0.24 (2009)
+               # works for pkgconf since version 0.8.3 (2012)
+               for cf_pkg_program in \
+                       `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
+                       pkg-config \
+                       pkgconf
+               do
+                       cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
+                       test -n "$cf_search_path" && break
+               done
+
+               # works for pkg-config since import in 2005 of original 2001 HP code.
+               test -z "$cf_search_path" && \
+               cf_search_path=`
+               "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
+/^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
+       sub(\"^[[^']]*'\",\"\"); \
+       sub(\"'.*\",\"\"); \
+       printf \" %s\", \\[$]0; } \
+{ next; } \
+"`
        fi
 
-       # If you don't like using the default architecture, you have to specify the
-       # intended library directory and corresponding compiler/linker options.
-       #
-       # This case allows for Debian's 2014-flavor of multiarch, along with the
-       # most common variations before that point.  Some other variants spell the
-       # directory differently, e.g., "pkg-config", and put it in unusual places.
-       # pkg-config has always been poorly standardized, which is ironic...
-       case x`(arch) 2>/dev/null` in
-       (*64)
-               cf_search_path="\
-                       $cf_path/lib/*64-linux-gnu \
-                       $cf_path/share \
-                       $cf_path/lib64 \
-                       $cf_path/lib32 \
-                       $cf_path/lib"
-               ;;
-       (*)
-               cf_search_path="\
-                       $cf_path/lib/*-linux-gnu \
-                       $cf_path/share \
-                       $cf_path/lib32 \
-                       $cf_path/lib \
-                       $cf_path/libdata"
-               ;;
-       esac
+       AC_MSG_RESULT($cf_search_path)
+       ;;
+(*)
+       AC_MSG_ERROR(Unexpected option value: $cf_search_path)
+       ;;
+esac
 
-       CF_VERBOSE(list...)
+if test -n "$cf_search_path"
+then
+       AC_MSG_CHECKING(for first directory)
+       cf_pkg_config_path=none
        for cf_config in $cf_search_path
        do
-               CF_VERBOSE(checking $cf_config/pkgconfig)
-               if test -d "$cf_config/pkgconfig"
+               if test -d "$cf_config"
                then
-                       PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
-                       AC_MSG_CHECKING(done)
+                       cf_pkg_config_path=$cf_config
                        break
                fi
        done
-       ;;
-(*)
-       ;;
-esac
+       AC_MSG_RESULT($cf_pkg_config_path)
 
-if test "x$PKG_CONFIG_LIBDIR" != xno ; then
-       AC_MSG_RESULT($PKG_CONFIG_LIBDIR)
+       if test "x$cf_pkg_config_path" != xnone ; then
+               # limit this to the first directory found
+               PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
+       fi
+
+       if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
+       then
+               AC_MSG_CHECKING(for workaround)
+               if test "$prefix" = "NONE" ; then
+                       cf_prefix="$ac_default_prefix"
+               else
+                       cf_prefix="$prefix"
+               fi
+               eval cf_libdir=$libdir
+               cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
+               cf_backup=
+               for cf_config in $cf_search_path
+               do
+                       case $cf_config in
+                       $cf_libdir/pkgconfig)
+                               PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
+                               break
+                               ;;
+                       *)
+                               test -z "$cf_backup" && cf_backup=$cf_config
+                               ;;
+                       esac
+               done
+               test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
+               AC_MSG_RESULT($PKG_CONFIG_LIBDIR)
+       fi
 fi
 
 AC_SUBST(PKG_CONFIG_LIBDIR)
@@ -4912,7 +5128,7 @@ AC_ARG_WITH(system-type,
 ])
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_XOPEN_SOURCE version: 59 updated: 2021/08/28 15:20: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,
@@ -4921,6 +5137,18 @@ dnl
 dnl Parameters:
 dnl    $1 is the nominal value for _XOPEN_SOURCE
 dnl    $2 is the nominal value for _POSIX_C_SOURCE
+dnl
+dnl The default case prefers _XOPEN_SOURCE over _POSIX_C_SOURCE if the
+dnl implementation predefines it, because X/Open and most implementations agree
+dnl that the latter is a legacy or "aligned" value.
+dnl
+dnl Because _XOPEN_SOURCE is preferred, if defining _POSIX_C_SOURCE turns
+dnl that off, then refrain from setting _POSIX_C_SOURCE explicitly.
+dnl
+dnl References:
+dnl https://pubs.opengroup.org/onlinepubs/007904975/functions/xsh_chap02_02.html
+dnl https://docs.oracle.com/cd/E19253-01/816-5175/standards-5/index.html
+dnl https://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html
 AC_DEFUN([CF_XOPEN_SOURCE],[
 AC_REQUIRE([AC_CANONICAL_HOST])
 AC_REQUIRE([CF_POSIX_VISIBLE])
@@ -4935,9 +5163,6 @@ case "$host_os" in
 (aix[[4-7]]*)
        cf_xopen_source="-D_ALL_SOURCE"
        ;;
-(msys)
-       cf_XOPEN_SOURCE=600
-       ;;
 (darwin[[0-8]].*)
        cf_xopen_source="-D_APPLE_C_SOURCE"
        ;;
@@ -4963,7 +5188,7 @@ case "$host_os" in
        cf_xopen_source="-D_SGI_SOURCE"
        cf_XOPEN_SOURCE=
        ;;
-(linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
+(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*)
@@ -5012,7 +5237,15 @@ case "$host_os" in
        ;;
 (*)
        CF_TRY_XOPEN_SOURCE
+       cf_save_xopen_cppflags="$CPPFLAGS"
        CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE)
+       # Some of these niche implementations use copy/paste, double-check...
+       if test "$cf_cv_xopen_source" = no ; then
+               CF_VERBOSE(checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE)
+               AC_TRY_COMPILE(CF__XOPEN_SOURCE_HEAD,CF__XOPEN_SOURCE_BODY,,[
+                       AC_MSG_WARN(_POSIX_C_SOURCE definition is not usable)
+                       CPPFLAGS="$cf_save_xopen_cppflags"])
+       fi
        ;;
 esac
 
@@ -5027,7 +5260,7 @@ if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
        AC_MSG_CHECKING(if _XOPEN_SOURCE really is set)
        AC_TRY_COMPILE([#include <stdlib.h>],[
 #ifndef _XOPEN_SOURCE
-make an error
+#error _XOPEN_SOURCE is not defined
 #endif],
        [cf_XOPEN_SOURCE_set=yes],
        [cf_XOPEN_SOURCE_set=no])
@@ -5036,7 +5269,7 @@ make an error
        then
                AC_TRY_COMPILE([#include <stdlib.h>],[
 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
-make an error
+#error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
 #endif],
                [cf_XOPEN_SOURCE_set_ok=yes],
                [cf_XOPEN_SOURCE_set_ok=no])
@@ -5056,3 +5289,21 @@ dnl ------------------
 dnl Trim something using sed, then trim extra whitespace
 dnl $1 = extra parameters, e.g., in CF_STRIP_G_OPT
 define([CF__SED_TRIMBLANKS],[sed ifelse($1,,,[$1] )-e 's%[[    ]]% %g' -e 's% [[ ]]*% %g' -e 's%^ %%' -e 's% [$]%%'])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF__XOPEN_SOURCE_BODY version: 2 updated: 2023/02/18 17:41:25
+dnl ---------------------
+dnl body of test when test-compiling for _XOPEN_SOURCE check
+define([CF__XOPEN_SOURCE_BODY],
+[
+#ifndef _XOPEN_SOURCE
+#error _XOPEN_SOURCE is not defined
+#endif
+])
+dnl ---------------------------------------------------------------------------
+dnl CF__XOPEN_SOURCE_HEAD version: 2 updated: 2023/02/18 17:41:25
+dnl ---------------------
+dnl headers to include when test-compiling for _XOPEN_SOURCE check
+define([CF__XOPEN_SOURCE_HEAD],
+[
+$ac_includes_default
+])