Skip to content

Commit 6510dd4

Browse files
committed
Use PHP 7.x style PDO include check
The PDO extensions bundled with PHP moved to this style (well, they don't include the legacy check; this mirrors how it was in 7.3) Pushed to CI branch to see how it affects it.
1 parent e9ec0c4 commit 6510dd4

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

config.m4

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,22 @@ if test "$PHP_PDO_IBM" != "no"; then
6262
done
6363
fi
6464

65-
AC_MSG_CHECKING([for PDO includes])
66-
if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
67-
pdo_inc_path=$abs_srcdir/ext
68-
elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
69-
pdo_inc_path=$abs_srcdir/ext
70-
elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
71-
pdo_inc_path=$prefix/include/php/ext
72-
else
73-
AC_MSG_ERROR([Cannot find php_pdo_driver.h.])
74-
fi
75-
AC_MSG_RESULT($pdo_inc_path)
65+
ifdef([PHP_CHECK_PDO_INCLUDES],
66+
[
67+
PHP_CHECK_PDO_INCLUDES
68+
],[
69+
AC_MSG_CHECKING([for PDO includes])
70+
if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
71+
pdo_cv_inc_path=$abs_srcdir/ext
72+
elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
73+
pdo_cv_inc_path=$abs_srcdir/ext
74+
elif test -f $phpincludedir/ext/pdo/php_pdo_driver.h; then
75+
pdo_cv_inc_path=$phpincludedir/ext
76+
else
77+
AC_MSG_ERROR([Cannot find php_pdo_driver.h.])
78+
fi
79+
AC_MSG_RESULT($pdo_cv_inc_path)
80+
])
7681

7782
dnl Don't forget to add additional source files here
7883
php_pdo_ibm_sources_core="pdo_ibm.c ibm_driver.c ibm_statement.c"

0 commit comments

Comments
 (0)