* aclocal.m4: fixes to do sane quoting of arguments before
authorTom Yu <tlyu@mit.edu>
Mon, 27 Jun 1994 18:25:30 +0000 (18:25 +0000)
committerTom Yu <tlyu@mit.edu>
Mon, 27 Jun 1994 18:25:30 +0000 (18:25 +0000)
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

src/ChangeLog
src/aclocal.m4

index 457f0ecb15d46ed2c6f67c6d5966c5a754a5cc81..c82f8e74f4eff24305691c59d5bdabc1a8b728bd 100644 (file)
@@ -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
index b2551828ff515d0de8f4f272daf315caad1685c3..a0e8cf05f4eba6a8238d7895756b6a84b5bae079 100644 (file)
@@ -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