summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberts Muktupāvels <alberts.muktupavels@gmail.com>2016-11-12 10:41:45 +0200
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2017-04-26 14:32:15 +0300
commite124d7a8c9afc2886add6c5abc6b55c943f803ca (patch)
tree37168887a4f0c047626ed3c49f54e13de3e00162
parentc8c10b8966e6e339187b3c11a4ae56f0ee9c2874 (diff)
downloadlibwnck-e124d7a8c9afc2886add6c5abc6b55c943f803ca.tar.gz
build: don't use gnome-autogen.sh
https://wiki.gnome.org/Projects/GnomeCommon/Migration
-rwxr-xr-xautogen.sh51
-rw-r--r--configure.ac6
-rw-r--r--libwnck/Makefile.am7
3 files changed, 45 insertions, 19 deletions
diff --git a/autogen.sh b/autogen.sh
index 6d156e7..e927ec6 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,23 +1,44 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
-srcdir=`dirname $0`
+srcdir=$(dirname "$0")
test -z "$srcdir" && srcdir=.
-PKG_NAME="libwnck"
-REQUIRED_AUTOMAKE_VERSION=1.9
-REQUIRED_M4MACROS=introspection.m4
+if [ ! -f $srcdir/configure.ac ]; then
+ echo "**Error**: Directory "\'$srcdir\'" does not look like the top-level" \
+ "project directory."
+ exit 1
+fi
-(test -f $srcdir/configure.ac \
- && test -f $srcdir/$PKG_NAME.doap) || {
- echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
- echo " top-level $PKG_NAME directory"
- exit 1
-}
+olddir=$(pwd)
+cd "$srcdir"
-which gnome-autogen.sh || {
- echo "You need to install gnome-common."
- exit 1
-}
+PKG_NAME=$(autoconf --trace 'AC_INIT:$1' "$srcdir/configure.ac")
-. gnome-autogen.sh
+if [ "$#" = 0 ] && [ -z "$NOCONFIGURE" ]; 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 '$0'" \
+ "command line." >&2
+fi
+
+set -x
+aclocal --install || exit 1
+glib-gettextize --force --copy || exit 1
+gtkdocize --copy || exit 1
+intltoolize --force --copy --automake || exit 1
+autoreconf --verbose --force --install -Wno-portability || exit 1
+{ set +x; } 2>/dev/null
+
+if [ -z "$NOCONFIGURE" ]; then
+ set -x
+ $srcdir/configure "$@" || exit 1
+ { set +x; } 2>/dev/null
+
+ 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 c1a95b5..973eeb2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,13 +9,15 @@ m4_define([wnck_version],
AC_INIT([libwnck], [wnck_version],
[http://bugzilla.gnome.org/enter_bug.cgi?product=libwnck])
+AX_IS_RELEASE([git-directory])
+
AC_CONFIG_HEADERS(config.h)
AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz tar-ustar])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_CONFIG_MACRO_DIR([m4])
-GNOME_MAINTAINER_MODE_DEFINES
+AX_CHECK_ENABLE_DEBUG([yes])
dnl libtool versioning for libwnck
@@ -49,7 +51,7 @@ IT_PROG_INTLTOOL([0.40.6])
AC_PROG_CC
-GNOME_COMPILE_WARNINGS([maximum])
+AX_COMPILER_FLAGS([WARN_CFLAGS], [WARN_LDFLAGS])
AC_ARG_ENABLE(deprecation_flags,
[AC_HELP_STRING([--enable-deprecation-flags],
diff --git a/libwnck/Makefile.am b/libwnck/Makefile.am
index 06a9161..d293092 100644
--- a/libwnck/Makefile.am
+++ b/libwnck/Makefile.am
@@ -97,7 +97,10 @@ libwnck_3_la_LIBADD = \
libwnck_3_la_LDFLAGS = \
-version-info $(LIBWNCK_CURRENT):$(LIBWNCK_REVISION):$(LIBWNCK_AGE) \
-no-undefined \
- -export-symbols-regex "^[^_].*"
+ -export-symbols-regex "^[^_].*" \
+ $(WARN_LDFLAGS) \
+ $(AM_LDFLAGS) \
+ $(NULL)
wnckprop_SOURCES = wnckprop.c
wnck_urgency_monitor_SOURCES = wnck-urgency-monitor.c
@@ -180,7 +183,7 @@ Wnck-3.0.gir: libwnck-3.la
Wnck_3_0_gir_INCLUDES = GObject-2.0 GdkPixbuf-2.0 Gtk-3.0
Wnck_3_0_gir_CFLAGS = $(libwnck_3_la_CPPFLAGS)
Wnck_3_0_gir_LIBS = libwnck-3.la
-Wnck_3_0_gir_SCANNERFLAGS = --pkg-export=libwnck-3.0
+Wnck_3_0_gir_SCANNERFLAGS = --pkg-export=libwnck-3.0 $(WARN_SCANNERFLAGS)
Wnck_3_0_gir_FILES = $(introspection_sources)
INTROSPECTION_GIRS += Wnck-3.0.gir