From: Akim Demaille Date: Mon, 22 May 2000 08:05:40 +0000 (+0000) Subject: More than one argument to `configure' builds a broken X-Git-Tag: autoconf-2.50~896 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbb8a34d4886f1376f66932dd96df1f0e6193512;p=thirdparty%2Fautoconf.git 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. --- diff --git a/ChangeLog b/ChangeLog index e497cbc1a..b92e00d27 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2000-05-22 Akim Demaille + + 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 * acgeneral.m4 (AC_MSG_WARN): s/warning/WARNING/. diff --git a/acgeneral.m4 b/acgeneral.m4 index 491804fcf..a8ec73aca 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -3857,19 +3857,14 @@ AC_PROVIDE_IFELSE([AC_CONFIG_SUBDIRS], [_AC_OUTPUT_SUBDIRS()])dnl # shells die. Unfortunately the limit is not known precisely... define([_AC_OUTPUT_CONFIG_STATUS], [echo creating $CONFIG_STATUS -cat >$CONFIG_STATUS <$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} @@ -3930,12 +3925,12 @@ Report bugs to ." 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 <>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 491804fcf..a8ec73aca 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -3857,19 +3857,14 @@ AC_PROVIDE_IFELSE([AC_CONFIG_SUBDIRS], [_AC_OUTPUT_SUBDIRS()])dnl # shells die. Unfortunately the limit is not known precisely... define([_AC_OUTPUT_CONFIG_STATUS], [echo creating $CONFIG_STATUS -cat >$CONFIG_STATUS <$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} @@ -3930,12 +3925,12 @@ Report bugs to ." 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 <>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) diff --git a/tests/torture.m4 b/tests/torture.m4 index 9d5416e22..3fe3140e7 100644 --- a/tests/torture.m4 +++ b/tests/torture.m4 @@ -103,33 +103,35 @@ AT_CLEANUP(dummy) ## 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)