aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorGeoffrey Keating <geoffk@apple.com>2003-08-21 02:14:45 +0000
committerGeoffrey Keating <geoffk@apple.com>2003-08-21 02:14:45 +0000
commit5dc8f7223b2e40361ab33265ba213053c7ddab52 (patch)
tree1535ee193a7c6ad69408da9f0e7e33eaf564ebf2 /configure.in
parent11f103bd614f5f2ade534d879a6f196814e9f974 (diff)
* configure.in (TOPLEVEL_CONFIGURE_ARGUMENTS): Quote properly for
make, shell, etc. (baseargs): Likewise. * configure: Regenerate. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@70633 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in47
1 files changed, 31 insertions, 16 deletions
diff --git a/configure.in b/configure.in
index 22888b3b663..b30f5242e71 100644
--- a/configure.in
+++ b/configure.in
@@ -66,8 +66,19 @@ progname=$0
# if PWD already has a value, it is probably wrong.
if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
-# Export original configure arguments for use by sub-configures.
-TOPLEVEL_CONFIGURE_ARGUMENTS="$progname $@"
+# Export original configure arguments for use by sub-configures. These
+# will be expanded once by make, and once by the shell, so they need to
+# have '$' quoted for make, and then each argument quoted for the shell.
+# What's more, the 'echo' below might expand backslashes.
+cat <<\EOF_SED > conftestsed
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
+tmp="'$progname'"
+for ac_arg ; do
+ tmp="$tmp '"`echo "$ac_arg" | sed -fconftestsed`
+done
+rm -f conftestsed
+TOPLEVEL_CONFIGURE_ARGUMENTS="$tmp"
AC_SUBST(TOPLEVEL_CONFIGURE_ARGUMENTS)
moveifchange=${srcdir}/move-if-change
@@ -1754,20 +1765,24 @@ AC_SUBST_FILE(serialization_dependencies)
# Base args. Strip norecursion, cache-file, srcdir, host, build,
# target and nonopt. These are the ones we might not want to pass
# down to subconfigures.
-baseargs=`echo " ${ac_configure_args} " | \
- sed -e 's/ --no[[^ ]]* / /' \
- -e 's/ --c[[a-z-]]*[[= ]][[^ ]]* / /' \
- -e 's/ --sr[[a-z-]]*[[= ]][[^ ]]* / /' \
- -e 's/ --ho[[a-z-]]*[[= ]][[^ ]]* / /' \
- -e 's/ --bu[[a-z-]]*[[= ]][[^ ]]* / /' \
- -e 's/ --t[[a-z-]]*[[= ]][[^ ]]* / /' \
- -e 's/ -cache-file[[= ]][[^ ]]* / /' \
- -e 's/ -srcdir[[= ]][[^ ]]* / /' \
- -e 's/ -host[[= ]][[^ ]]* / /' \
- -e 's/ -build[[= ]][[^ ]]* / /' \
- -e 's/ -target[[= ]][[^ ]]* / /' \
- -e "s/ [[^' -][^ ]*] / /" \
- -e 's/^ *//;s/ *$//'`
+cat <<\EOF_SED > conftestsed
+s/ --no[[^ ]]* / /
+s/ --c[[a-z-]]*[[= ]][[^ ]]* / /
+s/ --sr[[a-z-]]*[[= ]][[^ ]]* / /
+s/ --ho[[a-z-]]*[[= ]][[^ ]]* / /
+s/ --bu[[a-z-]]*[[= ]][[^ ]]* / /
+s/ --t[[a-z-]]*[[= ]][[^ ]]* / /
+s/ -cache-file[[= ]][[^ ]]* / /
+s/ -srcdir[[= ]][[^ ]]* / /
+s/ -host[[= ]][[^ ]]* / /
+s/ -build[[= ]][[^ ]]* / /
+s/ -target[[= ]][[^ ]]* / /
+s/ [[^' -][^ ]*] / /
+s/^ *//;s/ *$//
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
+baseargs=`echo " ${ac_configure_args} " | sed -fconftestsed`
+rm -f conftestsed
# For the build-side libraries, we just need to pretend we're native,
# and not use the same cache file. Multilibs are neither needed nor