2008-07-30 Anders Carlsson <andersca@apple.com>
[webkit/qt.git] / autogen.sh
bloba929538d20a626286197af48899ff6ce0c5ed645
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 DIE=0
13 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
14 echo
15 echo "You must have autoconf installed to compile $PROJECT."
16 echo "Install the appropriate package for your distribution,"
17 echo "or get the source tarball at http://ftp.gnu.org/gnu/autoconf/"
18 DIE=1
21 (automake --version) < /dev/null > /dev/null 2>&1 || {
22 echo
23 echo "You must have automake installed to compile $PROJECT."
24 echo "Install the appropriate package for your distribution,"
25 echo "or get the source tarball at http://ftp.gnu.org/gnu/automake/"
26 DIE=1
29 LIBTOOLIZE=libtoolize
30 ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
31 LIBTOOLIZE=glibtoolize
32 ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
33 echo
34 echo "You must have libtool installed to compile $PROJECT."
35 echo "Install the appropriate package for your distribution,"
36 echo "or get the source tarball at http://ftp.gnu.org/gnu/libtool/"
37 DIE=1
41 if test "$DIE" -eq 1; then
42 exit 1
45 rm -rf $top_srcdir/autom4te.cache
47 touch README INSTALL
49 aclocal || exit $?
50 $LIBTOOLIZE --force || exit $?
51 autoheader || exit $?
52 automake --foreign --add-missing || exit $?
53 autoconf || exit $?
55 cd $ORIGDIR || exit 1
57 $srcdir/configure $AUTOGEN_CONFIGURE_ARGS "$@" || exit $?