[gjs] build: Use modern pkg-config macros
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] build: Use modern pkg-config macros
- Date: Fri, 30 Sep 2016 20:06:10 +0000 (UTC)
commit 96aa7a527b58e051446b134fbab4e90ef4a0f2d3
Author: Philip Chimento <philip chimento gmail com>
Date: Wed Sep 28 18:44:52 2016 -0700
build: Use modern pkg-config macros
The PKG_INSTALLDIR macro is available in pkg-config 0.27 and
PKG_CHECK_VAR was introduced in 0.28, allowing for slightly cleaner build
code. This does not affect what version of pkg-config is required if you
build from a tarball.
If running autoconf to regenerate configure, you now require 0.28. There
is an even newer pkg-config macro to check what version of the M4 macros
you have, but I don't want to require 0.29 just to check for 0.28. (0.28
is four years old, while 0.29 was released this year.)
https://bugzilla.gnome.org/show_bug.cgi?id=772027
Makefile.am | 1 -
configure.ac | 4 ++--
2 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 4b1538f..75b1661 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -71,7 +71,6 @@ noinst_HEADERS += \
util/misc.h
########################################################################
-pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = gjs-1.0.pc gjs-internals-1.0.pc
EXTRA_DIST += \
diff --git a/configure.ac b/configure.ac
index b7bb0fd..0660395 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,6 +26,7 @@ AM_SILENT_RULES([yes])
# our first pkg-config invocation is conditional, ensure macros still work
PKG_PROG_PKG_CONFIG
+PKG_INSTALLDIR
AC_PROG_CXX
AX_CXX_COMPILE_STDCXX_11
@@ -105,8 +106,7 @@ AS_IF([test x$have_gtk = xyes], [
], [AS_IF([test "x$with_gtk" = "xyes"],
[AC_MSG_ERROR([GTK requested but not found])])])
-GI_DATADIR=$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0)
-AC_SUBST(GI_DATADIR)
+PKG_CHECK_VAR([GI_DATADIR], [gobject-introspection-1.0], [gidatadir])
# readline
LIBS_no_readline=$LIBS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]