GThread: expand the docs
[glib.git] / autogen.sh
blob1730e57ee525e159f3fc139b05ee6c11a0b0924d
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
4 srcdir=`dirname $0`
5 test -z "$srcdir" && srcdir=.
7 ORIGDIR=`pwd`
8 cd $srcdir
9 PROJECT=GLib
10 TEST_TYPE=-f
11 FILE=glib/glib.h
13 DIE=0
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*|2.4*)
23 have_libtool=true
25 esac
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
35 (gtkdocize --version) < /dev/null > /dev/null 2>&1 || {
36 echo
37 echo "You must have gtk-doc installed to compile $PROJECT."
38 echo "Install the appropriate package for your distribution,"
39 echo "or get the source tarball at ftp://ftp.gnome.org/pub/GNOME/sources/gtk-doc/"
40 DIE=1
43 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
44 echo
45 echo "You must have autoconf installed to compile $PROJECT."
46 echo "Install the appropriate package for your distribution,"
47 echo "or get the source tarball at http://ftp.gnu.org/gnu/autoconf/"
48 DIE=1
51 if automake-1.11 --version < /dev/null > /dev/null 2>&1 ; then
52 AUTOMAKE=automake-1.11
53 ACLOCAL=aclocal-1.11
54 else if automake-1.10 --version < /dev/null > /dev/null 2>&1 ; then
55 AUTOMAKE=automake-1.10
56 ACLOCAL=aclocal-1.10
57 else
58 echo
59 echo "You must have automake 1.10.x or 1.11.x installed to compile $PROJECT."
60 echo "Install the appropriate package for your distribution,"
61 echo "or get the source tarball at http://ftp.gnu.org/gnu/automake/"
62 DIE=1
66 if test "$DIE" -eq 1; then
67 exit 1
70 test $TEST_TYPE $FILE || {
71 echo "You must run this script in the top-level $PROJECT directory"
72 exit 1
75 # NOCONFIGURE is used by gnome-common; support both
76 if ! test -z "$AUTOGEN_SUBDIR_MODE"; then
77 NOCONFIGURE=1
80 if test -z "$NOCONFIGURE"; then
81 if test -z "$*"; then
82 echo "I am going to run ./configure with no arguments - if you wish "
83 echo "to pass any to it, please specify them on the $0 command line."
87 rm -rf autom4te.cache
89 # README and INSTALL are required by automake, but may be deleted by clean
90 # up rules. to get automake to work, simply touch these here, they will be
91 # regenerated from their corresponding *.in files by ./configure anyway.
92 touch README INSTALL
94 $ACLOCAL $ACLOCAL_FLAGS || exit $?
96 libtoolize --force || exit $?
97 gtkdocize || exit $?
99 autoheader || exit $?
101 $AUTOMAKE --add-missing || exit $?
102 autoconf || exit $?
103 cd $ORIGDIR || exit $?
105 if test -z "$NOCONFIGURE"; then
106 $srcdir/configure --enable-maintainer-mode $AUTOGEN_CONFIGURE_ARGS "$@" || exit $?
108 echo
109 echo "Now type 'make' to compile $PROJECT."