summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2016-07-12 01:24:10 +0100
committerOndrej Holy <oholy@redhat.com>2016-08-11 08:16:01 +0200
commitc641009dec6873aed9bbc00c74936263148b5d4c (patch)
tree6c27a76e1535484384c4b8df3c29ec9b6862ca59
parentaf7c5516d3d1f4f38f28ee429c6ae568257fa4cc (diff)
downloadgvfs-c641009dec6873aed9bbc00c74936263148b5d4c.tar.gz
build: Use autoreconf instead custom script
The patch uses autogen.sh template from: https://wiki.gnome.org/Projects/GnomeCommon/Migration Modified by Ondrej Holy. https://bugzilla.gnome.org/show_bug.cgi?id=768707
-rw-r--r--.gitignore1
-rw-r--r--INSTALL0
-rwxr-xr-xautogen.sh135
3 files changed, 25 insertions, 111 deletions
diff --git a/.gitignore b/.gitignore
index da256a10..3f0d0cfb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -44,3 +44,4 @@ common/gvfsdbus.*
man/*.1
man/*.7
test-driver
+INSTALL
diff --git a/INSTALL b/INSTALL
deleted file mode 100644
index e69de29b..00000000
--- a/INSTALL
+++ /dev/null
diff --git a/autogen.sh b/autogen.sh
index c7b81cf6..bc7661ad 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,126 +1,39 @@
#!/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)
-ORIGDIR=`pwd`
cd $srcdir
-PROJECT=GVfs
-TEST_TYPE=-f
-FILE=client/gdaemonvfs.h
-DIE=0
-
-have_libtool=false
-if libtoolize --version < /dev/null > /dev/null 2>&1 ; then
- libtool_version=`libtoolize --version | sed 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
- case $libtool_version in
- 1.4*|1.5*|2.2*|2.4*)
- have_libtool=true
- ;;
- esac
-fi
-if $have_libtool ; then : ; else
- echo
- echo "You must have libtool 1.4 installed to compile $PROJECT."
- echo "Install the appropriate package for your distribution,"
- echo "or get the source tarball at http://ftp.gnu.org/gnu/libtool/"
- DIE=1
-fi
-
-(intltoolize --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "You must have intltool installed to compile $PROJECT."
- echo "Install the appropriate package for your distribution,"
- echo "or get the source tarball at http://ftp.gnome.org/pub/GNOME/sources/intltool"
- DIE=1
-}
-
-(gtkdocize --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "You must have gtk-doc installed to compile $PROJECT."
- echo "Install the appropriate package for your distribution,"
- echo "or get the source tarball at http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/"
- DIE=1
+(test -f configure.ac) || {
+ echo "*** ERROR: Directory '$srcdir' does not look like the top-level project directory ***"
+ exit 1
}
-(autoconf --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "You must have autoconf installed to compile $PROJECT."
- echo "Install the appropriate package for your distribution,"
- echo "or get the source tarball at http://ftp.gnu.org/gnu/autoconf/"
- DIE=1
-}
+# shellcheck disable=SC2016
+PKG_NAME=$(autoconf --trace 'AC_INIT:$1' configure.ac)
-if automake --version < /dev/null > /dev/null 2>&1 ; then
- AUTOMAKE=automake
- ACLOCAL=aclocal
-else
- echo
- echo "You must have automake 1.7.x installed to compile $PROJECT."
- echo "Install the appropriate package for your distribution,"
- echo "or get the source tarball at http://ftp.gnu.org/gnu/automake/"
- DIE=1
+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
-if test "$DIE" -eq 1; then
- exit 1
-fi
+aclocal --install || exit 1
+gtkdocize --copy || exit 1
+intltoolize --force --copy --automake || exit 1
+autoreconf --verbose --force --install || exit 1
-test $TEST_TYPE $FILE || {
- echo "You must run this script in the top-level $PROJECT directory"
- exit 1
-}
+cd "$olddir"
+if [ "$NOCONFIGURE" = "" ]; then
+ $srcdir/configure "$@" || 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."
+ if [ "$1" = "--help" ]; then exit 0 else
+ echo "Now type 'make' to compile $PKG_NAME" || exit 1
fi
-fi
-
-if test -z "$ACLOCAL_FLAGS"; then
-
- acdir=`$ACLOCAL --print-ac-dir`
- m4list="glib-2.0.m4 glib-gettext.m4"
-
- for file in $m4list
- do
- if [ ! -f "$acdir/$file" ]; then
- echo "WARNING: aclocal's directory is $acdir, but..."
- echo " no file $acdir/$file"
- echo " You may see fatal macro warnings below."
- echo " If these files are installed in /some/dir, set the ACLOCAL_FLAGS "
- echo " environment variable to \"-I /some/dir\", or install"
- echo " $acdir/$file."
- echo ""
- fi
- done
-fi
-
-rm -rf autom4te.cache
-
-# README and INSTALL are required by automake, but may be deleted by clean
-# up rules. to get automake to work, simply touch these here, they will be
-# regenerated from their corresponding *.in files by ./configure anyway.
-touch README INSTALL
-
-libtoolize --force --copy || exit $?
-intltoolize --force --copy --automake || exit $?
-gtkdocize --copy || exit $?
-
-$ACLOCAL $ACLOCAL_FLAGS || exit $?
-
-autoheader || exit $?
-
-$AUTOMAKE --add-missing || exit $?
-autoconf || exit $?
-cd $ORIGDIR || exit $?
-
-if test -z "$AUTOGEN_SUBDIR_MODE" && test -z "$NOCONFIGURE"; then
- $srcdir/configure $AUTOGEN_CONFIGURE_ARGS "$@" || exit $?
-
- echo
- echo "Now type 'make' to compile $PROJECT."
+else
+ echo "Skipping configure process."
fi