Rubber-stamped by Brady Eidson.
[webbrowser.git] / autogen.sh
blob97beb209d2f755a70523b1774dc2f8512ed8dd63
1 #! /bin/sh
3 # Allow invocation from a separate build directory; in that case, we change
4 # to the source directory to run the auto*, then change back before running configure
5 srcdir=`dirname $0`
6 test -z "$srcdir" && srcdir=.
8 ORIGDIR=`pwd`
9 cd $srcdir
11 GTKDOCIZE_FLAGS="--copy"
12 LIBTOOLIZE_FLAGS="--force --automake"
13 ACLOCAL_FLAGS="-I autotools"
14 AUTOMAKE_FLAGS="--foreign --add-missing"
16 DIE=0
18 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
19 echo
20 echo "You must have autoconf installed to compile $PROJECT."
21 echo "Install the appropriate package for your distribution,"
22 echo "or get the source tarball at http://ftp.gnu.org/gnu/autoconf/"
23 DIE=1
26 (automake --version) < /dev/null > /dev/null 2>&1 || {
27 echo
28 echo "You must have automake installed to compile $PROJECT."
29 echo "Install the appropriate package for your distribution,"
30 echo "or get the source tarball at http://ftp.gnu.org/gnu/automake/"
31 DIE=1
34 LIBTOOLIZE=libtoolize
35 ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
36 LIBTOOLIZE=glibtoolize
37 ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
38 echo
39 echo "You must have libtool installed to compile $PROJECT."
40 echo "Install the appropriate package for your distribution,"
41 echo "or get the source tarball at http://ftp.gnu.org/gnu/libtool/"
42 DIE=1
46 if test "$DIE" -eq 1; then
47 exit 1
50 rm -rf $top_srcdir/autom4te.cache
52 touch README INSTALL
54 gtkdocize $GTKDOCIZE_FLAGS > /dev/null 2>&1 || echo "Warning: not running gtk-docize."
55 aclocal $ACLOCAL_FLAGS || exit $?
56 $LIBTOOLIZE $LIBTOOLIZE_FLAGS || exit $?
57 autoheader || exit $?
58 automake $AUTOMAKE_FLAGS || exit $?
59 autoconf || exit $?
61 cd $ORIGDIR || exit 1
63 $srcdir/configure $AUTOGEN_CONFIGURE_ARGS "$@" || exit $?