build: Go back to autoreconf
[profile/ivi/clutter.git] / autogen.sh
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
3
4 srcdir=`dirname $0`
5 test -z "$srcdir" && srcdir=.
6
7 ORIGDIR=`pwd`
8
9 cd $srcdir
10 PROJECT=Clutter
11 TEST_TYPE=-f
12 FILE=clutter/clutter.h
13
14 test $TEST_TYPE $FILE || {
15         echo "You must run this script in the top-level $PROJECT directory"
16         exit 1
17 }
18
19 (gtkdocize --version) < /dev/null > /dev/null 2>&1 || {
20         echo
21         echo "You must have gtk-doc installed to compile $PROJECT."
22         echo "Install the appropriate package for your distribution,"
23         echo "or get the source tarball at http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/"
24         exit 1
25 }
26
27 # NOCONFIGURE is used by gnome-common
28 if test -z "$NOCONFIGURE"; then
29         if test -z "$*"; then
30                 echo "I am going to run ./configure with no arguments - if you wish "
31                 echo "to pass any to it, please specify them on the $0 command line."
32         fi
33 fi
34
35 rm -rf autom4te.cache
36
37 gtkdocize || exit $?
38 autoreconf -vfi || exit $?
39 cd $ORIGDIR || exit $?
40
41 if test -z "$NOCONFIGURE"; then
42         $srcdir/configure $AUTOGEN_CONFIGURE_ARGS "$@" || exit $?
43         echo "Now type 'make' to compile $PROJECT."
44 fi