Released 1.2.
[gtk-doc.git] / autogen.sh
blob961811afa795808c1555d860c8ab058903e8408b
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
4 PROJECT=gtk-doc
5 TEST_TYPE=-f
6 FILE=gtk-doc.dsl.in
8 DIE=0
10 srcdir=`dirname $0`
11 test -z "$srcdir" && srcdir=.
13 THEDIR="`pwd`"
15 cd "$srcdir"
17 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
18 echo
19 echo "You must have autoconf installed to compile $PROJECT."
20 echo "Download the appropriate package for your distribution,"
21 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
22 DIE=1
25 (libtool --version) < /dev/null > /dev/null 2>&1 || {
26 echo
27 echo "You must have libtool installed to compile $PROJECT."
28 echo "Get ftp://alpha.gnu.org/gnu/libtool-1.2b.tar.gz"
29 echo "(or a newer version if it is available)"
30 DIE=1
33 if automake-1.7 --version < /dev/null > /dev/null 2>&1; then
34 AUTOMAKE=automake-1.7
35 ACLOCAL=aclocal-1.7
36 elif automake-1.6 --version < /dev/null > /dev/null 2>&1; then
37 AUTOMAKE=automake-1.6
38 ACLOCAL=aclocal-1.6
39 elif automake-1.4 --version < /dev/null > /dev/null 2>&1; then
40 AUTOMAKE=automake-1.4
41 ACLOCAL=aclocal-1.4
42 else
43 echo
44 echo "You must have automake installed to compile $PROJECT."
45 echo "Get ftp://ftp.cygnus.com/pub/home/tromey/automake-1.2d.tar.gz"
46 echo "(or a newer version if it is available)"
47 DIE=1
50 if test "$DIE" -eq 1; then
51 exit 1
54 test $TEST_TYPE $FILE || {
55 echo "You must run this script in the top-level $PROJECT directory"
56 exit 1
59 if test -z "$*"; then
60 echo "I am going to run ./configure with no arguments - if you wish "
61 echo "to pass any to it, please specify them on the $0 command line."
64 case $CC in
65 *xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
66 esac
68 $ACLOCAL $ACLOCAL_FLAGS
70 # optionally feature autoheader
71 #(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader
73 $AUTOMAKE --add-missing $am_opt
74 autoconf
76 cd "$THEDIR"
78 $srcdir/configure --enable-maintainer-mode "$@"
80 echo
81 echo "Now type 'make install' to install $PROJECT."