[libgweather] Modernize Autotools



commit bc595df612e5990d68bc692fde65d4c786a9a9fb
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Mon Dec 21 13:30:39 2015 +0100

    Modernize Autotools
    
    Remove dependency on gnome-common, replace it with m4-common.

 Makefile.am  |    2 --
 autogen.sh   |   56 +++++++++++++++-----------------------------------------
 configure.ac |    8 +++-----
 3 files changed, 18 insertions(+), 48 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 683c20e..d91011a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,5 @@
 SUBDIRS = data libgweather schemas doc po po-locations
 
-ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
-
 AM_DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection
 
 EXTRA_DIST =           \
diff --git a/autogen.sh b/autogen.sh
index a21e354..d7ff533 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,55 +1,29 @@
 #!/bin/sh
 # Run this to generate all the initial makefiles, etc.
-
-PKG_NAME="libgweather"
-
 test -n "$srcdir" || srcdir=`dirname "$0"`
 test -n "$srcdir" || srcdir=.
 
 olddir=`pwd`
-cd "$srcdir"
-
-(test -f configure.ac \
-  && test -f $PKG_NAME.doap) || {
-    echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
-    echo " top-level $PKG_NAME directory"
-    exit 1
-}
 
-mkdir m4/
-
-GTKDOCIZE=$(which gtkdocize 2>/dev/null)
-if test -z $GTKDOCIZE; then
-        echo "You don't have gtk-doc installed, and thus won't be able to generate the documentation."
-        rm -f gtk-doc.make
-        cat > gtk-doc.make <<EOF
-EXTRA_DIST =
-CLEANFILES =
-EOF
-else
-        gtkdocize || exit $?
-fi
+cd $srcdir
 
-AUTORECONF=`which autoreconf`
-if test -z $AUTORECONF; then
-        echo "*** No autoreconf found, please install it ***"
+(test -f configure.ac) || {
+        echo "*** ERROR: Directory '$srcdir' does not look like the top-level project directory ***"
         exit 1
-fi
-
-# 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
-
-autoreconf --force --install --verbose || exit $?
-intltoolize --force --automake || exit $?
+}
 
-# Replace autopoint Makefile.in.in with intltool's one
+aclocal --install || exit 1
+gtkdocize --copy || exit 1
+intltoolize --force --copy --automake || exit 1
 sed -e 's/subdir = po/subdir = po-locations/' \
     -e 's/GETTEXT_PACKAGE = @GETTEXT_PACKAGE@/GETTEXT_PACKAGE = libgweather-locations/' \
     po/Makefile.in.in > po-locations/Makefile.in.in
+autoreconf --verbose --force --install -Wno-portability || exit 1
 
-# Now configure, if asked
-cd "$olddir"
-test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
-
+cd $olddir
+if [ "$NOCONFIGURE" = "" ]; then
+        $srcdir/configure "$@" || exit 1
+        echo "Now type 'make' to compile."
+else
+        echo "Skipping configure process."
+fi
diff --git a/configure.ac b/configure.ac
index 756add6..e097d4a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 m4_define(libgweather_major_version,   3)
-m4_define(libgweather_minor_version,  18)
+m4_define(libgweather_minor_version,  19)
 m4_define(libgweather_micro_version,  1)
 m4_define(libgweather_version, libgweather_major_version.libgweather_minor_version.libgweather_micro_version)
 
@@ -13,6 +13,7 @@ AC_PREREQ([2.64])
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_AUX_DIR([build-aux])
+AX_IS_RELEASE([minor-version])
 
 AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz tar-ustar])
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
@@ -55,7 +56,7 @@ AM_PROG_CC_C_O
 
 GLIB_GSETTINGS
 
-GNOME_COMPILE_WARNINGS([maximum])
+AX_COMPILER_FLAGS([WARN_CFLAGS],[WARN_LDFLAGS])
 
 PKG_CHECK_MODULES(DEPS, [gtk+-3.0 >= $GTK_REQUIRED
                          libxml-2.0 >= $LIBXML_REQUIRED
@@ -68,9 +69,6 @@ dnl -- check for glib; redundant at this point, but sets $GLIB_MKENUMS
 AM_PATH_GLIB_2_0($GLIB_REQUIRED)
 
 dnl gettext
-AM_GNU_GETTEXT_VERSION([0.18])
-AM_GNU_GETTEXT([external])
-
 IT_PROG_INTLTOOL([0.50.0])
 IT_PO_SUBDIR([po-locations])
 


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