[goobox] autogen.sh: do not use gnome-autogen.sh



commit 00b611ec100ee23c0b2ad2f66e98cd75a83b8542
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sun Sep 18 15:58:08 2016 +0200

    autogen.sh: do not use gnome-autogen.sh

 autogen.sh   |   44 ++++++++++++++++++++++++++++++++++----------
 configure.ac |    2 +-
 2 files changed, 35 insertions(+), 11 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index fc1676d..5684d0d 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,15 +1,39 @@
 #!/bin/sh
-srcdir=`dirname $0`
-[ -z "$srcdir" ] && srcdir=.
+# Run this to generate all the initial makefiles, etc.
+test -n "$srcdir" || srcdir=$(dirname "$0")
+test -n "$srcdir" || srcdir=.
 
-if [ ! -f "$srcdir/configure.ac" ]; then
- echo "$srcdir doesn't look like source directory for $PKG_NAME" >&2
- exit 1
-fi
+olddir=$(pwd)
+
+cd $srcdir
 
-which gnome-autogen.sh || {
-       echo "You need to install gnome-common from GNOME Git"
-       exit 1
+(test -f configure.ac) || {
+        echo "*** ERROR: Directory '$srcdir' does not look like the top-level project directory ***"
+        exit 1
 }
 
-. gnome-autogen.sh "$@"
+# shellcheck disable=SC2016
+PKG_NAME=$(autoconf --trace 'AC_INIT:$1' configure.ac)
+
+if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
+        echo "*** WARNING: I am going to run 'configure' with no arguments." >&2
+        echo "*** If you wish to pass any to it, please specify them on the" >&2
+        echo "*** '$0' command line." >&2
+        echo "" >&2
+fi
+
+aclocal --install || exit 1
+glib-gettextize --force --copy || exit 1
+intltoolize --force --copy --automake || exit 1
+autoreconf --verbose --force --install || exit 1
+
+cd "$olddir"
+if [ "$NOCONFIGURE" = "" ]; then
+        $srcdir/configure "$@" || exit 1
+
+        if [ "$1" = "--help" ]; then exit 0 else
+                echo "Now type 'make' to compile $PKG_NAME" || exit 1
+        fi
+else
+        echo "Skipping configure process."
+fi
diff --git a/configure.ac b/configure.ac
index 8065ad4..e9ca1c7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,11 +7,11 @@ AC_CONFIG_SRCDIR([config.h.in])
 AC_CONFIG_HEADER([config.h])
 AC_CONFIG_MACRO_DIR([m4])
 AC_SUBST([ACLOCAL_AMFLAGS], ["-I $ac_macro_dir \${ACLOCAL_FLAGS}"])
+AX_REQUIRE_DEFINED([YELP_HELP_INIT])
 
 AC_PROG_CXX
 AM_PROG_LIBTOOL
 YELP_HELP_INIT
-GNOME_MAINTAINER_MODE_DEFINES
 GLIB_GSETTINGS
 
 GLIB_REQUIRED=2.36


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