[sound-juicer] Drop gnome-common dependency



commit 1d3a25aefba26f82b4ea0bd3c9eb0c63d0c007bb
Author: Phillip Wood <phillip wood dunelm org uk>
Date:   Thu Nov 10 10:22:23 2016 +0000

    Drop gnome-common dependency
    
    Use our own autogen.sh and the appropriate autoconf archive macros
    instead¹. Using AX_COMPILER_FLAGS turns on several new sets of compile
    warnings and means -Werror is on by default in non release builds.
    
    ¹ https://wiki.gnome.org/Projects/GnomeCommon/Migration
    
    https://bugzilla.gnome.org/show_bug.cgi?id=777692

 autogen.sh   |   40 ++++++++++++++++++++++++++++++----------
 configure.ac |    8 ++++++--
 2 files changed, 36 insertions(+), 12 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index 891a6ff..56ae61e 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,17 +1,37 @@
 #!/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)"
 
-(test -f $srcdir/src/sound-juicer.h) || {
-    echo "**Error**: Directory "\`$srcdir\'" does not look like the top-level sound-juicer directory"
-    exit 1
-}
+cd "$srcdir"
 
-which gnome-autogen.sh || {
-       echo "You need to install gnome-common from the GNOME CVS"
-       exit 1
+(test -f configure.ac) || {
+        echo "*** ERROR: Directory '$srcdir' does not look like the top-level project directory ***"
+        exit 1
 }
 
-REQUIRED_AUTOMAKE_VERSION=1.9 . gnome-autogen.sh
+# shellcheck disable=SC2016
+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
+
+aclocal --install || exit 1
+autoreconf --verbose --force --install || 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
diff --git a/configure.ac b/configure.ac
index f94dcfc..339a63f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,6 +2,10 @@ AC_INIT([Sound Juicer],[3.22.0],[http://bugzilla.gnome.org/enter_bug.cgi?product
 
 AC_PREREQ(2.60)
 
+AX_IS_RELEASE([git-directory])
+AX_REQUIRE_DEFINED([YELP_HELP_INIT])
+AX_REQUIRE_DEFINED([APPSTREAM_XML])
+
 AC_CONFIG_AUX_DIR([build-aux])
 
 AM_INIT_AUTOMAKE([1.9 subdir-objects no-dist-gzip dist-xz check-news])
@@ -13,7 +17,7 @@ AC_CONFIG_HEADERS([config.h])
 # Enable silent build when available (Automake 1.11)
 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
 
-GNOME_DEBUG_CHECK
+AX_CHECK_ENABLE_DEBUG([yes])
 
 AM_MAINTAINER_MODE([enable])
 
@@ -28,7 +32,7 @@ AC_HEADER_STDC
 AC_PROG_INSTALL
 AC_PROG_MKDIR_P
 
-GNOME_COMPILE_WARNINGS([maximum])
+AX_COMPILER_FLAGS([WARN_CFLAGS],[WARN_LDFLAGS])
 
 GTK_REQUIRED=3.21.6
 GLIB_GSETTINGS


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