summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorMichael Wallner <mike@php.net>2015-10-08 11:16:22 +0200
committerMichael Wallner <mike@php.net>2016-02-03 13:24:40 +0100
commit0e856232d864721b22fb5dfa223361424634a178 (patch)
tree1ff7c608f1a8ee96c108918b6e1ace8a91c2d2ab /acinclude.m4
parent6d87eb2727b6fb185e8c2c13038786885378226a (diff)
downloadphp-git-0e856232d864721b22fb5dfa223361424634a178.tar.gz
fix generating config.nice; again
The fix in a8bc18420702e1b4fa524d21eae804cd6004879e broke if an arg containing spaces was passed to configure.
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m429
1 files changed, 15 insertions, 14 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index e828de1fd6..70b1a79894 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -2685,20 +2685,21 @@ EOF
else
CONFIGURE_COMMAND="$CONFIGURE_COMMAND [$]0"
fi
- for arg in $ac_configure_args; do
- if test `expr -- $arg : "'.*"` = 0; then
- if test `expr -- $arg : "-.*"` = 0 && test `expr -- $arg : ".*=.*"` = 0; then
- continue;
- fi
- echo "'[$]arg' \\" >> $1
- CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS '[$]arg'"
- else
- if test `expr -- $arg : "'-.*"` = 0 && test `expr -- $arg : "'.*=.*"` = 0; then
- continue;
- fi
- echo "[$]arg \\" >> $1
- CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS [$]arg"
- fi
+ CONFIGURE_ARGS="$ac_configure_args"
+ while test "X$CONFIGURE_ARGS" != "X";
+ do
+ if CURRENT_ARG=`expr "X$CONFIGURE_ARGS" : "X *\('[[^']]*'\)"`
+ then
+ CONFIGURE_ARGS=`expr "X$CONFIGURE_ARGS" : "X *'[[^']]*' \(.*\)"`
+ elif CURRENT_ARG=`expr "X$CONFIGURE_ARGS" : "X *\([[^ ]]*\)"`
+ then
+ CONFIGURE_ARGS=`expr "X$CONFIGURE_ARGS" : "X *[[^ ]]* \(.*\)"`
+ CURRENT_ARG="'$CURRENT_ARG'"
+ else
+ break
+ fi
+ $as_echo "$CURRENT_ARG \\" >>$1
+ CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS $CURRENT_ARG"
done
echo '"[$]@"' >> $1
chmod +x $1