Skip to content

Commit 0db3738

Browse files
committed
detect funky kerberos deps that chain on from openssl deps on RH distros
1 parent 6fa3716 commit 0db3738

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

ext/pdo_pgsql/config.m4

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,17 @@ if test "$PHP_PDO_PGSQL" != "no"; then
6666
fi
6767

6868
AC_DEFINE(HAVE_PDO_PGSQL,1,[Whether to build PostgreSQL for PDO support or not])
69+
70+
AC_MSG_CHECKING([for openssl dependencies])
71+
if grep -q openssl $PGSQL_INCLUDE/libpq-fe.h ; then
72+
AC_MSG_RESULT([yes])
73+
if pkg-config openssl ; then
74+
PDO_PGSQL_CFLAGS="`pkg-config openssl --cflags`"
75+
fi
76+
else
77+
AC_MSG_RESULT([no])
78+
fi
79+
6980
old_LIBS=$LIBS
7081
old_LDFLAGS=$LDFLAGS
7182
LDFLAGS="$LDFLAGS -L$PGSQL_LIBDIR"
@@ -77,7 +88,7 @@ if test "$PHP_PDO_PGSQL" != "no"; then
7788
AC_CHECK_LIB(pq, PQparameterStatus,AC_DEFINE(HAVE_PQPARAMETERSTATUS,1,[PostgreSQL 7.4 or later]))
7889
AC_CHECK_LIB(pq, PQprotocolVersion,AC_DEFINE(HAVE_PQPROTOCOLVERSION,1,[PostgreSQL 7.4 or later]))
7990
AC_CHECK_LIB(pq, PQtransactionStatus,AC_DEFINE(HAVE_PGTRANSACTIONSTATUS,1,[PostgreSQL 7.4 or later]))
80-
AC_CHECK_LIB(pq, pg_encoding_to_char,AC_DEFINE(HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT,1,[Whether libpq is compiled with --enable-multibye]))
91+
AC_CHECK_LIB(pq, pg_encoding_to_char,AC_DEFINE(HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT,1,[Whether libpq is compiled with --enable-multibyte]))
8192
LIBS=$old_LIBS
8293
LDFLAGS=$old_LDFLAGS
8394

@@ -97,6 +108,6 @@ dnl find PDO sources
97108
AC_MSG_ERROR([Cannot find php_pdo_driver.h.])
98109
fi
99110

100-
PHP_NEW_EXTENSION(pdo_pgsql, pdo_pgsql.c pgsql_driver.c pgsql_statement.c, $ext_shared,,-I$pdo_inc_path)
111+
PHP_NEW_EXTENSION(pdo_pgsql, pdo_pgsql.c pgsql_driver.c pgsql_statement.c, $ext_shared,,-I$pdo_inc_path $PDO_PGSQL_CFLAGS)
101112
PHP_ADD_EXTENSION_DEP(pdo_pgsql, pdo)
102113
fi

0 commit comments

Comments
 (0)