ue May 21 15:51:17 2002 Owen Taylor <otaylor@redhat.com>
[platform/upstream/glib.git] / autogen.sh
index 8e79c21..9da7a60 100755 (executable)
@@ -8,13 +8,13 @@ ORIGDIR=`pwd`
 cd $srcdir
 PROJECT=GLib
 TEST_TYPE=-f
-FILE=glib.h
+FILE=glib/glib.h
 
 DIE=0
 
 have_libtool=false
 if libtool --version < /dev/null > /dev/null 2>&1 ; then
-       libtool_version=`libtoolize --version |  libtoolize --version | sed 's/^[^0-9]*\([0-9.]\+\).*/\1/'`
+       libtool_version=`libtoolize --version |  libtoolize --version | sed 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
        case $libtool_version in
            1.4*)
                have_libtool=true
@@ -56,6 +56,18 @@ if $have_automake ; then : ; else
        DIE=1
 fi
 
+have_gettext=false
+if xgettext --version 2>/dev/null | grep 'GNU' > /dev/null ; then 
+        have_gettext=true
+fi
+
+if $have_gettext ; then : ; else
+       echo
+       echo "GNU gettext must be installed to build GLib from CVS"
+       echo "GNU gettext is available from http://www.gnu.org/software/gettext/"
+       DIE=1
+fi
+
 if test "$DIE" -eq 1; then
        exit 1
 fi
@@ -65,9 +77,11 @@ test $TEST_TYPE $FILE || {
        exit 1
 }
 
-if test -z "$*"; then
-       echo "I am going to run ./configure with no arguments - if you wish "
-        echo "to pass any to it, please specify them on the $0 command line."
+if test -z "$AUTOGEN_SUBDIR_MODE"; then
+        if test -z "$*"; then
+                echo "I am going to run ./configure with no arguments - if you wish "
+                echo "to pass any to it, please specify them on the $0 command line."
+        fi
 fi
 
 case $CC in
@@ -83,7 +97,9 @@ automake -a $am_opt
 autoconf
 cd $ORIGDIR
 
-$srcdir/configure --enable-maintainer-mode "$@"
+if test -z "$AUTOGEN_SUBDIR_MODE"; then
+        $srcdir/configure --enable-maintainer-mode --enable-gtk-doc "$@"
 
-echo 
-echo "Now type 'make' to compile $PROJECT."
+        echo 
+        echo "Now type 'make' to compile $PROJECT."
+fi
\ No newline at end of file