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