YACC = @YACC@
MAINT = @MAINT@
APXS = @APXS@
-APXS_LDFLAGS = @APXS_LDFLAGS@
+APXS_LDFLAGS = $(EXTRA_LIBS)
WARNING_LEVEL = @WARNING_LEVEL@
SOURCE = main.c internal_functions.c snprintf.c php3_sprintf.c \
$(CC) $(CFLAGS) -o $(BINNAME) $(LDFLAGS) $(OBJS) $(LIBS)
# Apache modules
-libphp3.a libmodphp3.a libmodphp3-so.a: all-recursive $(OBJS)
+libphp3.a libmodphp3.a: all-recursive $(OBJS)
$(AR) $@.tmp $(OBJS)
$(srcdir)/scripts/armerge $@ $@.tmp ext/libphpext.a $(srcdir)/libzend/libzend.a
@rm -f $@.tmp
$(RANLIB) $(BINNAME)
+# Apache modules
+libmodphp3-so.a: all-recursive $(OBJS)
+ $(AR) $@.tmp $(OBJS)
+ $(srcdir)/scripts/armerge $@ $@.tmp ext/libphpext.a $(srcdir)/libzend/libzend.a
+ @rm -f $@.tmp
+ $(RANLIB) libmodphp3-so.a
+
# Apache 1.3 shared module
libphp3.so: $(srcdir)/mod_php3.c libmodphp3-so.a
$(APXS) -c -o libphp3.so $(APXS_LDFLAGS) mod_php3.c libmodphp3-so.a
AC_MSG_RESULT($php_cv_cc_dashr)
if test $php_cv_cc_dashr = "yes"; then
ld_runpath_switch="-R"
- apxs_runpath_switch="-Wl,-R"
+ apxs_runpath_switch="-Wl,-R'"
else
AC_MSG_CHECKING([if compiler supports -Wl,-rpath,])
AC_CACHE_VAL(php_cv_cc_rpath,[
AC_MSG_RESULT($php_cv_cc_rpath)
if test $php_cv_cc_rpath = "yes"; then
ld_runpath_switch="-Wl,-rpath,"
- apxs_runpath_switch="-Wl,-rpath "
+ apxs_runpath_switch="-Wl,'-rpath "
else
dnl something innocuous
ld_runpath_switch="-L"
- apxs_runpath_switch="-L"
+ apxs_runpath_switch="-L'"
fi
fi
LDFLAGS_SHLIB_EXPORT=`perl -V:ccdlflags | cut -d\' -f2`
PHP_LIBS=
STRONGHOLD=
+ INCLUDES="$INCLUDES $APACHE_INCLUDE"
AC_DEFINE(APACHE)
AC_SUBST(APXS)
AC_SUBST(APXS_LDFLAGS)
AC_SUBST(BINNAME)
AC_SUBST(INSTALL_IT)
AC_SUBST(PHP_LIBS)
+ AC_SUBST(APACHE_INCLUDE)
AC_DEFINE(HAVE_AP_CONFIG_H)
AC_DEFINE(HAVE_AP_COMPAT_H)
AC_MSG_RESULT(yes)
[
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)