Initial revision
[platform/upstream/atk.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 cd $srcdir
9 PROJECT=Atk
10 TEST_TYPE=-f
11 FILE=atk/atk.h
12
13 DIE=0
14
15 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
16         echo
17         echo "You must have autoconf installed to compile $PROJECT."
18         echo "Download the appropriate package for your distribution,"
19         echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
20         DIE=1
21 }
22
23 (automake --version) < /dev/null > /dev/null 2>&1 || {
24         echo
25         echo "You must have automake installed to compile $PROJECT."
26         echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4.tar.gz"
27         echo "(or a newer version if it is available)"
28         DIE=1
29 }
30
31 if test "$DIE" -eq 1; then
32         exit 1
33 fi
34
35 test $TEST_TYPE $FILE || {
36         echo "You must run this script in the top-level $PROJECT directory"
37         exit 1
38 }
39
40 if test -z "$*"; then
41         echo "I am going to run ./configure with no arguments - if you wish "
42         echo "to pass any to it, please specify them on the $0 command line."
43 fi
44
45 aclocal $ACLOCAL_FLAGS
46
47 # optionally run autoheader
48 (autoheader --version)  < /dev/null > /dev/null 2>&1 && autoheader
49
50 automake -a $am_opt
51 autoconf
52 cd $ORIGDIR
53
54 $srcdir/configure --enable-maintainer-mode "$@"
55
56 echo 
57 echo "Now type 'make' to compile $PROJECT."