Let's use an autogen.sh based on libosinfo's one, which is cleaner and
matches the current GNOME guidelines.
Signed-off-by: Fabiano FidĂȘncio <fidencio(a)redhat.com>
---
.gitignore | 3 +++
autogen.sh | 58 +++++++++++++++++++++++-------------------------------
2 files changed, 28 insertions(+), 33 deletions(-)
diff --git a/.gitignore b/.gitignore
index de89c4d..4b9467e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,11 +19,14 @@ Makefile.in
*.la
*~
*.orig
+m4/gtk-doc.m4
+m4/introspection.m4
m4/ltsugar.m4
m4/lt~obsolete.m4
m4/libtool.m4
m4/ltversion.m4
m4/ltoptions.m4
+m4/pkg.m4
autom4te.cache
config.*
COPYING
diff --git a/autogen.sh b/autogen.sh
index 3b593ce..bf037f0 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,43 +1,26 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
+test -n "$srcdir" || srcdir=$(dirname "$0")
+test -n "$srcdir" || srcdir=.
-set -e
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
+olddir=$(pwd)
-THEDIR=`pwd`
-cd $srcdir
+cd "$srcdir"
-DIE=0
-
-for prog in autoreconf automake autoconf libtoolize
-do
- ($prog --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "You must have $prog installed to compile libvirt-glib."
- DIE=1
- }
-done
-
-if test "$DIE" -eq 1; then
- exit 1
-fi
-
-if test -z "$*"; then
- echo "I am going to run ./configure with no args - if you "
- echo "wish to pass any extra arguments to it, please specify them on "
- echo "the $0 command line."
-fi
+(test -f libvirt-glib/libvirt-glib-main.c) || {
+ echo -n "**Error**: Directory "\`$srcdir\'" does not look like
the"
+ echo " top-level libvirt-glib directory"
+ exit 1
+}
# Real ChangeLog/AUTHORS is auto-generated from GIT logs at
# make dist time, but automake requires that it
# exists at all times :-(
touch ChangeLog AUTHORS
-mkdir -p build-aux
-autoreconf -if
-
-cd $THEDIR
+aclocal --install || exit 1
+gtkdocize --copy || exit 1
+autoreconf --verbose --force --install || exit 1
if test "x$1" = "x--system"; then
shift
@@ -51,7 +34,16 @@ if test "x$1" = "x--system"; then
EXTRA_ARGS="--prefix=$prefix --sysconfdir=$sysconfdir
--localstatedir=$localstatedir --libdir=$libdir"
fi
-$srcdir/configure $EXTRA_ARGS "$@" && {
- echo
- echo "Now type 'make' to compile libvirt-glib."
-}
+cd "$olddir"
+
+if [ "$NOCONFIGURE" = "" ]; then
+ $srcdir/configure $EXTRA_ARGS "$@" || 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
--
2.21.0