diff options
Diffstat (limited to 'ext/oci8/config.m4')
-rw-r--r-- | ext/oci8/config.m4 | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/ext/oci8/config.m4 b/ext/oci8/config.m4 index 3d084d7d3..ca334de82 100644 --- a/ext/oci8/config.m4 +++ b/ext/oci8/config.m4 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.55.2.3 2006/04/05 14:06:00 tony2001 Exp $ +dnl $Id: config.m4,v 1.55.2.3.2.3 2006/09/18 21:23:42 tony2001 Exp $ dnl if test -z "$SED"; then @@ -50,7 +50,7 @@ AC_DEFUN([AC_OCI8_CHECK_LIB_DIR],[ AC_DEFUN([AC_OCI8IC_VERSION],[ AC_MSG_CHECKING([Oracle Instant Client version]) - if test -f $PHP_OCI8_INSTANT_CLIENT/libociei.$SHLIB_SUFFIX_NAME; then + if test -f $PHP_OCI8_INSTANT_CLIENT/libnnz10.$SHLIB_SUFFIX_NAME; then if test -f $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME.10.1; then if test ! -f $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME; then AC_MSG_ERROR([Link from $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME to libclntsh.$SHLIB_SUFFIX_NAME.10.1 not found]) @@ -101,6 +101,35 @@ PHP_ARG_WITH(oci8, for Oracle (OCI8) support, Use --with-oci8=instantclient,/path/to/oic/lib to use Oracle Instant Client installation]) + AC_MSG_CHECKING([checking PHP version]) + + tmp_version=$PHP_VERSION + if test -z "$tmp_version"; then + if test -z "$PHP_CONFIG"; then + AC_MSG_ERROR([php-config not found]) + fi + php_version=`$PHP_CONFIG --version 2>/dev/null|head -n 1|sed -e 's#\([0-9]\.[0-9]*\.[0-9]*\)\(.*\)#\1#'` + else + php_version=`echo "$tmp_version"|sed -e 's#\([0-9]\.[0-9]*\.[0-9]*\)\(.*\)#\1#'` + fi + + if test -z "$php_version"; then + AC_MSG_ERROR([failed to detect PHP version, please report]) + fi + + ac_IFS=$IFS + IFS="." + set $php_version + IFS=$ac_IFS + oci8_php_version=`expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3` + + if test "$oci8_php_version" -le "4003010"; then + AC_MSG_ERROR([You need at least PHP 4.3.10 to be able to use this version of OCI8. PHP $php_version found]) + else + AC_MSG_RESULT([$php_version, ok]) + fi + + PHP_OCI8_INSTANT_CLIENT="no" if test "`echo $PHP_OCI8 | cut -d, -f2`" = "instantclient"; then @@ -316,13 +345,13 @@ dnl version in /usr/lib AC_MSG_CHECKING([Oracle Instant Client SDK header directory]) dnl Header directory for Instant Client SDK RPM install - OCISDKRPMINC=`echo "$PHP_OCI8_INSTANT_CLIENT" | $PHP_OCI8_SED -e 's!^/usr/lib/oracle/\(.*\)/client/lib[[/]]*$!/usr/include/oracle/\1/client!'` + OCISDKRPMINC=`echo "$PHP_OCI8_INSTANT_CLIENT" | $PHP_OCI8_SED -e 's!^/usr/lib/oracle/\(.*\)/client/lib[/]*$!/usr/include/oracle/\1/client!'` dnl Header directory for Instant Client SDK zip file install OCISDKZIPINC=$PHP_OCI8_INSTANT_CLIENT/sdk/include dnl Header directory for manual installation - OCISDKMANINC=`echo "$PHP_OCI8_INSTANT_CLIENT" | $PHP_OCI8_SED -e 's!\(.*\)/lib[[/]]*$!\1/include!'` + OCISDKMANINC=`echo "$PHP_OCI8_INSTANT_CLIENT" | $PHP_OCI8_SED -e 's!\(.*\)/lib[/]*$!\1/include!'` if test -f "$OCISDKRPMINC/oci.h"; then AC_MSG_RESULT($OCISDKRPMINC) |