[gftp/autotools: 2/12] autogen.sh: Use autoreconf instead custom script



commit 98bab2d6611bc65514213f73c2c79cc220f04fa3
Author: Javier Jardón <jjardon gnome org>
Date:   Sun Sep 29 23:01:30 2013 +0100

    autogen.sh: Use autoreconf instead custom script

 autogen.sh |   94 ++++-------------------------------------------------------
 1 files changed, 7 insertions(+), 87 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index 124e14c..1eb1850 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -2,99 +2,19 @@
 # Run this to generate all the initial makefiles, etc.
 # This was derived from Glib's autogen.sh
 
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
+test -n "$srcdir" || srcdir=`dirname "$0"`
+test -n "$srcdir" || srcdir=.
 
 ORIGDIR=`pwd`
 cd $srcdir
-PROJECT=gFTP
-TEST_TYPE=-f
-FILE=lib/gftp.h
-GETTEXTIZE=gettextize
 
-DIE=0
-
-AUTOMAKE=automake
-ACLOCAL=aclocal
-AUTOCONF=autoconf
-AUTOHEADER=autoheader
-
-autoconf_version=`$AUTOCONF --version 2>/dev/null`
-if [ "x$autoconf_version" = "x" ] ; then 
-       echo
-       echo "GNU autoconf must be installed to build $PROJECT"
-       echo "GNU autoconf is available from http://www.gnu.org/software/autoconf/";
-       DIE=1
-fi
-
-automake_version=`$AUTOMAKE --version 2>/dev/null`
-if [ "x$automake_version" = "x" ] ; then 
-       echo
-       echo "GNU automake must be installed to build $PROJECT"
-       echo "GNU automake is available from http://www.gnu.org/software/automake/";
-       DIE=1
-fi
-
-gettext_version=`$GETTEXTIZE --version 2>/dev/null | grep 'GNU'`
-if [ "x$gettext_version" = "x" ] ; then 
-       echo
-       echo "GNU gettext must be installed to build $PROJECT"
-       echo "GNU gettext is available from http://www.gnu.org/software/gettext/";
-       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"
+AUTORECONF=`which autoreconf`
+if test -z $AUTORECONF; then
+       echo "*** No autoreconf found, please install it ***"
        exit 1
-}
-
-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
-*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
-esac
-
-intl=`$GETTEXTIZE --help 2>/dev/null | grep -- '--intl'`
-if test -z "$intl"; then
-       GETTEXTIZE_FLAGS="-c"
-else
-       GETTEXTIZE_FLAGS="-c --intl -f"
-fi
-
-echo "$GETTEXTIZE $GETTEXTIZE_FLAGS"
-$GETTEXTIZE $GETTEXTIZE_FLAGS
-
-mv Makefile.am~ Makefile.am
-mv configure.in~ configure.in
-
-ACLOCAL_FLAGS="-I m4"
-echo "$ACLOCAL $ACLOCAL_FLAGS"
-$ACLOCAL $ACLOCAL_FLAGS
-
-# optionally feature autoheader
-($AUTOHEADER --version)  < /dev/null > /dev/null 2>&1 && $AUTOHEADER
-
-AUTOMAKE_FLAGS="-a -c $am_opt"
-echo "$AUTOMAKE $AUTOMAKE_FLAGS"
-$AUTOMAKE $AUTOMAKE_FLAGS
-
-echo $AUTOCONF
-$AUTOCONF
+autoreconf --force --install --verbose || exit $?
 
 cd $ORIGDIR
-
-if test -z "$AUTOGEN_SUBDIR_MODE"; then
-        CFLAGS="-Wall -W -Wno-long-long -Wno-unused-parameter -ansi -D_GNU_SOURCE -O -g" $srcdir/configure 
"$@"
-
-        echo 
-        echo "Now type 'make' to compile $PROJECT."
-fi
+test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"


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