1998-09-03 08:37:37 +08:00
|
|
|
#! @SHELL@
|
1994-04-30 09:42:39 +08:00
|
|
|
# autoreconf - remake all Autoconf configure scripts in a directory tree
|
2000-10-17 02:25:55 +08:00
|
|
|
# Copyright 1994, 1999, 2000 Free Software Foundation, Inc.
|
1994-04-30 09:42:39 +08:00
|
|
|
|
|
|
|
# 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
|
1996-06-13 01:55:25 +08:00
|
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
|
|
# 02111-1307, USA.
|
1994-04-30 09:42:39 +08:00
|
|
|
|
2000-02-08 19:39:46 +08:00
|
|
|
me=`echo "$0" | sed -e 's,.*/,,'`
|
|
|
|
|
1994-05-05 01:34:32 +08:00
|
|
|
usage="\
|
2000-03-14 01:26:21 +08:00
|
|
|
Usage: $0 [OPTION] ... [TEMPLATE-FILE]
|
1999-01-08 11:38:59 +08:00
|
|
|
|
2000-02-15 17:15:22 +08:00
|
|
|
Run \`autoconf' (and \`autoheader', \`aclocal' and \`automake', where
|
|
|
|
appropriate) repeatedly to remake the Autoconf \`configure' scripts
|
|
|
|
and configuration header templates in the directory tree rooted at the
|
1999-01-08 11:38:59 +08:00
|
|
|
current directory. By default, it only remakes those files that are
|
|
|
|
older than their predecessors. If you install a new version of
|
|
|
|
Autoconf, running \`autoreconf' remakes all of the files by giving it
|
|
|
|
the \`--force' option.
|
|
|
|
|
2000-07-10 18:18:57 +08:00
|
|
|
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
|
|
|
|
-f, --force consider every files are obsolete
|
2000-07-10 18:22:06 +08:00
|
|
|
-i, --install copy missing auxiliary files
|
2000-07-19 17:04:26 +08:00
|
|
|
-s, --symlink instead of copying, install symbolic links
|
2000-07-10 18:22:06 +08:00
|
|
|
|
|
|
|
The option \`--install' is similar to the option \`--add-missing' in
|
|
|
|
other tools.
|
2000-07-10 18:18:57 +08:00
|
|
|
|
|
|
|
Library directories:
|
2000-07-19 17:03:53 +08:00
|
|
|
-A, --autoconf-dir=ACDIR Autoconf's macro files location (rarely needed)
|
|
|
|
-l, --localdir=DIR location of \`aclocal.m4' and \`acconfig.h'
|
|
|
|
-M, --m4dir=M4DIR this package's Autoconf extensions
|
2000-07-10 18:18:57 +08:00
|
|
|
|
|
|
|
Unless specified, heuristics try to compute \`M4DIR' from the \`Makefile.am',
|
|
|
|
or defaults to \`m4' if it exists.
|
1999-01-08 11:38:59 +08:00
|
|
|
|
|
|
|
The following options are passed to \`automake':
|
2000-06-26 18:51:17 +08:00
|
|
|
--cygnus assume program is part of Cygnus-style tree
|
|
|
|
--foreign set strictness to foreign
|
|
|
|
--gnits set strictness to gnits
|
|
|
|
--gnu set strictness to gnu
|
|
|
|
--include-deps include generated dependencies in Makefile.in
|
|
|
|
|
|
|
|
The environment variables AUTOCONF, AUTOHEADER, AUTOMAKE, and ACLOCAL
|
|
|
|
are honored.
|
1999-01-08 11:38:59 +08:00
|
|
|
|
|
|
|
Report bugs to <bug-autoconf@gnu.org>."
|
1994-09-16 02:34:35 +08:00
|
|
|
|
2000-01-10 18:11:57 +08:00
|
|
|
version="\
|
|
|
|
autoreconf (GNU @PACKAGE@) @VERSION@
|
|
|
|
Written by David J. MacKenzie.
|
|
|
|
|
2000-10-17 02:25:55 +08:00
|
|
|
Copyright 1994, 1999, 2000 Free Software Foundation, Inc.
|
2000-01-10 18:11:57 +08:00
|
|
|
This is free software; see the source for copying conditions. There is NO
|
|
|
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
|
|
|
|
2000-02-08 19:39:46 +08:00
|
|
|
help="\
|
|
|
|
Try \`$me --help' for more information."
|
|
|
|
|
2000-06-15 19:33:04 +08:00
|
|
|
exit_missing_arg="\
|
|
|
|
echo \"$me: option \\\`\$1' requires an argument\" >&2
|
|
|
|
echo \"\$help\" >&2
|
|
|
|
exit 1"
|
|
|
|
|
2000-05-27 01:45:10 +08:00
|
|
|
# NLS nuisances.
|
|
|
|
# Only set these to C if already set. These must not be set unconditionally
|
|
|
|
# because not all systems understand e.g. LANG=C (notably SCO).
|
|
|
|
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
|
|
|
|
# Non-C LC_CTYPE values break the ctype check.
|
|
|
|
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_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
|
|
|
|
|
|
|
|
# Variables.
|
2000-07-19 17:03:53 +08:00
|
|
|
: ${autoconf_dir=${AC_MACRODIR=@datadir@}}
|
2000-07-10 18:08:29 +08:00
|
|
|
debug=false
|
2000-11-16 18:12:50 +08:00
|
|
|
dir=`echo "$0" | sed -e 's,[^/]*$,,'`
|
2000-07-10 16:54:41 +08:00
|
|
|
force=false
|
2000-07-10 18:22:06 +08:00
|
|
|
# --install -- as --add-missing in other tools.
|
|
|
|
install=false
|
2000-06-26 18:51:17 +08:00
|
|
|
localdir=.
|
2000-07-10 18:18:57 +08:00
|
|
|
# m4dir -- local Autoconf extensions. Typically `m4'.
|
|
|
|
m4dir=
|
2000-09-27 18:02:27 +08:00
|
|
|
status=0
|
2000-07-10 18:22:06 +08:00
|
|
|
# symlink -- when --install, use symlinks instead.
|
|
|
|
symlink=false
|
2000-06-26 18:51:17 +08:00
|
|
|
verbose=:
|
|
|
|
|
|
|
|
# Looking for autoconf.
|
2000-05-27 02:09:43 +08:00
|
|
|
# We test "$dir/autoconf" in case we are in the build tree, in which case
|
|
|
|
# the names are not transformed yet.
|
|
|
|
for autoconf in "$AUTOCONF" \
|
|
|
|
"$dir/@autoconf-name@" \
|
|
|
|
"$dir/autoconf" \
|
|
|
|
"@bindir@/@autoconf-name@"; do
|
|
|
|
test -f "$autoconf" && break
|
|
|
|
done
|
2000-06-26 18:51:17 +08:00
|
|
|
|
|
|
|
# Looking for autoheader.
|
2000-05-27 02:09:43 +08:00
|
|
|
for autoheader in "$AUTOHEADER" \
|
|
|
|
"$dir/@autoheader-name@" \
|
|
|
|
"$dir/autoheader" \
|
|
|
|
"@bindir@/@autoheader-name@"; do
|
|
|
|
test -f "$autoheader" && break
|
|
|
|
done
|
2000-06-26 18:51:17 +08:00
|
|
|
# Looking for automake.
|
|
|
|
: ${automake=${AUTOMAKE=automake}}
|
|
|
|
# Looking for aclocal.
|
|
|
|
: ${aclocal=${ACLOCAL=aclocal}}
|
1994-05-05 01:34:32 +08:00
|
|
|
|
2000-05-27 01:45:10 +08:00
|
|
|
# Parse command line.
|
1994-05-05 01:34:32 +08:00
|
|
|
while test $# -gt 0; do
|
2000-09-19 20:35:01 +08:00
|
|
|
optarg=`expr "x$1" : 'x--[^=]*=\(.*\)' \| \
|
|
|
|
"x$1" : 'x-.\(.*\)'`
|
1999-04-10 14:18:49 +08:00
|
|
|
case "$1" in
|
2000-11-08 01:58:43 +08:00
|
|
|
--version | -V )
|
2000-03-14 01:26:21 +08:00
|
|
|
echo "$version" ; exit 0 ;;
|
2000-11-08 01:58:43 +08:00
|
|
|
--help | -h )
|
2000-03-14 01:26:21 +08:00
|
|
|
echo "$usage"; exit 0 ;;
|
|
|
|
|
2000-11-08 01:58:43 +08:00
|
|
|
--verbose | -v )
|
2000-03-14 01:26:21 +08:00
|
|
|
verbose=echo
|
|
|
|
shift;;
|
2000-11-08 01:58:43 +08:00
|
|
|
--debug | -d )
|
2000-07-10 18:08:29 +08:00
|
|
|
debug=:; shift ;;
|
2000-03-14 01:26:21 +08:00
|
|
|
|
2000-11-08 01:58:43 +08:00
|
|
|
--localdir=* | -l?* )
|
2000-07-10 18:18:57 +08:00
|
|
|
localdir=$optarg
|
2000-03-14 01:26:21 +08:00
|
|
|
shift ;;
|
2000-11-08 01:58:43 +08:00
|
|
|
--localdir | -l )
|
2000-06-15 19:33:04 +08:00
|
|
|
test $# = 1 && eval "$exit_missing_arg"
|
2000-03-14 01:26:21 +08:00
|
|
|
shift
|
|
|
|
localdir=$1
|
|
|
|
shift ;;
|
|
|
|
|
2000-11-08 01:58:43 +08:00
|
|
|
--autoconf-dir=* | -A?* )
|
2000-10-27 06:27:48 +08:00
|
|
|
autoconf_dir=$optarg
|
|
|
|
shift ;;
|
2000-11-08 01:58:43 +08:00
|
|
|
--autoconf-dir | -A )
|
2000-06-15 19:33:04 +08:00
|
|
|
test $# = 1 && eval "$exit_missing_arg"
|
2000-03-14 01:26:21 +08:00
|
|
|
shift
|
2000-07-19 17:03:53 +08:00
|
|
|
autoconf_dir=$1
|
2000-03-14 01:26:21 +08:00
|
|
|
shift ;;
|
2000-11-08 01:58:43 +08:00
|
|
|
--macrodir=* | -m?* )
|
2000-10-27 06:27:48 +08:00
|
|
|
echo "$me: warning: --macrodir is obsolete, use --autoconf-dir" >&2
|
2000-09-19 20:35:01 +08:00
|
|
|
autoconf_dir=$optarg
|
2000-07-10 18:18:57 +08:00
|
|
|
shift ;;
|
2000-11-08 01:58:43 +08:00
|
|
|
--macrodir | -m )
|
2000-10-27 06:27:48 +08:00
|
|
|
echo "$me: warning: --macrodir is obsolete, use --autoconf-dir" >&2
|
|
|
|
test $# = 1 && eval "$exit_missing_arg"
|
|
|
|
shift
|
|
|
|
autoconf_dir=$1
|
|
|
|
shift ;;
|
2000-09-19 20:35:01 +08:00
|
|
|
|
2000-11-08 01:58:43 +08:00
|
|
|
--m4dir=* | -M?* )
|
2000-10-27 21:47:54 +08:00
|
|
|
m4dir=$optarg
|
|
|
|
shift ;;
|
2000-11-08 01:58:43 +08:00
|
|
|
--m4dir | -M )
|
2000-07-10 18:18:57 +08:00
|
|
|
test $# = 1 && eval "$exit_missing_arg"
|
|
|
|
shift
|
|
|
|
m4dir=$1
|
|
|
|
shift ;;
|
|
|
|
|
2000-11-08 01:58:43 +08:00
|
|
|
--force | -f )
|
2000-07-10 16:54:41 +08:00
|
|
|
force=:; shift ;;
|
2000-06-26 18:51:17 +08:00
|
|
|
|
2000-11-08 01:58:43 +08:00
|
|
|
--install | -i )
|
2000-07-10 18:22:06 +08:00
|
|
|
install=:; shift ;;
|
2000-11-08 01:58:43 +08:00
|
|
|
--symlink | -s )
|
2000-07-10 18:22:06 +08:00
|
|
|
symlink=:; shift ;;
|
|
|
|
|
2000-06-26 18:51:17 +08:00
|
|
|
# Options of Automake.
|
|
|
|
--cygnus | --foreign | --gnits | --gnu | --include-deps | -i )
|
|
|
|
automake="$automake $1"; shift ;;
|
2000-03-14 01:26:21 +08:00
|
|
|
|
|
|
|
-- ) # Stop option processing.
|
|
|
|
shift; break ;;
|
|
|
|
-* )
|
|
|
|
exec >&2
|
|
|
|
echo "$me: invalid option $1"
|
|
|
|
echo "$help"
|
|
|
|
exit 1 ;;
|
|
|
|
* )
|
|
|
|
break ;;
|
1994-05-05 01:34:32 +08:00
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2000-03-14 01:26:21 +08:00
|
|
|
# Find the input file.
|
1994-09-16 05:16:59 +08:00
|
|
|
if test $# -ne 0; then
|
2000-02-08 21:45:24 +08:00
|
|
|
exec >&2
|
2000-02-15 17:15:22 +08:00
|
|
|
echo "$me: invalid number of arguments"
|
2000-02-08 19:39:46 +08:00
|
|
|
echo "$help"
|
2000-02-15 17:15:22 +08:00
|
|
|
exit 1
|
1994-09-16 05:16:59 +08:00
|
|
|
fi
|
|
|
|
|
2000-07-19 17:24:10 +08:00
|
|
|
# If verbose, say what you are going to use.
|
|
|
|
if test $verbose = echo; then
|
|
|
|
$autoconf --version |
|
|
|
|
sed "s,.*)\(.*\)$,$me: using autoconf\1: $autoconf,;1q" >&2
|
|
|
|
$autoheader --version |
|
|
|
|
sed "s,.*)\(.*\)$,$me: using autoheader\1: $autoheader,;1q" >&2
|
|
|
|
$automake --version |
|
|
|
|
sed "s,.*)\(.*\)$,$me: using automake\1: $automake,;1q" >&2
|
|
|
|
$aclocal --version |
|
|
|
|
sed "s,.*)\(.*\)$,$me: using aclocal\1: $aclocal,;1q" >&2
|
|
|
|
fi
|
|
|
|
|
2000-06-26 18:51:17 +08:00
|
|
|
# Dispatch autoreconf's option to the tools.
|
2000-07-10 18:22:06 +08:00
|
|
|
# --localdir
|
|
|
|
autoconf="$autoconf -l $localdir"
|
|
|
|
autoheader="$autoheader -l $localdir"
|
|
|
|
# --force
|
2000-07-10 16:54:41 +08:00
|
|
|
$force || automake="$automake --no-force"
|
2000-07-10 18:22:06 +08:00
|
|
|
# --verbose
|
|
|
|
autoconf="$autoconf `$verbose --verbose`"
|
|
|
|
autoheader="$autoheader `$verbose --verbose`"
|
2000-06-26 18:51:17 +08:00
|
|
|
automake="$automake `$verbose --verbose`"
|
|
|
|
aclocal="$aclocal `$verbose --verbose`"
|
2000-07-19 16:54:44 +08:00
|
|
|
# --debug
|
|
|
|
$debug &&
|
|
|
|
{
|
|
|
|
autoconf="$autoconf --debug"
|
|
|
|
autoheader="$autoheader --debug"
|
|
|
|
}
|
2000-07-10 18:22:06 +08:00
|
|
|
# --macrodir
|
2000-07-19 17:03:53 +08:00
|
|
|
export autoconf_dir
|
2000-07-10 18:22:06 +08:00
|
|
|
# --install and --symlink
|
|
|
|
if $install; then
|
|
|
|
automake="$automake --add-missing `$symlink || echo --copy`"
|
|
|
|
fi
|
|
|
|
|
2000-07-10 16:57:16 +08:00
|
|
|
# Trap on 0 to stop playing with `rm'.
|
|
|
|
$debug ||
|
|
|
|
{
|
|
|
|
trap 'status=$?; rm -rf $tmp && exit $status' 0
|
2000-09-27 18:02:27 +08:00
|
|
|
trap '(exit $?); exit' 1 2 13 15
|
2000-07-10 16:57:16 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
# Create a (secure) tmp directory for tmp files.
|
|
|
|
: ${TMPDIR=/tmp}
|
|
|
|
{
|
|
|
|
tmp=`(umask 077 && mktemp -d -q "$TMPDIR/arXXXXXX") 2>/dev/null` &&
|
|
|
|
test -n "$tmp" && test -d "$tmp"
|
|
|
|
} ||
|
|
|
|
{
|
2000-09-25 21:24:45 +08:00
|
|
|
tmp=$TMPDIR/ar$$
|
|
|
|
(umask 077 && mkdir $tmp)
|
2000-07-10 16:57:16 +08:00
|
|
|
} ||
|
|
|
|
{
|
|
|
|
echo "$me: cannot create a temporary directory in $TMPDIR" >&2
|
2000-09-27 18:02:27 +08:00
|
|
|
(exit 1); exit
|
2000-07-10 16:57:16 +08:00
|
|
|
}
|
|
|
|
|
2000-07-19 16:54:44 +08:00
|
|
|
# When debugging, it is convenient that all the related temporary
|
|
|
|
# files be at the same place.
|
|
|
|
TMPDIR=$tmp
|
|
|
|
export TMPDIR
|
|
|
|
|
2000-07-10 16:57:16 +08:00
|
|
|
# alflags.sed -- Fetch the aclocal flags.
|
|
|
|
cat >$tmp/alflags.sed <<EOF
|
|
|
|
#n
|
|
|
|
/^ACLOCAL_[A-Z_]*FLAGS/{
|
|
|
|
s/.*=//
|
|
|
|
p
|
|
|
|
q
|
|
|
|
}
|
|
|
|
EOF
|
2000-07-10 18:01:42 +08:00
|
|
|
|
|
|
|
# update.sh --
|
2000-09-27 18:02:27 +08:00
|
|
|
# Exit 0 if the first argument is not the most recent of all or is missing.
|
2000-07-10 18:01:42 +08:00
|
|
|
cat >$tmp/update.sh <<\EOF
|
2000-11-02 03:57:54 +08:00
|
|
|
test -f "$1" || { :; exit; }
|
2000-07-13 21:38:45 +08:00
|
|
|
test x`ls -1dt "$@" 2>/dev/null | sed 1q` != x"$1"
|
2000-07-10 18:01:42 +08:00
|
|
|
EOF
|
|
|
|
update="@SHELL@ $tmp/update.sh"
|
|
|
|
|
|
|
|
|
2000-05-27 01:45:10 +08:00
|
|
|
# ----------------------- #
|
|
|
|
# Real work starts here. #
|
|
|
|
# ----------------------- #
|
1994-04-30 09:42:39 +08:00
|
|
|
|
1996-11-21 05:27:29 +08:00
|
|
|
# Make a list of directories to process.
|
1994-04-30 09:42:39 +08:00
|
|
|
# The xargs grep filters out Cygnus configure.in files.
|
1994-09-16 02:34:35 +08:00
|
|
|
find . -name configure.in -print |
|
1994-04-30 09:42:39 +08:00
|
|
|
xargs grep -l AC_OUTPUT |
|
1994-09-16 02:34:35 +08:00
|
|
|
sed 's%/configure\.in$%%; s%^./%%' |
|
|
|
|
while read dir; do
|
1994-04-30 09:42:39 +08:00
|
|
|
(
|
1994-09-16 02:34:35 +08:00
|
|
|
cd $dir || continue
|
|
|
|
|
2000-07-10 16:57:16 +08:00
|
|
|
|
|
|
|
# ----------------- #
|
|
|
|
# Running aclocal. #
|
|
|
|
# ----------------- #
|
|
|
|
|
2000-07-10 18:06:48 +08:00
|
|
|
# uses_aclocal -- is this package using aclocal?
|
|
|
|
uses_aclocal=false
|
2000-07-10 18:19:55 +08:00
|
|
|
if grep 'generated .* by aclocal' $localddir/aclocal.m4 >/dev/null 2>&1 ||
|
|
|
|
test -f "$localdir/acinclude.m4"; then
|
2000-07-10 18:06:48 +08:00
|
|
|
uses_aclocal=:
|
1998-10-29 08:53:33 +08:00
|
|
|
fi
|
2000-07-10 18:06:48 +08:00
|
|
|
if $uses_aclocal &&
|
2000-07-10 18:01:42 +08:00
|
|
|
{ $force ||
|
2000-07-10 18:19:55 +08:00
|
|
|
$update $localdir/aclocal.m4 $localdir/acinclude.m4; } then
|
2000-07-10 16:57:16 +08:00
|
|
|
# If there are flags for aclocal in Makefile.am, use them.
|
|
|
|
aclocal_flags=`sed -f $tmp/alflags.sed Makefile.am 2>/dev/null`
|
2000-07-10 18:18:57 +08:00
|
|
|
|
|
|
|
# If m4dir no specified and these flags do not specify the
|
|
|
|
# location of the local Autoconf extensions, default to `m4'.
|
|
|
|
case $m4dir,$aclocal_flags in
|
|
|
|
,*"-I "* ) ;; # Not overriden and specified.
|
|
|
|
,*) # Not specified at all.
|
|
|
|
test -d "m4" && aclocal_flags="$aclocal_flags -I m4";;
|
|
|
|
* ) # Specified by the user.
|
|
|
|
aclocal_flags="$aclocal_flags -I $m4dir";;
|
|
|
|
esac
|
|
|
|
|
2000-07-13 21:38:45 +08:00
|
|
|
$verbose $me: running $aclocal $aclocal_flags --output=$localdir/aclocal.m4 in $dir >&2
|
2000-07-10 18:19:55 +08:00
|
|
|
$aclocal $aclocal_flags --output=$localdir/aclocal.m4
|
1998-10-29 08:53:33 +08:00
|
|
|
fi
|
|
|
|
|
2000-07-10 16:57:16 +08:00
|
|
|
|
|
|
|
# ------------------ #
|
|
|
|
# Running automake. #
|
|
|
|
# ------------------ #
|
|
|
|
|
|
|
|
# Assumes that there is a Makefile.am in the topmost directory.
|
2000-07-10 18:07:41 +08:00
|
|
|
uses_automake=false
|
|
|
|
test -f "Makefile.am" &&
|
|
|
|
uses_automake=:
|
2000-07-10 22:03:12 +08:00
|
|
|
# We should always run automake, and let it decide whether it shall
|
|
|
|
# update the file or not. In fact, the effect of `$force' is already
|
|
|
|
# included in `$automake' via `--no-force'.
|
|
|
|
if $uses_automake; then
|
2000-07-13 21:38:45 +08:00
|
|
|
$verbose $me: running $automake in $dir >&2
|
2000-07-10 16:59:11 +08:00
|
|
|
$automake
|
1998-10-29 08:53:33 +08:00
|
|
|
fi
|
|
|
|
|
2000-07-10 16:57:16 +08:00
|
|
|
|
|
|
|
# ------------------ #
|
|
|
|
# Running autoconf. #
|
|
|
|
# ------------------ #
|
|
|
|
|
2000-07-10 18:01:42 +08:00
|
|
|
if $force ||
|
2000-07-10 18:19:55 +08:00
|
|
|
$update configure configure.in $localdir/aclocal.m4; then
|
2000-07-13 21:38:45 +08:00
|
|
|
$verbose $me: running $autoconf in $dir >&2
|
2000-07-10 18:18:57 +08:00
|
|
|
$autoconf
|
1994-11-04 22:44:38 +08:00
|
|
|
fi
|
1994-09-16 02:34:35 +08:00
|
|
|
|
2000-07-10 16:57:16 +08:00
|
|
|
|
|
|
|
# -------------------- #
|
|
|
|
# Running autoheader. #
|
|
|
|
# -------------------- #
|
|
|
|
|
|
|
|
# templates -- arguments of AC_CONFIG_HEADERS.
|
2000-07-13 21:38:45 +08:00
|
|
|
$verbose $me: running $autoconf -t 'AC_CONFIG_HEADERS:$1'
|
2000-07-10 18:18:57 +08:00
|
|
|
templates=`$autoconf -t 'AC_CONFIG_HEADERS:$1'`
|
2000-07-10 16:57:16 +08:00
|
|
|
if test -n "$templates"; then
|
1998-10-29 08:53:33 +08:00
|
|
|
tcount=`set -- $templates; echo $#`
|
|
|
|
template=`set -- $templates; echo $1 | sed '
|
2000-07-10 18:01:42 +08:00
|
|
|
s/.*://
|
|
|
|
t colon
|
|
|
|
s/$/.in/
|
|
|
|
: colon
|
|
|
|
s/:.*//
|
1998-10-29 08:53:33 +08:00
|
|
|
'`
|
2000-07-10 16:55:48 +08:00
|
|
|
template_dir=`echo $template | sed 's,/*[^/]*$,,;s,^$,.,'`
|
|
|
|
stamp_num=`test "$tcount" -gt 1 && echo "$tcount"`
|
|
|
|
stamp=$template_dir/stamp-h$stamp_num.in
|
2000-07-10 18:06:48 +08:00
|
|
|
uses_autoheader=false;
|
2000-07-10 18:07:41 +08:00
|
|
|
grep autoheader "$template" >/dev/null 2>&1 &&
|
2000-07-10 18:06:48 +08:00
|
|
|
uses_autoheader=:
|
|
|
|
if $uses_autoheader &&
|
|
|
|
{ $force ||
|
2000-07-10 18:19:55 +08:00
|
|
|
$update $template \
|
|
|
|
configure.in $localdir/aclocal.m4 $localdir/acconfig.h ||
|
|
|
|
$update $stamp \
|
|
|
|
configure.in $localdir/aclocal_m4 $localdir/acconfig.h; } then
|
2000-07-13 21:38:45 +08:00
|
|
|
$verbose $me: running $autoheader in $dir >&2
|
2000-07-10 18:18:57 +08:00
|
|
|
$autoheader &&
|
2000-07-10 18:19:55 +08:00
|
|
|
$verbose "touching $stamp" >&2 &&
|
2000-07-10 18:07:41 +08:00
|
|
|
touch $stamp
|
1994-09-16 02:34:35 +08:00
|
|
|
fi
|
1994-04-30 09:42:39 +08:00
|
|
|
fi
|
|
|
|
)
|
|
|
|
done
|
1999-04-10 14:18:49 +08:00
|
|
|
|
|
|
|
# Local Variables:
|
2000-02-15 17:15:22 +08:00
|
|
|
# mode: shell-script
|
|
|
|
# sh-indentation: 2
|
1999-04-10 14:18:49 +08:00
|
|
|
# End:
|