Permalink
Browse files

Improve building the LDAP and OCI8 extensions statically.

Allows the LDAP extension to link with the Oracle Instant Client ZIP
file library LDAP implementation, e.g. using
--with-ldap=/path/to/instantclient.  (Does not support building with
Instant Client RPMS.)

Allows the LDAP and OCI8 extensions to be statically built when not
passing a directory to --with-ldap.  However this uses Oracle ldap.h
headers but doesn't use Oracle's LDAP implementation.  A preferred
user build scenario is to build PHP without OCI8, and then build OCI8
as a shared extension.
  • Loading branch information...
1 parent f514856 commit 68b1abcd789711586c481feb12b985e5807ebeaa Christopher Jones committed Mar 24, 2012
Showing with 7 additions and 1 deletion.
  1. +6 −0 ext/ldap/config.m4
  2. +1 −1 ext/ldap/php_ldap.h
View
@@ -15,6 +15,10 @@ AC_DEFUN([PHP_LDAP_CHECKS], [
LDAP_DIR=$1
LDAP_INCDIR=$1/ldap/public
LDAP_LIBDIR=$1/$PHP_LIBDIR
+ elif test -f $1/sdk/include/ldap.h; then
+ LDAP_DIR=$1
+ LDAP_INCDIR=$1/sdk/include
+ LDAP_LIBDIR=$1
fi
])
@@ -148,6 +152,8 @@ if test "$PHP_LDAP" != "no"; then
AC_DEFINE(HAVE_ORALDAP,1,[ ])
if test -f $LDAP_LIBDIR/libclntsh.$SHLIB_SUFFIX_NAME.10.1; then
AC_DEFINE(HAVE_ORALDAP_10,1,[ ])
+ elif test -f $LDAP_LIBDIR/libclntsh.$SHLIB_SUFFIX_NAME.11.1; then
+ AC_DEFINE(HAVE_ORALDAP_11,1,[ ])
@cjbj
cjbj Apr 30, 2012 Owner

In retrospect, I'd change this to define HAVE_ORALDAP_10

fi
else
AC_MSG_ERROR(Cannot find ldap libraries in $LDAP_LIBDIR.)
View
@@ -23,7 +23,7 @@
#ifndef PHP_LDAP_H
#define PHP_LDAP_H
-#ifndef HAVE_ORALDAP
+#if !defined(HAVE_OCI8) && !defined(HAVE_ORALDAP)
#include <lber.h>
#endif

0 comments on commit 68b1abc

Please sign in to comment.