diff options
author | Mark Mitchell <mark@codesourcery.com> | 2007-02-17 13:35:03 +0000 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2007-02-17 13:35:03 +0000 |
commit | beeaf21625e7a085818c23eb8f1ac43faf07e8a4 (patch) | |
tree | 26a4e7a6d7732528c8e82325d97eac21815b6955 /configure | |
parent | 51db94a08e94148abba8c32f4eec11b73632ea86 (diff) | |
download | gcc-beeaf21625e7a085818c23eb8f1ac43faf07e8a4.zip gcc-beeaf21625e7a085818c23eb8f1ac43faf07e8a4.tar.gz gcc-beeaf21625e7a085818c23eb8f1ac43faf07e8a4.tar.bz2 |
Vladimir Prus <vladimir@codesourcery.com Joseph Myers <joseph@codesourcery.com>
2007-02-17 Mark Mitchell <mark@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com>
Vladimir Prus <vladimir@codesourcery.com
Joseph Myers <joseph@codesourcery.com>
* configure.ac (TOPLEVEL_CONFIGURE_ARGUMENTS): Fix quoting.
* configure: Regenerate.
Co-Authored-By: Nathan Sidwell <nathan@codesourcery.com>
From-SVN: r122073
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 26 |
1 files changed, 18 insertions, 8 deletions
@@ -1615,14 +1615,24 @@ 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. These -# will be expanded by make, so quote '$'. -tmp="$progname $@" -sed -e 's,\$,$$,g' <<EOF_SED > conftestsed.out -$tmp -EOF_SED -TOPLEVEL_CONFIGURE_ARGUMENTS=`cat conftestsed.out` -rm -f conftestsed.out +# Export original configure arguments for use by sub-configures. +# Quote arguments with shell meta charatcers. +TOPLEVEL_CONFIGURE_ARGUMENTS= +set -- "$progname" "$@" +for ac_arg; do + case "$ac_arg" in + *" "*|*" "*|*\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` + # if the argument is of the form -foo=baz, quote the baz part only + ac_arg=`echo "'$ac_arg'" | sed "s/^'\([-a-zA-Z0-9]*=\)/\\1'/"` ;; + *) ;; + esac + # Add the quoted argument to the list. + TOPLEVEL_CONFIGURE_ARGUMENTS="$TOPLEVEL_CONFIGURE_ARGUMENTS $ac_arg" +done +# Remove the initial space we just introduced and, as these will be +# expanded by make, quote '$'. +TOPLEVEL_CONFIGURE_ARGUMENTS=`echo "x$TOPLEVEL_CONFIGURE_ARGUMENTS" | sed -e 's/^x *//' -e 's,\\$,$$,g'` moveifchange=${srcdir}/move-if-change |