blob: 60b163d5503dc4e677b0c26b7e97dc039cf398ed [file] [log] [blame]
alp@webkit.org278f1252007-12-27 06:05:21 +00001#! /bin/sh
2
alp@webkit.orga37ed5b2008-01-05 10:23:01 +00003# 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
alp@webkit.org278f1252007-12-27 06:05:21 +00005srcdir=`dirname $0`
6test -z "$srcdir" && srcdir=.
7
alp@webkit.orga37ed5b2008-01-05 10:23:01 +00008ORIGDIR=`pwd`
alp@webkit.org278f1252007-12-27 06:05:21 +00009cd $srcdir
10
kov@webkit.org1edd5ac2009-05-08 21:37:09 +000011GTKDOCIZE_FLAGS="--copy"
jmalonzo@webkit.org06d65c102009-01-31 09:36:45 +000012LIBTOOLIZE_FLAGS="--force --automake"
alex@webkit.orgfe170302010-08-13 16:51:10 +000013ACLOCAL_FLAGS="-I autotools $ACLOCAL_FLAGS"
jmalonzo@webkit.org06d65c102009-01-31 09:36:45 +000014AUTOMAKE_FLAGS="--foreign --add-missing"
15
alp@webkit.org278f1252007-12-27 06:05:21 +000016DIE=0
17
18(autoconf --version) < /dev/null > /dev/null 2>&1 || {
mrowe@apple.com2bc789f2008-01-26 12:32:49 +000019 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
alp@webkit.org278f1252007-12-27 06:05:21 +000024}
25
alp@webkit.orgf93619a2007-12-30 03:33:44 +000026(automake --version) < /dev/null > /dev/null 2>&1 || {
mrowe@apple.com2bc789f2008-01-26 12:32:49 +000027 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
32}
33
34LIBTOOLIZE=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
43 }
alp@webkit.orgf93619a2007-12-30 03:33:44 +000044}
alp@webkit.org278f1252007-12-27 06:05:21 +000045
46if test "$DIE" -eq 1; then
mrowe@apple.com2bc789f2008-01-26 12:32:49 +000047 exit 1
alp@webkit.org278f1252007-12-27 06:05:21 +000048fi
49
50rm -rf $top_srcdir/autom4te.cache
51
52touch README INSTALL
53
kov@webkit.org2f1014c2009-05-22 19:40:08 +000054gtkdocize $GTKDOCIZE_FLAGS > /dev/null 2>&1 || echo "Warning: not running gtk-docize."
jmalonzo@webkit.org06d65c102009-01-31 09:36:45 +000055aclocal $ACLOCAL_FLAGS || exit $?
56$LIBTOOLIZE $LIBTOOLIZE_FLAGS || exit $?
alp@webkit.org278f1252007-12-27 06:05:21 +000057autoheader || exit $?
jmalonzo@webkit.org06d65c102009-01-31 09:36:45 +000058automake $AUTOMAKE_FLAGS || exit $?
alp@webkit.org278f1252007-12-27 06:05:21 +000059autoconf || exit $?
60
alp@webkit.orga37ed5b2008-01-05 10:23:01 +000061cd $ORIGDIR || exit 1
62
63$srcdir/configure $AUTOGEN_CONFIGURE_ARGS "$@" || exit $?