summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Fergeau <teuf@gnome.org>2004-08-30 18:16:39 +0000
committerChristophe Fergeau <teuf@gnome.org>2004-08-30 18:16:39 +0000
commita088af610aafdc597692f82ffb28f1e88dfeccf0 (patch)
treea37a4fb94dc3675f28d1b205f1bf0c3d2aa23a51
parentda9ac1f5f5ab4e3ce05d7e33cc9757f77f8a2118 (diff)
2004-08-30 Christophe Fergeau <teuf@gnome.org>Release-0-15
* Makefile.am: * configure.in: use m4 macros provided by pkg-config instead of using our own
-rw-r--r--ChangeLog6
-rw-r--r--Makefile.am4
-rw-r--r--configure.in62
3 files changed, 23 insertions, 49 deletions
diff --git a/ChangeLog b/ChangeLog
index 18f3ed0..fc35706 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2004-08-30 Christophe Fergeau <teuf@gnome.org>
+ * Makefile.am:
+ * configure.in: use m4 macros provided by pkg-config instead of using
+ our own
+
+2004-08-30 Christophe Fergeau <teuf@gnome.org>
+
* NEWS:
* configure.in: raised version number, updated NEWS file
diff --git a/Makefile.am b/Makefile.am
index 652ebe6..2c437b2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -25,8 +25,8 @@ EXTRA_DIST = \
CLEANFILES = intltool-extract intltool-merge intltool-update freedesktop.org.xml
-CFLAGS = @CFLAGS@ `@PKG_CONFIG@ --cflags libxml-2.0 glib-2.0`
-LDFLAGS = @LDFLAGS@ `@PKG_CONFIG@ --libs libxml-2.0 glib-2.0`
+CFLAGS = $(ALL_CFLAGS)
+LDFLAGS = $(ALL_LIBS)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = shared-mime-info.pc
diff --git a/configure.in b/configure.in
index b2bddb6..4888238 100644
--- a/configure.in
+++ b/configure.in
@@ -1,59 +1,30 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(freedesktop.org.xml.in)
-AM_INIT_AUTOMAKE(shared-mime-info, 0.14)
-
-AC_PROG_INTLTOOL
+AM_INIT_AUTOMAKE(shared-mime-info, 0.15)
AM_CONFIG_HEADER(config.h)
+dnl Checks for programs.
+AC_PROG_CC
+
+dnl Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+
+
+dnl i18n
+AC_PROG_INTLTOOL
GETTEXT_PACKAGE=shared-mime-info
AC_SUBST(GETTEXT_PACKAGE)
ALL_LINGUAS="az cs cy de el fi fr hu ko nl nn no sv sr"
AM_GLIB_GNU_GETTEXT
dnl Check pkg-config is installed
-if test -z "$PKG_CONFIG"; then
- PKG_CONFIG=pkg-config
-fi
-AC_SUBST(PKG_CONFIG)
-
-AC_MSG_CHECKING(that pkg-config runs)
-if "$PKG_CONFIG" --version > /dev/null 2>&1 ; then
- AC_MSG_RESULT(yes)
-else
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([*** $PKG_CONFIG missing ***
-
-\'$PKG_CONFIG --version\' failed to run - make sure it is inside one of the
-directories in your PATH environment variable!
-
-pkg-config is available from this web page:
-
-http://www.freedesktop.org/software/pkgconfig
-])
-fi
-
-AC_DEFUN(REQUIRE, [
-AC_MSG_CHECKING(that $1 (version >= $2) is installed)
-if "$PKG_CONFIG" --atleast-version=$2 $1 ; then
- AC_MSG_RESULT(yes)
-else
- AC_MSG_RESULT(no)
- if "$PKG_CONFIG" --exists $1 ; then
- AC_MSG_ERROR(Current version is only `"$PKG_CONFIG" "$1" --modversion`)
- else
- AC_MSG_ERROR(Package is not installed)
- fi
-fi
-])
-
-dnl Check for libxml and glib
-REQUIRE(libxml-2.0, 2.4.0)
-REQUIRE(glib-2.0, 2.0.0)
-
-dnl Checks for programs.
-AC_PROG_CC
+PKG_CHECK_MODULES(ALL, \
+ libxml-2.0 >= 2.4 \
+ glib-2.0 >= 2.0.0)
+AC_SUBST (ALL_CFLAGS)
+AC_SUBST (ALL_LIBS)
dnl Use -Wall, etc if possible
[
@@ -71,9 +42,6 @@ AC_ARG_ENABLE(update-mimedb,
enable_update_mimedb=yes)
AM_CONDITIONAL(ENABLE_UPDATE_MIMEDB, test x$enable_update_mimedb = xyes)
-dnl Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-
mimedir=['${datadir}/mime']
AC_SUBST(mimedir)