Remove unneeded GTK Doc stuff
[platform/upstream/glib-networking.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=gLib-networking
10 TEST_TYPE=-f
11 FILE=proxy/libproxy/glibproxyresolver.h
12
13 DIE=0
14
15 have_libtool=false
16 if libtoolize --version < /dev/null > /dev/null 2>&1 ; then
17         libtool_version=`libtoolize --version |
18                          head -1 |
19                          sed -e 's/^\(.*\)([^)]*)\(.*\)$/\1\2/g' \
20                              -e 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
21         case $libtool_version in
22             2.2*)
23                 have_libtool=true
24                 ;;
25         esac
26 fi
27 if $have_libtool ; then : ; else
28         echo
29         echo "You must have libtool >= 2.2 installed to compile $PROJECT."
30         echo "Install the appropriate package for your distribution,"
31         echo "or get the source tarball at http://ftp.gnu.org/gnu/libtool/"
32         DIE=1
33 fi
34
35 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
36         echo
37         echo "You must have autoconf installed to compile $PROJECT."
38         echo "Install the appropriate package for your distribution,"
39         echo "or get the source tarball at http://ftp.gnu.org/gnu/autoconf/"
40         DIE=1
41 }
42
43 if automake-1.11 --version < /dev/null > /dev/null 2>&1 ; then
44     AUTOMAKE=automake-1.11
45     ACLOCAL=aclocal-1.11
46 else if automake-1.10 --version < /dev/null > /dev/null 2>&1 ; then
47     AUTOMAKE=automake-1.10
48     ACLOCAL=aclocal-1.10
49 else
50         echo
51         echo "You must have automake 1.10.x or 1.11.x installed to compile $PROJECT."
52         echo "Install the appropriate package for your distribution,"
53         echo "or get the source tarball at http://ftp.gnu.org/gnu/automake/"
54         DIE=1
55 fi
56 fi
57
58 if test "$DIE" -eq 1; then
59         exit 1
60 fi
61
62 test $TEST_TYPE $FILE || {
63         echo "You must run this script in the top-level $PROJECT directory"
64         exit 1
65 }
66
67 # NOCONFIGURE is used by gnome-common; support both
68 if ! test -z "$AUTOGEN_SUBDIR_MODE"; then
69     NOCONFIGURE=1
70 fi
71
72 if test -z "$NOCONFIGURE"; then
73         if test -z "$*"; then
74                 echo "I am going to run ./configure with no arguments - if you wish "
75                 echo "to pass any to it, please specify them on the $0 command line."
76         fi
77 fi
78
79 rm -rf autom4te.cache
80
81 # README and INSTALL are required by automake, but may be deleted by clean
82 # up rules. to get automake to work, simply touch these here, they will be
83 # regenerated from their corresponding *.in files by ./configure anyway.
84 touch README INSTALL
85
86 $ACLOCAL $ACLOCAL_FLAGS || exit $?
87
88 libtoolize --force || exit $?
89 intltoolize --force --copy || exit $?
90
91 autoheader || exit $?
92
93 $AUTOMAKE --add-missing || exit $?
94 autoconf || exit $?
95 cd $ORIGDIR || exit $?
96
97 if test -z "$NOCONFIGURE"; then
98         $srcdir/configure --enable-maintainer-mode $AUTOGEN_CONFIGURE_ARGS "$@" || exit $?
99
100         echo 
101         echo "Now type 'make' to compile $PROJECT."
102 fi