d32b73eb61c08459bb0231f919b654a79b0be216
[openembedded.git] / recipes / webkit / webkit-gtk / autogen.sh
1 #! /bin/sh
2
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=.
7
8 ORIGDIR=`pwd`
9 cd $srcdir
10
11 GTKDOCIZE_FLAGS="--copy"
12 LIBTOOLIZE_FLAGS="--force --automake"
13 ACLOCAL_FLAGS="-I autotools"
14 AUTOMAKE_FLAGS="--foreign --add-missing"
15
16 DIE=0
17
18 (gtkdocize --version) < /dev/null > /dev/null 2>&1 || {
19     echo
20     echo "You must have gtkdocize installed to compile $PROJECT."
21     echo "Install the appropriate package for your distribution,"
22     echo "or get the source tarball at http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/"
23     DIE=1
24 }
25
26 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
27     echo
28     echo "You must have autoconf 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/autoconf/"
31     DIE=1
32 }
33
34 (automake --version) < /dev/null > /dev/null 2>&1 || {
35     echo
36     echo "You must have automake installed to compile $PROJECT."
37     echo "Install the appropriate package for your distribution,"
38     echo "or get the source tarball at http://ftp.gnu.org/gnu/automake/"
39     DIE=1
40 }
41
42 LIBTOOLIZE=libtoolize
43 ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
44     LIBTOOLIZE=glibtoolize
45     ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
46         echo
47         echo "You must have libtool installed to compile $PROJECT."
48         echo "Install the appropriate package for your distribution,"
49         echo "or get the source tarball at http://ftp.gnu.org/gnu/libtool/"
50         DIE=1
51     }
52 }
53
54 if test "$DIE" -eq 1; then
55     exit 1
56 fi
57
58 rm -rf $top_srcdir/autom4te.cache
59
60 touch README INSTALL
61
62 gtkdocize $GTKDOCIZE_FLAGS || exit $?
63 aclocal $ACLOCAL_FLAGS || exit $?
64 $LIBTOOLIZE $LIBTOOLIZE_FLAGS || exit $?
65 autoheader || exit $?
66 automake $AUTOMAKE_FLAGS || exit $?
67 autoconf || exit $?
68
69 cd $ORIGDIR || exit 1
70
71 $srcdir/configure $AUTOGEN_CONFIGURE_ARGS "$@" || exit $?