* autoheader.sh: s/-eq/=/.
Uniform ordering of variable initializations, option handling.
Don't use quotes where useless (foo=$1, not foo="$1").
Propagate `run_m4' and `run_m4f'.
Use `$0' in --help.
* autoconf.sh: Likewise.
* autoreconf.sh: Likewise.
* autoupdate.sh: Likewise.
* ifnames.sh: Likewise.
* autoupdate.m4: Small bug: at the end `dnl' is disabled, so use
`m4_dnl'.
+2000-03-13 Akim Demaille <akim@epita.fr>
+
+ More uniform style is scripts.
+
+ * autoheader.sh: s/-eq/=/.
+ Uniform ordering of variable initializations, option handling.
+ Don't use quotes where useless (foo=$1, not foo="$1").
+ Propagate `run_m4' and `run_m4f'.
+ Use `$0' in --help.
+ * autoconf.sh: Likewise.
+ * autoreconf.sh: Likewise.
+ * autoupdate.sh: Likewise.
+ * ifnames.sh: Likewise.
+ * autoupdate.m4: Small bug: at the end `dnl' is disabled, so use
+ `m4_dnl'.
+
2000-03-13 Akim Demaille <akim@epita.fr>
`autoconf --trace': faster.
echo "$version" ; exit 0 ;;
--help | --h* | -h )
echo "$usage"; exit 0 ;;
+
--debug | --d* | -d )
debug=:; shift ;;
+ --verbose | --verb* | -v )
+ verbose=echo
+ shift;;
--localdir=* | --l*=* )
localdir=`echo "$1" | sed -e 's/^[^=]*=//'`
shift ;;
--localdir | --l* | -l )
shift
- test $# -eq 0 && { echo "$help" >&2; exit 1; }
- localdir="$1"
+ test $# = 0 && { echo "$help" >&2; exit 1; }
+ localdir=$1
shift ;;
--macrodir=* | --m*=* )
shift ;;
--macrodir | --m* | -m )
shift
- test $# -eq 0 && { echo "$help" >&2; exit 1; }
- AC_MACRODIR="$1"
+ test $# = 0 && { echo "$help" >&2; exit 1; }
+ AC_MACRODIR=$1
shift ;;
--install )
task=install
shift;;
- --verbose | --verb* | -v )
- verbose=echo
- shift;;
-
--trace | -t )
task=trace
shift
- test $# -eq 0 && { echo "$help" >&2; exit 1; }
+ test $# = 0 && { echo "$help" >&2; exit 1; }
traces="$traces '$1'"
shift ;;
--trace=* )
--output | -o )
shift
- test $# -eq 0 && { echo "$help" >&2; exit 1; }
- outfile="$1"
+ test $# = 0 && { echo "$help" >&2; exit 1; }
+ outfile=$1
shift ;;
--output=* )
outfile=`echo "$1" | sed -e 's/^[^=]*=//'`
case $# in
0) infile=configure.in
test $task = script && test "x$outfile" = x && outfile=configure;;
- 1) infile="$1" ;;
+ 1) infile=$1 ;;
*) exec >&2
echo "$me: invalid number of arguments."
echo "$help"
# Trap on 0 to stop playing with `rm'.
if $debug; then
- trap 'ah_status=$?
- rm -f $tmpin $tmpout $silent_m4 $trace_m4 && exit $ah_status' 0
+ trap 'status=$?
+ rm -f $tmpin $tmpout $silent_m4 $trace_m4 && exit $status' 0
trap exit 1 2 13 15
fi
sed -n "s/^[^#]*\\($pattern[_A-Za-z0-9]*\\).*/\\1/p" $tmpout |
while read macro; do
grep -n "^[^#]*$macro" $infile /dev/null
- test $? -eq 1 && echo "***BUG in Autoconf--please report*** $macro"
+ test $? = 1 && echo "***BUG in Autoconf--please report*** $macro"
done | sort -u >&2
status=1
fi
echo "$version" ; exit 0 ;;
--help | --h* | -h )
echo "$usage"; exit 0 ;;
+
--debug | --d* | -d )
debug=:; shift ;;
+ --verbose | --verb* | -v )
+ verbose=echo
+ shift;;
--localdir=* | --l*=* )
localdir=`echo "$1" | sed -e 's/^[^=]*=//'`
shift ;;
--localdir | --l* | -l )
shift
- test $# -eq 0 && { echo "$help" >&2; exit 1; }
- localdir="$1"
+ test $# = 0 && { echo "$help" >&2; exit 1; }
+ localdir=$1
shift ;;
--macrodir=* | --m*=* )
shift ;;
--macrodir | --m* | -m )
shift
- test $# -eq 0 && { echo "$help" >&2; exit 1; }
- AC_MACRODIR="$1"
+ test $# = 0 && { echo "$help" >&2; exit 1; }
+ AC_MACRODIR=$1
shift ;;
--install )
task=install
shift;;
- --verbose | --verb* | -v )
- verbose=echo
- shift;;
-
--trace | -t )
task=trace
shift
- test $# -eq 0 && { echo "$help" >&2; exit 1; }
+ test $# = 0 && { echo "$help" >&2; exit 1; }
traces="$traces '$1'"
shift ;;
--trace=* )
--output | -o )
shift
- test $# -eq 0 && { echo "$help" >&2; exit 1; }
- outfile="$1"
+ test $# = 0 && { echo "$help" >&2; exit 1; }
+ outfile=$1
shift ;;
--output=* )
outfile=`echo "$1" | sed -e 's/^[^=]*=//'`
case $# in
0) infile=configure.in
test $task = script && test "x$outfile" = x && outfile=configure;;
- 1) infile="$1" ;;
+ 1) infile=$1 ;;
*) exec >&2
echo "$me: invalid number of arguments."
echo "$help"
# Trap on 0 to stop playing with `rm'.
if $debug; then
- trap 'ah_status=$?
- rm -f $tmpin $tmpout $silent_m4 $trace_m4 && exit $ah_status' 0
+ trap 'status=$?
+ rm -f $tmpin $tmpout $silent_m4 $trace_m4 && exit $status' 0
trap exit 1 2 13 15
fi
sed -n "s/^[^#]*\\($pattern[_A-Za-z0-9]*\\).*/\\1/p" $tmpout |
while read macro; do
grep -n "^[^#]*$macro" $infile /dev/null
- test $? -eq 1 && echo "***BUG in Autoconf--please report*** $macro"
+ test $? = 1 && echo "***BUG in Autoconf--please report*** $macro"
done | sort -u >&2
status=1
fi
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-test -z "${AC_MACRODIR}" && AC_MACRODIR=@datadir@
-test -z "${M4}" && M4=@M4@
-case "${M4}" in
-/*) # Handle the case that m4 has moved since we were configured.
- # It may have been found originally in a build directory.
- test -f "${M4}" || M4=m4 ;;
-esac
-
# ac_LF_and_DOT
# We use echo to avoid assuming a particular line-breaking character.
# The extra dot is to prevent the shell from consuming trailing
# would break.
ac_LF_and_DOT=`echo; echo .`
-localdir=.
+# Find GNU m4.
+# 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
+/*) 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
+*reload-state*);;
+*) echo "$me: Autoconf requires GNU m4 1.4 or later" >&2; exit 1 ;;
+esac
+
+# Variables.
+: ${AC_MACRODIR=@datadir@}
debug=false
+localdir=.
+verbose=:
# Basename for temporary files.
: ${TMPDIR=/tmp}
-ah_base=$TMPDIR/ah$$
-tmpout=$ah_base.out
+tmpbase=$TMPDIR/ah$$
+tmpout=$tmpbase.out
while test $# -gt 0 ; do
- case "$1" in
- -h | --help | --h* )
- echo "$usage"; exit 0 ;;
- --version | --v* )
- echo "$version"; exit 0 ;;
- -d | --debug | --d* )
- debug=:; shift ;;
- --localdir=* | --l*=* )
- localdir=`echo "$1" | sed -e 's/^[^=]*=//'`
- shift ;;
- -l | --localdir | --l*)
- shift
- test $# -eq 0 && { echo "$help" >&2; exit 1; }
- localdir=$1
- shift ;;
- --macrodir=* | --m*=* )
- AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'`
- shift ;;
- -m | --macrodir | --m* )
- shift
- test $# -eq 0 && { echo "$help" >&2; exit 1; }
- AC_MACRODIR=$1
- shift ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- exec >&2
- echo "$me: invalid option $1"
- echo "$help"
- exit 1 ;;
- * )
- break ;;
- esac
+ case "$1" in
+ --version | --vers* | -V )
+ echo "$version" ; exit 0 ;;
+ --help | --h* | -h )
+ echo "$usage"; exit 0 ;;
+
+ --debug | --d* | -d )
+ debug=:; shift ;;
+ --verbose | --verb* | -v )
+ verbose=echo
+ shift;;
+
+ --localdir=* | --l*=* )
+ localdir=`echo "$1" | sed -e 's/^[^=]*=//'`
+ shift ;;
+ --localdir | --l* | -l )
+ shift
+ test $# = 0 && { echo "$help" >&2; exit 1; }
+ localdir=$1
+ shift ;;
+
+ --macrodir=* | --m*=* )
+ AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'`
+ shift ;;
+ --macrodir | --m* | -m )
+ shift
+ test $# = 0 && { echo "$help" >&2; exit 1; }
+ AC_MACRODIR=$1
+ shift ;;
+
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ exec >&2
+ echo "$me: invalid option $1"
+ echo "$help"
+ exit 1 ;;
+ * )
+ break ;;
+ esac
done
+# Running m4.
+test -n "$localdir" && use_localdir="-I$localdir"
+run_m4="$M4 $use_localdir -I $AC_MACRODIR autoheader.m4"
+run_m4f="$M4 $use_localdir --reload $AC_MACRODIR/autoheader.m4f"
+
acconfigs=
test -r $localdir/acconfig.h && acconfigs="$acconfigs $localdir/acconfig.h"
+# Find the input file.
case $# in
0) infile=configure.in ;;
1) infile=$1 ;;
exit 1 ;;
esac
-config_h=
-syms=
-
-if test "$localdir" != .; then
- use_localdir="-I$localdir -DAC_LOCALDIR=$localdir"
-else
- use_localdir=
-fi
-
-# Some non-GNU m4's don't reject the --help option, so give them /dev/null.
-case `$M4 --help < /dev/null 2>&1` in
-*reload-state*);;
-*) echo "$me: Autoconf requires GNU m4 1.4 or later" >&2; exit 1 ;;
-esac
-run_m4="$M4 --reload $AC_MACRODIR/autoheader.m4f $use_localdir"
-
# Trap on 0 to stop playing with `rm'.
-$debug || trap 'ah_status=$?; rm -f $ah_base* && exit $ah_status' 0
+$debug || trap 'status=$?; rm -f $tmpbase* && exit $status' 0
$debug || trap exit 1 2 13 15
+# Well, work now!
+config_h=
+syms=
+
# Extract assignments of `ah_verbatim_SYMBOL' from the modified
# autoconf processing of the input file. The sed hair is necessary to
# win for multi-line macro invocations.
-$run_m4 $infile >$ah_base.exp
+$run_m4 $infile >$tmpbase.exp
sed -n -e '
: again
/^@@@.*@@@$/s/^@@@\(.*\)@@@$/\1/p
n
s/^/@@@/
b again
- }' $ah_base.exp >$ah_base.decls
-. $ah_base.decls
-$debug || rm -f $ah_base.exp $ah_base.decls
+ }' $tmpbase.exp >$tmpbase.decls
+. $tmpbase.decls
+$debug || rm -f $tmpbase.exp $tmpbase.decls
# Make SYMS newline-separated rather than blank-separated, and remove dups.
# Start each symbol with a blank (to match the blank after "#undef")
# Some fgrep's have limits on the number of lines that can be in the
# pattern on the command line, so use a temporary file containing the
# pattern.
- (fgrep_tmp=$ah_base.fgrep
+ (fgrep_tmp=$tmpbase.fgrep
cat > $fgrep_tmp <<EOF
$syms
EOF
fi
# If the run was successful, output the result.
-if test $status -eq 0; then
- if test $# -eq 0; then
+if test $status = 0; then
+ if test $# = 0; then
# Output is a file
if test -f $config_h_in && cmp -s $tmpout $config_h_in; then
# File didn't change, so don't update its mod time.
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-test -z "${AC_MACRODIR}" && AC_MACRODIR=@datadir@
-test -z "${M4}" && M4=@M4@
-case "${M4}" in
-/*) # Handle the case that m4 has moved since we were configured.
- # It may have been found originally in a build directory.
- test -f "${M4}" || M4=m4 ;;
-esac
-
# ac_LF_and_DOT
# We use echo to avoid assuming a particular line-breaking character.
# The extra dot is to prevent the shell from consuming trailing
# would break.
ac_LF_and_DOT=`echo; echo .`
-localdir=.
+# Find GNU m4.
+# 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
+/*) 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
+*reload-state*);;
+*) echo "$me: Autoconf requires GNU m4 1.4 or later" >&2; exit 1 ;;
+esac
+
+# Variables.
+: ${AC_MACRODIR=@datadir@}
debug=false
+localdir=.
+verbose=:
# Basename for temporary files.
: ${TMPDIR=/tmp}
-ah_base=$TMPDIR/ah$$
-tmpout=$ah_base.out
+tmpbase=$TMPDIR/ah$$
+tmpout=$tmpbase.out
while test $# -gt 0 ; do
- case "$1" in
- -h | --help | --h* )
- echo "$usage"; exit 0 ;;
- --version | --v* )
- echo "$version"; exit 0 ;;
- -d | --debug | --d* )
- debug=:; shift ;;
- --localdir=* | --l*=* )
- localdir=`echo "$1" | sed -e 's/^[^=]*=//'`
- shift ;;
- -l | --localdir | --l*)
- shift
- test $# -eq 0 && { echo "$help" >&2; exit 1; }
- localdir=$1
- shift ;;
- --macrodir=* | --m*=* )
- AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'`
- shift ;;
- -m | --macrodir | --m* )
- shift
- test $# -eq 0 && { echo "$help" >&2; exit 1; }
- AC_MACRODIR=$1
- shift ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- exec >&2
- echo "$me: invalid option $1"
- echo "$help"
- exit 1 ;;
- * )
- break ;;
- esac
+ case "$1" in
+ --version | --vers* | -V )
+ echo "$version" ; exit 0 ;;
+ --help | --h* | -h )
+ echo "$usage"; exit 0 ;;
+
+ --debug | --d* | -d )
+ debug=:; shift ;;
+ --verbose | --verb* | -v )
+ verbose=echo
+ shift;;
+
+ --localdir=* | --l*=* )
+ localdir=`echo "$1" | sed -e 's/^[^=]*=//'`
+ shift ;;
+ --localdir | --l* | -l )
+ shift
+ test $# = 0 && { echo "$help" >&2; exit 1; }
+ localdir=$1
+ shift ;;
+
+ --macrodir=* | --m*=* )
+ AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'`
+ shift ;;
+ --macrodir | --m* | -m )
+ shift
+ test $# = 0 && { echo "$help" >&2; exit 1; }
+ AC_MACRODIR=$1
+ shift ;;
+
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ exec >&2
+ echo "$me: invalid option $1"
+ echo "$help"
+ exit 1 ;;
+ * )
+ break ;;
+ esac
done
+# Running m4.
+test -n "$localdir" && use_localdir="-I$localdir"
+run_m4="$M4 $use_localdir -I $AC_MACRODIR autoheader.m4"
+run_m4f="$M4 $use_localdir --reload $AC_MACRODIR/autoheader.m4f"
+
acconfigs=
test -r $localdir/acconfig.h && acconfigs="$acconfigs $localdir/acconfig.h"
+# Find the input file.
case $# in
0) infile=configure.in ;;
1) infile=$1 ;;
exit 1 ;;
esac
-config_h=
-syms=
-
-if test "$localdir" != .; then
- use_localdir="-I$localdir -DAC_LOCALDIR=$localdir"
-else
- use_localdir=
-fi
-
-# Some non-GNU m4's don't reject the --help option, so give them /dev/null.
-case `$M4 --help < /dev/null 2>&1` in
-*reload-state*);;
-*) echo "$me: Autoconf requires GNU m4 1.4 or later" >&2; exit 1 ;;
-esac
-run_m4="$M4 --reload $AC_MACRODIR/autoheader.m4f $use_localdir"
-
# Trap on 0 to stop playing with `rm'.
-$debug || trap 'ah_status=$?; rm -f $ah_base* && exit $ah_status' 0
+$debug || trap 'status=$?; rm -f $tmpbase* && exit $status' 0
$debug || trap exit 1 2 13 15
+# Well, work now!
+config_h=
+syms=
+
# Extract assignments of `ah_verbatim_SYMBOL' from the modified
# autoconf processing of the input file. The sed hair is necessary to
# win for multi-line macro invocations.
-$run_m4 $infile >$ah_base.exp
+$run_m4 $infile >$tmpbase.exp
sed -n -e '
: again
/^@@@.*@@@$/s/^@@@\(.*\)@@@$/\1/p
n
s/^/@@@/
b again
- }' $ah_base.exp >$ah_base.decls
-. $ah_base.decls
-$debug || rm -f $ah_base.exp $ah_base.decls
+ }' $tmpbase.exp >$tmpbase.decls
+. $tmpbase.decls
+$debug || rm -f $tmpbase.exp $tmpbase.decls
# Make SYMS newline-separated rather than blank-separated, and remove dups.
# Start each symbol with a blank (to match the blank after "#undef")
# Some fgrep's have limits on the number of lines that can be in the
# pattern on the command line, so use a temporary file containing the
# pattern.
- (fgrep_tmp=$ah_base.fgrep
+ (fgrep_tmp=$tmpbase.fgrep
cat > $fgrep_tmp <<EOF
$syms
EOF
fi
# If the run was successful, output the result.
-if test $status -eq 0; then
- if test $# -eq 0; then
+if test $status = 0; then
+ if test $# = 0; then
# Output is a file
if test -f $config_h_in && cmp -s $tmpout $config_h_in; then
# File didn't change, so don't update its mod time.
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
-Usage: autoreconf [OPTION] ... [TEMPLATE-FILE]
+Usage: $0 [OPTION] ... [TEMPLATE-FILE]
Run \`autoconf' (and \`autoheader', \`aclocal' and \`automake', where
appropriate) repeatedly to remake the Autoconf \`configure' scripts
while test $# -gt 0; do
case "$1" in
- --help | --h* | -h )
- echo "$usage"; exit 0 ;;
- --version | --vers* | -V )
- echo "$version"; exit 0 ;;
-
- --localdir=* | --l*=* )
- localdir=`echo "$1" | sed -e 's/^[^=]*=//'`
- shift ;;
- --localdir | --l* | -l )
- shift
- test $# -eq 0 && { echo "$help" >&2; exit 1; }
- localdir="${1}"
- shift ;;
-
- --macrodir=* | --m*=* )
- AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'`
- shift ;;
- --macrodir | --m* | -m )
- shift
- test $# -eq 0 && { echo "help" >&2; exit 1; }
- AC_MACRODIR="$1"
- shift ;;
-
- -v | --verbose | --verb*)
- verbose=echo; shift ;;
- -f | --force)
- force=yes; shift ;;
- --cygnus | --foreign | --gnits | --gnu)
- automake_mode=$1; shift ;;
- --include-deps | -i)
- automake_deps=$1; shift ;;
-
- --) # Stop option processing.
- shift; break ;;
- -*)
- exec >&2
- echo "$me: invalid option $1"
- echo "$help"
- exit 1 ;;
- *) break ;;
+ --version | --vers* | -V )
+ echo "$version" ; exit 0 ;;
+ --help | --h* | -h )
+ echo "$usage"; exit 0 ;;
+
+ --verbose | --verb* | -v )
+ verbose=echo
+ shift;;
+
+ --localdir=* | --l*=* )
+ localdir=`echo "$1" | sed -e 's/^[^=]*=//'`
+ shift ;;
+ --localdir | --l* | -l )
+ shift
+ test $# = 0 && { echo "$help" >&2; exit 1; }
+ localdir=$1
+ shift ;;
+
+ --macrodir=* | --m*=* )
+ AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'`
+ shift ;;
+ --macrodir | --m* | -m )
+ shift
+ test $# = 0 && { echo "$help" >&2; exit 1; }
+ AC_MACRODIR=$1
+ shift ;;
+
+ --force | -f )
+ force=yes; shift ;;
+ --cygnus | --foreign | --gnits | --gnu)
+ automake_mode=$1; shift ;;
+ --include-deps | -i)
+ automake_deps=$1; shift ;;
+
+ -- ) # Stop option processing.
+ shift; break ;;
+ -* )
+ exec >&2
+ echo "$me: invalid option $1"
+ echo "$help"
+ exit 1 ;;
+ * )
+ break ;;
esac
done
+# Find the input file.
if test $# -ne 0; then
exec >&2
echo "$me: invalid number of arguments"
fi
# The paths to the autoconf and autoheader scripts, at the top of the tree.
-top_autoconf=`echo "$0" |sed s%autoreconf%autoconf%`
-top_autoheader=`echo "$0" |sed s%autoreconf%autoheader%`
+top_autoconf=`echo "$0" | sed s%autoreconf%autoconf%`
+top_autoheader=`echo "$0" | sed s%autoreconf%autoheader%`
# Make a list of directories to process.
# The xargs grep filters out Cygnus configure.in files.
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
-Usage: autoreconf [OPTION] ... [TEMPLATE-FILE]
+Usage: $0 [OPTION] ... [TEMPLATE-FILE]
Run \`autoconf' (and \`autoheader', \`aclocal' and \`automake', where
appropriate) repeatedly to remake the Autoconf \`configure' scripts
while test $# -gt 0; do
case "$1" in
- --help | --h* | -h )
- echo "$usage"; exit 0 ;;
- --version | --vers* | -V )
- echo "$version"; exit 0 ;;
-
- --localdir=* | --l*=* )
- localdir=`echo "$1" | sed -e 's/^[^=]*=//'`
- shift ;;
- --localdir | --l* | -l )
- shift
- test $# -eq 0 && { echo "$help" >&2; exit 1; }
- localdir="${1}"
- shift ;;
-
- --macrodir=* | --m*=* )
- AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'`
- shift ;;
- --macrodir | --m* | -m )
- shift
- test $# -eq 0 && { echo "help" >&2; exit 1; }
- AC_MACRODIR="$1"
- shift ;;
-
- -v | --verbose | --verb*)
- verbose=echo; shift ;;
- -f | --force)
- force=yes; shift ;;
- --cygnus | --foreign | --gnits | --gnu)
- automake_mode=$1; shift ;;
- --include-deps | -i)
- automake_deps=$1; shift ;;
-
- --) # Stop option processing.
- shift; break ;;
- -*)
- exec >&2
- echo "$me: invalid option $1"
- echo "$help"
- exit 1 ;;
- *) break ;;
+ --version | --vers* | -V )
+ echo "$version" ; exit 0 ;;
+ --help | --h* | -h )
+ echo "$usage"; exit 0 ;;
+
+ --verbose | --verb* | -v )
+ verbose=echo
+ shift;;
+
+ --localdir=* | --l*=* )
+ localdir=`echo "$1" | sed -e 's/^[^=]*=//'`
+ shift ;;
+ --localdir | --l* | -l )
+ shift
+ test $# = 0 && { echo "$help" >&2; exit 1; }
+ localdir=$1
+ shift ;;
+
+ --macrodir=* | --m*=* )
+ AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'`
+ shift ;;
+ --macrodir | --m* | -m )
+ shift
+ test $# = 0 && { echo "$help" >&2; exit 1; }
+ AC_MACRODIR=$1
+ shift ;;
+
+ --force | -f )
+ force=yes; shift ;;
+ --cygnus | --foreign | --gnits | --gnu)
+ automake_mode=$1; shift ;;
+ --include-deps | -i)
+ automake_deps=$1; shift ;;
+
+ -- ) # Stop option processing.
+ shift; break ;;
+ -* )
+ exec >&2
+ echo "$me: invalid option $1"
+ echo "$help"
+ exit 1 ;;
+ * )
+ break ;;
esac
done
+# Find the input file.
if test $# -ne 0; then
exec >&2
echo "$me: invalid number of arguments"
fi
# The paths to the autoconf and autoheader scripts, at the top of the tree.
-top_autoconf=`echo "$0" |sed s%autoreconf%autoconf%`
-top_autoheader=`echo "$0" |sed s%autoreconf%autoheader%`
+top_autoconf=`echo "$0" | sed s%autoreconf%autoconf%`
+top_autoheader=`echo "$0" | sed s%autoreconf%autoheader%`
# Make a list of directories to process.
# The xargs grep filters out Cygnus configure.in files.
include(libm4.m4)# -*- Autoconf -*-
# This file is part of Autoconf.
# Driver that loads the Autoupdate macro files.
-# Copyright (C) 1999 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
#
-# Written by Akim Demaille
+# Written by Akim Demaille.
#
# Do not sinclude acsite.m4 here, because it may not be installed
# yet when Autoconf is frozen.
# Disable m4
m4_disable(libm4)
m4_changequote(, )
-divert(0)dnl
+divert(0)m4_dnl
echo "$version" ; exit 0 ;;
--help | --h* | -h )
echo "$usage"; exit 0 ;;
+
--debug | --d* | -d )
debug=:; shift ;;
+ --verbose | --verb* | -v )
+ verbose=echo
+ shift;;
--localdir=* | --l*=* )
localdir=`echo "$1" | sed -e 's/^[^=]*=//'`
shift ;;
--localdir | --l* | -l )
shift
- test $# -eq 0 && { echo "$help" >&2; exit 1; }
- localdir="$1"
+ test $# = 0 && { echo "$help" >&2; exit 1; }
+ localdir=$1
shift ;;
--macrodir=* | --m*=* )
shift ;;
--macrodir | --m* | -m )
shift
- test $# -eq 0 && { echo "$help" >&2; exit 1; }
- AC_MACRODIR="$1"
+ test $# = 0 && { echo "$help" >&2; exit 1; }
+ AC_MACRODIR=$1
shift ;;
--install )
task=install
shift;;
- --verbose | --verb* | -v )
- verbose=echo
- shift;;
-
--trace | -t )
task=trace
shift
- test $# -eq 0 && { echo "$help" >&2; exit 1; }
+ test $# = 0 && { echo "$help" >&2; exit 1; }
traces="$traces '$1'"
shift ;;
--trace=* )
--output | -o )
shift
- test $# -eq 0 && { echo "$help" >&2; exit 1; }
- outfile="$1"
+ test $# = 0 && { echo "$help" >&2; exit 1; }
+ outfile=$1
shift ;;
--output=* )
outfile=`echo "$1" | sed -e 's/^[^=]*=//'`
case $# in
0) infile=configure.in
test $task = script && test "x$outfile" = x && outfile=configure;;
- 1) infile="$1" ;;
+ 1) infile=$1 ;;
*) exec >&2
echo "$me: invalid number of arguments."
echo "$help"
# Trap on 0 to stop playing with `rm'.
if $debug; then
- trap 'ah_status=$?
- rm -f $tmpin $tmpout $silent_m4 $trace_m4 && exit $ah_status' 0
+ trap 'status=$?
+ rm -f $tmpin $tmpout $silent_m4 $trace_m4 && exit $status' 0
trap exit 1 2 13 15
fi
sed -n "s/^[^#]*\\($pattern[_A-Za-z0-9]*\\).*/\\1/p" $tmpout |
while read macro; do
grep -n "^[^#]*$macro" $infile /dev/null
- test $? -eq 1 && echo "***BUG in Autoconf--please report*** $macro"
+ test $? = 1 && echo "***BUG in Autoconf--please report*** $macro"
done | sort -u >&2
status=1
fi
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-test -z "${AC_MACRODIR}" && AC_MACRODIR=@datadir@
-test -z "${M4}" && M4=@M4@
-case "${M4}" in
-/*) # Handle the case that m4 has moved since we were configured.
- # It may have been found originally in a build directory.
- test -f "${M4}" || M4=m4 ;;
-esac
-
# ac_LF_and_DOT
# We use echo to avoid assuming a particular line-breaking character.
# The extra dot is to prevent the shell from consuming trailing
# would break.
ac_LF_and_DOT=`echo; echo .`
-localdir=.
+# Find GNU m4.
+# 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
+/*) 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
+*reload-state*);;
+*) echo "$me: Autoconf requires GNU m4 1.4 or later" >&2; exit 1 ;;
+esac
+
+# Variables.
+: ${AC_MACRODIR=@datadir@}
debug=false
+localdir=.
+verbose=:
# Basename for temporary files.
: ${TMPDIR=/tmp}
-ah_base=$TMPDIR/ah$$
-tmpout=$ah_base.out
+tmpbase=$TMPDIR/ah$$
+tmpout=$tmpbase.out
while test $# -gt 0 ; do
- case "$1" in
- -h | --help | --h* )
- echo "$usage"; exit 0 ;;
- --version | --v* )
- echo "$version"; exit 0 ;;
- -d | --debug | --d* )
- debug=:; shift ;;
- --localdir=* | --l*=* )
- localdir=`echo "$1" | sed -e 's/^[^=]*=//'`
- shift ;;
- -l | --localdir | --l*)
- shift
- test $# -eq 0 && { echo "$help" >&2; exit 1; }
- localdir=$1
- shift ;;
- --macrodir=* | --m*=* )
- AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'`
- shift ;;
- -m | --macrodir | --m* )
- shift
- test $# -eq 0 && { echo "$help" >&2; exit 1; }
- AC_MACRODIR=$1
- shift ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- exec >&2
- echo "$me: invalid option $1"
- echo "$help"
- exit 1 ;;
- * )
- break ;;
- esac
+ case "$1" in
+ --version | --vers* | -V )
+ echo "$version" ; exit 0 ;;
+ --help | --h* | -h )
+ echo "$usage"; exit 0 ;;
+
+ --debug | --d* | -d )
+ debug=:; shift ;;
+ --verbose | --verb* | -v )
+ verbose=echo
+ shift;;
+
+ --localdir=* | --l*=* )
+ localdir=`echo "$1" | sed -e 's/^[^=]*=//'`
+ shift ;;
+ --localdir | --l* | -l )
+ shift
+ test $# = 0 && { echo "$help" >&2; exit 1; }
+ localdir=$1
+ shift ;;
+
+ --macrodir=* | --m*=* )
+ AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'`
+ shift ;;
+ --macrodir | --m* | -m )
+ shift
+ test $# = 0 && { echo "$help" >&2; exit 1; }
+ AC_MACRODIR=$1
+ shift ;;
+
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ exec >&2
+ echo "$me: invalid option $1"
+ echo "$help"
+ exit 1 ;;
+ * )
+ break ;;
+ esac
done
+# Running m4.
+test -n "$localdir" && use_localdir="-I$localdir"
+run_m4="$M4 $use_localdir -I $AC_MACRODIR autoheader.m4"
+run_m4f="$M4 $use_localdir --reload $AC_MACRODIR/autoheader.m4f"
+
acconfigs=
test -r $localdir/acconfig.h && acconfigs="$acconfigs $localdir/acconfig.h"
+# Find the input file.
case $# in
0) infile=configure.in ;;
1) infile=$1 ;;
exit 1 ;;
esac
-config_h=
-syms=
-
-if test "$localdir" != .; then
- use_localdir="-I$localdir -DAC_LOCALDIR=$localdir"
-else
- use_localdir=
-fi
-
-# Some non-GNU m4's don't reject the --help option, so give them /dev/null.
-case `$M4 --help < /dev/null 2>&1` in
-*reload-state*);;
-*) echo "$me: Autoconf requires GNU m4 1.4 or later" >&2; exit 1 ;;
-esac
-run_m4="$M4 --reload $AC_MACRODIR/autoheader.m4f $use_localdir"
-
# Trap on 0 to stop playing with `rm'.
-$debug || trap 'ah_status=$?; rm -f $ah_base* && exit $ah_status' 0
+$debug || trap 'status=$?; rm -f $tmpbase* && exit $status' 0
$debug || trap exit 1 2 13 15
+# Well, work now!
+config_h=
+syms=
+
# Extract assignments of `ah_verbatim_SYMBOL' from the modified
# autoconf processing of the input file. The sed hair is necessary to
# win for multi-line macro invocations.
-$run_m4 $infile >$ah_base.exp
+$run_m4 $infile >$tmpbase.exp
sed -n -e '
: again
/^@@@.*@@@$/s/^@@@\(.*\)@@@$/\1/p
n
s/^/@@@/
b again
- }' $ah_base.exp >$ah_base.decls
-. $ah_base.decls
-$debug || rm -f $ah_base.exp $ah_base.decls
+ }' $tmpbase.exp >$tmpbase.decls
+. $tmpbase.decls
+$debug || rm -f $tmpbase.exp $tmpbase.decls
# Make SYMS newline-separated rather than blank-separated, and remove dups.
# Start each symbol with a blank (to match the blank after "#undef")
# Some fgrep's have limits on the number of lines that can be in the
# pattern on the command line, so use a temporary file containing the
# pattern.
- (fgrep_tmp=$ah_base.fgrep
+ (fgrep_tmp=$tmpbase.fgrep
cat > $fgrep_tmp <<EOF
$syms
EOF
fi
# If the run was successful, output the result.
-if test $status -eq 0; then
- if test $# -eq 0; then
+if test $status = 0; then
+ if test $# = 0; then
# Output is a file
if test -f $config_h_in && cmp -s $tmpout $config_h_in; then
# File didn't change, so don't update its mod time.
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
-Usage: autoreconf [OPTION] ... [TEMPLATE-FILE]
+Usage: $0 [OPTION] ... [TEMPLATE-FILE]
Run \`autoconf' (and \`autoheader', \`aclocal' and \`automake', where
appropriate) repeatedly to remake the Autoconf \`configure' scripts
while test $# -gt 0; do
case "$1" in
- --help | --h* | -h )
- echo "$usage"; exit 0 ;;
- --version | --vers* | -V )
- echo "$version"; exit 0 ;;
-
- --localdir=* | --l*=* )
- localdir=`echo "$1" | sed -e 's/^[^=]*=//'`
- shift ;;
- --localdir | --l* | -l )
- shift
- test $# -eq 0 && { echo "$help" >&2; exit 1; }
- localdir="${1}"
- shift ;;
-
- --macrodir=* | --m*=* )
- AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'`
- shift ;;
- --macrodir | --m* | -m )
- shift
- test $# -eq 0 && { echo "help" >&2; exit 1; }
- AC_MACRODIR="$1"
- shift ;;
-
- -v | --verbose | --verb*)
- verbose=echo; shift ;;
- -f | --force)
- force=yes; shift ;;
- --cygnus | --foreign | --gnits | --gnu)
- automake_mode=$1; shift ;;
- --include-deps | -i)
- automake_deps=$1; shift ;;
-
- --) # Stop option processing.
- shift; break ;;
- -*)
- exec >&2
- echo "$me: invalid option $1"
- echo "$help"
- exit 1 ;;
- *) break ;;
+ --version | --vers* | -V )
+ echo "$version" ; exit 0 ;;
+ --help | --h* | -h )
+ echo "$usage"; exit 0 ;;
+
+ --verbose | --verb* | -v )
+ verbose=echo
+ shift;;
+
+ --localdir=* | --l*=* )
+ localdir=`echo "$1" | sed -e 's/^[^=]*=//'`
+ shift ;;
+ --localdir | --l* | -l )
+ shift
+ test $# = 0 && { echo "$help" >&2; exit 1; }
+ localdir=$1
+ shift ;;
+
+ --macrodir=* | --m*=* )
+ AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'`
+ shift ;;
+ --macrodir | --m* | -m )
+ shift
+ test $# = 0 && { echo "$help" >&2; exit 1; }
+ AC_MACRODIR=$1
+ shift ;;
+
+ --force | -f )
+ force=yes; shift ;;
+ --cygnus | --foreign | --gnits | --gnu)
+ automake_mode=$1; shift ;;
+ --include-deps | -i)
+ automake_deps=$1; shift ;;
+
+ -- ) # Stop option processing.
+ shift; break ;;
+ -* )
+ exec >&2
+ echo "$me: invalid option $1"
+ echo "$help"
+ exit 1 ;;
+ * )
+ break ;;
esac
done
+# Find the input file.
if test $# -ne 0; then
exec >&2
echo "$me: invalid number of arguments"
fi
# The paths to the autoconf and autoheader scripts, at the top of the tree.
-top_autoconf=`echo "$0" |sed s%autoreconf%autoconf%`
-top_autoheader=`echo "$0" |sed s%autoreconf%autoheader%`
+top_autoconf=`echo "$0" | sed s%autoreconf%autoconf%`
+top_autoheader=`echo "$0" | sed s%autoreconf%autoheader%`
# Make a list of directories to process.
# The xargs grep filters out Cygnus configure.in files.
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
-Usage: ifnames [OPTION] ... [FILE] ...
+Usage: $0 [OPTION] ... [FILE] ...
Scan all of the C source FILES (or the standard input, if none are
given) and write to the standard output a sorted list of all the
esac
done
-@AWK@ '
+# Variables.
+: ${AWK=@AWK@}
+
+$AWK '
# Record that sym was found in FILENAME.
function file_sym(sym, i, fs) {
if (sym ~ /^[A-Za-z_]/) {
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
-Usage: ifnames [OPTION] ... [FILE] ...
+Usage: $0 [OPTION] ... [FILE] ...
Scan all of the C source FILES (or the standard input, if none are
given) and write to the standard output a sorted list of all the
esac
done
-@AWK@ '
+# Variables.
+: ${AWK=@AWK@}
+
+$AWK '
# Record that sym was found in FILENAME.
function file_sym(sym, i, fs) {
if (sym ~ /^[A-Za-z_]/) {
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
-Usage: ifnames [OPTION] ... [FILE] ...
+Usage: $0 [OPTION] ... [FILE] ...
Scan all of the C source FILES (or the standard input, if none are
given) and write to the standard output a sorted list of all the
esac
done
-@AWK@ '
+# Variables.
+: ${AWK=@AWK@}
+
+$AWK '
# Record that sym was found in FILENAME.
function file_sym(sym, i, fs) {
if (sym ~ /^[A-Za-z_]/) {