]> saetta.ns0.it Git - reptool/libreptool/commitdiff
New autogen.sh.
authorAndrea Zagli <azagli@libero.it>
Sat, 21 Jan 2017 09:49:34 +0000 (10:49 +0100)
committerAndrea Zagli <azagli@libero.it>
Sat, 21 Jan 2017 09:49:34 +0000 (10:49 +0100)
autogen.sh

index 4cdba58f2dfb4245071be63ea93519aede73b92e..83f5de2eff99d76076f1d617e180c5f07d309433 100755 (executable)
@@ -1,23 +1,44 @@
-#!/bin/bash
+#!/bin/sh
 # Run this to generate all the initial makefiles, etc.
+test -n "$srcdir" || srcdir=`dirname "$0"`
+test -n "$srcdir" || srcdir=.
 
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
+olddir=`pwd`
 
-PKG_NAME="libreptool"
+cd $srcdir
 
-(test -f $srcdir/configure.ac \
-  && test -d $srcdir/src \
-  && test -f $srcdir/src/libreptool.h) || {
-    echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
-    echo " top-level libreptool directory"
-    exit 1
+(test -f configure.ac) || {
+        echo "*** ERROR: Directory "\`$srcdir\'" does not look like the top-level project directory ***"
+        exit 1
 }
 
-which gnome-autogen.sh || {
-    echo "You need to install gnome-common from GNOME and make"
-    echo "sure the gnome-autogen.sh script is in your \$PATH."
-    exit 1
-}
+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
+
+set -x
+aclocal --install || exit 1
+glib-gettextize --force --copy || exit 1
+#gtkdocize --copy || exit 1
+intltoolize --force --copy --automake || exit 1
+autoreconf --verbose --force --install -Wno-portability || 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
 
-USE_GNOME2_MACROS=1 . gnome-autogen.sh
+{ set +x; } 2>/dev/null