From 7828d1b4e2bc9837236440e6330463cd8515eb82 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 17 Mar 2007 12:54:28 +0100 Subject: [PATCH] Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted. * bootstrap: Put ""s around use of $build_aux, in case someone uses a name containing shell meta-characters. Reported by Alfred M. Szmidt. --- ChangeLog | 5 +++++ bootstrap | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 67e39e8..110f2e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2007-03-17 Jim Meyering + Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted. + * bootstrap: Put ""s around use of $build_aux, in case + someone uses a name containing shell meta-characters. + Reported by Alfred M. Szmidt. + * tests/misc/tty-eof: Add shuf to the list of tested commands. Avoid test failure on NFS-mounted Solaris ZFS file system. diff --git a/bootstrap b/bootstrap index eadf9f5..5c4b855 100755 --- a/bootstrap +++ b/bootstrap @@ -169,10 +169,15 @@ insert_sorted_if_absent() { } # Die if there is no AC_CONFIG_AUX_DIR($build_aux) line in configure.ac. -grep '^[ ]*AC_CONFIG_AUX_DIR('$build_aux')' configure.ac >/dev/null || +found_aux_dir=no +grep '^[ ]*AC_CONFIG_AUX_DIR(\['"$build_aux"'\])' configure.ac \ + >/dev/null && found_aux_dir=yes +grep '^[ ]*AC_CONFIG_AUX_DIR('"$build_aux"')' configure.ac \ + >/dev/null && found_aux_dir=yes +if test $found_aux_dir = no; then { echo "$0: expected line not found in configure.ac. Add the following:" >&2 - echo " AC_CONFIG_AUX_DIR($build_aux)" >&2. + echo " AC_CONFIG_AUX_DIR([$build_aux])" >&2. } # If $build_aux doesn't exist, create it now, otherwise some bits -- 2.7.4