cvs: php4 / acinclude.m4 /ext/imap config.m4 /ext/informix config.m4
| From: | Jani Taskinen | Date: | Fri, 03 Aug 2001 05:17:19 +0000 |
| Subject: | cvs: php4 / acinclude.m4 /ext/imap config.m4 /ext/informix config.m4 | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-6500@lists.php.net to get a copy of this message | ||
sniper Fri Aug 3 01:17:19 2001 EDT
Modified files:
/php4 acinclude.m4
/php4/ext/imap config.m4
/php4/ext/informix config.m4
Log:
Changed the PHP_ADD_LIBRARY_DEFER() to work when building
standalone extensions. Also improved the checks for SSL and Kerberos in
IMAP extension configure.
Index: php4/acinclude.m4
diff -u php4/acinclude.m4:1.136 php4/acinclude.m4:1.137
--- php4/acinclude.m4:1.136 Fri Jun 15 08:53:20 2001
+++ php4/acinclude.m4 Fri Aug 3 01:17:16 2001
@@ -1,4 +1,4 @@
-dnl $Id: acinclude.m4,v 1.136 2001/06/15 12:53:20 sas Exp $
+dnl $Id: acinclude.m4,v 1.137 2001/08/03 05:17:16 sniper Exp $
dnl
dnl This file contains local autoconf functions.
@@ -749,13 +749,27 @@
])
dnl
-dnl PHP_ADD_LIBRARY_DEFER(library[, append])
+dnl PHP_ADD_LIBRARY_DEFER(library[, append[, shared-libadd]])
dnl
dnl add a library to the link line (deferred)
+dnl
AC_DEFUN(PHP_ADD_LIBRARY_DEFER,[
- ifelse($#, 1, DLIBS="-l$1 $DLIBS", DLIBS="$DLIBS -l$1")
+ case $1 in
+ c|c_r|pthread*) ;;
+ *)
+ifelse($3,,[
+ PHP_X_ADD_LIBRARY($1,$2,DLIBS)
+],[
+ if test "$ext_shared" = "yes"; then
+ PHP_X_ADD_LIBRARY($1,$2,$3)
+ else
+ PHP_ADD_LIBRARY_DEFER($1,$2)
+ fi
])
-
+ ;;
+ esac
+])
+
dnl
dnl PHP_ADD_LIBRARY_WITH_PATH(library, path[, shared-libadd])
dnl
Index: php4/ext/imap/config.m4
diff -u php4/ext/imap/config.m4:1.36 php4/ext/imap/config.m4:1.37
--- php4/ext/imap/config.m4:1.36 Thu Aug 2 07:23:01 2001
+++ php4/ext/imap/config.m4 Fri Aug 3 01:17:17 2001
@@ -1,5 +1,5 @@
dnl
-dnl $Id: config.m4,v 1.36 2001/08/02 11:23:01 thies Exp $
+dnl $Id: config.m4,v 1.37 2001/08/03 05:17:17 sniper Exp $
dnl
AC_DEFUN(IMAP_INC_CHK,[if test -r "$i$1/c-client.h"; then
@@ -22,8 +22,12 @@
])
AC_DEFUN(PHP_IMAP_KRB_CHK, [
- PHP_ARG_WITH(kerberos,for Kerberos support in IMAP,
- [ --with-kerberos[=DIR] IMAP: Include Kerberos support. DIR is the Kerberos install dir.])
+ AC_ARG_WITH(kerberos,
+ [ --with-kerberos[=DIR] IMAP: Include Kerberos support. DIR is the Kerberos install dir.],[
+ PHP_KERBEROS=$withval
+ ],[
+ PHP_KERBEROS=no
+ ])
if test "$PHP_KERBEROS" = "yes"; then
test -d /usr/kerberos && PHP_KERBEROS=/usr/kerberos
@@ -36,27 +40,40 @@
PHP_ADD_LIBRARY(krb5, 1, IMAP_SHARED_LIBADD)
PHP_ADD_LIBRARY(k5crypto, 1, IMAP_SHARED_LIBADD)
PHP_ADD_LIBRARY(com_err, 1, IMAP_SHARED_LIBADD)
+ else
+ AC_EGREP_HEADER(auth_gss, $IMAP_INC_DIR/linkage.h, [
+ AC_MSG_ERROR(This c-client library is build with Kerberos support.
+
+ Add --with-kerberos<=DIR> to your configure line. Check config.log for details.)
+ ])
fi
+
])
AC_DEFUN(PHP_IMAP_SSL_CHK, [
- PHP_ARG_WITH(imap-ssl,for SSL support in IMAP,
- [ --with-imap-ssl[=DIR] IMAP: Include SSL support. DIR is the OpenSSL install dir.])
+ AC_ARG_WITH(imap-ssl,
+ [ --with-imap-ssl[=DIR] IMAP: Include SSL support. DIR is the OpenSSL install dir.],[
+ PHP_IMAP_SSL=$withval
+ ],[
+ PHP_IMAP_SSL=no
+ ])
if test "$PHP_IMAP_SSL" = "yes"; then
PHP_IMAP_SSL=/usr
fi
if test "$PHP_IMAP_SSL" != "no"; then
+ AC_DEFINE(HAVE_IMAP_SSL,1,[ ])
PHP_ADD_LIBPATH($PHP_IMAP_SSL/lib, IMAP_SHARED_LIBADD)
- PHP_ADD_LIBRARY_DEFER(crypto)
- PHP_ADD_LIBRARY_DEFER(ssl)
-
+ PHP_ADD_LIBRARY_DEFER(ssl,, IMAP_SHARED_LIBADD)
+ PHP_ADD_LIBRARY_DEFER(crypto,, IMAP_SHARED_LIBADD)
+ else
old_LIBS=$LIBS
- LIBS="$LIBS -lc-client -lcrypto -lssl"
+ LIBS="$LIBS -L$IMAP_LIBDIR -lc-client"
if test $PHP_KERBEROS != "no"; then
- LIBS="$LIBS -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err"
+ LIBS="$LIBS -L$PHP_KERBEROS/lib -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err"
fi
+
AC_TRY_RUN([
void mm_log(void){}
void mm_dlog(void){}
@@ -73,15 +90,15 @@
void mm_exists(void){}
void mm_searched(void){}
void mm_expunged(void){}
- char ssl_onceonlyinit();
+ char mail_open();
int main() {
- ssl_onceonlyinit();
+ mail_open();
return 0;
}
- ],[
- AC_DEFINE(HAVE_IMAP_SSL,1,[ ])
- ], [
- AC_MSG_ERROR(Problem with c-client library. Please check config.log for more information.)
+ ],,[
+ AC_MSG_ERROR(This c-client library is build with SSL support.
+
+ Add --with-imap-ssl<=DIR> to your configure line. Check config.log for details.)
])
LIBS=$old_LIBS
fi
@@ -89,8 +106,7 @@
PHP_ARG_WITH(imap,for IMAP support,
-[ --with-imap[=DIR] Include IMAP support. DIR is the IMAP include
- and c-client.a directory.])
+[ --with-imap[=DIR] Include IMAP support. DIR is the c-client install prefix.])
if test "$PHP_IMAP" != "no"; then
@@ -109,7 +125,8 @@
done
AC_CHECK_LIB(pam, pam_start)
-
+ AC_CHECK_LIB(crypt, crypt)
+
PHP_EXPAND_PATH($IMAP_DIR, IMAP_DIR)
if test -z "$IMAP_DIR"; then
@@ -134,7 +151,7 @@
PHP_ADD_INCLUDE($IMAP_INC_DIR)
PHP_ADD_LIBPATH($IMAP_LIBDIR, IMAP_SHARED_LIBADD)
- PHP_ADD_LIBRARY_DEFER($IMAP_LIB)
+ PHP_ADD_LIBRARY_DEFER($IMAP_LIB,, IMAP_SHARED_LIBADD)
PHP_IMAP_KRB_CHK
PHP_IMAP_SSL_CHK
fi
Index: php4/ext/informix/config.m4
diff -u php4/ext/informix/config.m4:1.22 php4/ext/informix/config.m4:1.23
--- php4/ext/informix/config.m4:1.22 Mon Jul 30 06:09:51 2001
+++ php4/ext/informix/config.m4 Fri Aug 3 01:17:18 2001
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.22 2001/07/30 10:09:51 sniper Exp $
+dnl $Id: config.m4,v 1.23 2001/08/03 05:17:18 sniper Exp $
PHP_ARG_WITH(informix,for Informix support,
[ --with-informix[=DIR] Include Informix support. DIR is the Informix base
@@ -62,7 +62,7 @@
*.o)
IFX_LIBOBJS="$IFX_LIBOBJS $i"
PHP_ADD_LIBPATH($ext_builddir, INFORMIX_SHARED_LIBADD)
- PHP_ADD_LIBRARY_DEFER(phpifx, 1)
+ PHP_ADD_LIBRARY_DEFER(phpifx, 1, INFORMIX_SHARED_LIBADD)
;;
-lm)
;;
@@ -70,7 +70,7 @@
;;
-l*)
lib=
echo $i | cut -c 3-
- PHP_ADD_LIBRARY_DEFER($lib, 1)
+ PHP_ADD_LIBRARY_DEFER($lib, 1, INFORMIX_SHARED_LIBADD)
;;
*.a)
case "uname -s 2>/dev/null" in