[gnome-settings-daemon] build: Drop dependency on gnome-common



commit f67e21c6e4fd4db6197efd55f0111b9cc7741a3f
Author: Philip Withnall <withnall endlessm com>
Date:   Thu Feb 9 11:31:53 2017 +0000

    build: Drop dependency on gnome-common
    
    Move the autogen.sh script to be self-contained, so we drop our
    dependency on gnome-common.
    
    This does not (yet) port us to use any of the shiny new autoconf-archive
    macros, but since we invent our own (like EXTRA_COMPILE_WARNINGS) rather
    than using the gnome-common ones, the dependency is gone.
    
    See https://wiki.gnome.org/Projects/GnomeCommon/Migration.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=778383

 autogen.sh   |   56 ++++++++++++++++++++++++++++++--------------------------
 configure.ac |    1 +
 2 files changed, 31 insertions(+), 26 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index 37e774f..7e92e3e 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,38 +1,42 @@
 #!/bin/sh
 # Run this to generate all the initial makefiles, etc.
+test -n "$srcdir" || srcdir=$(dirname "$0")
+test -n "$srcdir" || srcdir=.
 
-REQUIRED_AUTOMAKE_VERSION=1.5
-USE_GNOME2_MACROS=1
+olddir=$(pwd)
 
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
+cd $srcdir
 
-olddir="`pwd`"
-
-PKG_NAME="gnome-settings-daemon"
-
-(test -f $srcdir/configure.ac \
-  && test -d $srcdir/gnome-settings-daemon \
-  && test -f $srcdir/gnome-settings-daemon/gnome-settings-bus.c) || {
-    echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
-    echo " top-level gnome-settings-daemon 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 the GNOME SVN"
-    exit 1
-}
+# shellcheck disable=SC2016
+PKG_NAME=$(autoconf --trace 'AC_INIT:$1' configure.ac)
 
-cd "$srcdir"
+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
 
 # Fetch submodules if needed
-if test ! -f plugins/media-keys/gvc/Makefile.am; then
-  echo "+ Setting up submodules"
-  git submodule init
-fi
-git submodule update
+git submodule update --init
 
-cd "$olddir"
+aclocal --install || exit 1
+glib-gettextize --force --copy || exit 1
+intltoolize --force --copy --automake || exit 1
+autoreconf --verbose --force --install || exit 1
 
-. gnome-autogen.sh
+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 257bbb6..0fcf608 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,6 +5,7 @@ AC_INIT([gnome-settings-daemon],
         [http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-settings-daemon])
 
 AC_CONFIG_SRCDIR([gnome-settings-daemon/gnome-settings-bus.c])
+AC_CONFIG_MACRO_DIR([m4])
 
 AM_INIT_AUTOMAKE([1.9 tar-ustar dist-xz no-dist-gzip check-news])
 AM_MAINTAINER_MODE([enable])


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