X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=aclocal.m4;h=320cb18f7e6e0e3b4b8e6b0176701cc189ab370e;hp=b2b9c3f8f50f81125371883883bf1b4d96c9d933;hb=HEAD;hpb=b97ea58e03d5faebed2166faa4e0e590f2cdea34 diff --git a/aclocal.m4 b/aclocal.m4 index b2b9c3f8..003bb308 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,5 +1,5 @@ dnl*************************************************************************** -dnl Copyright 2018-2022,2023 Thomas E. Dickey * +dnl Copyright 2018-2023,2024 Thomas E. Dickey * dnl Copyright 1998-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 1995-on dnl -dnl $Id: aclocal.m4,v 1.1062 2023/12/04 00:39:37 tom Exp $ +dnl $Id: aclocal.m4,v 1.1071 2024/05/18 19:49:14 tom Exp $ dnl Macros used in NCURSES auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -741,7 +741,7 @@ if test "$cf_cv_type_of_bool" = unknown ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_BUILD_CC version: 11 updated: 2022/12/04 15:40:08 +dnl CF_BUILD_CC version: 12 updated: 2024/03/17 09:17:26 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 @@ -841,9 +841,9 @@ else : ${BUILD_CC:='${CC}'} : ${BUILD_CPP:='${CPP}'} : ${BUILD_CFLAGS:='${CFLAGS}'} - : ${BUILD_CPPFLAGS:='${CPPFLAGS}'} + : ${BUILD_CPPFLAGS:='ifelse([$1],,'${CPPFLAGS}',[$1])'} : ${BUILD_LDFLAGS:='${LDFLAGS}'} - : ${BUILD_LIBS:='${LIBS}'} + : ${BUILD_LIBS:='ifelse([$2],,'${LIBS}',[$2])'} : ${BUILD_EXEEXT:='$x'} : ${BUILD_OBJEXT:='o'} fi @@ -2623,19 +2623,36 @@ else fi ]) dnl --------------------------------------------------------------------------- -dnl CF_FUNC_GETTIME version: 2 updated: 2023/02/25 08:45:56 +dnl CF_FUNC_GETTIME version: 3 updated: 2024/05/11 13:40:02 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 ], +cf_save_libs="$LIBS" +AC_CHECK_FUNC(clock_gettime, + cf_cv_test_clock_gettime=yes, + AC_CHECK_LIB(rt, clock_gettime, + [LIBS="-lrt $LIBS" + cf_cv_test_clock_gettime=yes], + cf_cv_test_clock_gettime=no)) + +if test "$cf_cv_test_clock_gettime" = yes ; then +AC_CACHE_CHECK(if clock_gettime links,cf_cv_func_clock_gettime,[ + AC_TRY_LINK([ +$ac_includes_default +#include + ], [struct timespec ts; - int rc = clock_gettime(CLOCK_REALTIME, &ts); (void) rc; (void)ts], + int rc = clock_gettime(CLOCK_REALTIME, &ts) + + clock_gettime(CLOCK_MONOTONIC, &ts); + (void) rc; (void)ts], [cf_cv_func_clock_gettime=yes], [cf_cv_func_clock_gettime=no]) ]) +else + cf_cv_func_clock_gettime=no +fi if test "$cf_cv_func_clock_gettime" = yes then @@ -5681,7 +5698,7 @@ AC_SUBST(MAKE_UPPER_TAGS) AC_SUBST(MAKE_LOWER_TAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MANPAGE_FORMAT version: 18 updated: 2023/05/19 18:35:02 +dnl CF_MANPAGE_FORMAT version: 19 updated: 2024/03/30 08:27:40 dnl ----------------- dnl Option to allow user to override automatic configuration of manpage format. dnl There are several special cases: @@ -5799,6 +5816,7 @@ cf_manpage_format=no cf_manpage_inboth=no cf_manpage_so_strip= cf_manpage_compress= +cf_manpage_coptions= for cf_item in $MANPAGE_FORMAT do @@ -5818,6 +5836,7 @@ case "$cf_item" in (gzip) cf_manpage_so_strip="gz" cf_manpage_compress=gzip + cf_manpage_coptions=-n ;; (bzip2) cf_manpage_so_strip="bz2" @@ -5834,6 +5853,7 @@ AC_SUBST(cf_manpage_format) AC_SUBST(cf_manpage_inboth) AC_SUBST(cf_manpage_so_strip) AC_SUBST(cf_manpage_compress) +AC_SUBST(cf_manpage_coptions) ])dnl dnl --------------------------------------------------------------------------- @@ -5938,7 +5958,32 @@ AC_ARG_WITH(manpage-tbl, AC_MSG_RESULT($MANPAGE_TBL) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MAN_PAGES version: 58 updated: 2023/07/28 20:13:29 +dnl CF_MB_LEN_MAX version: 1 updated: 2024/03/02 15:45:10 +dnl ------------- +dnl Check if defines a usable MB_LEN_MAX. That may be because it is +dnl not defined, or it may be a bogus value. +AC_DEFUN([CF_MB_LEN_MAX],[ +AC_CACHE_CHECK(if MB_LEN_MAX is usable,cf_cv_mb_len_max,[ +AC_TRY_COMPILE([ +$ac_includes_default +#include ], +[ +#if defined(MB_LEN_MAX) && MB_LEN_MAX >= 6 + ${cf_cv_main_return:-return}(0); +#else +#error MB_LEN_MAX is not usable +#endif +], [cf_cv_mb_len_max=yes], + [cf_cv_mb_len_max=no])]) +if test "$cf_cv_mb_len_max" = yes +then + AC_DEFINE(HAVE_CONSISTENT_MB_LEN_MAX,1,[Define to 1 if MB_LEN_MAX is usable]) +else + AC_MSG_WARN(MB_LEN_MAX is missing/inconsistent in system headers) +fi +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_MAN_PAGES version: 59 updated: 2024/03/30 08:27:40 dnl ------------ dnl Try to determine if the man-pages on the system are compressed, and if dnl so, what format is used. Use this information to construct a script that @@ -6212,7 +6257,7 @@ CF_EOF if test -n "$cf_manpage_compress" ; then cat >>$cf_edit_man </dev/null` + case "x$cf_file_gnatgcc" in + (*script*) + cf_cv_path_gnatgcc=`sh -x "$cf_cv_path_gnatgcc" --version 2>&1 | grep -w exec | sed -e 's/^[[ ]]*+[[ ]]*//' -e 's/exec[[ ]]//' -e 's/ .*//'` + ;; + (*) + cf_cv_path_gnatgcc=no + ;; + esac + AC_MSG_RESULT($cf_cv_path_gnatgcc) + test "$cf_cv_path_gnatgcc" = no && cf_cv_path_gnatgcc=gnatgcc + cf_prog_cc="$cf_cv_path_gnatgcc $cf_prog_cc" + fi + fi +fi +case "$cf_prog_cc" in +(*/*) + CC="$cf_prog_cc" + AC_SUBST(CC) + ;; +(*) + CF_PROG_CC($cf_prog_cc) + ;; +esac +])dnl +dnl --------------------------------------------------------------------------- dnl CF_WITH_ADA_COMPILER version: 3 updated: 2023/10/28 11:59:01 dnl -------------------- dnl Command-line option to specify the Ada95 compiler.