`config.status'. Fix and test.
* acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Use
`$ac_configure_args' directly, no via a tmp variable.
* tests/torture.m4 (command line interface): Test with more than
one argument.
+2000-05-22 Akim Demaille <akim@epita.fr>
+
+ More than one argument to `configure' builds a broken
+ `config.status'. Fix and test.
+
+ * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Use
+ `$ac_configure_args' directly, no via a tmp variable.
+ * tests/torture.m4 (command line interface): Test with more than
+ one argument.
+
2000-05-19 Akim Demaille <akim@epita.fr>
* acgeneral.m4 (AC_MSG_WARN): s/warning/WARNING/.
# shells die. Unfortunately the limit is not known precisely...
define([_AC_OUTPUT_CONFIG_STATUS],
[echo creating $CONFIG_STATUS
-cat >$CONFIG_STATUS <<EOF
+cat >$CONFIG_STATUS <<\EOF
#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.
-configure=$[0]
-configure_args=$ac_configure_args
debug=false
-EOF
-
-cat >>$CONFIG_STATUS <<\EOF
me=`echo "$[0]" | sed -e 's,.*/,,'`
SHELL=${CONFIG_SHELL-/bin/sh}
EOF
dnl hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-dnl so uname gets run too.
+dnl so uname gets run too. Use two double quotes for font-lock.
cat >>$CONFIG_STATUS <<EOF
ac_cs_version="\\
$CONFIG_STATUS generated by autoconf version AC_ACVERSION.
Configured on host `(hostname || uname -n) 2>/dev/null | sed 1q` by
- $configure $configure_arg"
+ `echo "[$]0 $ac_configure_args" | sed 's/[[\\""\`\$]]/\\\\&/g'`"
ac_given_srcdir=$srcdir
AC_PROVIDE_IFELSE([AC_PROG_INSTALL],
esac
case "$[1]" in
-
# Handling of the options.
+EOF
+cat >>$CONFIG_STATUS <<EOF
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-dnl The following line is extremely suspicious: there are double quotes
-dnl inside a "`...`" (which is not portable). But it is actually safe,
-dnl since we are in an unquoted here doc, which will skip the outer pair
-dnl of double quotes, and only eval the back quotes.
- echo "running $SHELL $configure $configure_args --no-create --no-recursion"
- exec $SHELL $configure $configure_args --no-create --no-recursion ;;
+ echo "running $SHELL $[0] " $ac_configure_args " --no-create --no-recursion"
+ exec $SHELL $[0] $ac_configure_args --no-create --no-recursion ;;
+EOF
+cat >>$CONFIG_STATUS <<\EOF
--version | --vers* | -V )
echo "$ac_cs_version"; exit 0 ;;
--he | --h)
# shells die. Unfortunately the limit is not known precisely...
define([_AC_OUTPUT_CONFIG_STATUS],
[echo creating $CONFIG_STATUS
-cat >$CONFIG_STATUS <<EOF
+cat >$CONFIG_STATUS <<\EOF
#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.
-configure=$[0]
-configure_args=$ac_configure_args
debug=false
-EOF
-
-cat >>$CONFIG_STATUS <<\EOF
me=`echo "$[0]" | sed -e 's,.*/,,'`
SHELL=${CONFIG_SHELL-/bin/sh}
EOF
dnl hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-dnl so uname gets run too.
+dnl so uname gets run too. Use two double quotes for font-lock.
cat >>$CONFIG_STATUS <<EOF
ac_cs_version="\\
$CONFIG_STATUS generated by autoconf version AC_ACVERSION.
Configured on host `(hostname || uname -n) 2>/dev/null | sed 1q` by
- $configure $configure_arg"
+ `echo "[$]0 $ac_configure_args" | sed 's/[[\\""\`\$]]/\\\\&/g'`"
ac_given_srcdir=$srcdir
AC_PROVIDE_IFELSE([AC_PROG_INSTALL],
esac
case "$[1]" in
-
# Handling of the options.
+EOF
+cat >>$CONFIG_STATUS <<EOF
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-dnl The following line is extremely suspicious: there are double quotes
-dnl inside a "`...`" (which is not portable). But it is actually safe,
-dnl since we are in an unquoted here doc, which will skip the outer pair
-dnl of double quotes, and only eval the back quotes.
- echo "running $SHELL $configure $configure_args --no-create --no-recursion"
- exec $SHELL $configure $configure_args --no-create --no-recursion ;;
+ echo "running $SHELL $[0] " $ac_configure_args " --no-create --no-recursion"
+ exec $SHELL $[0] $ac_configure_args --no-create --no-recursion ;;
+EOF
+cat >>$CONFIG_STATUS <<\EOF
--version | --vers* | -V )
echo "$ac_cs_version"; exit 0 ;;
--he | --h)
## interface. ##
## ------------------------------------------------------ ##
-# We run `./configure result=val' and verify that (i) `configure'
-# correctly receives `val' and (ii) correctly passes it to
-# `config.status', which we check by running `config.status --recheck'
-# (which *must* preserve the value of `result').
+# We run `./configure one=val1 --enable-two=val2 --with-three=val3'
+# and verify that (i) `configure' correctly receives the arguments and
+# (ii) correctly passes them to `config.status', which we check by
+# running `config.status --recheck'.
AT_SETUP(command line interface)
AT_DATA(configure.in,
[[AC_INIT
-echo "result=$result"
+echo "result=$one$enable_two$with_three"
AC_OUTPUT
]])
AT_CHECK([../autoconf -m .. -l $at_srcdir], 0,, ignore)
-AT_CHECK([./configure result=result | sed -n -e 's/^result=//p'], 0,
- [result
+AT_CHECK([./configure one=one --enable-two=two --with-three=three |
+ sed -n -e 's/^result=//p'], 0,
+ [onetwothree
], ignore)
AT_CHECK([./config.status --recheck | sed -n -e 's/^result=//p'], 0,
- [result
+ [onetwothree
], ignore)
-AT_CHECK([./configure result="\"'$" | sed -n -e 's/^result=//p'], 0,
- ["'$
+AT_CHECK([./configure one="\"'$ " --enable-two="\" ' $" --with-three=" \"'$"|
+ sed -n -e 's/^result=//p'], 0,
+ ["'$ " ' $ "'$
], ignore)
AT_CHECK([./config.status --recheck | sed -n -e 's/^result=//p'], 0,
- ["'$
+ ["'$ " ' $ "'$
], ignore)
AT_CLEANUP(configure config.status config.log config.cache)