Fix finding Oracle Instant Client library on OS X https://bugs.php.net/bug.php?id=39312 https://github.com/php/php-src/commit/70075bc84c4c1f5700ee95415e07c1799e3c083c --- ext/pdo_oci/config.m4.orig +++ ext/pdo_oci/config.m4 @@ -79,6 +81,13 @@ You need to tell me where to find your Oracle Instant Client SDK, or set ORACLE_ fi PDO_OCI_IC_PREFIX="`echo $PDO_OCI_DIR | cut -d, -f2`" PDO_OCI_IC_VERS="`echo $PDO_OCI_DIR | cut -d, -f3`" + if test -n "$PDO_OCI_IC_VERS"; then + PDO_OCI_IC_MAJ_VER="`echo $PDO_OCI_IC_VERS | cut -d. -f1`" + if test "$PDO_OCI_IC_MAJ_VER" -ge 11; then + # From 11.1.0.7 the RPM path only has an X.Y component + PDO_OCI_IC_VERS="`echo $PDO_OCI_IC_VERS | cut -d. -f1-2`" + fi + fi AC_MSG_CHECKING([for oci.h]) 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) @@ -97,11 +97,11 @@ 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 + if test -f "$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/lib/libclntsh.$SHLIB_SUFFIX_NAME" ; 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 + elif test -f "$PDO_OCI_IC_PREFIX/client/lib/libclntsh.$SHLIB_SUFFIX_NAME" ; then PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/client/lib" - elif test -f "$PDO_OCI_IC_PREFIX/libclntsh.so" ; then + elif test -f "$PDO_OCI_IC_PREFIX/libclntsh.$SHLIB_SUFFIX_NAME" ; then PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX" else AC_MSG_ERROR([I'm too dumb to figure out where the libraries are in your Instant Client install])