[PHP4BETA] CVS update: php4/ext/ldap

From: Date: Sun, 25 Apr 1999 14:10:22 +0000
Subject: [PHP4BETA] CVS update: php4/ext/ldap
Groups: php.version4 
Request: Send a blank email to php-version4+get-510@lists.php.net to get a copy of this message
Date: Sunday April 25, 1999 @ 10:10 Author: rasmus Update of /repository/php4/ext/ldap In directory php:/tmp/cvs-serv2324/ext/ldap Modified Files: config.m4 Log Message: Ok, this beast compiles via --with-apxs Not sure if it actually works yet though. I have a feeling there are some -fpic flags missing in the libzend build. Will test later on today. Index: php4/ext/ldap/config.m4 diff -u php4/ext/ldap/config.m4:1.1 php4/ext/ldap/config.m4:1.2 --- php4/ext/ldap/config.m4:1.1 Wed Apr 21 20:45:14 1999 +++ php4/ext/ldap/config.m4 Sun Apr 25 10:10:22 1999 @@ -1,4 +1,4 @@ -dnl $Id: config.m4,v 1.1 1999/04/22 00:45:14 ssb Exp $ +dnl $Id: config.m4,v 1.2 1999/04/25 14:10:22 rasmus Exp $ AC_MSG_CHECKING(for LDAP support) AC_ARG_WITH(ldap, @@ -7,17 +7,64 @@ [ if test "$withval" != "no"; then if test "$withval" = "yes"; then - LDAP_INCDIR=/usr/local/ldap/include - LDAP_LIBDIR=/usr/local/ldap/lib + if test -f /usr/include/ldap.h; then + LDAP_INCDIR=/usr/include + LDAP_LIBDIR=/usr/lib + elif test -f /usr/local/include/ldap.h; then + LDAP_INCDIR=/usr/local/include + LDAP_LIBDIR=/usr/local/lib + elif test -f /usr/local/ldap/include/ldap.h; then + LDAP_INCDIR=/usr/local/ldap/include + LDAP_LIBDIR=/usr/local/ldap/lib + else + AC_MSG_RESULT(no) + AC_MSG_ERROR(Unable to find ldap.h) + fi else - LDAP_INCDIR=$withval/include - LDAP_LIBDIR=$withval/lib + if test -f $withval/include/ldap.h; then + LDAP_INCDIR=$withval/include + LDAP_LIBDIR=$withval/lib + else + AC_MSG_RESULT(no) + AC_MSG_ERROR(Unable to find $withval/include/ldap.h) + fi fi - LDAP_INCLUDE=-I$LDAP_INCDIR - LDAP_LFLAGS="-L$LDAP_LIBDIR ${ld_runpath_switch}$LDAP_LIBDIR" - LDAP_LIBS="-lldap -llber" - INCLUDES="$INCLUDES $LDAP_INCLUDE" - EXTRA_LIBS="$EXTRA_LIBS $LDAP_LFLAGS $LDAP_LIBS" + +dnl The Linux version of the SDK need -lpthread +dnl I have tested Solaris, and it doesn't, but others may. Add +dnl these here if necessary. -RL + + if test uname = "Linux"; then + LDAP_PTHREAD="-lpthread" + else + LDAP_PTHREAD= + fi + + if test -f $LDAP_LIBDIR/liblber.a; then + LDAP_LIBS="-lldap -llber" + elif test -f $LDAP_LIBDIR/libldapssl30.so; then + LDAP_LIBS="-lldapssl30 $LDAP_PTHREAD" + AC_DEFINE(HAVE_NSLDAP) + elif test -f $LDAP_LIBDIR/libldapssl30.sl; then + LDAP_LIBS="-lldapssl30" + AC_DEFINE(HAVE_NSLDAP) + elif test -f $LDAP_LIBDIR/libldap30.so; then + LDAP_LIBS="-lldap30 $LDAP_PTHREAD" + AC_DEFINE(HAVE_NSLDAP) + elif test -f $LDAP_LIBDIR/libldap30.sl; then + LDAP_LIBS="-lldap30" + AC_DEFINE(HAVE_NSLDAP) + fi + + LDAP_INCLUDE=-I$LDAP_INCDIR + if test -n "$APXS"; then + LDAP_LFLAGS="-L$LDAP_LIBDIR ${apxs_runpath_switch}$LDAP_LIBDIR'" + else + LDAP_LFLAGS="-L$LDAP_LIBDIR ${ld_runpath_switch}$LDAP_LIBDIR" + fi + + INCLUDES="$INCLUDES $LDAP_INCLUDE" + EXTRA_LIBS="$EXTRA_LIBS $LDAP_LFLAGS $LDAP_LIBS" AC_DEFINE(HAVE_LDAP) -- PHP 4 Beta

« previous php.version4 (#510) next »