[telepathy-account-widgets] build: Don't hard code the name of the pkg-config binary



commit f2d99ae83eab8a0aacd9d9d191a219c9af6536fb
Author: Saleem Abdulrasool <compnerd compnerd org>
Date:   Fri Jan 22 11:18:46 2016 -0800

    build: Don't hard code the name of the pkg-config binary
    
    Use the PKG_CONFIG variable to refer to pkg-config as it may be target
    triple prefixed.  This is needed for cross-compilation.  This also makes the use
    of tool to access particular variables uniform as there were some instances of
    $PKG_CONFIG already.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=761000

 configure.ac |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 7a5b070..3507d5b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,6 +70,8 @@ AC_PATH_XTRA
 LT_PREREQ([2.2])
 LT_INIT
 
+PKG_PROG_PKG_CONFIG([0.25])
+
 GLIB_GSETTINGS
 
 GLIB_COMPILE_RESOURCES=`$PKG_CONFIG gio-2.0 --variable=glib_compile_resources`
@@ -312,35 +314,35 @@ if test "x$enable_ubuntu_online_accounts" != "xno"; then
 
    # provider plugin dir
    AC_MSG_CHECKING([Accounts provider plugin dir])
-   ACCOUNTS_PROVIDER_PLUGIN_DIR=`pkg-config --variable=provider_plugindir account-plugin`
+   ACCOUNTS_PROVIDER_PLUGIN_DIR=`$PKG_CONFIG --variable=provider_plugindir account-plugin`
 
    AC_MSG_RESULT([$ACCOUNTS_PROVIDER_PLUGIN_DIR])
    AC_SUBST(ACCOUNTS_PROVIDER_PLUGIN_DIR)
 
    # app plugin dir
    AC_MSG_CHECKING([Accounts provider app plugin dir])
-   ACCOUNTS_APP_PLUGIN_DIR=`pkg-config --variable=application_plugindir account-plugin`
+   ACCOUNTS_APP_PLUGIN_DIR=`$PKG_CONFIG --variable=application_plugindir account-plugin`
 
    AC_MSG_RESULT([$ACCOUNTS_APP_PLUGIN_DIR])
    AC_SUBST(ACCOUNTS_APP_PLUGIN_DIR)
 
    # provider files dir
    AC_MSG_CHECKING([Accounts provider files dir])
-   ACCOUNTS_PROVIDER_FILES_DIR=`pkg-config --variable=providerfilesdir libaccounts-glib`
+   ACCOUNTS_PROVIDER_FILES_DIR=`$PKG_CONFIG --variable=providerfilesdir libaccounts-glib`
 
    AC_MSG_RESULT([$ACCOUNTS_PROVIDER_FILES_DIR])
    AC_SUBST(ACCOUNTS_PROVIDER_FILES_DIR)
 
    # service files dir
    AC_MSG_CHECKING([Accounts service files dir])
-   ACCOUNTS_SERVICE_FILES_DIR=`pkg-config --variable=servicefilesdir libaccounts-glib`
+   ACCOUNTS_SERVICE_FILES_DIR=`$PKG_CONFIG --variable=servicefilesdir libaccounts-glib`
 
    AC_MSG_RESULT([$ACCOUNTS_SERVICE_FILES_DIR])
    AC_SUBST(ACCOUNTS_SERVICE_FILES_DIR)
 
    # application files dir
    AC_MSG_CHECKING([Accounts applications files dir])
-   ACCOUNTS_APPLICATION_FILES_DIR=`pkg-config --variable=applicationfilesdir libaccounts-glib`
+   ACCOUNTS_APPLICATION_FILES_DIR=`$PKG_CONFIG --variable=applicationfilesdir libaccounts-glib`
 
    AC_MSG_RESULT([$ACCOUNTS_APPLICATION_FILES_DIR])
    AC_SUBST(ACCOUNTS_APPLICATION_FILES_DIR)
@@ -363,7 +365,7 @@ AM_CONDITIONAL(HAVE_UOA, test "x$have_uoa" = "xyes")
 
 if test "x$have_uoa" = "xyes" -o "x$have_goa" = "xyes"; then
    AC_MSG_CHECKING([Mission Control plugins dir])
-   MISSION_CONTROL_PLUGINS_DIR=${libdir}/mission-control-plugins.`pkg-config --variable=MCP_ABI_VERSION 
mission-control-plugins`
+   MISSION_CONTROL_PLUGINS_DIR=${libdir}/mission-control-plugins.`$PKG_CONFIG --variable=MCP_ABI_VERSION 
mission-control-plugins`
 
    AC_MSG_RESULT([$MISSION_CONTROL_PLUGINS_DIR])
    AC_SUBST(MISSION_CONTROL_PLUGINS_DIR)


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