summaryrefslogtreecommitdiff
path: root/ext/pdo_pgsql/config.m4
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pdo_pgsql/config.m4')
-rw-r--r--ext/pdo_pgsql/config.m422
1 files changed, 20 insertions, 2 deletions
diff --git a/ext/pdo_pgsql/config.m4 b/ext/pdo_pgsql/config.m4
index 33f2709206..9f356db64a 100644
--- a/ext/pdo_pgsql/config.m4
+++ b/ext/pdo_pgsql/config.m4
@@ -104,10 +104,28 @@ if test "$PHP_PDO_PGSQL" != "no"; then
PHP_ADD_INCLUDE($PGSQL_INCLUDE)
- PHP_CHECK_PDO_INCLUDES
+ ifdef([PHP_CHECK_PDO_INCLUDES],
+ [
+ PHP_CHECK_PDO_INCLUDES
+ ],[
+ AC_MSG_CHECKING([for PDO includes])
+ if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
+ pdo_inc_path=$abs_srcdir/ext
+ elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
+ pdo_inc_path=$abs_srcdir/ext
+ elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
+ pdo_inc_path=$prefix/include/php/ext
+ else
+ AC_MSG_ERROR([Cannot find php_pdo_driver.h.])
+ fi
+ AC_MSG_RESULT($pdo_inc_path)
+ ])
PHP_NEW_EXTENSION(pdo_pgsql, pdo_pgsql.c pgsql_driver.c pgsql_statement.c, $ext_shared,,-I$pdo_inc_path $PDO_PGSQL_CFLAGS)
- PHP_ADD_EXTENSION_DEP(pdo_pgsql, pdo)
+ ifdef([PHP_ADD_EXTENSION_DEP],
+ [
+ PHP_ADD_EXTENSION_DEP(pdo_pgsql, pdo)
+ ])
fi
fi