[gnome-weather] Modernize autotools



commit e76617943c49548b1bccc81a3df63ed4d2def9bd
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Mon Dec 21 12:32:00 2015 +0100

    Modernize autotools
    
    And remove dependency on gnome-common

 Makefile.am  |    1 -
 autogen.sh   |   34 +++++++++++++++++-----------------
 configure.ac |    4 ++++
 3 files changed, 21 insertions(+), 18 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index f4650c0..ee00883 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,3 @@
-ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
 DISTCHECK_CONFIGURE_FLAGS = --disable-dogtail
 
 SUBDIRS = po data src tests
diff --git a/autogen.sh b/autogen.sh
index fdf163f..9e6c2cf 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,24 +1,24 @@
 #!/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`
+cd $srcdir
 
-PKG_NAME="gnome-weather"
-
-test -f $srcdir/configure.ac || {
-    echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
-    echo " top-level gnome-weather 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 Git (or from"
-    echo "your OS vendor's package manager)."
-    exit 1
-}
+aclocal --install || exit 1
+intltoolize --force --copy --automake || exit 1
+autoreconf --verbose --force --install -Wno-portability || exit 1
 
-(cd "$srcdir" ;
-test -d m4 || mkdir m4/ ;
-)
-. gnome-autogen.sh
+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 2d4d437..e223c0b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,6 +5,7 @@ AC_INIT([org.gnome.Weather],[3.19.1],
        [https://wiki.gnome.org/Apps/Weather])
 
 AC_CONFIG_MACRO_DIR([m4])
+AX_IS_RELEASE([minor-version])
 
 AM_INIT_AUTOMAKE([1.12 dist-xz no-dist-gzip foreign tar-ustar no-define serial-tests -Wno-portability])
 # revert automake using PACKAGE_TARNAME instead of PACKAGE_NAME
@@ -19,8 +20,11 @@ AC_PROG_LN_S
 
 PKG_PROG_PKG_CONFIG([0.22])
 
+AX_REQUIRE_DEFINED([APPSTREAM_XML])
 APPSTREAM_XML
+AX_REQUIRE_DEFINED([GLIB_GSETTINGS])
 GLIB_GSETTINGS
+AX_REQUIRE_DEFINED([GOBJECT_INTROSPECTION_REQUIRE])
 GOBJECT_INTROSPECTION_REQUIRE([1.35.9])
 GJS_MIN_VERSION=1.39.91
 PKG_CHECK_MODULES([DEPS], [gdk-3.0


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