From caea088ac7971a22b453112f77a3131bdbeb3b58 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Sat, 20 Apr 2019 16:12:54 +0200 Subject: [PATCH] Remove PHP_SETUP_KERBEROS m4 macro With recent transition to pkg-config/pkgconf this macro has been now a simple wrapper for PKG_CHECK_MODULES and PHP_EVAL_INCLINE so it's better to omit it altogether and use these two in the *.m4 code directly. --- acinclude.m4 | 14 -------------- ext/imap/config.m4 | 10 ++++++---- ext/openssl/config0.m4 | 5 ++++- 3 files changed, 10 insertions(+), 19 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index ad28142db32..6987056185e 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1905,20 +1905,6 @@ AC_DEFUN([PHP_SETUP_ICU],[ fi ]) -dnl -dnl PHP_SETUP_KERBEROS(shared-add [, action-found]) -dnl -dnl Common setup macro for kerberos -dnl -AC_DEFUN([PHP_SETUP_KERBEROS],[ - PKG_CHECK_MODULES([KERBEROS], [krb5-gssapi krb5]) - - PHP_EVAL_INCLINE($KERBEROS_CFLAGS) - PHP_EVAL_LIBLINE($KERBEROS_LIBS, $1) - - ifelse([$2],[],:,[$2]) -]) - dnl dnl PHP_SETUP_OPENSSL(shared-add [, action-found [, action-not-found]]) dnl diff --git a/ext/imap/config.m4 b/ext/imap/config.m4 index 1d96769a923..102c917aee2 100644 --- a/ext/imap/config.m4 +++ b/ext/imap/config.m4 @@ -48,10 +48,12 @@ AC_DEFUN([PHP_IMAP_TEST_BUILD], [ AC_DEFUN([PHP_IMAP_KRB_CHK], [ if test "$PHP_KERBEROS" != "no"; then - PHP_SETUP_KERBEROS(IMAP_SHARED_LIBADD, - [ - AC_DEFINE(HAVE_IMAP_KRB,1,[ ]) - ]) + PKG_CHECK_MODULES([KERBEROS], [krb5-gssapi krb5]) + + PHP_EVAL_INCLINE($KERBEROS_CFLAGS) + PHP_EVAL_LIBLINE($KERBEROS_LIBS, IMAP_SHARED_LIBADD) + + AC_DEFINE(HAVE_IMAP_KRB, 1, [Whether IMAP extension has Kerberos support]) else AC_EGREP_HEADER(auth_gss, $IMAP_INC_DIR/linkage.h, [ AC_MSG_ERROR([This c-client library is built with Kerberos support. diff --git a/ext/openssl/config0.m4 b/ext/openssl/config0.m4 index 8d7d65621dc..b77bd5508b7 100644 --- a/ext/openssl/config0.m4 +++ b/ext/openssl/config0.m4 @@ -24,7 +24,10 @@ if test "$PHP_OPENSSL" != "no"; then PHP_SUBST(OPENSSL_SHARED_LIBADD) if test "$PHP_KERBEROS" != "no"; then - PHP_SETUP_KERBEROS(OPENSSL_SHARED_LIBADD) + PKG_CHECK_MODULES([KERBEROS], [krb5-gssapi krb5]) + + PHP_EVAL_INCLINE($KERBEROS_CFLAGS) + PHP_EVAL_LIBLINE($KERBEROS_LIBS, OPENSSL_SHARED_LIBADD) fi AC_CHECK_FUNCS([RAND_egd])