Hi.
With php-4.3.0-dev from CVS configure allways fails at:
checking whether SSL libraries are needed for c-client... /usr/lib
checking whether IMAP works... configure: error: build test failed. Please
check the config.log for details.
Reverting back to the old ext/imap/config.m4 fixes this as in the attached
patch.
Chears.
--
Regards // Oden Eriksson
Deserve-IT Networks -> http://d-srv.com
--- ext/imap/config.m4.old 2002-07-24 10:56:04.000000000 +0200
+++ ext/imap/config.m4 2002-07-13 02:46:59.000000000 +0200
@@ -1,5 +1,5 @@
dnl
-dnl $Id: config.m4,v 1.44 2002/06/01 20:14:57 sr Exp $
+dnl $Id: config.m4,v 1.46 2002/07/12 22:11:54 sniper Exp $
dnl
AC_DEFUN(IMAP_INC_CHK,[if test -r "$i$1/c-client.h"; then
@@ -21,6 +21,40 @@
done
])
+dnl PHP_IMAP_TEST_BUILD(action-if-ok, action-if-not-ok [, extra-libs])
+AC_DEFUN(PHP_IMAP_TEST_BUILD, [
+ old_LIBS=$LIBS
+ LIBS="$3 $LIBS"
+ AC_TRY_RUN([
+ void mm_log(void){}
+ void mm_dlog(void){}
+ void mm_flags(void){}
+ void mm_fatal(void){}
+ void mm_critical(void){}
+ void mm_nocritical(void){}
+ void mm_notify(void){}
+ void mm_login(void){}
+ void mm_diskerror(void){}
+ void mm_status(void){}
+ void mm_lsub(void){}
+ void mm_list(void){}
+ void mm_exists(void){}
+ void mm_searched(void){}
+ void mm_expunged(void){}
+ char mail_open();
+ int main() {
+ mail_open(0,"",0);
+ return 0;
+ }
+ ], [
+ LIBS=$old_LIBS
+ $1
+ ],[
+ LIBS=$old_LIBS
+ $2
+ ])
+])
+
AC_DEFUN(PHP_IMAP_KRB_CHK, [
AC_ARG_WITH(kerberos,
[ --with-kerberos[=DIR] IMAP: Include Kerberos support. DIR is the Kerberos install dir.],[
@@ -34,6 +68,12 @@
fi
if test "$PHP_KERBEROS" != "no"; then
+ if test ! -f $PHP_KERBEROS/lib/libkrb5.a && test ! -f $PHP_KERBEROS/lib/libkrb5.$SHLIB_SUFFIX_NAME; then
+ AC_MSG_ERROR([Kerberos libraries not found in $PHP_KERBEROS/lib.
+
+ Check the path given to --with-kerberos (if no path is given, defaults to /usr/kerberos )
+ ])
+ fi
AC_DEFINE(HAVE_IMAP_KRB,1,[ ])
PHP_ADD_LIBPATH($PHP_KERBEROS/lib, IMAP_SHARED_LIBADD)
PHP_ADD_LIBRARY(gssapi_krb5, 1, IMAP_SHARED_LIBADD)
@@ -42,9 +82,10 @@
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.
+ 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.)
+ Add --with-kerberos<=DIR> to your configure line. Check config.log for details.
+ ])
])
fi
@@ -62,45 +103,29 @@
PHP_IMAP_SSL=/usr
fi
+ AC_MSG_CHECKING([whether SSL libraries are needed for c-client])
+
if test "$PHP_IMAP_SSL" != "no"; then
+ AC_MSG_RESULT([$PHP_IMAP_SSL/lib])
AC_DEFINE(HAVE_IMAP_SSL,1,[ ])
PHP_ADD_LIBPATH($PHP_IMAP_SSL/lib, IMAP_SHARED_LIBADD)
PHP_ADD_LIBRARY_DEFER(ssl,, IMAP_SHARED_LIBADD)
PHP_ADD_LIBRARY_DEFER(crypto,, IMAP_SHARED_LIBADD)
else
- old_LIBS=$LIBS
- LIBS="$LIBS -L$IMAP_LIBDIR -l$IMAP_LIB"
+ TST_LIBS="-L$IMAP_LIBDIR -l$IMAP_LIB"
if test $PHP_KERBEROS != "no"; then
- LIBS="$LIBS -L$PHP_KERBEROS/lib -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err"
+ TST_LIBS="$TST_LIBS -L$PHP_KERBEROS/lib -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err"
fi
- AC_TRY_RUN([
- void mm_log(void){}
- void mm_dlog(void){}
- void mm_flags(void){}
- void mm_fatal(void){}
- void mm_critical(void){}
- void mm_nocritical(void){}
- void mm_notify(void){}
- void mm_login(void){}
- void mm_diskerror(void){}
- void mm_status(void){}
- void mm_lsub(void){}
- void mm_list(void){}
- void mm_exists(void){}
- void mm_searched(void){}
- void mm_expunged(void){}
- char mail_open();
- int main() {
- mail_open(0,"",0);
- return 0;
- }
- ],,[
- 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
+ PHP_IMAP_TEST_BUILD([
+ AC_MSG_RESULT(no)
+ ], [
+ AC_MSG_RESULT(yes)
+ 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.
+ ])
+ ], $TST_LIBS)
fi
])
@@ -166,4 +191,12 @@
PHP_ADD_LIBRARY_DEFER($IMAP_LIB,, IMAP_SHARED_LIBADD)
PHP_IMAP_KRB_CHK
PHP_IMAP_SSL_CHK
+
+ dnl Test the build in the end
+ AC_MSG_CHECKING(whether IMAP works)
+ PHP_IMAP_TEST_BUILD([
+ AC_MSG_RESULT(yes)
+ ], [
+ AC_MSG_ERROR([build test failed. Please check the config.log for details.])
+ ], $DLIBS)
fi
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php