]> Pileus Git - ~andy/gtk/blob - autogen.sh
use $srcdir instead of the $OBJ_DIR hack
[~andy/gtk] / 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 pushd $srcdir
8 PROJECT=Gtk+
9 TEST_TYPE=-d
10 FILE=gdk
11
12 DIE=0
13
14 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
15         echo
16         echo "You must have autoconf installed to compile $PROJECT."
17         echo "Download the appropriate package for your distribution,"
18         echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
19         DIE=1
20 }
21
22 (libtool --version) < /dev/null > /dev/null 2>&1 || {
23         echo
24         echo "You must have libtool installed to compile $PROJECT."
25         echo "Get ftp://alpha.gnu.org/gnu/libtool-1.2b.tar.gz"
26         echo "(or a newer version if it is available)"
27         DIE=1
28 }
29
30 (automake --version) < /dev/null > /dev/null 2>&1 || {
31         echo
32         echo "You must have automake installed to compile $PROJECT."
33         echo "Get ftp://ftp.cygnus.com/pub/home/tromey/automake-1.2d.tar.gz"
34         echo "(or a newer version if it is available)"
35         DIE=1
36 }
37
38 if test "$DIE" -eq 1; then
39         exit 1
40 fi
41
42 test $TEST_TYPE $FILE || {
43         echo "You must run this script in the top-level $PROJECT directory"
44         exit 1
45 }
46
47 if test -z "$*"; then
48         echo "I am going to run ./configure with no arguments - if you wish "
49         echo "to pass any to it, please specify them on the $0 command line."
50 fi
51
52 case $CC in
53 *xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
54 esac
55
56 aclocal $ACLOCAL_FLAGS
57
58 # optionally feature autoheader
59 (autoheader --version)  < /dev/null > /dev/null 2>&1 && autoheader
60
61 automake $am_opt
62 autoconf
63 popd
64
65 $srcdir/configure "$@"
66
67 echo 
68 echo "Now type 'make' to compile $PROJECT."