Alfred M. Szmidt [EMAIL PROTECTED] wrote:
The check for AC_CONFIG_AUX_DIR is incorrect, since autoconf (really,
m4) allows one to quote arguments. So if ones configure.ac contains
the following valid code:
AC_CONFIG_AUX_DIR([build-aux])
the check will fail. Not entierly sure how to handle it since m4
allows one to set the quote character. Any ideas?
If someone changes the m4 quote character they'll have other things to
worry about :-)
Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
* build-aux/bootstrap: Put s around use of $build_aux, in case
someone uses a name containing shell meta-characters.
Reported by Alfred M. Szmidt.
Index: build-aux/bootstrap
===
RCS file: /cvsroot/gnulib/gnulib/build-aux/bootstrap,v
retrieving revision 1.4
diff -u -p -r1.4 bootstrap
--- build-aux/bootstrap 17 Mar 2007 08:58:43 - 1.4
+++ build-aux/bootstrap 17 Mar 2007 11:51:39 -
@@ -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