php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #44989
Patch pdo_oci-64bit-5.3 revision 2010-08-16 21:11 UTC by jbnance at tresgeek dot net
Patch pdo_oci-64bit revision 2010-08-03 23:15 UTC by jbnance at tresgeek dot net
revision 2010-08-03 23:13 UTC by jbnance at tresgeek dot net
revision 2010-08-03 22:57 UTC by jbnance at tresgeek dot net

Patch pdo_oci-64bit-5.3 for PDO OCI Bug #44989

Patch version 2010-08-16 21:11 UTC

Return to Bug #44989 | Download this patch
Patch Revisions:

Developer: jbnance@tresgeek.net

--- php-5.3.3/ext/pdo_oci/config.m4-no64	2010-02-04 01:12:14.000000000 +0000
+++ php-5.3.3/ext/pdo_oci/config.m4	2010-08-16 20:57:32.000000000 +0000
@@ -71,28 +71,34 @@ You need to tell me where to find your O
   fi
 
   if test "instantclient" = "`echo $PDO_OCI_DIR | cut -d, -f1`" ; then
+    AC_CHECK_SIZEOF(long int, 4)
+    if test "$ac_cv_sizeof_long_int" = "4" ; then
+      PDO_OCI_CLIENT_DIR="client"
+    else
+      PDO_OCI_CLIENT_DIR="client64"
+    fi
     PDO_OCI_IC_PREFIX="`echo $PDO_OCI_DIR | cut -d, -f2`"
     PDO_OCI_IC_VERS="`echo $PDO_OCI_DIR | cut -d, -f3`"
     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)
+    if test -f $PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR/oci.h ; then
+      PHP_ADD_INCLUDE($PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR)
+      AC_MSG_RESULT($PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR)
+    elif test -f $PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR/include/oci.h ; then
+      PHP_ADD_INCLUDE($PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR/include)
+      AC_MSG_RESULT($PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR/include)
     elif test -f $PDO_OCI_IC_PREFIX/sdk/include/oci.h ; then
       PHP_ADD_INCLUDE($PDO_OCI_IC_PREFIX/sdk/include)
       AC_MSG_RESULT($PDO_OCI_IC_PREFIX/sdk/include)
-    elif test -f $PDO_OCI_IC_PREFIX/client/include/oci.h ; then
-      PHP_ADD_INCLUDE($PDO_OCI_IC_PREFIX/client/include)
-      AC_MSG_RESULT($PDO_OCI_IC_PREFIX/client/include)
+    elif test -f $PDO_OCI_IC_PREFIX/$PDO_OCI_CLIENT_DIR/include/oci.h ; then
+      PHP_ADD_INCLUDE($PDO_OCI_IC_PREFIX/$PDO_OCI_CLIENT_DIR/include)
+      AC_MSG_RESULT($PDO_OCI_IC_PREFIX/$PDO_OCI_CLIENT_DIR/include)
     else
       AC_MSG_ERROR([I'm too dumb to figure out where the include dir is in your Instant Client install])
     fi
-    if test -f "$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/lib/libclntsh.so" ; then
-    PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/lib"
-    elif test -f "$PDO_OCI_IC_PREFIX/client/lib/libclntsh.so" ; then
-      PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/client/lib"
+    if test -f "$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR/lib/libclntsh.so" ; then
+    PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR/lib"
+    elif test -f "$PDO_OCI_IC_PREFIX/$PDO_OCI_CLIENT_DIR/lib/libclntsh.so" ; then
+      PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/$PDO_OCI_CLIENT_DIR/lib"
     elif test -f "$PDO_OCI_IC_PREFIX/libclntsh.so" ; then
       PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX"
     else
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 12:01:29 2024 UTC