]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* m4sh.m4 (AS_BASENAME): New.
authorAkim Demaille <akim@epita.fr>
Fri, 30 Mar 2001 12:49:36 +0000 (12:49 +0000)
committerAkim Demaille <akim@epita.fr>
Fri, 30 Mar 2001 12:49:36 +0000 (12:49 +0000)
(AS_SHELL_SANITIZE): Set `$as_me'.
* acgeneral.m4: Don't set as_me; AS_SHELL_SANITIZE now does this.
* tests/atgeneral.m4: Likewise.
(AT_INIT): Use $PATH_SEPARATOR for walking the path.
* autoconf.sh: Be DOS-friendly when setting as_me and M4.
Add quotes to support spaces in $tmp.
Work around problem in DJGPP port of awk by using a temporary file.
* autoheader.sh: Be DOS-friendly when setting as_me.
* autoreconf.sh: Be DOS-friendly when setting as_me, dir and
template_dir.

16 files changed:
ChangeLog
acgeneral.m4
autoconf.in
autoconf.sh
autoheader.in
autoheader.sh
autoreconf.in
autoreconf.sh
bin/autoconf.in
bin/autoheader.in
bin/autoreconf.in
lib/autoconf/general.m4
lib/autotest/general.m4
lib/m4sugar/m4sh.m4
m4sh.m4
tests/atgeneral.m4

index d85db2b3b74ee5a7c6cb00b5d06c309743737467..8db3564d6860aef74c1c23268f55cb097d63f173 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2001-03-30  Tim Van Holder <tim.van.holder@pandora.be>
+
+       * m4sh.m4 (AS_BASENAME): New.
+       (AS_SHELL_SANITIZE): Set `$as_me'.
+       * acgeneral.m4: Don't set as_me; AS_SHELL_SANITIZE now does this.
+       * tests/atgeneral.m4: Likewise.
+       (AT_INIT): Use $PATH_SEPARATOR for walking the path.
+       * autoconf.sh: Be DOS-friendly when setting as_me and M4.
+       Add quotes to support spaces in $tmp.
+       Work around problem in DJGPP port of awk by using a temporary file.
+       * autoheader.sh: Be DOS-friendly when setting as_me.
+       * autoreconf.sh: Be DOS-friendly when setting as_me, dir and
+       template_dir.
+
 2001-03-27  Lars J. Aas  <larsa@sim.no>
 
        * acgeneral.m4 (AC_INIT_VERSION): Improved version information string
index 45feb57a8c5573f46faca9cb5c9bfd55dc5f2ba5..c0a3d2c17322fa99a480b86291bb407635573dba 100644 (file)
@@ -723,9 +723,6 @@ AS_SHELL_SANITIZE
 # so uname gets run too.
 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 
-# Name of the executable.
-as_me=`echo "$[0]" | sed 's,.*/,,'`
-
 cat >config.log <<EOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
@@ -3596,7 +3593,6 @@ cat >$CONFIG_STATUS <<_ACEOF
 # configure, is in config.log if it exists.
 
 debug=false
-as_me=\`echo "\$[0]" | sed 's,.*/,,'\`
 SHELL=\${CONFIG_SHELL-$SHELL}
 
 _ACEOF
@@ -4000,8 +3996,8 @@ AC_PROVIDE_IFELSE([AC_PROG_INSTALL],
     for f in $ac_file_in; do
       case $f in
       -) echo $tmp/stdin ;;
-      [[\\/$]]* | ?:[[\\/]]*)
-         # Absolute
+      [[\\/$]]*)
+         # Absolute (can't be DOS-style, as IFS=:)
          test -f "$f" || AC_MSG_ERROR([cannot find input file: $f])
          echo $f;;
       *) # Relative
@@ -4147,8 +4143,8 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
     for f in $ac_file_in; do
       case $f in
       -) echo $tmp/stdin ;;
-      [[\\/$]]* | ?:[[\\/]]*)
-         # Absolute
+      [[\\/$]]*)
+         # Absolute (can't be DOS-style, as IFS=:)
          test -f "$f" || AC_MSG_ERROR([cannot find input file: $f])
          echo $f;;
       *) # Relative
index 315b03412e8b493184ff26ac7cf6bc429e31904e..2a2222eb9ec6c221d1ec0ee6909145c28cec61cf 100644 (file)
@@ -18,7 +18,7 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 # 02111-1307, USA.
 
-me=`echo "$0" | sed -e 's,.*/,,'`
+me=`echo "$0" | sed -e 's,.*[\\/],,'`
 
 usage="\
 Usage: $0 [OPTION] ... [TEMPLATE-FILE]
@@ -95,8 +95,8 @@ ac_LF_and_DOT=`echo; echo .`
 # Handle the case that m4 has moved since we were configured.
 # It may have been found originally in a build directory.
 : ${M4=@M4@}
-case $M4 in
-/*|[a-zA-Z]:*) test -f "$M4" || M4=m4 ;;
+case "$M4" in
+  [\\/]* | ?:[\\/]*) test -f "$M4" || M4=m4 ;;
 esac
 # Some non-GNU m4's don't reject the --help option, so give them /dev/null.
 case `$M4 --help </dev/null 2>&1` in
@@ -322,7 +322,7 @@ case $task in
   # Put the real line numbers into configure to make config.log more
   # helpful.  Because quoting can sometimes get really painful in m4,
   # there are special @tokens@ to substitute.
-  sed 's/^    //' >$tmp/finalize.awk <<EOF
+  sed 's/^    //' >"$tmp/finalize.awk" <<EOF
     # Load the list of tokens which escape the forbidden patterns.
     BEGIN {
       # Be sure the read GAWK documentation to understand the parens
@@ -344,7 +344,10 @@ case $task in
 
     function errprint (message)
     {
-      print message | "cat >&2"
+      # BAD! the pipe to 'cat >&2' doesn't work for DJGPP.
+      #  print message | "cat >&2"
+      # Use normal redirection instead:
+      print message > "$tmp/finalize.err"
     }
 
     function undefined (file, line, macro)
@@ -421,8 +424,10 @@ case $task in
 EOF
     $AWK -v tmp="$tmp" \
          `$verbose "-v verbose=1"` \
-         -f $tmp/finalize.awk <$tmp/configure >&4 ||
-      { (exit 1); exit; }
+         -f "$tmp/finalize.awk" <$tmp/configure >&4 ||
+      { test -f "$tmp/finalize.err" && cat "$tmp/finalize.err" >&2
+        (exit 1); exit; }
+    test -f "$tmp/finalize.err" && cat "$tmp/finalize.err" >&2
   ;; # End of the task script.
 
 
index 315b03412e8b493184ff26ac7cf6bc429e31904e..2a2222eb9ec6c221d1ec0ee6909145c28cec61cf 100644 (file)
@@ -18,7 +18,7 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 # 02111-1307, USA.
 
-me=`echo "$0" | sed -e 's,.*/,,'`
+me=`echo "$0" | sed -e 's,.*[\\/],,'`
 
 usage="\
 Usage: $0 [OPTION] ... [TEMPLATE-FILE]
@@ -95,8 +95,8 @@ ac_LF_and_DOT=`echo; echo .`
 # Handle the case that m4 has moved since we were configured.
 # It may have been found originally in a build directory.
 : ${M4=@M4@}
-case $M4 in
-/*|[a-zA-Z]:*) test -f "$M4" || M4=m4 ;;
+case "$M4" in
+  [\\/]* | ?:[\\/]*) test -f "$M4" || M4=m4 ;;
 esac
 # Some non-GNU m4's don't reject the --help option, so give them /dev/null.
 case `$M4 --help </dev/null 2>&1` in
@@ -322,7 +322,7 @@ case $task in
   # Put the real line numbers into configure to make config.log more
   # helpful.  Because quoting can sometimes get really painful in m4,
   # there are special @tokens@ to substitute.
-  sed 's/^    //' >$tmp/finalize.awk <<EOF
+  sed 's/^    //' >"$tmp/finalize.awk" <<EOF
     # Load the list of tokens which escape the forbidden patterns.
     BEGIN {
       # Be sure the read GAWK documentation to understand the parens
@@ -344,7 +344,10 @@ case $task in
 
     function errprint (message)
     {
-      print message | "cat >&2"
+      # BAD! the pipe to 'cat >&2' doesn't work for DJGPP.
+      #  print message | "cat >&2"
+      # Use normal redirection instead:
+      print message > "$tmp/finalize.err"
     }
 
     function undefined (file, line, macro)
@@ -421,8 +424,10 @@ case $task in
 EOF
     $AWK -v tmp="$tmp" \
          `$verbose "-v verbose=1"` \
-         -f $tmp/finalize.awk <$tmp/configure >&4 ||
-      { (exit 1); exit; }
+         -f "$tmp/finalize.awk" <$tmp/configure >&4 ||
+      { test -f "$tmp/finalize.err" && cat "$tmp/finalize.err" >&2
+        (exit 1); exit; }
+    test -f "$tmp/finalize.err" && cat "$tmp/finalize.err" >&2
   ;; # End of the task script.
 
 
index d93f330ae3e39cdcf1e92f5d210dc05349a9fc0d..800a7172c39c7ca083e3865bc5a32fcdb17bf314 100644 (file)
@@ -20,7 +20,7 @@
 
 # Written by Roland McGrath.
 
-me=`echo "$0" | sed -e 's,.*/,,'`
+me=`echo "$0" | sed -e 's,.*[/\\],,'`
 
 usage="\
 Usage: $0 [OPTION] ... [TEMPLATE-FILE]
index d93f330ae3e39cdcf1e92f5d210dc05349a9fc0d..800a7172c39c7ca083e3865bc5a32fcdb17bf314 100644 (file)
@@ -20,7 +20,7 @@
 
 # Written by Roland McGrath.
 
-me=`echo "$0" | sed -e 's,.*/,,'`
+me=`echo "$0" | sed -e 's,.*[/\\],,'`
 
 usage="\
 Usage: $0 [OPTION] ... [TEMPLATE-FILE]
index 82297c665b9712ae940385b37328434abdaa35ac..78e1c232182044f4a336b86aef4c7387020a11bf 100644 (file)
@@ -17,7 +17,7 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 # 02111-1307, USA.
 
-me=`echo "$0" | sed -e 's,.*/,,'`
+me=`echo "$0" | sed -e 's,.*[\\/],,'`
 
 usage="\
 Usage: $0 [OPTION] ... [TEMPLATE-FILE]
@@ -91,7 +91,7 @@ if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
 # Variables.
 : ${autoconf_dir=${AC_MACRODIR=@datadir@}}
 debug=false
-dir=`echo "$0" | sed -e 's,[^/]*$,,'`
+dir=`echo "$0" | sed -e 's,[^\\/]*$,,'`
 force=false
 # --install -- as --add-missing in other tools.
 install=false
@@ -382,7 +382,7 @@ while read dir; do
         : colon
         s/:.*//
       '`
-    template_dir=`echo $template | sed 's,/*[^/]*$,,;s,^$,.,'`
+    template_dir=`echo $template | sed -e 's,[\\/]*[^\\/]*$,,;s,^$,.,'`
     stamp_num=`test "$tcount" -gt 1 && echo "$tcount"`
     stamp=$template_dir/stamp-h$stamp_num.in
     # If config.hin exists, don't override it unless it was really
index 82297c665b9712ae940385b37328434abdaa35ac..78e1c232182044f4a336b86aef4c7387020a11bf 100644 (file)
@@ -17,7 +17,7 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 # 02111-1307, USA.
 
-me=`echo "$0" | sed -e 's,.*/,,'`
+me=`echo "$0" | sed -e 's,.*[\\/],,'`
 
 usage="\
 Usage: $0 [OPTION] ... [TEMPLATE-FILE]
@@ -91,7 +91,7 @@ if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
 # Variables.
 : ${autoconf_dir=${AC_MACRODIR=@datadir@}}
 debug=false
-dir=`echo "$0" | sed -e 's,[^/]*$,,'`
+dir=`echo "$0" | sed -e 's,[^\\/]*$,,'`
 force=false
 # --install -- as --add-missing in other tools.
 install=false
@@ -382,7 +382,7 @@ while read dir; do
         : colon
         s/:.*//
       '`
-    template_dir=`echo $template | sed 's,/*[^/]*$,,;s,^$,.,'`
+    template_dir=`echo $template | sed -e 's,[\\/]*[^\\/]*$,,;s,^$,.,'`
     stamp_num=`test "$tcount" -gt 1 && echo "$tcount"`
     stamp=$template_dir/stamp-h$stamp_num.in
     # If config.hin exists, don't override it unless it was really
index 315b03412e8b493184ff26ac7cf6bc429e31904e..2a2222eb9ec6c221d1ec0ee6909145c28cec61cf 100644 (file)
@@ -18,7 +18,7 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 # 02111-1307, USA.
 
-me=`echo "$0" | sed -e 's,.*/,,'`
+me=`echo "$0" | sed -e 's,.*[\\/],,'`
 
 usage="\
 Usage: $0 [OPTION] ... [TEMPLATE-FILE]
@@ -95,8 +95,8 @@ ac_LF_and_DOT=`echo; echo .`
 # Handle the case that m4 has moved since we were configured.
 # It may have been found originally in a build directory.
 : ${M4=@M4@}
-case $M4 in
-/*|[a-zA-Z]:*) test -f "$M4" || M4=m4 ;;
+case "$M4" in
+  [\\/]* | ?:[\\/]*) test -f "$M4" || M4=m4 ;;
 esac
 # Some non-GNU m4's don't reject the --help option, so give them /dev/null.
 case `$M4 --help </dev/null 2>&1` in
@@ -322,7 +322,7 @@ case $task in
   # Put the real line numbers into configure to make config.log more
   # helpful.  Because quoting can sometimes get really painful in m4,
   # there are special @tokens@ to substitute.
-  sed 's/^    //' >$tmp/finalize.awk <<EOF
+  sed 's/^    //' >"$tmp/finalize.awk" <<EOF
     # Load the list of tokens which escape the forbidden patterns.
     BEGIN {
       # Be sure the read GAWK documentation to understand the parens
@@ -344,7 +344,10 @@ case $task in
 
     function errprint (message)
     {
-      print message | "cat >&2"
+      # BAD! the pipe to 'cat >&2' doesn't work for DJGPP.
+      #  print message | "cat >&2"
+      # Use normal redirection instead:
+      print message > "$tmp/finalize.err"
     }
 
     function undefined (file, line, macro)
@@ -421,8 +424,10 @@ case $task in
 EOF
     $AWK -v tmp="$tmp" \
          `$verbose "-v verbose=1"` \
-         -f $tmp/finalize.awk <$tmp/configure >&4 ||
-      { (exit 1); exit; }
+         -f "$tmp/finalize.awk" <$tmp/configure >&4 ||
+      { test -f "$tmp/finalize.err" && cat "$tmp/finalize.err" >&2
+        (exit 1); exit; }
+    test -f "$tmp/finalize.err" && cat "$tmp/finalize.err" >&2
   ;; # End of the task script.
 
 
index d93f330ae3e39cdcf1e92f5d210dc05349a9fc0d..800a7172c39c7ca083e3865bc5a32fcdb17bf314 100644 (file)
@@ -20,7 +20,7 @@
 
 # Written by Roland McGrath.
 
-me=`echo "$0" | sed -e 's,.*/,,'`
+me=`echo "$0" | sed -e 's,.*[/\\],,'`
 
 usage="\
 Usage: $0 [OPTION] ... [TEMPLATE-FILE]
index 82297c665b9712ae940385b37328434abdaa35ac..78e1c232182044f4a336b86aef4c7387020a11bf 100644 (file)
@@ -17,7 +17,7 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 # 02111-1307, USA.
 
-me=`echo "$0" | sed -e 's,.*/,,'`
+me=`echo "$0" | sed -e 's,.*[\\/],,'`
 
 usage="\
 Usage: $0 [OPTION] ... [TEMPLATE-FILE]
@@ -91,7 +91,7 @@ if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
 # Variables.
 : ${autoconf_dir=${AC_MACRODIR=@datadir@}}
 debug=false
-dir=`echo "$0" | sed -e 's,[^/]*$,,'`
+dir=`echo "$0" | sed -e 's,[^\\/]*$,,'`
 force=false
 # --install -- as --add-missing in other tools.
 install=false
@@ -382,7 +382,7 @@ while read dir; do
         : colon
         s/:.*//
       '`
-    template_dir=`echo $template | sed 's,/*[^/]*$,,;s,^$,.,'`
+    template_dir=`echo $template | sed -e 's,[\\/]*[^\\/]*$,,;s,^$,.,'`
     stamp_num=`test "$tcount" -gt 1 && echo "$tcount"`
     stamp=$template_dir/stamp-h$stamp_num.in
     # If config.hin exists, don't override it unless it was really
index 45feb57a8c5573f46faca9cb5c9bfd55dc5f2ba5..c0a3d2c17322fa99a480b86291bb407635573dba 100644 (file)
@@ -723,9 +723,6 @@ AS_SHELL_SANITIZE
 # so uname gets run too.
 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 
-# Name of the executable.
-as_me=`echo "$[0]" | sed 's,.*/,,'`
-
 cat >config.log <<EOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
@@ -3596,7 +3593,6 @@ cat >$CONFIG_STATUS <<_ACEOF
 # configure, is in config.log if it exists.
 
 debug=false
-as_me=\`echo "\$[0]" | sed 's,.*/,,'\`
 SHELL=\${CONFIG_SHELL-$SHELL}
 
 _ACEOF
@@ -4000,8 +3996,8 @@ AC_PROVIDE_IFELSE([AC_PROG_INSTALL],
     for f in $ac_file_in; do
       case $f in
       -) echo $tmp/stdin ;;
-      [[\\/$]]* | ?:[[\\/]]*)
-         # Absolute
+      [[\\/$]]*)
+         # Absolute (can't be DOS-style, as IFS=:)
          test -f "$f" || AC_MSG_ERROR([cannot find input file: $f])
          echo $f;;
       *) # Relative
@@ -4147,8 +4143,8 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
     for f in $ac_file_in; do
       case $f in
       -) echo $tmp/stdin ;;
-      [[\\/$]]* | ?:[[\\/]]*)
-         # Absolute
+      [[\\/$]]*)
+         # Absolute (can't be DOS-style, as IFS=:)
          test -f "$f" || AC_MSG_ERROR([cannot find input file: $f])
          echo $f;;
       *) # Relative
index fff5c97c76ea199a05b4413a28125e665e2621fa..4283d0dab6de5c13c167a188ea53d204cd46c7f5 100644 (file)
@@ -95,9 +95,6 @@ m4_divert_push([DEFAULT])dnl
 #! /bin/sh
 
 AS_SHELL_SANITIZE
-
-# Name of the executable.
-as_me=`echo "$[0]" | sed 's,.*/,,'`
 SHELL=${CONFIG_SHELL-/bin/sh}
 
 . ./atconfig
@@ -108,12 +105,12 @@ at_top_srcdir=`cd "$top_srcdir" && pwd`
 # Don't take risks: use absolute path names.
 at_path=`pwd`
 at_IFS_save=$IFS
-IFS=:
+IFS=$PATH_SEPARATOR
 for at_dir in $AUTOTEST_PATH $PATH; do
   # There might be directories that don't exist, but don't redirect
   # builtins' (eg., cd) stderr directly: Ultrix's sh hates that.
   at_dir=`(cd "$at_dir" && pwd) 2>/dev/null`
-  test -n "$at_dir" && at_path=$at_path:$at_dir
+  test -n "$at_dir" && at_path="$at_path$PATH_SEPARATOR$at_dir"
 done
 IFS=$at_IFS_save
 PATH=$at_path
index fcd87c9dbfb775274c0d0ee0fd2a57a0cb5fcd2a..b1dbbd51ea623057c2820595940459f31b59fc0c 100644 (file)
@@ -66,6 +66,10 @@ elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
   set -o posix
 fi
 
+# Name of the executable.
+dnl Moved here because the tests below can use AC_MSG_ERROR, which uses $as_me
+as_me=`AS_BASENAME($[0])`
+
 _AS_EXPR_PREPARE
 _AS_LN_S_PREPARE
 _AS_TEST_PREPARE
@@ -291,6 +295,13 @@ m4_defun([AS_DIRNAME],
 AS_DIRNAME_SED([$1])])
 
 
+# AS_BASENAME(PATHNAME)
+# --------------------
+# Simulate running `basename(1)' on PATHNAME, not all systems have it.
+# This macro must be usable from inside ` `.
+m4_defun([AS_BASENAME],
+[echo "$1" |sed 's,.*[[\\/]],,'])
+
 # AS_EXECUTABLE_P
 # ---------------
 # Check whether a file is executable.
@@ -317,7 +328,7 @@ fi
 # _AS_LN_S_PREPARE
 # ----------------
 # Don't use conftest.sym to avoid filename issues on DJGPP, where this
-# would yield conftest.sym.exe for DJGPP < 2.04.  And do use `conftest'
+# would yield conftest.sym.exe for DJGPP < 2.04.  And don't use `conftest'
 # as base name to avoid prohibiting concurrency (e.g., concurrent
 # config.statuses).
 m4_defun([_AS_LN_S_PREPARE],
diff --git a/m4sh.m4 b/m4sh.m4
index fcd87c9dbfb775274c0d0ee0fd2a57a0cb5fcd2a..b1dbbd51ea623057c2820595940459f31b59fc0c 100644 (file)
--- a/m4sh.m4
+++ b/m4sh.m4
@@ -66,6 +66,10 @@ elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
   set -o posix
 fi
 
+# Name of the executable.
+dnl Moved here because the tests below can use AC_MSG_ERROR, which uses $as_me
+as_me=`AS_BASENAME($[0])`
+
 _AS_EXPR_PREPARE
 _AS_LN_S_PREPARE
 _AS_TEST_PREPARE
@@ -291,6 +295,13 @@ m4_defun([AS_DIRNAME],
 AS_DIRNAME_SED([$1])])
 
 
+# AS_BASENAME(PATHNAME)
+# --------------------
+# Simulate running `basename(1)' on PATHNAME, not all systems have it.
+# This macro must be usable from inside ` `.
+m4_defun([AS_BASENAME],
+[echo "$1" |sed 's,.*[[\\/]],,'])
+
 # AS_EXECUTABLE_P
 # ---------------
 # Check whether a file is executable.
@@ -317,7 +328,7 @@ fi
 # _AS_LN_S_PREPARE
 # ----------------
 # Don't use conftest.sym to avoid filename issues on DJGPP, where this
-# would yield conftest.sym.exe for DJGPP < 2.04.  And do use `conftest'
+# would yield conftest.sym.exe for DJGPP < 2.04.  And don't use `conftest'
 # as base name to avoid prohibiting concurrency (e.g., concurrent
 # config.statuses).
 m4_defun([_AS_LN_S_PREPARE],
index fff5c97c76ea199a05b4413a28125e665e2621fa..4283d0dab6de5c13c167a188ea53d204cd46c7f5 100644 (file)
@@ -95,9 +95,6 @@ m4_divert_push([DEFAULT])dnl
 #! /bin/sh
 
 AS_SHELL_SANITIZE
-
-# Name of the executable.
-as_me=`echo "$[0]" | sed 's,.*/,,'`
 SHELL=${CONFIG_SHELL-/bin/sh}
 
 . ./atconfig
@@ -108,12 +105,12 @@ at_top_srcdir=`cd "$top_srcdir" && pwd`
 # Don't take risks: use absolute path names.
 at_path=`pwd`
 at_IFS_save=$IFS
-IFS=:
+IFS=$PATH_SEPARATOR
 for at_dir in $AUTOTEST_PATH $PATH; do
   # There might be directories that don't exist, but don't redirect
   # builtins' (eg., cd) stderr directly: Ultrix's sh hates that.
   at_dir=`(cd "$at_dir" && pwd) 2>/dev/null`
-  test -n "$at_dir" && at_path=$at_path:$at_dir
+  test -n "$at_dir" && at_path="$at_path$PATH_SEPARATOR$at_dir"
 done
 IFS=$at_IFS_save
 PATH=$at_path