1994-04-30 09:42:39 +08:00
|
|
|
#!/bin/sh
|
|
|
|
# autoreconf - remake all Autoconf configure scripts in a directory tree
|
|
|
|
# Copyright (C) 1994 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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
1994-05-05 01:34:32 +08:00
|
|
|
usage="\
|
|
|
|
Usage: autoreconf [--help] [--macrodir=dir] [--verbose] [--version]
|
|
|
|
[directory...]"
|
1994-07-19 22:44:16 +08:00
|
|
|
verbose=no
|
|
|
|
show_version=no
|
1994-05-05 01:34:32 +08:00
|
|
|
|
|
|
|
test -z "$AC_MACRODIR" && AC_MACRODIR=@datadir@
|
|
|
|
export AC_MACRODIR # Pass it down to autoconf and autoheader.
|
|
|
|
|
|
|
|
while test $# -gt 0; do
|
|
|
|
case "$1" in
|
|
|
|
--help | --hel | --he | --h)
|
|
|
|
echo "$usage"; exit 0 ;;
|
|
|
|
--macrodir=* | --m*=* )
|
|
|
|
AC_MACRODIR="`echo \"$1\" | sed -e 's/^[^=]*=//'`"
|
|
|
|
shift ;;
|
|
|
|
-m | --macrodir | --m*)
|
|
|
|
shift
|
|
|
|
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
|
|
|
|
AC_MACRODIR="$1"
|
|
|
|
shift ;;
|
|
|
|
--verbose | --verbos | --verbo | --verb)
|
1994-07-19 22:44:16 +08:00
|
|
|
verbose=yes; shift ;;
|
1994-05-05 01:34:32 +08:00
|
|
|
--version | --versio | --versi | --vers)
|
1994-07-19 22:44:16 +08:00
|
|
|
show_version=yes; shift ;;
|
1994-05-05 01:34:32 +08:00
|
|
|
--) # Stop option processing.
|
|
|
|
shift; break ;;
|
|
|
|
-*) echo "$usage" 1>&2; exit 1 ;;
|
|
|
|
*) break ;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
1994-07-19 22:44:16 +08:00
|
|
|
if test $show_version = yes; then
|
1994-05-05 01:34:32 +08:00
|
|
|
version=`sed -n 's/define.AC_ACVERSION.[ ]*\([0-9.]*\).*/\1/p' \
|
|
|
|
$AC_MACRODIR/acgeneral.m4`
|
|
|
|
echo "Autoconf version $version"
|
|
|
|
exit 0
|
|
|
|
fi
|
1994-04-30 09:42:39 +08:00
|
|
|
|
|
|
|
if test $# -eq 0; then paths=.; else paths="$@"; fi
|
|
|
|
|
|
|
|
# The xargs grep filters out Cygnus configure.in files.
|
|
|
|
find $paths -name configure.in -print |
|
|
|
|
xargs grep -l AC_OUTPUT |
|
|
|
|
while read confin; do
|
|
|
|
(
|
|
|
|
dir=`echo $confin|sed 's%/[^/][^/]*$%%'`
|
|
|
|
cd $dir || exit 1
|
1994-07-19 22:44:16 +08:00
|
|
|
test $verbose = yes && echo running autoconf in $dir
|
1994-04-30 09:42:39 +08:00
|
|
|
autoconf
|
|
|
|
if grep AC_CONFIG_HEADER configure.in > /dev/null; then
|
1994-07-19 22:44:16 +08:00
|
|
|
test $verbose = yes && echo running autoheader in $dir
|
1994-04-30 09:42:39 +08:00
|
|
|
autoheader
|
|
|
|
fi
|
|
|
|
)
|
|
|
|
done
|
|
|
|
|