mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
fix ldap.h detection without pkgconfig (#19005)
This commit is contained in:
parent
7fcdf8369e
commit
840dc1981f
1 changed files with 9 additions and 4 deletions
|
@ -60,15 +60,20 @@ if test "$PHP_LDAP" != "no"; then
|
|||
[-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1])
|
||||
|
||||
AS_VAR_IF([PHP_LDAP], [yes], [
|
||||
PKG_CHECK_MODULES([LDAP], [lber ldap])
|
||||
PHP_LDAP_PKGCONFIG=true
|
||||
], [PHP_LDAP_CHECKS([$PHP_LDAP])])
|
||||
PKG_CHECK_MODULES([LDAP], [lber ldap],
|
||||
PHP_LDAP_PKGCONFIG=true, PHP_LDAP_PKGCONFIG=false)])
|
||||
|
||||
AS_IF([test "$PHP_LDAP_PKGCONFIG" = true], [
|
||||
PHP_EVAL_INCLINE([$LDAP_CFLAGS])
|
||||
PHP_EVAL_LIBLINE([$LDAP_LIBS], [LDAP_SHARED_LIBADD])
|
||||
], [
|
||||
AS_VAR_IF([LDAP_DIR],, [AC_MSG_ERROR([Cannot find ldap.h])])
|
||||
AS_VAR_IF([PHP_LDAP], [yes], [
|
||||
for i in /usr/local /usr; do
|
||||
PHP_LDAP_CHECKS([$i])
|
||||
done
|
||||
], [PHP_LDAP_CHECKS([$PHP_LDAP])])
|
||||
AC_MSG_CHECKING([for ldap.h])
|
||||
AS_VAR_IF([LDAP_DIR],, [AC_MSG_ERROR([Cannot find ldap.h])], AC_MSG_RESULT([$LDAP_DIR]))
|
||||
|
||||
dnl -pc removal is a hack for clang
|
||||
MACHINE_INCLUDES=$($CC -dumpmachine | $SED 's/-pc//')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue