From 43085117bb19b480c0fb1e42f0d27ef137e4a4b0 Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Sat, 16 Apr 2016 09:41:36 +0200 Subject: [PATCH] build: Drop dependency on gnome-common and some minor updates --- Makefile.am | 2 ++ autogen.sh | 58 ++++++++++++++++++++++++------------------------- configure.ac | 11 +++++++--- src/Makefile.am | 2 +- 4 files changed, 39 insertions(+), 34 deletions(-) diff --git a/Makefile.am b/Makefile.am index 0c0535ee..13d4c56c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,7 @@ include $(top_srcdir)/Makefile.common +ACLOCAL_AMFLAGS = --install -I m4 ${ACLOCAL_FLAGS} + SUBDIRS = \ data \ lib \ diff --git a/autogen.sh b/autogen.sh index bce92604..634216fe 100755 --- a/autogen.sh +++ b/autogen.sh @@ -4,37 +4,35 @@ srcdir=`dirname $0` test -z "$srcdir" && srcdir=. -PKG_NAME="gala" - -(test -f $srcdir/configure.ac \ - && test -f $srcdir/autogen.sh) || { - echo -n "**Error**: Directory \`$srcdir' does not look like the" - echo " top-level $PKG_NAME directory" - exit 1 +(test -f $srcdir/configure.ac) || { + echo "**Error**: Directory "\`$srcdir\'" does not look like the top-level project directory" + exit 1 } -if which gnome-autogen.sh ; then - REQUIRED_AUTOMAKE_VERSION=1.11 . gnome-autogen.sh -else - if which intltoolize && which autoreconf ; then - intltoolize --copy --force --automake || \ - (echo "There was an error in running intltoolize." > /dev/stderr; - exit 1) - autoreconf --force --install || \ - (echo "There was an error in running autoreconf." > /dev/stderr; - exit 1) - else - echo "No build script available. You have two choices:" - echo "1. You need to install the gnome-common module and make" - echo " sure the gnome-autogen.sh script is in your \$PATH." - echo "2. You need to install the following scripts:" - echo " * intltool" - echo " * libtool" - echo " * automake" - echo " * autoconf" - echo " Additionally, you need to make" - echo " sure that they are in your \$PATH." - exit 1 - fi +PKG_NAME=`autoconf --trace 'AC_INIT:$1' "$srcdir/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 + +set -x +aclocal --install || exit 1 +intltoolize --force --copy --automake || exit 1 +autoreconf --verbose --force --install -Wno-portability || exit 1 +set +x + +if [ "$NOCONFIGURE" = "" ]; then + set -x + $srcdir/configure "$@" || exit 1 + set +x + + 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 bcca0950..67adc30a 100644 --- a/configure.ac +++ b/configure.ac @@ -44,14 +44,19 @@ AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS(config.h) AC_CONFIG_SRCDIR([configure.ac]) AM_INIT_AUTOMAKE([1.11 tar-ustar dist-xz no-dist-gzip -Wno-portability subdir-objects]) -AM_MAINTAINER_MODE + +AM_MAINTAINER_MODE([enable]) AC_PROG_CC AM_PROG_CC_C_O -AC_DISABLE_STATIC -LT_INIT +AC_PROG_INSTALL + +LT_PREREQ([2.2.6]) +LT_INIT([disable-static]) PKG_PROG_PKG_CONFIG([0.21]) +LT_LIB_M + GLIB_GSETTINGS AC_SUBST([CFLAGS]) diff --git a/src/Makefile.am b/src/Makefile.am index 002ae3d4..54fc1222 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -25,7 +25,7 @@ gala_CFLAGS = \ $(NULL) gala_LDADD = \ - -lm \ + $(LIBM) \ $(GALA_CORE_LIBS) \ $(top_builddir)/lib/libgala.la \ $(NULL)