[gtk-doc] autogen.sh: Use autoreconf



commit af667b04c9fed8151b38afdbb1cc6b669f0a4ee9
Author: Javier Jardón <jjardon gnome org>
Date:   Thu Jan 13 20:43:12 2011 +0000

    autogen.sh: Use autoreconf

 Makefile.am  |    2 +-
 autogen.sh   |  100 +++++++---------------------------------------------------
 configure.ac |    8 ++---
 3 files changed, 16 insertions(+), 94 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 99ee15d..2c9beb6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,5 @@
 ## Process this file with automake to produce Makefile.in
-ACLOCAL_AMFLAGS=-I m4
+ACLOCAL_AMFLAGS=-I m4 ${ACLOCAL_FLAGS}
 
 SUBDIRS = help tests
 
diff --git a/autogen.sh b/autogen.sh
index a6091f3..23de3f3 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,75 +1,12 @@
 #!/bin/sh
 # Run this to generate all the initial makefiles, etc.
 
-PROJECT=gtk-doc
-TEST_TYPE=-f
-FILE=gtk-doc.dsl.in
-
-# a silly hack that generates autoregen.sh but it's handy
-echo "#!/bin/sh" > autoregen.sh
-echo "./autogen.sh $@ \$@" >> autoregen.sh
-chmod +x autoregen.sh
-
-DIE=0
-
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
-
-THEDIR="`pwd`"
+test -n "$srcdir" || srcdir=`dirname "$0"`
+test -n "$srcdir" || srcdir=.
 
+olddir=`pwd`
 cd "$srcdir"
 
-(autoconf --version) < /dev/null > /dev/null 2>&1 || {
-	echo
-	echo "You must have autoconf installed to compile $PROJECT."
-	echo "Download the appropriate package for your distribution,"
-	echo "or get the source tarball at ftp://ftp.gnu.org/gnu/autoconf/";
-	DIE=1
-}
-
-if automake --version < /dev/null > /dev/null 2>&1; then
-    AUTOMAKE=automake
-    ACLOCAL=aclocal
-elif automake-1.11 --version < /dev/null > /dev/null 2>&1; then
-    AUTOMAKE=automake-1.11
-    ACLOCAL=aclocal-1.11
-elif automake-1.10 --version < /dev/null > /dev/null 2>&1; then
-    AUTOMAKE=automake-1.10
-    ACLOCAL=aclocal-1.10
-elif automake-1.9 --version < /dev/null > /dev/null 2>&1; then
-    AUTOMAKE=automake-1.9
-    ACLOCAL=aclocal-1.9
-elif automake-1.8 --version < /dev/null > /dev/null 2>&1; then
-    AUTOMAKE=automake-1.8
-    ACLOCAL=aclocal-1.8
-elif automake-1.7 --version < /dev/null > /dev/null 2>&1; then
-    AUTOMAKE=automake-1.7
-    ACLOCAL=aclocal-1.7
-elif automake-1.6 --version < /dev/null > /dev/null 2>&1; then
-    AUTOMAKE=automake-1.6
-    ACLOCAL=aclocal-1.6
-else
-	echo
-	echo "You must have automake installed to compile $PROJECT."
-	echo "Download the appropriate package for your distribution,"
-	echo "or get the source tarball at ftp://ftp.gnu.org/gnu/automake/";
-	DIE=1
-fi
-
-if test "$DIE" -eq 1; then
-	exit 1
-fi
-
-test $TEST_TYPE $FILE || {
-	echo "You must run this script in the top-level $PROJECT directory"
-	exit 1
-}
-
-if test "$#" = 0; 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
-
 if gnome-doc-prepare --version < /dev/null > /dev/null 2>&1; then
   echo "* Running gnome-doc-prepare"
   gnome-doc-prepare --copy --force --automake
@@ -77,26 +14,13 @@ else
   touch gnome-doc-utils.make
 fi
 
-# to support timj aclocal setup we are shipping gnome-doc-utils.m4
-# and making sure automake picks it up ;)
-# this is bad as -I prepends to the search path
-echo "* Running $ACLOCAL"
-$ACLOCAL $ACLOCAL_FLAGS -I m4 || exit $?
-
-echo "* Running autoconf"
-autoconf || exit $?
-# optionally feature autoheader
-#(autoheader --version)  < /dev/null > /dev/null 2>&1 && autoheader
-
-echo "* Running libtoolize"
-libtoolize --copy --force
-
-echo "* Running $AUTOMAKE"
-$AUTOMAKE --add-missing -Wno-portability $am_opt || exit $?
-
-cd "$THEDIR"
-
-$srcdir/configure --enable-maintainer-mode "$@" || exit $?
+AUTORECONF=`which autoreconf`
+if test -z $AUTORECONF; then
+        echo "*** No autoreconf found, please install it ***"
+        exit 1
+else
+        autoreconf --force --install --verbose || exit $?
+fi
 
-echo
-echo "Now type 'make install' to install $PROJECT."
+cd "$olddir"
+test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
diff --git a/configure.ac b/configure.ac
index 9dada11..a52679f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,8 +12,8 @@ AC_INIT([gtk-doc], [gtk_doc_version], [http://bugzilla.gnome.org/enter_bug.cgi?p
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_SRCDIR([gtkdoc-common.pl.in])
 
-AM_INIT_AUTOMAKE([check-news std-options])
-AM_MAINTAINER_MODE
+AM_INIT_AUTOMAKE([check-news std-options -Wno-portability])
+AM_MAINTAINER_MODE([enable])
 
 # Support silent build rules, requires at least automake-1.11. Disable
 # by either passing --disable-silent-rules to configure or passing V=1
@@ -24,9 +24,7 @@ dnl Forcing a non-null ACTION-IF-NOT-FOUND disables scrollkeeper if
 dnl gnome-doc-utils is not found but does not invalidate the build.
 GNOME_DOC_INIT([],[],enable_scrollkeeper=no)
 
-dnl make sure $ACLOCAL_FLAGS are used during a rebuild.
-AC_SUBST([ACLOCAL_AMFLAGS], ["\${ACLOCAL_FLAGS}"])
-
+# Check for programs
 AC_ISC_POSIX
 AC_PROG_CC
 AC_PROG_LIBTOOL



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]