diff options
-rw-r--r-- | src/ChangeLog | 4 | ||||
-rw-r--r-- | src/aclocal.m4 | 29 |
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 |