]> granicus.if.org Git - php/commitdiff
MFH:- Fixed bug #35981 (pdo-pgsql should not use pkg-config when not present)
authorJani Taskinen <jani@php.net>
Mon, 9 Jul 2007 12:54:11 +0000 (12:54 +0000)
committerJani Taskinen <jani@php.net>
Mon, 9 Jul 2007 12:54:11 +0000 (12:54 +0000)
ext/pdo_pgsql/config.m4

index 61169d491b14fd8fb904d67ca07eafec68deeabf..e0111df4d7ee1fc257ed6dc565652900a57bd133 100644 (file)
@@ -71,8 +71,10 @@ if test "$PHP_PDO_PGSQL" != "no"; then
   AC_MSG_CHECKING([for openssl dependencies])
   if grep -q openssl $PGSQL_INCLUDE/libpq-fe.h ; then
     AC_MSG_RESULT([yes])
-    if pkg-config openssl ; then
-      PDO_PGSQL_CFLAGS="`pkg-config openssl --cflags`"
+    dnl First try to find pkg-config
+    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+    if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists openssl; then
+      PDO_PGSQL_CFLAGS=`$PKG_CONFIG openssl --cflags`
     fi
   else
     AC_MSG_RESULT([no])