From c9ee822bb614e27b5afdff5c951ac3939377a7c9 Mon Sep 17 00:00:00 2001 From: Hugh McMaster Date: Wed, 24 Apr 2019 21:39:17 +1000 Subject: [PATCH] Always use pkg-config from the host architecture --- ext/ffi/config.m4 | 6 ------ ext/odbc/config.m4 | 3 --- ext/skeleton/config.m4.in | 1 - ext/sodium/config.m4 | 1 - ext/zip/config.m4 | 3 --- sapi/fpm/config.m4 | 3 --- scripts/phpize.m4 | 1 + 7 files changed, 1 insertion(+), 17 deletions(-) diff --git a/ext/ffi/config.m4 b/ext/ffi/config.m4 index 2619e66e57..76150dcffb 100644 --- a/ext/ffi/config.m4 +++ b/ext/ffi/config.m4 @@ -10,12 +10,6 @@ if test "$PHP_FFI" != "no"; then FFI_INCDIR=$PHP_FFI/include FFI_LIBDIR=$PHP_FFI else - dnl First try to find pkg-config - if test -z "$PKG_CONFIG"; then - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) - fi - - dnl If pkg-config is installed, try using it if test -x "$PKG_CONFIG" && "$PKG_CONFIG" --exists libffi; then FFI_VER=`"$PKG_CONFIG" --modversion libffi` FFI_INCDIR=`"$PKG_CONFIG" --variable=includedir libffi` diff --git a/ext/odbc/config.m4 b/ext/odbc/config.m4 index 31aa1e3b8b..6ded84c5ab 100644 --- a/ext/odbc/config.m4 +++ b/ext/odbc/config.m4 @@ -327,9 +327,6 @@ PHP_ARG_WITH([iodbc],, AC_MSG_CHECKING(for iODBC support) if test "$PHP_IODBC" != "no"; then - if test -z "$PKG_CONFIG"; then - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) - fi if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libiodbc ; then PHP_ADD_LIBRARY_WITH_PATH(iodbc, $PHP_IODBC/$PHP_LIBDIR) ODBC_TYPE=iodbc diff --git a/ext/skeleton/config.m4.in b/ext/skeleton/config.m4.in index 0911c60aa0..041c28eb66 100644 --- a/ext/skeleton/config.m4.in +++ b/ext/skeleton/config.m4.in @@ -22,7 +22,6 @@ if test "$PHP_%EXTNAMECAPS%" != "no"; then dnl Write more examples of tests here... dnl # get library FOO build options from pkg-config output - dnl AC_PATH_PROG(PKG_CONFIG, pkg-config, no) dnl AC_MSG_CHECKING(for libfoo) dnl if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists foo; then dnl if $PKG_CONFIG foo --atleast-version 1.2.3; then diff --git a/ext/sodium/config.m4 b/ext/sodium/config.m4 index 42da137b81..aed0aedec3 100644 --- a/ext/sodium/config.m4 +++ b/ext/sodium/config.m4 @@ -9,7 +9,6 @@ if test "$PHP_SODIUM" != "no"; then SEARCH_PATH="/usr/local /usr" # you might want to change this SEARCH_FOR="/include/sodium.h" # you most likely want to change this - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) AC_MSG_CHECKING([for libsodium]) dnl user provided location diff --git a/ext/zip/config.m4 b/ext/zip/config.m4 index c1c8cbc18e..b1f87a0101 100644 --- a/ext/zip/config.m4 +++ b/ext/zip/config.m4 @@ -17,9 +17,6 @@ if test "$PHP_ZIP" != "no"; then PHP_ZIP_SOURCES="php_zip.c zip_stream.c" if test "$PHP_LIBZIP" != "no"; then - - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) - AC_MSG_CHECKING(for libzip) if test -r $PHP_LIBZIP/include/zip.h; then LIBZIP_CFLAGS="-I$PHP_LIBZIP/include" diff --git a/sapi/fpm/config.m4 b/sapi/fpm/config.m4 index 2aed96046c..3c0a7f3d5d 100644 --- a/sapi/fpm/config.m4 +++ b/sapi/fpm/config.m4 @@ -591,9 +591,6 @@ if test "$PHP_FPM" != "no"; then [no]) if test "$PHP_FPM_SYSTEMD" != "no" ; then - if test -z "$PKG_CONFIG"; then - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) - fi unset SYSTEMD_LIBS unset SYSTEMD_INCS diff --git a/scripts/phpize.m4 b/scripts/phpize.m4 index 61af6c2b74..bcd66df6f3 100644 --- a/scripts/phpize.m4 +++ b/scripts/phpize.m4 @@ -33,6 +33,7 @@ test -z "$CFLAGS" && auto_cflags=1 abs_srcdir=`(cd $srcdir && pwd)` abs_builddir=`pwd` +PKG_PROG_PKG_CONFIG AC_PROG_CC([cc gcc]) PHP_DETECT_ICC PHP_DETECT_SUNCC -- 2.40.0