2
# Copyright 2000, 2001 Alexandre Duret-Lutz <duret_g@epita.fr>
4
# This file is free software; you can redistribute it and/or modify it under
5
# the terms of the GNU General Public License as published by the Free
6
# Software Foundation; either version 2 of the License, or (at your
7
# option) any later version.
9
# This program is distributed in the hope that it will be useful, but WITHOUT
10
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14
# You should have received a copy of the GNU General Public License along
15
# with this program; if not, write to the Free Software Foundation, Inc.,
16
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23
echo "Usage: autogen.sh [-h] [-v] [-V]"
35
$@ || die "*** Error '${1+\"$@\"}' exited with bad status."
40
test -f configure.ac || test -f configure.in ||
41
die "Cannot find configure.in in current directory (`pwd`)."
43
if test -f Makefile.am; then
44
# use the same aclocal flags as in Makefile.am, if specified
45
aclocalflags=`sed -n -e '/ACLOCAL_AMFLAGS/{s/.*=\(.*\)$/\1/
51
saferun aclocal $aclocalflags ${moreverb}
54
saferun autoconf ${moreverb}
56
if grep AC_CONFIG_HEADER configure.* >/dev/null 2>/dev/null; then
57
# generate src/config.h.in
58
saferun autoheader ${moreverb}
61
# generate **/Makefile.in and add mssing files
62
# Use --force-missing, or it's possible that we'll use
63
# some obsolete files (for instance if the Automake location
64
# changer and the symlink still point to the old).
65
saferun automake --force-missing --add-missing ${moreverb}
68
while test $# -gt 0 ; do
86
targets=`find . \( -name 'configure.ac' -o -name 'configure.in' \) -print`
87
test -n "$targets" || die "Cannot find any configure.in or configure.ac."
90
dir=`expr "x$i" : 'x\(.*\)/[^/]*' \| '.' : '.'`
91
test $# -gt 1 && echo "=== configuring '$dir' ==="