[gjs/wip/ptomato/autotools] build: Use modern pkg-config macros



commit b2cc961907fa67c8dbc5283972ba096185b14ae6
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.)

 Makefile.am  |    1 -
 configure.ac |    4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 2ff8019..d4d8f5c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -72,7 +72,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 81209e2..8b571ab 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
@@ -89,8 +90,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]