* acgeneral.m4 (AC_CHECK_PROG, AC_PATH_PROG): Assign the path to
authorTom Yu <tlyu@mit.edu>
Wed, 18 Jun 1997 22:28:50 +0000 (22:28 +0000)
committerTom Yu <tlyu@mit.edu>
Wed, 18 Jun 1997 22:28:50 +0000 (22:28 +0000)
ac_dummy and then expand it, rather than simply tacking on
$ac_dummy to the path.  This works around POSIX.2 word splitting
semantics, in which even things like a:b:c:$PATH don't get
word-split as you might expect on a pre-POSIX shell.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10099 dc483132-0cff-0310-8789-dd5450dbe970

src/util/autoconf/ChangeLog
src/util/autoconf/acgeneral.m4
src/util/autoconf/configure

index 8415c4863802db5e69b7243014a2fea7aa22f2cf..94ad35048d3448c459f1504b2df250fc67920419 100644 (file)
@@ -1,3 +1,11 @@
+Wed Jun 18 16:13:11 1997  Tom Yu  <tlyu@mit.edu>
+
+       * acgeneral.m4 (AC_CHECK_PROG, AC_PATH_PROG): Assign the path to
+       ac_dummy and then expand it, rather than simply tacking on
+       $ac_dummy to the path.  This works around POSIX.2 word splitting
+       semantics, in which even things like a:b:c:$PATH don't get
+       word-split as you might expect on a pre-POSIX shell.
+
 Tue Nov 26 13:00:28 1996  David J MacKenzie  <djm@catapult.va.pubnix.com>
 
        * Version 2.12.
index fee0215d9b639a3ae782d10193998c1bca5266b3..a343b9ac6b1de13b0d0010e07a6a2cfcd82c15a4 100644 (file)
@@ -1280,9 +1280,10 @@ else
 ifelse([$6], , , [  ac_prog_rejected=no
 ])dnl
 dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl bash word splitting is done only on the output of word expansions,
+dnl POSIX.2 word splitting is done only on the output of word expansions,
 dnl not every word.  This closes a longstanding sh security hole.
-  for ac_dir in ifelse([$5], , $PATH, [$5$ac_dummy]); do
+  ac_dummy=ifelse([$5], , $PATH, [$5])
+  for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
 ifelse([$6], , , dnl
@@ -1344,9 +1345,10 @@ AC_CACHE_VAL(ac_cv_path_$1,
   *)
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
 dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl bash word splitting is done only on the output of word expansions,
+dnl POSIX.2 word splitting is done only on the output of word expansions,
 dnl not every word.  This closes a longstanding sh security hole.
-  for ac_dir in ifelse([$4], , $PATH, [$4$ac_dummy]); do
+  ac_dummy=ifelse([$4], , $PATH, [$4])
+  for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_path_$1="$ac_dir/$ac_word"
index 9f04e77a3e1a18c58c621bb34b768c998ff0d307..a0a4e7098a7a0afc2914e676452ea4eb112fcca0 100644 (file)
@@ -554,7 +554,8 @@ else
   ;;
   *)
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  ac_dummy=$PATH
+  for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_path_M4="$ac_dir/$ac_word"
@@ -581,7 +582,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:585: checking for $ac_word" >&5
+echo "configure:586: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -589,7 +590,8 @@ else
   ac_cv_prog_AWK="$AWK" # Let the user override the test.
 else
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  ac_dummy=$PATH
+  for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_AWK="$ac_prog"
@@ -613,7 +615,7 @@ done
 # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:617: checking for $ac_word" >&5
+echo "configure:619: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -623,7 +625,8 @@ else
   ;;
   *)
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  ac_dummy=$PATH
+  for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_path_PERL="$ac_dir/$ac_word"
@@ -678,7 +681,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:682: checking for a BSD compatible install" >&5
+echo "configure:685: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6