mirror of
git://git.sv.gnu.org/autoconf
synced 2025-04-12 15:20:26 +08:00
* lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Install the Zsh
workaround for ${1+"$@"}. * doc/autoconf.texi (Shell Substitutions): Explain it. From Oliver Kiddle and Peter Stephenson. Have M4sh perform minimal shell sanitizing. * lib/m4sugar/m4sh.at (AS_SHELL_SANITIZE): Split the `_AS_PREPARE_*' part into... (_AS_PREPARE): this new macro. (AS_PREPARE): New. (AS_INIT): Invoke AS_SHELL_SANITIZE. * tests/m4sh.at (AT_DATA_LINENO): Use _AS_PREPARE. Adjust Autoconf and Autotest. * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Don't invoke AS_SHELL_SANITIZE, AS_INIT did it, but invoke AS_PREPARE. * lib/autotest/general.m4 (AT_INIT): Likewise. * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Invoke _AS_PREPARE (not AS_PREPARE) in addition to AS_SHELL_SANITIZE. Use this M4sh to generate Autoconf's shell scripts. * tests/wrapsh.as: New, precursor of wrapsh.in. * tests/Makefile.am: Include lib/freeze.mk to get the dependencies on Autotest and M4sh. ($(TESTSUITE)): Use $(autotest_m4f_dependencies). (wrapsh.in): New target. * bin/autoconf.as: New, precursor of autoconf.in. (autoconf.in): New target.
This commit is contained in:
parent
b3904626ec
commit
9d658eddd9
35
ChangeLog
35
ChangeLog
@ -1,3 +1,38 @@
|
||||
2002-04-10 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Install the Zsh
|
||||
workaround for ${1+"$@"}.
|
||||
* doc/autoconf.texi (Shell Substitutions): Explain it.
|
||||
From Oliver Kiddle and Peter Stephenson.
|
||||
|
||||
Have M4sh perform minimal shell sanitizing.
|
||||
|
||||
* lib/m4sugar/m4sh.at (AS_SHELL_SANITIZE): Split the `_AS_PREPARE_*'
|
||||
part into...
|
||||
(_AS_PREPARE): this new macro.
|
||||
(AS_PREPARE): New.
|
||||
(AS_INIT): Invoke AS_SHELL_SANITIZE.
|
||||
* tests/m4sh.at (AT_DATA_LINENO): Use _AS_PREPARE.
|
||||
|
||||
Adjust Autoconf and Autotest.
|
||||
|
||||
* lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Don't invoke
|
||||
AS_SHELL_SANITIZE, AS_INIT did it, but invoke AS_PREPARE.
|
||||
* lib/autotest/general.m4 (AT_INIT): Likewise.
|
||||
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS):
|
||||
Invoke _AS_PREPARE (not AS_PREPARE) in addition to
|
||||
AS_SHELL_SANITIZE.
|
||||
|
||||
Use this M4sh to generate Autoconf's shell scripts.
|
||||
|
||||
* tests/wrapsh.as: New, precursor of wrapsh.in.
|
||||
* tests/Makefile.am: Include lib/freeze.mk to get the dependencies
|
||||
on Autotest and M4sh.
|
||||
($(TESTSUITE)): Use $(autotest_m4f_dependencies).
|
||||
(wrapsh.in): New target.
|
||||
* bin/autoconf.as: New, precursor of autoconf.in.
|
||||
(autoconf.in): New target.
|
||||
|
||||
2002-04-09 Alexandre Duret-Lutz <duret_g@epita.fr>
|
||||
|
||||
* doc/autoconf.texi (Limitations of Make): Mention the issue
|
||||
|
10
NEWS
10
NEWS
@ -8,6 +8,16 @@
|
||||
|
||||
- AC_PROG_CC_STDC is integrated into AC_PROG_CC.
|
||||
|
||||
** Bug fixes
|
||||
|
||||
- Spurious complaints from `m4_bmatch' about invalid regular
|
||||
expressions are suppressed.
|
||||
|
||||
** Improved Zsh portability
|
||||
Both Autoconf the package, and the scripts it produces, should run
|
||||
more reliably with Zsh. Bear in mind it is the default Bourne shell
|
||||
on Darwin.
|
||||
|
||||
** Documentation
|
||||
|
||||
- Limitations of Make
|
||||
|
2
THANKS
2
THANKS
@ -126,6 +126,7 @@ Nicolas Joly njoly@pasteur.fr
|
||||
Nishio Futoshi fut_nis@d3.dion.ne.jp
|
||||
Noah Elliott elliott@hera.llnl.gov
|
||||
Noah Friedman friedman@gnu.ai.mit.edu
|
||||
Oliver Kiddle okiddle@totalise.co.uk
|
||||
Olly Betts olly@survex.com
|
||||
Ossama Othman ossama@debian.org
|
||||
Patrick Tullmann tullmann@cs.utah.edu
|
||||
@ -137,6 +138,7 @@ Paul Martinolich martinol@datasync.com
|
||||
Pavel Roskin pavel_roskin@geocities.com
|
||||
Peter Eisentraut peter_e@gmx.net
|
||||
Peter Simons simons@research.cys.de
|
||||
Peter Stephenson pws@csr.com
|
||||
Philipp Thomas kthomas@gwdg.de
|
||||
Rainer Orth ro@TechFak.Uni-Bielefeld.DE
|
||||
Raja R Harinath harinath@cs.umn.edu
|
||||
|
@ -1,7 +1,7 @@
|
||||
## Process this file with automake to create Makefile.in. -*-Makefile-*-
|
||||
|
||||
## Makefile for Autoconf.
|
||||
## Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
## Copyright (C) 1999, 2000, 2001, 2002 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
|
||||
@ -22,7 +22,8 @@ bin_SCRIPTS = autom4te \
|
||||
autoconf autoheader autoreconf ifnames autoscan autoupdate
|
||||
|
||||
EXTRA_DIST = autoconf.in autoheader.in autoreconf.in autoupdate.in ifnames.in \
|
||||
autoscan.in autom4te.in
|
||||
autoscan.in autom4te.in \
|
||||
autoconf.as
|
||||
|
||||
# Files that should be removed, but which Automake does not know.
|
||||
CLEANFILES = $(bin_SCRIPTS)
|
||||
@ -46,10 +47,16 @@ edit = sed \
|
||||
-e 's,@VERSION\@,$(VERSION),g' \
|
||||
-e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g'
|
||||
|
||||
# autoconf is written in M4sh.
|
||||
AUTOM4SH = $(top_builddir)/tests/autom4te --language M4sh
|
||||
$(srcdir)/autoconf.in: $(srcdir)/autoconf.as $(m4sh_m4f_dependencies)
|
||||
$(AUTOM4SH) $(srcdir)/autoconf.as -o $@
|
||||
|
||||
## All the files below depend on configure.ac so that they are rebuilt
|
||||
## when the Autoconf version changes. Unfortunately, suffix rules cannot
|
||||
## have additional dependencies, so we have to use explicit rules.
|
||||
|
||||
|
||||
autoconf: $(srcdir)/autoconf.in $(top_srcdir)/configure.ac
|
||||
rm -f autoconf autoconf.tmp
|
||||
$(edit) $(srcdir)/autoconf.in >autoconf.tmp
|
||||
|
@ -85,7 +85,8 @@ bin_SCRIPTS = autom4te \
|
||||
|
||||
|
||||
EXTRA_DIST = autoconf.in autoheader.in autoreconf.in autoupdate.in ifnames.in \
|
||||
autoscan.in autom4te.in
|
||||
autoscan.in autom4te.in \
|
||||
autoconf.as
|
||||
|
||||
|
||||
# Files that should be removed, but which Automake does not know.
|
||||
@ -106,6 +107,9 @@ edit = sed \
|
||||
-e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g'
|
||||
|
||||
|
||||
# autoconf is written in M4sh.
|
||||
AUTOM4SH = $(top_builddir)/tests/autom4te --language M4sh
|
||||
|
||||
TAGS_DEPENDENCIES = $(EXTRA_DIST)
|
||||
|
||||
letters = abcdefghijklmnopqrstuvwxyz
|
||||
@ -294,6 +298,8 @@ uninstall-am: uninstall-binSCRIPTS uninstall-info-am
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic tags \
|
||||
uninstall uninstall-am uninstall-binSCRIPTS uninstall-info-am
|
||||
|
||||
$(srcdir)/autoconf.in: $(srcdir)/autoconf.as $(m4sh_m4f_dependencies)
|
||||
$(AUTOM4SH) $(srcdir)/autoconf.as -o $@
|
||||
|
||||
autoconf: $(srcdir)/autoconf.in $(top_srcdir)/configure.ac
|
||||
rm -f autoconf autoconf.tmp
|
||||
|
191
bin/autoconf.as
Normal file
191
bin/autoconf.as
Normal file
@ -0,0 +1,191 @@
|
||||
AS_INIT[]dnl -*- shell-script -*-
|
||||
# autoconf -- create `configure' using m4 macros
|
||||
# Copyright (C) 1992, 1993, 1994, 1996, 1999, 2000, 2001, 2002
|
||||
# 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
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
usage=["\
|
||||
Usage: $0 [OPTION] ... [TEMPLATE-FILE]
|
||||
|
||||
Generate a configuration script from a TEMPLATE-FILE if given, or
|
||||
\`configure.ac' if present, or else \`configure.in'. Output is sent
|
||||
to the standard output if TEMPLATE-FILE is given, else into
|
||||
\`configure'.
|
||||
|
||||
Operation modes:
|
||||
-h, --help print this help, then exit
|
||||
-V, --version print version number, then exit
|
||||
-v, --verbose verbosely report processing
|
||||
-d, --debug don't remove temporary files
|
||||
-I, --include=DIR look for input files in DIR (cumulative)
|
||||
-f, --force consider all files obsolete
|
||||
-o, --output=FILE save output in FILE (stdout is the default)
|
||||
-W, --warnings=CATEGORY report the warnings falling in CATEGORY [syntax]
|
||||
|
||||
Warning categories include:
|
||||
\`cross' cross compilation issues
|
||||
\`obsolete' obsolete constructs
|
||||
\`syntax' dubious syntactic constructs
|
||||
\`all' all the warnings
|
||||
\`no-CATEGORY' turn off the warnings on CATEGORY
|
||||
\`none' turn off all the warnings
|
||||
\`error' warnings are error
|
||||
|
||||
The environment variable \`WARNINGS' is honored.
|
||||
|
||||
Tracing:
|
||||
-t, --trace=MACRO report the list of calls to MACRO
|
||||
-i, --initialization also trace Autoconf's initialization process
|
||||
|
||||
In tracing mode, no configuration script is created.
|
||||
|
||||
Report bugs to <bug-autoconf@gnu.org>."]
|
||||
|
||||
version=["\
|
||||
autoconf (@PACKAGE_NAME@) @VERSION@
|
||||
Written by David J. MacKenzie and Akim Demaille.
|
||||
|
||||
Copyright 2002 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."]
|
||||
|
||||
me=`AS_BASENAME([$0])`
|
||||
|
||||
help="\
|
||||
Try \`$me --help' for more information."
|
||||
|
||||
exit_missing_arg="\
|
||||
echo \"$me: option \\\`\$1' requires an argument\" >&2
|
||||
echo \"\$help\" >&2
|
||||
exit 1"
|
||||
|
||||
# Variables.
|
||||
: ${AUTOM4TE=@autom4te-name@}
|
||||
dir=`AS_DIRNAME([$0])`
|
||||
outfile=
|
||||
verbose=:
|
||||
|
||||
# Parse command line.
|
||||
while test $# -gt 0 ; do
|
||||
option=[`expr "x$1" : 'x\(--[^=]*\)' \| \
|
||||
"x$1" : 'x\(-.\)'`]
|
||||
optarg=[`expr "x$1" : 'x--[^=]*=\(.*\)' \| \
|
||||
"x$1" : 'x-.\(.*\)'`]
|
||||
case $1 in
|
||||
--version | -V )
|
||||
echo "$version" ; exit 0 ;;
|
||||
--help | -h )
|
||||
echo "$usage"; exit 0 ;;
|
||||
|
||||
--verbose | -v )
|
||||
verbose=echo
|
||||
AUTOM4TE="$AUTOM4TE $1"; shift ;;
|
||||
|
||||
# Arguments passed as is to autom4te.
|
||||
--debug | -d | \
|
||||
--force | -f | \
|
||||
--include=* | -I?* | \
|
||||
--warnings=* | -W?* )
|
||||
AUTOM4TE="$AUTOM4TE $1"; shift ;;
|
||||
|
||||
# Options with separated arg passed as is to autom4te.
|
||||
--include | -I | \
|
||||
--warnings | -W )
|
||||
test $# = 1 && eval "$exit_missing_arg"
|
||||
AUTOM4TE="$AUTOM4TE $option $2"
|
||||
shift 2 ;;
|
||||
|
||||
# Obsolete options.
|
||||
--localdir=* | -l?* | --autoconf-dir=* | -A?* | --macrodir=* | -m?* )
|
||||
echo "$me: warning: $option is obsolete, use --include" >&2
|
||||
AUTOM4TE="$AUTOM4TE --include=$optarg"
|
||||
shift ;;
|
||||
--localdir | -l | --autoconf-dir | -A | --macrodir | -m )
|
||||
echo "$me: warning: $option is obsolete, use --include" >&2
|
||||
test $# = 1 && eval "$exit_missing_arg"
|
||||
shift
|
||||
AUTOM4TE="$AUTOM4TE --include=$1"
|
||||
shift ;;
|
||||
|
||||
--trace=* | -t?* )
|
||||
traces="$traces --trace='"`echo "$optarg" | sed "s/'/'\\\\\\\\''/g"`"'"
|
||||
shift ;;
|
||||
--trace | -t )
|
||||
test $# = 1 && eval "$exit_missing_arg"
|
||||
shift
|
||||
traces="$traces --trace='"`echo "$1" | sed "s/'/'\\\\\\\\''/g"`"'"
|
||||
shift ;;
|
||||
--initialization | -i )
|
||||
AUTOM4TE="$AUTOM4TE --melt"
|
||||
shift;;
|
||||
|
||||
--output=* | -o?* )
|
||||
outfile=$optarg
|
||||
shift ;;
|
||||
--output | -o )
|
||||
test $# = 1 && eval "$exit_missing_arg"
|
||||
shift
|
||||
outfile=$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
|
||||
|
||||
# Find the input file.
|
||||
case $# in
|
||||
0)
|
||||
case `ls configure.ac configure.in 2>/dev/null` in
|
||||
*ac*in )
|
||||
echo "$me: warning: both \`configure.ac' and \`configure.in' are present." >&2
|
||||
echo "$me: warning: proceeding with \`configure.ac'." >&2
|
||||
infile=configure.ac;;
|
||||
*ac ) infile=configure.ac;;
|
||||
*in ) infile=configure.in;;
|
||||
* )
|
||||
echo "$me: no input file" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
test -z "$traces" && test -z "$outfile" && outfile=configure;;
|
||||
1) # autom4te doesn't like `-'.
|
||||
test "x$1" != "x-" && infile=$1 ;;
|
||||
*) exec >&2
|
||||
echo "$me: invalid number of arguments."
|
||||
echo "$help"
|
||||
(exit 1); exit 1 ;;
|
||||
esac
|
||||
|
||||
# Unless specified, the output is stdout.
|
||||
test -z "$outfile" && outfile=-
|
||||
|
||||
# Running autom4te.
|
||||
run_autom4te="$AUTOM4TE --language=autoconf --output=$outfile"
|
||||
# Autom4te expansion.
|
||||
eval set dummy "$traces"
|
||||
shift
|
||||
$verbose "$me: running $run_autom4te "${1+"$@"}" $infile" >&2
|
||||
exec $run_autom4te ${1+"$@"} $infile
|
@ -1,7 +1,29 @@
|
||||
#! @SHELL@
|
||||
# -*- shell-script -*-
|
||||
#! /bin/sh
|
||||
if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
|
||||
as_basename=basename
|
||||
else
|
||||
as_basename=false
|
||||
fi
|
||||
|
||||
if expr a : '\(a\)' >/dev/null 2>&1; then
|
||||
as_expr=expr
|
||||
else
|
||||
as_expr=false
|
||||
fi
|
||||
|
||||
# Be Bourne compatible
|
||||
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
|
||||
emulate sh
|
||||
NULLCMD=:
|
||||
# Zsh performs word splitting on ${1+""}, which is contrary to
|
||||
# our usage. Disable this feature.
|
||||
alias -g '${1+""}'='""'
|
||||
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
|
||||
set -o posix
|
||||
fi
|
||||
|
||||
# autoconf -- create `configure' using m4 macros
|
||||
# Copyright 1992, 1993, 1994, 1996, 1999, 2000, 2001
|
||||
# Copyright (C) 1992, 1993, 1994, 1996, 1999, 2000, 2001, 2002
|
||||
# Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
@ -19,8 +41,6 @@
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
me=`echo "$0" | sed -e 's,.*[\\/],,'`
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION] ... [TEMPLATE-FILE]
|
||||
|
||||
@ -66,6 +86,17 @@ Copyright 2002 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
|
||||
me=`$as_basename $0 ||
|
||||
$as_expr X/$0 : '.*/\([^/][^/]*\)/*$' \| \
|
||||
X$0 : 'X\(//\)$' \| \
|
||||
X$0 : 'X\(/\)$' \| \
|
||||
. : '\(.\)' 2>/dev/null ||
|
||||
echo X/$0 |
|
||||
sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
|
||||
/^X\/\(\/\/\)$/{ s//\1/; q; }
|
||||
/^X\/\(\/\).*/{ s//\1/; q; }
|
||||
s/.*/./; q'`
|
||||
|
||||
help="\
|
||||
Try \`$me --help' for more information."
|
||||
|
||||
@ -74,15 +105,20 @@ echo \"$me: option \\\`\$1' requires an argument\" >&2
|
||||
echo \"\$help\" >&2
|
||||
exit 1"
|
||||
|
||||
# NLS nuisances.
|
||||
if test "${LANG+set}" = set; then LANG=C; export LANG; fi
|
||||
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
|
||||
if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
|
||||
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
|
||||
|
||||
# Variables.
|
||||
: ${AUTOM4TE=@autom4te-name@}
|
||||
dir=`echo "$0" | sed -e 's,[^\\/]*$,,'`
|
||||
dir=`(dirname $0) 2>/dev/null ||
|
||||
$as_expr X$0 : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X$0 : 'X\(//\)[^/]' \| \
|
||||
X$0 : 'X\(//\)$' \| \
|
||||
X$0 : 'X\(/\)' \| \
|
||||
. : '\(.\)' 2>/dev/null ||
|
||||
echo X$0 |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
|
||||
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
|
||||
/^X\(\/\/\)$/{ s//\1/; q; }
|
||||
/^X\(\/\).*/{ s//\1/; q; }
|
||||
s/.*/./; q'`
|
||||
outfile=
|
||||
verbose=:
|
||||
|
||||
|
258
configure
vendored
258
configure
vendored
@ -8,14 +8,6 @@
|
||||
# Free Software Foundation, Inc.
|
||||
# This configure script is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy, distribute and modify it.
|
||||
if expr a : '\(a\)' >/dev/null 2>&1; then
|
||||
as_expr=expr
|
||||
else
|
||||
as_expr=false
|
||||
fi
|
||||
|
||||
|
||||
|
||||
## --------------------- ##
|
||||
## M4sh Initialization. ##
|
||||
## --------------------- ##
|
||||
@ -24,6 +16,9 @@ fi
|
||||
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
|
||||
emulate sh
|
||||
NULLCMD=:
|
||||
# Zsh performs word splitting on ${1+"$@"}, which is contrary to
|
||||
# our usage. Disable this feature.
|
||||
alias -g '${1+"$@"}'='"$@"'
|
||||
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
|
||||
set -o posix
|
||||
fi
|
||||
@ -62,8 +57,22 @@ fi
|
||||
{ LC_MESSAGES=C; export LC_MESSAGES; }
|
||||
|
||||
|
||||
# Required to use basename.
|
||||
if expr a : '\(a\)' >/dev/null 2>&1; then
|
||||
as_expr=expr
|
||||
else
|
||||
as_expr=false
|
||||
fi
|
||||
|
||||
if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
|
||||
as_basename=basename
|
||||
else
|
||||
as_basename=false
|
||||
fi
|
||||
|
||||
|
||||
# Name of the executable.
|
||||
as_me=`(basename "$0") 2>/dev/null ||
|
||||
as_me=`$as_basename "$0" ||
|
||||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
|
||||
X"$0" : 'X\(//\)$' \| \
|
||||
X"$0" : 'X\(/\)$' \| \
|
||||
@ -74,13 +83,6 @@ echo X/"$0" |
|
||||
/^X\/\(\/\).*/{ s//\1/; q; }
|
||||
s/.*/./; q'`
|
||||
|
||||
# PATH needs CR, and LINENO needs CR and PATH.
|
||||
# Avoid depending upon Character Ranges.
|
||||
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
|
||||
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
||||
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
|
||||
as_cr_digits='0123456789'
|
||||
as_cr_alnum=$as_cr_Letters$as_cr_digits
|
||||
|
||||
# The user is always right.
|
||||
if test "${PATH_SEPARATOR+set}" != set; then
|
||||
@ -95,92 +97,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
|
||||
rm -f conftest.sh
|
||||
fi
|
||||
|
||||
|
||||
as_lineno_1=$LINENO
|
||||
as_lineno_2=$LINENO
|
||||
as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
|
||||
test "x$as_lineno_1" != "x$as_lineno_2" &&
|
||||
test "x$as_lineno_3" = "x$as_lineno_2" || {
|
||||
# Find who we are. Look in the path if we contain no path at all
|
||||
# relative or not.
|
||||
case $0 in
|
||||
*[\\/]* ) as_myself=$0 ;;
|
||||
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
|
||||
done
|
||||
|
||||
;;
|
||||
esac
|
||||
# We did not find ourselves, most probably we were run as `sh COMMAND'
|
||||
# in which case we are not to be found in the path.
|
||||
if test "x$as_myself" = x; then
|
||||
as_myself=$0
|
||||
fi
|
||||
if test ! -f "$as_myself"; then
|
||||
{ echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
case $CONFIG_SHELL in
|
||||
'')
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for as_base in sh bash ksh sh5; do
|
||||
case $as_dir in
|
||||
/*)
|
||||
if ("$as_dir/$as_base" -c '
|
||||
as_lineno_1=$LINENO
|
||||
as_lineno_2=$LINENO
|
||||
as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
|
||||
test "x$as_lineno_1" != "x$as_lineno_2" &&
|
||||
test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
|
||||
CONFIG_SHELL=$as_dir/$as_base
|
||||
export CONFIG_SHELL
|
||||
exec "$CONFIG_SHELL" "$0" ${1+"$@"}
|
||||
fi;;
|
||||
esac
|
||||
done
|
||||
done
|
||||
;;
|
||||
esac
|
||||
|
||||
# Create $as_me.lineno as a copy of $as_myself, but with $LINENO
|
||||
# uniformly replaced by the line number. The first 'sed' inserts a
|
||||
# line-number line before each line; the second 'sed' does the real
|
||||
# work. The second script uses 'N' to pair each line-number line
|
||||
# with the numbered line, and appends trailing '-' during
|
||||
# substitution so that $LINENO is not a special case at line end.
|
||||
# (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
|
||||
# second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
|
||||
sed '=' <$as_myself |
|
||||
sed '
|
||||
N
|
||||
s,$,-,
|
||||
: loop
|
||||
s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
|
||||
t loop
|
||||
s,-$,,
|
||||
s,^['$as_cr_digits']*\n,,
|
||||
' >$as_me.lineno &&
|
||||
chmod +x $as_me.lineno ||
|
||||
{ echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
|
||||
{ (exit 1); exit 1; }; }
|
||||
|
||||
# Don't try to exec as it changes $[0], causing all sort of problems
|
||||
# (the dirname of $[0] is not the place where we might find the
|
||||
# original and so on. Autoconf is especially sensible to this).
|
||||
. ./$as_me.lineno
|
||||
# Exit status is that of the last command.
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
|
||||
*c*,-n*) ECHO_N= ECHO_C='
|
||||
' ECHO_T=' ' ;;
|
||||
@ -188,48 +104,8 @@ case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
|
||||
*) ECHO_N= ECHO_C='\c' ECHO_T= ;;
|
||||
esac
|
||||
|
||||
if expr a : '\(a\)' >/dev/null 2>&1; then
|
||||
as_expr=expr
|
||||
else
|
||||
as_expr=false
|
||||
fi
|
||||
|
||||
rm -f conf$$ conf$$.exe conf$$.file
|
||||
echo >conf$$.file
|
||||
if ln -s conf$$.file conf$$ 2>/dev/null; then
|
||||
# We could just check for DJGPP; but this test a) works b) is more generic
|
||||
# and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
|
||||
if test -f conf$$.exe; then
|
||||
# Don't use ln at all; we don't have any links
|
||||
as_ln_s='cp -p'
|
||||
else
|
||||
as_ln_s='ln -s'
|
||||
fi
|
||||
elif ln conf$$.file conf$$ 2>/dev/null; then
|
||||
as_ln_s=ln
|
||||
else
|
||||
as_ln_s='cp -p'
|
||||
fi
|
||||
rm -f conf$$ conf$$.exe conf$$.file
|
||||
|
||||
as_executable_p="test -f"
|
||||
|
||||
# Sed expression to map a string onto a valid CPP name.
|
||||
as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
|
||||
|
||||
# Sed expression to map a string onto a valid variable name.
|
||||
as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
|
||||
|
||||
|
||||
# IFS
|
||||
# We need space, tab and new line, in precisely that order.
|
||||
as_nl='
|
||||
'
|
||||
IFS=" $as_nl"
|
||||
|
||||
# CDPATH.
|
||||
$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
|
||||
|
||||
|
||||
# Name of the host.
|
||||
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
|
||||
@ -1159,7 +1035,7 @@ ac_config_guess="$SHELL $ac_aux_dir/config.guess"
|
||||
ac_config_sub="$SHELL $ac_aux_dir/config.sub"
|
||||
ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
|
||||
|
||||
ac_config_files="$ac_config_files config/Makefile"
|
||||
ac_config_files="$ac_config_files config/Makefile"
|
||||
|
||||
|
||||
am__api_version="1.6a"
|
||||
@ -1519,24 +1395,24 @@ INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
|
||||
|
||||
|
||||
# Initialize the test suite and build position independent wrappers.
|
||||
ac_config_commands="$ac_config_commands tests/atconfig"
|
||||
ac_config_commands="$ac_config_commands tests/atconfig"
|
||||
|
||||
|
||||
ac_config_files="$ac_config_files tests/Makefile tests/atlocal"
|
||||
ac_config_files="$ac_config_files tests/Makefile tests/atlocal"
|
||||
|
||||
ac_config_files="$ac_config_files tests/autoconf:tests/wrapsh.in"
|
||||
ac_config_files="$ac_config_files tests/autoconf:tests/wrapsh.in"
|
||||
|
||||
ac_config_files="$ac_config_files tests/autoheader:tests/wrappl.in"
|
||||
ac_config_files="$ac_config_files tests/autoheader:tests/wrappl.in"
|
||||
|
||||
ac_config_files="$ac_config_files tests/autom4te:tests/wrappl.in"
|
||||
ac_config_files="$ac_config_files tests/autom4te:tests/wrappl.in"
|
||||
|
||||
ac_config_files="$ac_config_files tests/autoreconf:tests/wrappl.in"
|
||||
ac_config_files="$ac_config_files tests/autoreconf:tests/wrappl.in"
|
||||
|
||||
ac_config_files="$ac_config_files tests/autoscan:tests/wrappl.in"
|
||||
ac_config_files="$ac_config_files tests/autoscan:tests/wrappl.in"
|
||||
|
||||
ac_config_files="$ac_config_files tests/autoupdate:tests/wrappl.in"
|
||||
ac_config_files="$ac_config_files tests/autoupdate:tests/wrappl.in"
|
||||
|
||||
ac_config_files="$ac_config_files tests/ifnames:tests/wrappl.in"
|
||||
ac_config_files="$ac_config_files tests/ifnames:tests/wrappl.in"
|
||||
|
||||
# Extract the first word of "expr", so it can be a program name with args.
|
||||
set dummy expr; ac_word=$2
|
||||
@ -1649,7 +1525,7 @@ echo "$as_me: error: GNU M4 1.4 is required" >&2;}
|
||||
fi
|
||||
|
||||
# Man pages.
|
||||
ac_config_files="$ac_config_files man/Makefile"
|
||||
ac_config_files="$ac_config_files man/Makefile"
|
||||
|
||||
|
||||
HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"}
|
||||
@ -1708,7 +1584,7 @@ echo "$as_me: error: Perl 5.005_03 or better is required" >&2;}
|
||||
}
|
||||
|
||||
# Emacs modes.
|
||||
ac_config_files="$ac_config_files lib/emacs/Makefile"
|
||||
ac_config_files="$ac_config_files lib/emacs/Makefile"
|
||||
|
||||
test x"$EMACS" = xt && EMACS=
|
||||
for ac_prog in emacs xemacs
|
||||
@ -1845,7 +1721,7 @@ fi;
|
||||
|
||||
|
||||
|
||||
ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile lib/Autom4te/Makefile lib/autoscan/Makefile lib/m4sugar/Makefile lib/autoconf/Makefile lib/autotest/Makefile bin/Makefile"
|
||||
ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile lib/Autom4te/Makefile lib/autoscan/Makefile lib/m4sugar/Makefile lib/autoconf/Makefile lib/autotest/Makefile bin/Makefile"
|
||||
|
||||
|
||||
cat >confcache <<\_ACEOF
|
||||
@ -1973,7 +1849,6 @@ SHELL=\${CONFIG_SHELL-$SHELL}
|
||||
_ACEOF
|
||||
|
||||
cat >>$CONFIG_STATUS <<\_ACEOF
|
||||
|
||||
## --------------------- ##
|
||||
## M4sh Initialization. ##
|
||||
## --------------------- ##
|
||||
@ -1982,6 +1857,9 @@ cat >>$CONFIG_STATUS <<\_ACEOF
|
||||
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
|
||||
emulate sh
|
||||
NULLCMD=:
|
||||
# Zsh performs word splitting on ${1+"$@"}, which is contrary to
|
||||
# our usage. Disable this feature.
|
||||
alias -g '${1+"$@"}'='"$@"'
|
||||
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
|
||||
set -o posix
|
||||
fi
|
||||
@ -2020,8 +1898,22 @@ fi
|
||||
{ LC_MESSAGES=C; export LC_MESSAGES; }
|
||||
|
||||
|
||||
# Required to use basename.
|
||||
if expr a : '\(a\)' >/dev/null 2>&1; then
|
||||
as_expr=expr
|
||||
else
|
||||
as_expr=false
|
||||
fi
|
||||
|
||||
if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
|
||||
as_basename=basename
|
||||
else
|
||||
as_basename=false
|
||||
fi
|
||||
|
||||
|
||||
# Name of the executable.
|
||||
as_me=`(basename "$0") 2>/dev/null ||
|
||||
as_me=`$as_basename "$0" ||
|
||||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
|
||||
X"$0" : 'X\(//\)$' \| \
|
||||
X"$0" : 'X\(/\)$' \| \
|
||||
@ -2032,6 +1924,7 @@ echo X/"$0" |
|
||||
/^X\/\(\/\).*/{ s//\1/; q; }
|
||||
s/.*/./; q'`
|
||||
|
||||
|
||||
# PATH needs CR, and LINENO needs CR and PATH.
|
||||
# Avoid depending upon Character Ranges.
|
||||
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
|
||||
@ -2099,6 +1992,8 @@ do
|
||||
as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
|
||||
test "x$as_lineno_1" != "x$as_lineno_2" &&
|
||||
test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
|
||||
$as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
|
||||
$as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
|
||||
CONFIG_SHELL=$as_dir/$as_base
|
||||
export CONFIG_SHELL
|
||||
exec "$CONFIG_SHELL" "$0" ${1+"$@"}
|
||||
@ -2172,6 +2067,12 @@ else
|
||||
fi
|
||||
rm -f conf$$ conf$$.exe conf$$.file
|
||||
|
||||
if mkdir -p . 2>/dev/null; then
|
||||
as_mkdir_p=:
|
||||
else
|
||||
as_mkdir_p=false
|
||||
fi
|
||||
|
||||
as_executable_p="test -f"
|
||||
|
||||
# Sed expression to map a string onto a valid CPP name.
|
||||
@ -2544,25 +2445,30 @@ echo X"$ac_file" |
|
||||
/^X\(\/\/\)$/{ s//\1/; q; }
|
||||
/^X\(\/\).*/{ s//\1/; q; }
|
||||
s/.*/./; q'`
|
||||
{ case "$ac_dir" in
|
||||
[\\/]* | ?:[\\/]* ) as_incr_dir=;;
|
||||
*) as_incr_dir=.;;
|
||||
esac
|
||||
as_dummy="$ac_dir"
|
||||
for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
|
||||
case $as_mkdir_dir in
|
||||
# Skip DOS drivespec
|
||||
?:) as_incr_dir=$as_mkdir_dir ;;
|
||||
*)
|
||||
as_incr_dir=$as_incr_dir/$as_mkdir_dir
|
||||
test -d "$as_incr_dir" ||
|
||||
mkdir "$as_incr_dir" ||
|
||||
{ { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
|
||||
echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
;;
|
||||
esac
|
||||
done; }
|
||||
{ if $as_mkdir_p; then
|
||||
mkdir -p "$ac_dir"
|
||||
else
|
||||
as_dir="$ac_dir"
|
||||
as_dirs=
|
||||
while test ! -d "$as_dir"; do
|
||||
as_dirs="$as_dir $as_dirs"
|
||||
as_dir=`(dirname "$as_dir") 2>/dev/null ||
|
||||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$as_dir" : 'X\(//\)[^/]' \| \
|
||||
X"$as_dir" : 'X\(//\)$' \| \
|
||||
X"$as_dir" : 'X\(/\)' \| \
|
||||
. : '\(.\)' 2>/dev/null ||
|
||||
echo X"$as_dir" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
|
||||
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
|
||||
/^X\(\/\/\)$/{ s//\1/; q; }
|
||||
/^X\(\/\).*/{ s//\1/; q; }
|
||||
s/.*/./; q'`
|
||||
done
|
||||
test ! -n "$as_dirs" || mkdir $as_dirs
|
||||
fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
|
||||
echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
|
||||
{ (exit 1); exit 1; }; }; }
|
||||
|
||||
ac_builddir=.
|
||||
|
||||
|
@ -7412,6 +7412,9 @@ Any token matching @var{pattern} is allowed, including if it matches an
|
||||
@c FIXME: Eventually will become a chapter, as it is not related to
|
||||
@c programming in M4 per se.
|
||||
|
||||
M4sh is aiming at producing portable Bourne shell scripts. For the time
|
||||
being, it is not mature enough to be widely used.
|
||||
|
||||
M4sh provides portable alternatives for some common shell constructs
|
||||
that unfortunately are not portable in practice.
|
||||
|
||||
@ -8460,6 +8463,35 @@ be equivalent to nothing. But some shells, for instance under Digital
|
||||
Unix 4.0 and 5.0, will then replace it with an empty argument. To be
|
||||
portable, use @samp{$@{1+"$@@"@}}.
|
||||
|
||||
But that's not the end of the story. Zsh (3.x and 4.x), when emulating
|
||||
the Bourne shell, does perform word splitting on @samp{$@{1+"$@@"@}}...
|
||||
|
||||
@example
|
||||
zsh $ @kbd{emulate sh}
|
||||
zsh $ @kbd{for i in "$@"; do echo $i; done}
|
||||
Hello World
|
||||
!
|
||||
zsh $ @kbd{for i in $@{1+"$@@"@}; do echo $i; done}
|
||||
Hello
|
||||
World
|
||||
!
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
It is not clear whether this is a violation of the Bourne shell
|
||||
standard, nevertheless, in this regard Zsh is different from all the
|
||||
other shells. Of course Zsh handles @samp{"$@@"} properly, but we can't
|
||||
use it portably...
|
||||
|
||||
Fortunately, there is a workaround which relies on Zsh's ``global
|
||||
aliases'': let it convert @samp{$@{1+"$@@"@}} into @samp{"$@@"} by
|
||||
itself:
|
||||
|
||||
@example
|
||||
test -n "$@{ZSH_VERSION+set@}" = set && alias -g '$@{1+"$@@"@}'='"$@@"'
|
||||
@end example
|
||||
|
||||
|
||||
@item $@{@var{var}:-@var{value}@}
|
||||
@c Info cannot handle `:' in index entries.
|
||||
@c @cindex $@{@var{var}:-@var{value}@}
|
||||
@ -8478,6 +8510,8 @@ Be sure to quote:
|
||||
otherwise some shells, such as on Digital Unix V 5.0, will die because
|
||||
of a ``bad substitution''.
|
||||
|
||||
@sp 1
|
||||
|
||||
Solaris' @command{/bin/sh} has a frightening bug in its interpretation
|
||||
of this. Imagine you need set a variable to a string containing
|
||||
@samp{@}}. This @samp{@}} character confuses Solaris' @command{/bin/sh}
|
||||
@ -9133,6 +9167,12 @@ for arg in $@{1+"$@@"@}; do
|
||||
done
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
But keep in mind that Zsh, even in Bourne shell emulation mode, performs
|
||||
word splitting on @samp{$@{1+"$@@"@}}, see @ref{Shell Substitutions},
|
||||
item @samp{$@@}, for more.
|
||||
|
||||
|
||||
@item @command{if}
|
||||
@c ---------------
|
||||
@prindex @command{if}
|
||||
|
@ -1,6 +1,6 @@
|
||||
# This file is part of Autoconf. -*- Autoconf -*-
|
||||
# Driver that loads the Autoconf macro files.
|
||||
# Copyright 1994, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1999, 2000, 2001, 2002 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
|
||||
|
@ -432,8 +432,6 @@ AU_ALIAS([AC_FD_MSG], [AS_MESSAGE_FD])
|
||||
m4_define([_AC_INIT_DEFAULTS],
|
||||
[m4_divert_push([DEFAULTS])dnl
|
||||
|
||||
AS_SHELL_SANITIZE
|
||||
|
||||
# Name of the host.
|
||||
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
|
||||
# so uname gets run too.
|
||||
@ -1252,6 +1250,7 @@ m4_pattern_forbid([^LIBOBJS$],
|
||||
# Actually reserved by M4sh.
|
||||
m4_pattern_allow([^AS_FLAGS$])
|
||||
AS_INIT
|
||||
AS_PREPARE
|
||||
m4_ifval([$2], [_AC_INIT_PACKAGE($@)])
|
||||
_AC_INIT_DEFAULTS
|
||||
_AC_INIT_PARSE_ARGS
|
||||
@ -1754,9 +1753,9 @@ rm -f confcache[]dnl
|
||||
# ------------------------------------------
|
||||
# The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
|
||||
# Should be dnl'ed. Try to catch common mistakes.
|
||||
m4_define([AC_CACHE_VAL],
|
||||
m4_defun([AC_CACHE_VAL],
|
||||
[m4_bmatch([$2], [AC_DEFINE],
|
||||
[AC_DIAGNOSE(syntax,
|
||||
[AC_DIAGNOSE(syntax,
|
||||
[$0($1, ...): suspicious presence of an AC_DEFINE in the second argument, ]dnl
|
||||
[where no actions should be taken])])dnl
|
||||
AS_VAR_SET_IF([$1],
|
||||
@ -1767,7 +1766,7 @@ AS_VAR_SET_IF([$1],
|
||||
# AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)
|
||||
# -------------------------------------------
|
||||
# Do not call this macro with a dnl right behind.
|
||||
m4_define([AC_CACHE_CHECK],
|
||||
m4_defun([AC_CACHE_CHECK],
|
||||
[AC_MSG_CHECKING([$1])
|
||||
AC_CACHE_VAL([$2], [$3])dnl
|
||||
AC_MSG_RESULT_UNQUOTED([AS_VAR_GET([$2])])])
|
||||
|
@ -1261,6 +1261,10 @@ _ACEOF
|
||||
|
||||
cat >>$CONFIG_STATUS <<\_ACEOF
|
||||
AS_SHELL_SANITIZE
|
||||
dnl Watch out, this is directly the initializations, do not use
|
||||
dnl AS_PREPARE, otherwise you'd get it output in the initialization
|
||||
dnl of configure, not config.status.
|
||||
_AS_PREPARE
|
||||
exec AS_MESSAGE_FD>&1
|
||||
|
||||
# Open the log real soon, to keep \$[0] and so on meaningful, and to
|
||||
|
@ -94,9 +94,10 @@ m4_define([AT_TESTSUITE_NAME],
|
||||
m4_define([AT_ordinal], 0)
|
||||
m4_define([AT_banner_ordinal], 0)
|
||||
AS_INIT
|
||||
AS_PREPARE
|
||||
m4_divert_push([DEFAULT])dnl
|
||||
|
||||
AS_SHELL_SANITIZE
|
||||
AS_PREPARE
|
||||
SHELL=${CONFIG_SHELL-/bin/sh}
|
||||
|
||||
# How were we run?
|
||||
|
@ -137,20 +137,8 @@ m4_define([AS_REQUIRE],
|
||||
# AS_SHELL_SANITIZE
|
||||
# -----------------
|
||||
# Try to be as Bourne and/or POSIX as possible.
|
||||
#
|
||||
# This macro has a very special status. Normal use of M4sh relies
|
||||
# heavily on AS_REQUIRE, so that needed initiatizations (such as
|
||||
# _AS_TEST_PREPARE) are performed on need, not on demand. But
|
||||
# Autoconf is the first client of M4sh, and for two reasons: configure
|
||||
# and config.status. Relying on AS_REQUIRE is of course fine for
|
||||
# configure, but fails for config.status (which is created by
|
||||
# configure). So we need a means to force the inclusion of the
|
||||
# various _AS_PREPARE_* on top of config.status. That's basically why
|
||||
# there are so many _AS_PREPARE_* below, and that's also why it is
|
||||
# important not to forget some: config.status needs them.
|
||||
m4_defun([AS_SHELL_SANITIZE],
|
||||
[
|
||||
## --------------------- ##
|
||||
[## --------------------- ##
|
||||
## M4sh Initialization. ##
|
||||
## --------------------- ##
|
||||
|
||||
@ -158,6 +146,9 @@ m4_defun([AS_SHELL_SANITIZE],
|
||||
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
|
||||
emulate sh
|
||||
NULLCMD=:
|
||||
[#] Zsh performs word splitting on ${1+"$[@]"}, which is contrary to
|
||||
# our usage. Disable this feature.
|
||||
alias -g '${1+"$[@]"}'='"$[@]"'
|
||||
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
|
||||
set -o posix
|
||||
fi
|
||||
@ -172,11 +163,30 @@ m4_foreach([_AS_var],
|
||||
{ _AS_var=C; export _AS_var; }
|
||||
])
|
||||
|
||||
# Name of the executable.
|
||||
# Required to use basename.
|
||||
_AS_EXPR_PREPARE
|
||||
_AS_BASENAME_PREPARE
|
||||
|
||||
# Name of the executable.
|
||||
as_me=`AS_BASENAME("$[0]")`
|
||||
|
||||
# PATH needs CR, and LINENO needs CR and PATH.
|
||||
])
|
||||
|
||||
|
||||
# _AS_PREPARE
|
||||
# -----------
|
||||
# This macro has a very special status. Normal use of M4sh relies
|
||||
# heavily on AS_REQUIRE, so that needed initiatizations (such as
|
||||
# _AS_TEST_PREPARE) are performed on need, not on demand. But
|
||||
# Autoconf is the first client of M4sh, and for two reasons: configure
|
||||
# and config.status. Relying on AS_REQUIRE is of course fine for
|
||||
# configure, but fails for config.status (which is created by
|
||||
# configure). So we need a means to force the inclusion of the
|
||||
# various _AS_PREPARE_* on top of config.status. That's basically why
|
||||
# there are so many _AS_PREPARE_* below, and that's also why it is
|
||||
# important not to forget some: config.status needs them.
|
||||
m4_defun([_AS_PREPARE],
|
||||
[# PATH needs CR, and LINENO needs CR and PATH.
|
||||
_AS_CR_PREPARE
|
||||
_AS_PATH_SEPARATOR_PREPARE
|
||||
_AS_LINENO_PREPARE
|
||||
@ -200,6 +210,14 @@ AS_UNSET([CDPATH], [$PATH_SEPARATOR])
|
||||
])
|
||||
|
||||
|
||||
# AS_PREPARE
|
||||
# ----------
|
||||
# Output all the M4sh possible initialization into the initialization
|
||||
# diversion.
|
||||
m4_defun([AS_PREPARE],
|
||||
[m4_divert_text([M4SH-INIT], [_AS_PREPARE])])
|
||||
|
||||
|
||||
## ----------------------------- ##
|
||||
## 2. Wrappers around builtins. ##
|
||||
## ----------------------------- ##
|
||||
@ -508,7 +526,8 @@ m4_define([_AS_LINENO_WORKS],
|
||||
# configure) you'd compare LINENO wrt config.status vs. _oline_ vs
|
||||
# configure.
|
||||
m4_define([_AS_LINENO_PREPARE],
|
||||
[_AS_LINENO_WORKS || {
|
||||
[AS_REQUIRE([_AS_CR_PREPARE])dnl
|
||||
_AS_LINENO_WORKS || {
|
||||
# Find who we are. Look in the path if we contain no path at all
|
||||
# relative or not.
|
||||
case $[0] in
|
||||
@ -1017,8 +1036,9 @@ m4_define([AS_INIT],
|
||||
# Forbidden tokens and exceptions.
|
||||
m4_pattern_forbid([^_?AS_])
|
||||
|
||||
# Bangshe.
|
||||
# Bangshe and minimal initialization.
|
||||
m4_divert_text([BINSH], [@%:@! /bin/sh])
|
||||
m4_divert_text([M4SH-INIT], [AS_SHELL_SANITIZE])
|
||||
|
||||
# Let's go!
|
||||
m4_wrap([m4_divert_pop([BODY])[]])
|
||||
|
@ -1,5 +1,5 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.26.
|
||||
.TH AUTOCONF "1" "March 2002" "autoconf 2.53a" "User Commands"
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.27.
|
||||
.TH AUTOCONF "1" "April 2002" "autoconf 2.53a" "User Commands"
|
||||
.SH NAME
|
||||
autoconf \- Generate configuration scripts
|
||||
.SH SYNOPSIS
|
||||
|
@ -1,5 +1,5 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.25.
|
||||
.TH CONFIG.GUESS "1" "March 2002" "config.guess (2002-03-04)" "User Commands"
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.27.
|
||||
.TH CONFIG.GUESS "1" "April 2002" "config.guess (2002-03-20)" "User Commands"
|
||||
.SH NAME
|
||||
config.guess \- guess the build system triplet
|
||||
.SH SYNOPSIS
|
||||
|
@ -1,7 +1,7 @@
|
||||
## Process this file with automake to create Makefile.in. -*-Makefile-*-
|
||||
|
||||
## Makefile for Autoconf testsuite.
|
||||
## Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2000, 2001, 2002 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
|
||||
@ -21,14 +21,17 @@
|
||||
# We don't actually distribute the testsuite, since one only
|
||||
# needs m4 to build it, m4 being required anyway to install Autoconf.
|
||||
EXTRA_DIST = $(TESTSUITE_AT) atspecific.m4 mktests.sh \
|
||||
atlocal.in package.m4
|
||||
atlocal.in package.m4 wrapsh.as
|
||||
|
||||
# Running the uninstalled scripts.
|
||||
check_SCRIPTS = autoconf autoheader autoreconf autom4te autoscan autoupdate ifnames
|
||||
|
||||
# FIXME: Why doesn't Automake clean these?
|
||||
DISTCLEANFILES = atconfig atlocal $(TESTSUITE) $(check_SCRIPTS)
|
||||
|
||||
# Import the dependencies on Autotest and M4sh.
|
||||
include ../lib/freeze.mk
|
||||
|
||||
|
||||
## ------------ ##
|
||||
## package.m4. ##
|
||||
## ------------ ##
|
||||
@ -45,6 +48,14 @@ $(srcdir)/package.m4: $(top_srcdir)/configure.ac
|
||||
|
||||
|
||||
|
||||
## ---------- ##
|
||||
## Wrappers. ##
|
||||
## ---------- ##
|
||||
|
||||
$(srcdir)/wrapsh.in: $(srcdir)/wrapsh.as
|
||||
./autom4te --language=M4sh $(srcdir)/wrapsh.as -o $@
|
||||
|
||||
|
||||
## ------------ ##
|
||||
## Test suite. ##
|
||||
## ------------ ##
|
||||
@ -71,13 +82,10 @@ TESTSUITE = ./testsuite
|
||||
# Don't use AUTOM4TE since `make alpha' makes it unavailable although
|
||||
# we are allowed to use it (since we ship it).
|
||||
AUTOTEST = ./autom4te --language=autotest
|
||||
$(TESTSUITE): $(top_srcdir)/lib/m4sugar/m4sugar.m4 \
|
||||
$(top_srcdir)/lib/m4sugar/m4sh.m4 \
|
||||
$(top_srcdir)/lib/autotest/autotest.m4 \
|
||||
$(top_srcdir)/lib/autotest/general.m4 \
|
||||
$(srcdir)/package.m4 \
|
||||
atspecific.m4 \
|
||||
$(TESTSUITE_AT)
|
||||
$(TESTSUITE): $(srcdir)/package.m4 \
|
||||
atspecific.m4 \
|
||||
$(TESTSUITE_AT) \
|
||||
$(autotest_m4f_dependencies)
|
||||
$(AUTOTEST) -I $(srcdir) suite.at -o $@.tmp
|
||||
mv $@.tmp $@
|
||||
|
||||
|
@ -83,15 +83,69 @@ lispdir = @lispdir@
|
||||
# We don't actually distribute the testsuite, since one only
|
||||
# needs m4 to build it, m4 being required anyway to install Autoconf.
|
||||
EXTRA_DIST = $(TESTSUITE_AT) atspecific.m4 mktests.sh \
|
||||
atlocal.in package.m4
|
||||
atlocal.in package.m4 wrapsh.as
|
||||
|
||||
|
||||
# Running the uninstalled scripts.
|
||||
check_SCRIPTS = autoconf autoheader autoreconf autom4te autoscan autoupdate ifnames
|
||||
|
||||
# FIXME: Why doesn't Automake clean these?
|
||||
DISTCLEANFILES = atconfig atlocal $(TESTSUITE) $(check_SCRIPTS)
|
||||
|
||||
SUFFIXES = .m4 .m4f
|
||||
|
||||
# Do not use AUTOM4TE here, since Makefile.maint (my-distcheck)
|
||||
# checks if we are independant of Autoconf by defining AUTOM4TE (and
|
||||
# others) to `false'. But we _ship_ tests/autom4te, so it doesn't
|
||||
# apply to us.
|
||||
MY_AUTOM4TE = $(top_builddir)/tests/autom4te
|
||||
|
||||
AUTOM4TE_CFG = $(top_builddir)/lib/autom4te.cfg
|
||||
|
||||
# Factor the dependencies between all the frozen files.
|
||||
# Some day we should explain to Automake how to use autom4te to compute
|
||||
# the dependencies...
|
||||
src_libdir = $(top_srcdir)/lib
|
||||
build_libdir = $(top_builddir)/lib
|
||||
|
||||
m4f_dependencies = $(MY_AUTOM4TE) $(AUTOM4TE_CFG)
|
||||
|
||||
m4sugar_m4f_dependencies = \
|
||||
$(m4f_dependencies) \
|
||||
$(src_libdir)/m4sugar/m4sugar.m4 \
|
||||
$(build_libdir)/m4sugar/version.m4
|
||||
|
||||
|
||||
m4sh_m4f_dependencies = \
|
||||
$(m4sugar_m4f_dependencies) \
|
||||
$(src_libdir)/m4sugar/m4sh.m4
|
||||
|
||||
|
||||
autotest_m4f_dependencies = \
|
||||
$(m4sh_m4f_dependencies) \
|
||||
$(src_libdir)/autotest/autotest.m4 \
|
||||
$(src_libdir)/autotest/general.m4
|
||||
|
||||
|
||||
autoconf_m4f_dependencies = \
|
||||
$(m4sh_m4f_dependencies) \
|
||||
$(src_libdir)/autoconf/general.m4 \
|
||||
$(src_libdir)/autoconf/autoheader.m4 \
|
||||
$(src_libdir)/autoconf/autoupdate.m4 \
|
||||
$(src_libdir)/autoconf/autotest.m4 \
|
||||
$(src_libdir)/autoconf/status.m4 \
|
||||
$(src_libdir)/autoconf/oldnames.m4 \
|
||||
$(src_libdir)/autoconf/specific.m4 \
|
||||
$(src_libdir)/autoconf/lang.m4 \
|
||||
$(src_libdir)/autoconf/c.m4 \
|
||||
$(src_libdir)/autoconf/fortran.m4 \
|
||||
$(src_libdir)/autoconf/functions.m4 \
|
||||
$(src_libdir)/autoconf/headers.m4 \
|
||||
$(src_libdir)/autoconf/types.m4 \
|
||||
$(src_libdir)/autoconf/libs.m4 \
|
||||
$(src_libdir)/autoconf/programs.m4 \
|
||||
$(src_libdir)/autoconf/autoconf.m4
|
||||
|
||||
|
||||
TESTSUITE_GENERATED_AT = \
|
||||
aclang.at acc.at acfortran.at \
|
||||
acgeneral.at acstatus.at \
|
||||
@ -149,7 +203,8 @@ DIST_COMMON = Makefile.am Makefile.in atlocal.in wrappl.in wrapsh.in
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
.SUFFIXES: .m4 .m4f
|
||||
$(srcdir)/Makefile.in: Makefile.am $(srcdir)/../lib/freeze.mk $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu tests/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@ -278,6 +333,30 @@ uninstall-am: uninstall-info-am
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
uninstall uninstall-am uninstall-info-am
|
||||
|
||||
$(MY_AUTOM4TE):
|
||||
cd $(top_builddir)/tests && $(MAKE) $(AM_MAKEFLAGS) autom4te
|
||||
$(AUTOM4TE_CFG):
|
||||
cd $(top_builddir)/lib && $(MAKE) $(AM_MAKEFLAGS) autom4te.cfg
|
||||
|
||||
# When processing the file with diversion disabled, there must be no
|
||||
# output but comments and empty lines.
|
||||
# If freezing produces output, something went wrong: a bad `divert',
|
||||
# or an improper paren etc.
|
||||
# It may happen that the output does not end with a end of line, hence
|
||||
# force an end of line when reporting errors.
|
||||
.m4.m4f:
|
||||
$(MY_AUTOM4TE) \
|
||||
--language=$* \
|
||||
--freeze \
|
||||
--include=$(srcdir)/.. \
|
||||
--include=.. \
|
||||
--output=$@
|
||||
|
||||
# For parallel builds.
|
||||
$(build_libdir)/m4sugar/version.m4:
|
||||
cd $(build_libdir)/m4sugar && $(MAKE) $(AM_MAKEFLAGS) version.m4
|
||||
|
||||
# Import the dependencies on Autotest and M4sh.
|
||||
|
||||
$(srcdir)/package.m4: $(top_srcdir)/configure.ac
|
||||
{ \
|
||||
@ -288,13 +367,13 @@ $(srcdir)/package.m4: $(top_srcdir)/configure.ac
|
||||
echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
|
||||
echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
|
||||
} >$(srcdir)/package.m4
|
||||
$(TESTSUITE): $(top_srcdir)/lib/m4sugar/m4sugar.m4 \
|
||||
$(top_srcdir)/lib/m4sugar/m4sh.m4 \
|
||||
$(top_srcdir)/lib/autotest/autotest.m4 \
|
||||
$(top_srcdir)/lib/autotest/general.m4 \
|
||||
$(srcdir)/package.m4 \
|
||||
atspecific.m4 \
|
||||
$(TESTSUITE_AT)
|
||||
|
||||
$(srcdir)/wrapsh.in: $(srcdir)/wrapsh.as
|
||||
./autom4te --language=M4sh $(srcdir)/wrapsh.as -o $@
|
||||
$(TESTSUITE): $(srcdir)/package.m4 \
|
||||
atspecific.m4 \
|
||||
$(TESTSUITE_AT) \
|
||||
$(autotest_m4f_dependencies)
|
||||
$(AUTOTEST) -I $(srcdir) suite.at -o $@.tmp
|
||||
mv $@.tmp $@
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
AT_BANNER([M4sh.])
|
||||
|
||||
# Copyright 2000, 2001 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2000, 2001, 2002 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
|
||||
@ -47,7 +47,7 @@ m4_define([AT_DATA_LINENO],
|
||||
if $2; then
|
||||
AS@&t@_UNSET([LINENO])
|
||||
fi
|
||||
AS@&t@_SHELL_SANITIZE
|
||||
_AS@&t@_PREPARE
|
||||
echo "Line: $3"
|
||||
grep 'Line: .*$4' $[0] >/dev/null ||
|
||||
AS@&t@_ERROR([cannot find original script])
|
||||
|
5
tests/wrapsh.as
Normal file
5
tests/wrapsh.as
Normal file
@ -0,0 +1,5 @@
|
||||
AS_INIT
|
||||
# Running `$0' as if it were installed.
|
||||
me=`echo "$0" | sed -e 's,.*[\\/],,'`
|
||||
|
||||
exec @abs_top_builddir@/bin/$me --include @abs_top_builddir@/lib ${1+"$@"}
|
@ -1,6 +1,82 @@
|
||||
#! /bin/sh
|
||||
# Running `$0' as if it were installed.
|
||||
## --------------------- ##
|
||||
## M4sh Initialization. ##
|
||||
## --------------------- ##
|
||||
|
||||
me=`echo "$0" | sed -e 's,.*[\\/],,'`
|
||||
# Be Bourne compatible
|
||||
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
|
||||
emulate sh
|
||||
NULLCMD=:
|
||||
# Zsh performs word splitting on ${1+"$@"}, which is contrary to
|
||||
# our usage. Disable this feature.
|
||||
alias -g '${1+"$@"}'='"$@"'
|
||||
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
|
||||
set -o posix
|
||||
fi
|
||||
|
||||
# NLS nuisances.
|
||||
# Support unset when possible.
|
||||
if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
|
||||
as_unset=unset
|
||||
else
|
||||
as_unset=false
|
||||
fi
|
||||
|
||||
(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
|
||||
{ $as_unset LANG || test "${LANG+set}" != set; } ||
|
||||
{ LANG=C; export LANG; }
|
||||
(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
|
||||
{ $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
|
||||
{ LC_ALL=C; export LC_ALL; }
|
||||
(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
|
||||
{ $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
|
||||
{ LC_TIME=C; export LC_TIME; }
|
||||
(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
|
||||
{ $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
|
||||
{ LC_CTYPE=C; export LC_CTYPE; }
|
||||
(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
|
||||
{ $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
|
||||
{ LANGUAGE=C; export LANGUAGE; }
|
||||
(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
|
||||
{ $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
|
||||
{ LC_COLLATE=C; export LC_COLLATE; }
|
||||
(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
|
||||
{ $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
|
||||
{ LC_NUMERIC=C; export LC_NUMERIC; }
|
||||
(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
|
||||
{ $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
|
||||
{ LC_MESSAGES=C; export LC_MESSAGES; }
|
||||
|
||||
|
||||
# Required to use basename.
|
||||
if expr a : '\(a\)' >/dev/null 2>&1; then
|
||||
as_expr=expr
|
||||
else
|
||||
as_expr=false
|
||||
fi
|
||||
|
||||
if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
|
||||
as_basename=basename
|
||||
else
|
||||
as_basename=false
|
||||
fi
|
||||
|
||||
|
||||
# Name of the executable.
|
||||
as_me=`$as_basename "$0" ||
|
||||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
|
||||
X"$0" : 'X\(//\)$' \| \
|
||||
X"$0" : 'X\(/\)$' \| \
|
||||
. : '\(.\)' 2>/dev/null ||
|
||||
echo X/"$0" |
|
||||
sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
|
||||
/^X\/\(\/\/\)$/{ s//\1/; q; }
|
||||
/^X\/\(\/\).*/{ s//\1/; q; }
|
||||
s/.*/./; q'`
|
||||
|
||||
|
||||
|
||||
# Running `$0' as if it were installed.
|
||||
me=`echo "$0" | sed -e 's,.*\\/,,'`
|
||||
|
||||
exec @abs_top_builddir@/bin/$me --include @abs_top_builddir@/lib ${1+"$@"}
|
||||
|
Loading…
x
Reference in New Issue
Block a user