summaryrefslogtreecommitdiff
path: root/ext/oci8/config.m4
diff options
context:
space:
mode:
authorChristopher Jones <sixd@php.net>2008-01-16 00:38:03 +0000
committerChristopher Jones <sixd@php.net>2008-01-16 00:38:03 +0000
commit44a985f63ee8168fd8abbf7e25a95e649311d4cd (patch)
tree012928c468766bb43f5b7c9df98e2a518391c44c /ext/oci8/config.m4
parentbfb584bd0f8f7849f8450427e7eb466d4e5dafc6 (diff)
downloadphp-git-44a985f63ee8168fd8abbf7e25a95e649311d4cd.tar.gz
MFH: fix #41941 (oci8 extension not lib64 savvy)
Diffstat (limited to 'ext/oci8/config.m4')
-rw-r--r--ext/oci8/config.m417
1 files changed, 13 insertions, 4 deletions
diff --git a/ext/oci8/config.m4 b/ext/oci8/config.m4
index c12eb42470..6cfb167ede 100644
--- a/ext/oci8/config.m4
+++ b/ext/oci8/config.m4
@@ -143,7 +143,9 @@ fi
PHP_OCI8_INSTANT_CLIENT="no"
-if test "`echo $PHP_OCI8 | cut -d, -f2`" = "instantclient"; then
+if test "`echo $PHP_OCI8`" = "instantclient"; then
+ PHP_OCI8_INSTANT_CLIENT="yes"
+elif test "`echo $PHP_OCI8 | cut -d, -f2`" = "instantclient"; then
PHP_OCI8_INSTANT_CLIENT="`echo $PHP_OCI8 | cut -d, -f3`"
PHP_OCI8="`echo $PHP_OCI8 | cut -d, -f1,4`"
if test "$PHP_OCI8_INSTANT_CLIENT" = ""; then
@@ -308,14 +310,21 @@ if test "$PHP_OCI8" != "no" && test "$PHP_OCI8_INSTANT_CLIENT" = "no"; then
elif test "$PHP_OCI8" != "no" && test "$PHP_OCI8_INSTANT_CLIENT" != "no"; then
+ AC_CHECK_SIZEOF(long int, 4)
+ LIBDIR_SUFFIX=""
+ if test "$ac_cv_sizeof_long_int" = "8" ; then
+ LIBDIR_SUFFIX=64
+ fi
+
AC_MSG_CHECKING([Oracle Instant Client directory])
if test "$PHP_OCI8_INSTANT_CLIENT" = "yes"; then
+dnl Find the directory if user specified "instantclient" but did not give a dir.
dnl Generally the Instant Client can be anywhere so the user must pass in the
dnl directory to the libraries. But on Linux we default to the most recent
dnl version in /usr/lib
- PHP_OCI8_INSTANT_CLIENT=`ls -d /usr/lib/oracle/*/client/lib 2> /dev/null | tail -1`
+ PHP_OCI8_INSTANT_CLIENT=`ls -d /usr/lib/oracle/*/client${LIBDIR_SUFFIX}/lib 2> /dev/null | tail -1`
if test -z "$PHP_OCI8_INSTANT_CLIENT"; then
- AC_MSG_ERROR([Oracle Instant Client directory not found. Try --with-oci8=instantclient,DIR])
+ AC_MSG_ERROR([Oracle Instant Client directory /usr/lib/oracle/.../client${LIBDIR_SUFFIX}/lib not found. Try --with-oci8=instantclient,DIR])
fi
fi
AC_MSG_RESULT($PHP_OCI8_INSTANT_CLIENT)
@@ -362,7 +371,7 @@ dnl Header directory for manual installation
;;
*)
- AC_MSG_ERROR([Oracle Instant CLient version $PHP_OCI8_INSTANT_CLIENT is not supported])
+ AC_MSG_ERROR([Oracle Instant Client version $PHP_OCI8_INSTANT_CLIENT is not supported])
;;
esac