>From 870c40f9df86dcf0d80a4ab6aca2aaa9dffae38e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 16 Jul 2020 17:35:36 -0700 Subject: [PATCH] Fix ${VAR-NONWORD} bugs * lib/autoconf/functions.m4 (AC_FUNC_SELECT_ARGTYPES): * lib/autoconf/programs.m4 (AC_FUNC_SELECT_ARGTYPES): * lib/autotest/general.m4 (AT_INIT): Rewrite to avoid ${VAR-VALUE} where VALUE is not a shell word. --- lib/autoconf/functions.m4 | 5 ++--- lib/autoconf/programs.m4 | 11 +++++++---- lib/autotest/general.m4 | 7 +++++-- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4 index 645a7c60..718503f5 100644 --- a/lib/autoconf/functions.m4 +++ b/lib/autoconf/functions.m4 @@ -1526,7 +1526,8 @@ AC_DEFUN([AC_FUNC_SELECT_ARGTYPES], [AC_CHECK_HEADERS_ONCE([sys/select.h sys/socket.h]) AC_CACHE_CHECK([types of arguments for select], [ac_cv_func_select_args], -[for ac_arg234 in 'fd_set *' 'int *' 'void *'; do +[ac_cv_func_select_args='int,int *,struct timeval *' +for ac_arg234 in 'fd_set *' 'int *' 'void *'; do for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do AC_COMPILE_IFELSE( @@ -1546,8 +1547,6 @@ AC_CACHE_CHECK([types of arguments for select], done done done -# Provide a safe default value. -: "${ac_cv_func_select_args=int,int *,struct timeval *}" ]) ac_save_IFS=$IFS; IFS=',' set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'` diff --git a/lib/autoconf/programs.m4 b/lib/autoconf/programs.m4 index 087c913a..7f2d07f8 100644 --- a/lib/autoconf/programs.m4 +++ b/lib/autoconf/programs.m4 @@ -762,11 +762,14 @@ AS_VAR_SET_IF([LEXLIB], [], [ AC_CACHE_CHECK([for lex library], [ac_cv_lib_lex], [ ac_cv_lib_lex='not found' ac_save_LIBS=$LIBS - for ac_lib in '' -lfl -ll; do - LIBS="$ac_lib $ac_save_LIBS" + for ac_cv_lib_lex in 'none needed' -lfl -ll 'not found'; do + case $ac_cv_lib_lex in + 'none needed') ;; + 'not found') break;; + *) LIBS="$ac_lib $ac_save_LIBS";; + esac AC_LINK_IFELSE([AC_LANG_DEFINES_PROVIDED[`cat $LEX_OUTPUT_ROOT.c`]], - [ac_cv_lib_lex="${ac_lib:-none needed}" - break]) + [break]) done LIBS=$ac_save_LIBS ]) diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4 index 5d89d0c0..6a6d1a47 100644 --- a/lib/autotest/general.m4 +++ b/lib/autotest/general.m4 @@ -1642,12 +1642,15 @@ else else at_msg="\`${at_testdir+${at_testdir}/}$as_me.log'" fi + at_msg1a=${at_xpass_list:+', '} + at_msg1=$at_fail_list${at_fail_list:+" failed$at_msg1a"} + at_msg2=$at_xpass_list${at_xpass_list:+" passed unexpectedly"} + AS_ECHO(["Please send $at_msg and all information you think might help: To: Subject: @<:@AT_PACKAGE_STRING@:>@ $as_me: dnl -$at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}dnl -$at_xpass_list${at_xpass_list:+ passed unexpectedly} +$at_msg1$at_msg2 You may investigate any problem if you feel able to do so, in which case the test suite provides a good starting point. Its output may -- 2.17.1