summaryrefslogtreecommitdiff
path: root/ext/oci8/config.m4
diff options
context:
space:
mode:
Diffstat (limited to 'ext/oci8/config.m4')
-rw-r--r--ext/oci8/config.m421
1 files changed, 19 insertions, 2 deletions
diff --git a/ext/oci8/config.m4 b/ext/oci8/config.m4
index 34ae76c44b..eee4b4ec80 100644
--- a/ext/oci8/config.m4
+++ b/ext/oci8/config.m4
@@ -140,12 +140,29 @@ if test "$PHP_OCI8" != "no"; then
if test "$oci8_php_version" -lt "4003009"; then
AC_MSG_ERROR([You need at least PHP 4.3.9 to be able to use this version of OCI8. PHP $php_version found])
- elif test "$oci8_php_version" -ge "6000000"; then
- AC_MSG_ERROR([This version of OCI8 is not compatible with PHP 6 or higher])
else
AC_MSG_RESULT([$php_version, ok])
fi
+ dnl conditionally define PHP_INIT_DTRACE.
+ dnl This prevents 'configure' failing for PECL installs on older PHP versions.
+ dnl Note DTrace support can't be enabled on older PHP versions.
+ AC_PROVIDE_IFELSE([PHP_INIT_DTRACE], [], [AC_DEFUN([PHP_INIT_DTRACE], )])
+
+ if test "$PHP_DTRACE" = "yes"; then
+ if test "$oci8_php_version" -lt "5004000"; then
+ AC_MSG_ERROR([You need at least PHP 5.4 to be able to use DTrace with PHP OCI8])
+ else
+ AC_CHECK_HEADERS([sys/sdt.h], [
+ PHP_INIT_DTRACE([ext/oci8/oci8_dtrace.d],[ext/oci8/oci8_dtrace_gen.h],[ext/oci8/oci8.c \
+ ext/oci8/oci8_interface.c ext/oci8/oci8_collection.c ext/oci8/oci8_lob.c ext/oci8/oci8_statement.c])
+ ], [
+ AC_MSG_ERROR(
+ [Cannot find sys/sdt.h which is required for DTrace support])
+ ])
+ fi
+ fi
+
dnl Set some port specific directory components for use later
AC_CHECK_SIZEOF(long int, 4)