aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Yu <tlyu@mit.edu>1994-06-27 18:25:30 +0000
committerTom Yu <tlyu@mit.edu>1994-06-27 18:25:30 +0000
commit24d10482b9dc0d4d54c93154dc5055b39ce224fe (patch)
tree0f9788cd22065864629d749e93fc31b8b244a8c8
parent12bb0842fafb0d25e54cdfd4ee9832240a753a11 (diff)
downloadkrb5-24d10482b9dc0d4d54c93154dc5055b39ce224fe.zip
krb5-24d10482b9dc0d4d54c93154dc5055b39ce224fe.tar.gz
krb5-24d10482b9dc0d4d54c93154dc5055b39ce224fe.tar.bz2
* aclocal.m4: fixes to do sane quoting of arguments before
recursing. This allows options to be set with values containing whitespace, for instance. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3919 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r--src/ChangeLog4
-rw-r--r--src/aclocal.m429
2 files changed, 23 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 457f0ec..c82f8e7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,9 @@
Mon Jun 27 08:21:42 1994 Tom Yu (tlyu at dragons-lair)
+ * aclocal.m4: fixes to do sane quoting of arguments before
+ recursing. This allows options to be set with values containing
+ whitespace, for instance.
+
* configure.in (in all relevant subdirs): move invokations of
CONFIG_RULES around so that they preceed anything that even
vaguely resembles a compile test. This is so that $CC will get
diff --git a/src/aclocal.m4 b/src/aclocal.m4
index b255182..a0e8cf0 100644
--- a/src/aclocal.m4
+++ b/src/aclocal.m4
@@ -45,20 +45,29 @@ SUBDIRS="$1"
if [ -z "${norecursion}" ] ; then
recurse_args=
recur_state=
- for recur_arg in ${configure_args} ; do
- if test -z "${recur_state}" ; then
- case "${recur_arg}" in
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- recur_state="skip"
- ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- ;;
- *) recurse_args="${recurse_args} ${recur_arg}" ;;
+# ok this stuff really belongs in ac_general.m4, but we'll live :-)
+ set foo! "<<<$>>>@"
+ for arg do
+ shift
+ shift
+ if test -z "$recur_state" ; then
+ case $arg in
+ *\"*|*\\*|*\<<<$>>>*)
+ arg=`echo $arg|sed -e 's/\\\\/\\\\\\\\/g;s/"/\\\\"/g;s/\\$/\\\\$/g'`
+ ;;
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ recur_state="skip"
+ ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ ;;
esac
+ # yes this is gross but we need it to make sure that things don't get scrod
+ set foo! "<<<$>>>@" "\"$arg\""
else
recur_state=
fi
done
+ shift
for configdir in $1 ; do
if [ -d ${srcdir}/${configdir} ] ; then
@@ -106,7 +115,7 @@ if [ -z "${norecursion}" ] ; then
### The recursion line is here.
if [ ! -z "${recprog}" ] ; then
- if eval ${config_shell} ${recprog} "${recurse_args}" ${srcdiroption}; then
+ if eval ${config_shell} ${recprog} "<<<$>>>@" ${srcdiroption}; then
true
else
echo Configure in `pwd` failed, exiting. 1>&2