]> granicus.if.org Git - php/commitdiff
Add support for instant client 10.1.0.4.
authorWez Furlong <wez@php.net>
Wed, 27 Jul 2005 03:48:08 +0000 (03:48 +0000)
committerWez Furlong <wez@php.net>
Wed, 27 Jul 2005 03:48:08 +0000 (03:48 +0000)
Theoretically also add support for 10.2 libraries.
Prep for PECL release.

ext/pdo_oci/config.m4
ext/pdo_oci/package.xml
ext/pdo_oci/pdo_oci.c

index dbdc90f8c409a28b8149e0547b4ad53012cdf718..0a0d2a9219ad00accb1378d1e3f539ebad0af053 100755 (executable)
@@ -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
 
index 82b9f66899a1be48b38cc4dc1895e8fa554f7f8f..4702c5f06ac9ca112dd1515c66978ee340673b36 100755 (executable)
@@ -17,8 +17,8 @@
  <license>PHP</license>\r
  <release>\r
   <state>beta</state>\r
-  <version>0.2</version>\r
-  <date>2005-02-09</date>\r
+  <version>0.9</version>\r
+  <date>2005-07-27</date>\r
 \r
   <notes>\r
    You need to install the PDO core module before you can make use of this one.\r
@@ -41,7 +41,7 @@
   </filelist>\r
   <deps>\r
    <dep type="php" rel="ge" version="5.0.3"/>\r
-   <dep type="ext" rel="ge" name="pdo" version="0.2"/>\r
+   <dep type="ext" rel="ge" name="pdo" version="0.9"/>\r
   </deps>\r
  </release>\r
 </package>\r
index 5f31b29b748c6300ed895eaf2181851820111eef..5e5e873d5cdfc392bd2a907f1a664a7f05f6a3fc 100755 (executable)
@@ -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
 };
 /* }}} */