(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-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
# 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.
# configure, is in config.log if it exists.
debug=false
-as_me=\`echo "\$[0]" | sed 's,.*/,,'\`
SHELL=\${CONFIG_SHELL-$SHELL}
_ACEOF
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
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
# 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]
# 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
# 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
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)
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.
# 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]
# 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
# 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
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)
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.
# Written by Roland McGrath.
-me=`echo "$0" | sed -e 's,.*/,,'`
+me=`echo "$0" | sed -e 's,.*[/\\],,'`
usage="\
Usage: $0 [OPTION] ... [TEMPLATE-FILE]
# Written by Roland McGrath.
-me=`echo "$0" | sed -e 's,.*/,,'`
+me=`echo "$0" | sed -e 's,.*[/\\],,'`
usage="\
Usage: $0 [OPTION] ... [TEMPLATE-FILE]
# 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]
# 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
: 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
# 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]
# 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
: 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
# 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]
# 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
# 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
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)
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.
# Written by Roland McGrath.
-me=`echo "$0" | sed -e 's,.*/,,'`
+me=`echo "$0" | sed -e 's,.*[/\\],,'`
usage="\
Usage: $0 [OPTION] ... [TEMPLATE-FILE]
# 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]
# 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
: 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
# 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.
# configure, is in config.log if it exists.
debug=false
-as_me=\`echo "\$[0]" | sed 's,.*/,,'\`
SHELL=\${CONFIG_SHELL-$SHELL}
_ACEOF
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
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
#! /bin/sh
AS_SHELL_SANITIZE
-
-# Name of the executable.
-as_me=`echo "$[0]" | sed 's,.*/,,'`
SHELL=${CONFIG_SHELL-/bin/sh}
. ./atconfig
# 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
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
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.
# _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],
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
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.
# _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],
#! /bin/sh
AS_SHELL_SANITIZE
-
-# Name of the executable.
-as_me=`echo "$[0]" | sed 's,.*/,,'`
SHELL=${CONFIG_SHELL-/bin/sh}
. ./atconfig
# 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