]> granicus.if.org Git - php/commitdiff
Ok, this beast compiles via --with-apxs
authorRasmus Lerdorf <rasmus@php.net>
Sun, 25 Apr 1999 14:10:23 +0000 (14:10 +0000)
committerRasmus Lerdorf <rasmus@php.net>
Sun, 25 Apr 1999 14:10:23 +0000 (14:10 +0000)
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.

Makefile.in
acconfig.h.in
configure.in.in
ext/ldap/config.m4
ext/mysql/config.m4

index d40d09baf573b0a504b3b1109c9c4008f9abbf29..fc34fc176cc6efa5b0d7e16642871a8af54cf7ca 100644 (file)
@@ -56,7 +56,7 @@ RANLIB = @RANLIB@
 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 \
@@ -87,12 +87,19 @@ php: all-recursive $(OBJS) @REGEX_LIB@ @FHTTPD_LIB@
        $(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
index 335ec985459af2c79137d34d60f0c2b95700eed6..99d9b69ba47ed5b2ad4dd3d3c61d34fab4818969 100644 (file)
@@ -37,6 +37,9 @@
 /* Define if you have the bind library (-lbind). */
 #define HAVE_LIBBIND 0
 
+/* Define if you have Netscape LDAP instead of umich ldap or openldap*/
+#define HAVE_NSLDAP 0
+
 /* Define if you want safe mode enabled by default. */
 #define PHP_SAFE_MODE 0
 
index 55ab6aba659ca3493f81cf91c8d36ab0c45f7b92..9c970dfbe3d42717871c23e4fb4ee2758e8a897d 100644 (file)
@@ -96,7 +96,7 @@ AC_CACHE_VAL(php_cv_cc_dashr,[
 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,[
@@ -107,11 +107,11 @@ else
        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
 
@@ -325,12 +325,14 @@ AC_ARG_WITH(apxs,
     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)
index 876c739b97fe59036e745f3f1675d60dceb48dcb..d966fb8d8ae78bf20e8d65a971d87bd0b11d848b 100644 (file)
@@ -7,17 +7,64 @@ AC_ARG_WITH(ldap,
 [
   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)
 
index 8f2e24ef25d4318910e04a91d729ed92dadbb640..59cf779197227c1dd3eca2ad7672fdcfe20e8ef8 100644 (file)
@@ -38,7 +38,7 @@ AC_ARG_WITH(mysql,
                fi
                MYSQL_INCLUDE=-I$MYSQL_INCDIR
                if test -n "$APXS"; then
-                       MYSQL_LFLAGS="'${apxs_runpath_switch}$MYSQL_LIBDIR' -L$MYSQL_LIBDIR"
+                       MYSQL_LFLAGS="${apxs_runpath_switch}$MYSQL_LIBDIR' -L$MYSQL_LIBDIR"
                else
                        MYSQL_LFLAGS="${ld_runpath_switch}$MYSQL_LIBDIR -L$MYSQL_LIBDIR"
                fi