[gcab] build-sys: simplify



commit 2aadc9743f6ff78f6e1529aa27f9dd0c492ba3e1
Author: Marc-Andrà Lureau <marcandre lureau gmail com>
Date:   Mon Jan 21 17:00:34 2013 +0100

    build-sys: simplify

 Makefile.am  |    4 ++--
 configure.ac |   27 ++++++++++-----------------
 2 files changed, 12 insertions(+), 19 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 325d2bc..d78367f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -13,7 +13,7 @@ AM_CPPFLAGS =					\
 	-DLOCALEDIR="\"$(datadir)/locale\""	\
 	$(NULL)
 
-AM_CFLAGS = $(GLIB2_CFLAGS)
+AM_CFLAGS = $(GLIB_CFLAGS)
 
 libgcab_includedir = $(includedir)/libgcab-1.0
 libgcab_priv_includedir = $(libgcab_includedir)/libgcab
@@ -40,7 +40,7 @@ libgcab_1_0_la_SOURCES =			\
 	libgcab/glib-compat.c			\
 	libgcab/glib-compat.h			\
 	$(NULL)
-libgcab_1_0_la_LIBADD = -lz $(GLIB2_LIBS)
+libgcab_1_0_la_LIBADD = -lz $(GLIB_LIBS)
 libgcab_1_0_la_LDFLAGS =				\
 	-version-info 0:0:0				\
 	-export-symbols-regex='^gcab_'			\
diff --git a/configure.ac b/configure.ac
index 5807c1a..a2e0591 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,34 +18,27 @@ PKG_PROG_PKG_CONFIG
 GOBJECT_INTROSPECTION_CHECK([0.9.4])
 AM_CONDITIONAL([GIR], [test "x$INTROSPECTION_MAKEFILE" != x])
 
-IT_PROG_INTLTOOL(0.40.0)
+IT_PROG_INTLTOOL([0.40.0])
 GETTEXT_PACKAGE=AC_PACKAGE_NAME
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[The name of the gettext domain])
-AM_GNU_GETTEXT([external])
-AM_GNU_GETTEXT_VERSION([0.17])
-
-AM_MISSING_PROG([AUTOM4TE], [autom4te])
-AC_CONFIG_TESTDIR([.])
-AC_CONFIG_FILES([atlocal])
-AC_CONFIG_FILES([tests/package.m4.tmp:tests/package.m4.in],
-                [$srcdir/build-aux/move-if-change tests/package.m4.tmp $srcdir/tests/package.m4
-                 cp $srcdir/tests/package.m4 tests/package.m4.tmp])
-
+AM_GLIB_GNU_GETTEXT
 
+AM_PATH_GLIB_2_0([2.22.0], [], [AC_MSG_ERROR([glib required])], [gio])
 AM_PROG_VALAC([0.14])
 AC_PATH_PROG(VAPIGEN, vapigen, no)
 AC_SUBST(VAPIGEN)
 AM_CONDITIONAL([VAPI], [test "x$VAPIGEN" != xno])
 
-GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
-AC_SUBST(GLIB_MKENUMS)
+AC_CHECK_HEADERS([zlib.h], [], [AC_MSG_ERROR([zlib required])])
 
-PKG_CHECK_MODULES(GLIB2, glib-2.0 >= 2.22 gio-2.0 >= 2.22)
-AC_SUBST(GLIB2_CFLAGS)
-AC_SUBST(GLIB2_LIBS)
+AM_MISSING_PROG([AUTOM4TE], [autom4te])
+AC_CONFIG_TESTDIR([.])
+AC_CONFIG_FILES([atlocal])
+AC_CONFIG_FILES([tests/package.m4.tmp:tests/package.m4.in],
+                [$srcdir/build-aux/move-if-change tests/package.m4.tmp $srcdir/tests/package.m4
+                 cp $srcdir/tests/package.m4 tests/package.m4.tmp])
 
-AC_CHECK_HEADERS([zlib.h], [], [AC_MSG_ERROR([zlib required])])
 
 AC_OUTPUT([
   Makefile



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