Skip to content

Commit cab5c25

Browse files
author
Jani Taskinen
committed
MFH:- Fixed bug #35981 (pdo-pgsql should not use pkg-config when not present)
1 parent fb8aedb commit cab5c25

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ext/pdo_pgsql/config.m4

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,10 @@ if test "$PHP_PDO_PGSQL" != "no"; then
7171
AC_MSG_CHECKING([for openssl dependencies])
7272
if grep -q openssl $PGSQL_INCLUDE/libpq-fe.h ; then
7373
AC_MSG_RESULT([yes])
74-
if pkg-config openssl ; then
75-
PDO_PGSQL_CFLAGS="`pkg-config openssl --cflags`"
74+
dnl First try to find pkg-config
75+
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
76+
if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists openssl; then
77+
PDO_PGSQL_CFLAGS=`$PKG_CONFIG openssl --cflags`
7678
fi
7779
else
7880
AC_MSG_RESULT([no])

0 commit comments

Comments
 (0)