From: Wez Furlong Date: Wed, 27 Jul 2005 03:48:08 +0000 (+0000) Subject: Add support for instant client 10.1.0.4. X-Git-Tag: RELEASE_0_9~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9b73ab50b62d008237961f7385b4bea547767f06;p=php Add support for instant client 10.1.0.4. Theoretically also add support for 10.2 libraries. Prep for PECL release. --- diff --git a/ext/pdo_oci/config.m4 b/ext/pdo_oci/config.m4 index dbdc90f8c4..0a0d2a9219 100755 --- a/ext/pdo_oci/config.m4 +++ b/ext/pdo_oci/config.m4 @@ -54,7 +54,16 @@ You need to tell me where to find your oracle SDK, or set ORACLE_HOME. if test "instantclient" = "`echo $PDO_OCI_DIR | cut -d, -f1`" ; then PDO_OCI_IC_PREFIX="`echo $PDO_OCI_DIR | cut -d, -f2`" PDO_OCI_IC_VERS="`echo $PDO_OCI_DIR | cut -d, -f3`" - PHP_ADD_INCLUDE($PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client) + AC_MSG_CHECKING([for oci.h]) + if test -f $PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client/oci.h ; then + PHP_ADD_INCLUDE($PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client) + AC_MSG_RESULT($PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client) + elif test -f $PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/include/oci.h ; then + PHP_ADD_INCLUDE($PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/include) + AC_MSG_RESULT($PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/include) + else + AC_MSG_ERROR([I'm too dumb to figure out where the include dir is in your instant client install]) + fi PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/lib" PDO_OCI_VERSION="`echo $PDO_OCI_IC_VERS | cut -d. -f1-2`" else @@ -74,6 +83,10 @@ You need to tell me where to find your oracle SDK, or set ORACLE_HOME. PHP_ADD_INCLUDE($PDO_OCI_DIR/plsql/public) PDO_OCI_INCLUDES="$PDO_OCI_INCLUDES -I$PDO_OCI_DIR/plsql/public" fi + if test -d "$PDO_OCI_DIR/include"; then + PHP_ADD_INCLUDE($PDO_OCI_DIR/include) + PDO_OCI_INCLUDES="$PDO_OCI_INCLUDES -I$PDO_OCI_DIR/include" + fi if test -f "$PDO_OCI_DIR/lib/sysliblist"; then PHP_EVAL_LIBLINE(`cat $PDO_OCI_DIR/lib/sysliblist`, PDO_OCI_SYSLIB) @@ -103,6 +116,9 @@ You need to tell me where to find your oracle SDK, or set ORACLE_HOME. 10.1) PHP_ADD_LIBRARY(clntsh, 1, PDO_OCI_SHARED_LIBADD) ;; + 10.2) + PHP_ADD_LIBRARY(clntsh, 1, PDO_OCI_SHARED_LIBADD) + ;; *) AC_MSG_ERROR(Unsupported Oracle version! $PDO_OCI_VERSION) ;; @@ -160,14 +176,33 @@ You need to tell me where to find your oracle SDK, or set ORACLE_HOME. -L$PDO_OCI_LIB_DIR $PDO_OCI_SHARED_LIBADD ]) - 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_oci, pdo_oci.c oci_driver.c oci_statement.c, $ext_shared,,-I$pdo_inc_path) PHP_SUBST_OLD(PDO_OCI_SHARED_LIBADD) PHP_SUBST_OLD(PDO_OCI_DIR) PHP_SUBST_OLD(PDO_OCI_VERSION) - PHP_ADD_EXTENSION_DEP(pdo_oci, pdo) + + ifdef([PHP_ADD_EXTENDION_DEP], + [ + PHP_ADD_EXTENSION_DEP(pdo_oci, pdo) + ]) fi diff --git a/ext/pdo_oci/package.xml b/ext/pdo_oci/package.xml index 82b9f66899..4702c5f06a 100755 --- a/ext/pdo_oci/package.xml +++ b/ext/pdo_oci/package.xml @@ -17,8 +17,8 @@ PHP beta - 0.2 - 2005-02-09 + 0.9 + 2005-07-27 You need to install the PDO core module before you can make use of this one. @@ -41,7 +41,7 @@ - + diff --git a/ext/pdo_oci/pdo_oci.c b/ext/pdo_oci/pdo_oci.c index 5f31b29b74..5e5e873d5c 100755 --- a/ext/pdo_oci/pdo_oci.c +++ b/ext/pdo_oci/pdo_oci.c @@ -37,8 +37,21 @@ function_entry pdo_oci_functions[] = { /* }}} */ /* {{{ pdo_oci_module_entry */ + +#if ZEND_EXTENSION_API_NO >= 220050617 +static zend_module_dep pdo_oci_deps[] = { + ZEND_MOD_REQUIRED("pdo") + {NULL, NULL, NULL} +}; +#endif + zend_module_entry pdo_oci_module_entry = { +#if ZEND_EXTENSION_API_NO >= 220050617 + STANDARD_MODULE_HEADER_EX, NULL, + pdo_oci_deps, +#else STANDARD_MODULE_HEADER, +#endif "PDO_OCI", pdo_oci_functions, PHP_MINIT(pdo_oci), @@ -46,7 +59,7 @@ zend_module_entry pdo_oci_module_entry = { NULL, NULL, PHP_MINFO(pdo_oci), - "0.2", + "0.9", STANDARD_MODULE_PROPERTIES }; /* }}} */