X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=aclocal.m4;h=c78c13830858c3d33976440117d4312117766126;hp=59b81a2aa62b6418865deead973fec7d70b4c7e0;hb=643ec2bf782cd02efafe3ccdeaea8920a404645e;hpb=0af9283ca273c267ee6036c3b88115d9ba6d55a6 diff --git a/aclocal.m4 b/aclocal.m4 index 59b81a2a..c78c1383 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -29,7 +29,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: aclocal.m4,v 1.972 2021/08/07 21:01:11 tom Exp $ +dnl $Id: aclocal.m4,v 1.975 2021/09/04 10:36:30 tom Exp $ dnl Macros used in NCURSES auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -264,9 +264,9 @@ CXXFLAGS="$CFLAGS" CFLAGS="$cf_save_CXXFLAGS" ])dnl dnl --------------------------------------------------------------------------- -dnl CF_ADD_INCDIR version: 16 updated: 2020/12/31 20:19:42 +dnl CF_ADD_INCDIR version: 17 updated: 2021/09/04 06:35:04 dnl ------------- -dnl Add an include-directory to $CPPFLAGS. Don't add /usr/include, since it's +dnl Add an include-directory to $CPPFLAGS. Don't add /usr/include, since it is dnl redundant. We don't normally need to add -I/usr/local/include for gcc, dnl but old versions (and some misinstalled ones) need that. To make things dnl worse, gcc 3.x may give error messages if -I/usr/local/include is added to @@ -415,6 +415,21 @@ ifelse([$5],NONE,,[{ test -z "$5" || test "x$5" = xNONE || test "x$4" != "x$5"; } ])dnl dnl --------------------------------------------------------------------------- +dnl CF_APPEND_CFLAGS version: 1 updated: 2021/08/28 15:20:37 +dnl ---------------- +dnl Use CF_ADD_CFLAGS after first checking for potential redefinitions. +dnl $1 = flags to add +dnl $2 = if given makes this macro verbose. +define([CF_APPEND_CFLAGS], +[ +for cf_add_cflags in $1 +do + CF_REMOVE_CFLAGS($cf_add_cflags,CFLAGS,[$2]) + CF_REMOVE_CFLAGS($cf_add_cflags,CPPFLAGS,[$2]) +done +CF_ADD_CFLAGS([$1],[$2]) +])dnl +dnl --------------------------------------------------------------------------- dnl CF_APPEND_TEXT version: 1 updated: 2017/02/25 18:58:55 dnl -------------- dnl use this macro for appending text without introducing an extra blank at @@ -604,10 +619,10 @@ else AC_MSG_RESULT(no) fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_BOOL_SIZE version: 17 updated: 2020/10/24 19:48:55 +dnl CF_BOOL_SIZE version: 18 updated: 2021/09/04 06:35:04 dnl ------------ dnl Test for the size of 'bool' in the configured C++ compiler (e.g., a type). -dnl Don't bother looking for bool.h, since it's been deprecated. +dnl Don't bother looking for bool.h, since it has been deprecated. dnl dnl If the current compiler is C rather than C++, we get the bool definition dnl from . @@ -1093,10 +1108,10 @@ fi CF_CHECK_EXTERN_DATA($1,ifelse([$2],,int,[$2])) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CHECK_EXTERN_DATA version: 4 updated: 2015/04/18 08:56:57 +dnl CF_CHECK_EXTERN_DATA version: 5 updated: 2021/09/04 06:35:04 dnl -------------------- dnl Check for existence of external data in the current set of libraries. If -dnl we can modify it, it's real enough. +dnl we can modify it, it is real enough. dnl $1 = the name to check dnl $2 = its type AC_DEFUN([CF_CHECK_EXTERN_DATA], @@ -1864,9 +1879,9 @@ done AC_SUBST(DIRS_TO_MAKE) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_DISABLE_ECHO version: 13 updated: 2015/04/18 08:56:57 +dnl CF_DISABLE_ECHO version: 14 updated: 2021/09/04 06:35:04 dnl --------------- -dnl You can always use "make -n" to see the actual options, but it's hard to +dnl You can always use "make -n" to see the actual options, but it is hard to dnl pick out/analyze warning messages when the compile-line is long. dnl dnl Sets: @@ -5392,7 +5407,7 @@ AC_SUBST(MAKE_UPPER_TAGS) AC_SUBST(MAKE_LOWER_TAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MANPAGE_FORMAT version: 14 updated: 2021/01/02 17:09:14 +dnl CF_MANPAGE_FORMAT version: 15 updated: 2021/09/04 06:35:04 dnl ----------------- dnl Option to allow user to override automatic configuration of manpage format. dnl There are several special cases: @@ -5428,7 +5443,7 @@ case "$MANPAGE_FORMAT" in MANPATH="/usr/man:/usr/share/man" fi - # look for the 'date' man-page (it's most likely to be installed!) + # look for the 'date' man-page (it is most likely to be installed!) MANPAGE_FORMAT= cf_preform="no" cf_catonly="yes" @@ -6843,6 +6858,36 @@ case "$cf_cv_regex_hdrs" in esac ])dnl dnl --------------------------------------------------------------------------- +dnl CF_REMOVE_CFLAGS version: 1 updated: 2021/08/28 15:20:37 +dnl ---------------- +dnl Remove a given option from CFLAGS/CPPFLAGS +dnl $1 = option to remove +dnl $2 = variable to update +dnl $3 = nonempty to allow verbose message +define([CF_REMOVE_CFLAGS], +[ +cf_tmp_cflag=`echo "x$1" | sed -e 's/^.//' -e 's/=.*//'` +cf_old_cflag="[$]$2" + +case "[$]$2" in +(*$1=*) + cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[[^ ]]*%%g"` + ;; +(*$1\ *) + cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"` + ;; +(*$1) + cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"` + ;; +esac + +if test "[$]$2" != "$cf_old_cflag" ; +then + ifelse([$3],,,[CF_VERBOSE(removing old option $1 from $2)]) + $2="$cf_new_cflag" +fi +])dnl +dnl --------------------------------------------------------------------------- dnl CF_REMOVE_DEFINE version: 3 updated: 2010/01/09 11:05:50 dnl ---------------- dnl Remove all -U and -D options that refer to the given symbol from a list @@ -7701,7 +7746,7 @@ AC_MSG_RESULT($cf_cv_sig_atomic_t) test "$cf_cv_sig_atomic_t" != no && AC_DEFINE_UNQUOTED(SIG_ATOMIC_T, $cf_cv_sig_atomic_t,[Define to signal global datatype]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_SIZECHANGE version: 17 updated: 2021/01/01 13:31:04 +dnl CF_SIZECHANGE version: 18 updated: 2021/09/04 06:35:04 dnl ------------- dnl Check for definitions & structures needed for window size-changing dnl @@ -7732,7 +7777,7 @@ do #ifdef NEED_PTEM_H /* This is a workaround for SCO: they neglected to define struct winsize in - * termios.h -- it's only in termio.h and ptem.h + * termios.h -- it is only in termio.h and ptem.h */ #include #include @@ -8158,7 +8203,7 @@ else fi ]) dnl --------------------------------------------------------------------------- -dnl CF_TRY_XOPEN_SOURCE version: 2 updated: 2018/06/20 20:23:13 +dnl CF_TRY_XOPEN_SOURCE version: 3 updated: 2021/08/28 15:20:37 dnl ------------------- dnl If _XOPEN_SOURCE is not defined in the compile environment, check if we dnl can define it successfully. @@ -8193,7 +8238,7 @@ if test "$cf_cv_xopen_source" != no ; then CF_REMOVE_DEFINE(CFLAGS,$CFLAGS,_XOPEN_SOURCE) CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,_XOPEN_SOURCE) cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source" - CF_ADD_CFLAGS($cf_temp_xopen_source) + CF_APPEND_CFLAGS($cf_temp_xopen_source) fi ]) dnl --------------------------------------------------------------------------- @@ -9022,7 +9067,7 @@ else fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_PATH version: 11 updated: 2012/09/29 15:04:19 +dnl CF_WITH_PATH version: 12 updated: 2021/09/04 06:35:04 dnl ------------ dnl Wrapper for AC_ARG_WITH to ensure that user supplies a pathname, not just dnl defaulting to yes/no. @@ -9031,7 +9076,7 @@ dnl $1 = option name dnl $2 = help-text dnl $3 = environment variable to set dnl $4 = default value, shown in the help-message, must be a constant -dnl $5 = default value, if it's an expression & cannot be in the help-message +dnl $5 = default value, if it is an expression & cannot be in the help-message dnl AC_DEFUN([CF_WITH_PATH], [AC_ARG_WITH($1,[$2 ](default: ifelse([$4],,empty,[$4])),, @@ -9043,7 +9088,7 @@ eval $3="$withval" AC_SUBST($3)dnl ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_PATHLIST version: 12 updated: 2021/01/01 13:31:04 +dnl CF_WITH_PATHLIST version: 13 updated: 2021/09/04 06:35:04 dnl ---------------- dnl Process an option specifying a list of colon-separated paths. dnl @@ -9051,7 +9096,7 @@ dnl $1 = option name dnl $2 = help-text dnl $3 = environment variable to set dnl $4 = default value, shown in the help-message, must be a constant -dnl $5 = default value, if it's an expression & cannot be in the help-message +dnl $5 = default value, if it is an expression & cannot be in the help-message dnl $6 = flag to tell if we want to define or substitute dnl AC_DEFUN([CF_WITH_PATHLIST],[ @@ -9121,7 +9166,7 @@ AC_ARG_WITH($2-path, ]) ]) dnl --------------------------------------------------------------------------- -dnl CF_WITH_PCRE2 version: 5 updated: 2021/01/26 18:45:12 +dnl CF_WITH_PCRE2 version: 6 updated: 2021/08/11 20:35:34 dnl ------------- dnl Add PCRE2 (Perl-compatible regular expressions v2) to the build if it is dnl available and the user requests it. Assume the application will otherwise @@ -9163,6 +9208,7 @@ if test "x$with_pcre2" != xno ; then # either way, check for the library header files AC_CHECK_HEADERS(pcre2posix.h pcreposix.h) + AC_CHECK_FUNCS(PCRE2regcomp) fi ])dnl dnl --------------------------------------------------------------------------- @@ -9597,7 +9643,7 @@ fi AC_SUBST(no_x11_rgb) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_XOPEN_SOURCE version: 58 updated: 2021/05/01 17:49:36 +dnl CF_XOPEN_SOURCE version: 59 updated: 2021/08/28 15:20:37 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, @@ -9702,7 +9748,7 @@ case "$host_os" in esac if test -n "$cf_xopen_source" ; then - CF_ADD_CFLAGS($cf_xopen_source,true) + CF_APPEND_CFLAGS($cf_xopen_source,true) fi dnl In anything but the default case, we may have system-specific setting