Skip to content

Instantly share code, notes, and snippets.

@krisanalfa
Last active March 7, 2016 18:15
Show Gist options
  • Save krisanalfa/e0beaa512b4677c51a7c to your computer and use it in GitHub Desktop.
Save krisanalfa/e0beaa512b4677c51a7c to your computer and use it in GitHub Desktop.
Patch to install pdo_oci. Read full description here: https://gist.github.com/krisanalfa/09b765bb95012cd36fbd
--- config.m4 2005-09-25 06:23:24.000000000 +0700
+++ config.m4.new 2015-10-02 15:42:52.000000000 +0700
@@ -8,15 +8,15 @@
PDO_OCI_VERSION=`grep '"ocommon"' $PDO_OCI_DIR/orainst/unix.rgs | sed 's/[ ][ ]*/:/g' | cut -d: -f 6 | cut -c 2-4`
test -z "$PDO_OCI_VERSION" && PDO_OCI_VERSION=7.3
elif test -f $PDO_OCI_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.10.1; then
- PDO_OCI_VERSION=10.1
+ PDO_OCI_VERSION=10.1
elif test -f $PDO_OCI_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.9.0; then
PDO_OCI_VERSION=9.0
elif test -f $PDO_OCI_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.8.0; then
PDO_OCI_VERSION=8.1
elif test -f $PDO_OCI_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.1.0; then
PDO_OCI_VERSION=8.0
- elif test -f $PDO_OCI_DIR/lib/libclntsh.a; then
- if test -f $PDO_OCI_DIR/lib/libcore4.a; then
+ elif test -f $PDO_OCI_DIR/lib/libclntsh.a; then
+ if test -f $PDO_OCI_DIR/lib/libcore4.a; then
PDO_OCI_VERSION=8.0
else
PDO_OCI_VERSION=8.1
@@ -25,7 +25,7 @@
AC_MSG_ERROR(Oracle-OCI needed libraries not found under $PDO_OCI_DIR)
fi
AC_MSG_RESULT($PDO_OCI_VERSION)
-])
+])
PHP_ARG_WITH(pdo-oci, Oracle OCI support for PDO,
[ --with-pdo-oci[=DIR] PDO: Oracle-OCI support. Default DIR is ORACLE_HOME.
@@ -58,9 +58,9 @@
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)
+ elif test -f $PDO_OCI_IC_PREFIX/oracle/$PDO_OCI_IC_VERS/client/include/oci.h ; then
+ PHP_ADD_INCLUDE($PDO_OCI_IC_PREFIX/oracle/$PDO_OCI_IC_VERS/client/include)
+ AC_MSG_RESULT($PDO_OCI_IC_PREFIX/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
@@ -112,13 +112,16 @@
9.0)
PHP_ADD_LIBRARY(clntsh, 1, PDO_OCI_SHARED_LIBADD)
;;
-
+
10.1)
PHP_ADD_LIBRARY(clntsh, 1, PDO_OCI_SHARED_LIBADD)
;;
10.2)
PHP_ADD_LIBRARY(clntsh, 1, PDO_OCI_SHARED_LIBADD)
;;
+ 11.2)
+ PHP_ADD_LIBRARY(clntsh, 1, PDO_OCI_SHARED_LIBADD)
+ ;;
*)
AC_MSG_ERROR(Unsupported Oracle version! $PDO_OCI_VERSION)
;;
@@ -141,7 +144,7 @@
])
dnl
- dnl Check if we need to add -locijdbc8
+ dnl Check if we need to add -locijdbc8
dnl
PHP_CHECK_LIBRARY(clntsh, OCILobIsTemporary,
[
@@ -203,7 +206,7 @@
[
PHP_ADD_EXTENSION_DEP(pdo_oci, pdo)
])
-
+
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment