summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2020-07-16 17:35:36 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2020-07-16 23:08:10 -0700
commitc03ca42de310c5647b7970ae1bbb1344977cb384 (patch)
treee2b6adb263c5741f4326fa2baecb0746b8ce8a0d
parent2ff883c27e55b0c0d4a448614c1dee0492c9a7da (diff)
downloadautoconf-c03ca42de310c5647b7970ae1bbb1344977cb384.tar.gz
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.
-rw-r--r--lib/autoconf/functions.m45
-rw-r--r--lib/autoconf/programs.m412
-rw-r--r--lib/autotest/general.m47
3 files changed, 14 insertions, 10 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..0ad3ddd1 100644
--- a/lib/autoconf/programs.m4
+++ b/lib/autoconf/programs.m4
@@ -760,13 +760,15 @@ AC_SUBST([LEX_OUTPUT_ROOT], [$ac_cv_prog_lex_root])dnl
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_cv_lib_lex $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: <AT_PACKAGE_BUGREPORT>
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