[PHP-CVS] cvs: php4 /ext/cyrus config.m4

2002-12-10 Thread Jani Taskinen
sniper  Tue Dec 10 11:34:20 2002 EDT

  Modified files:  
/php4/ext/cyrus config.m4 
  Log:
  This extension requires cyrus-imap = 2.0.8
  
  
Index: php4/ext/cyrus/config.m4
diff -u php4/ext/cyrus/config.m4:1.11 php4/ext/cyrus/config.m4:1.12
--- php4/ext/cyrus/config.m4:1.11   Mon Dec  9 13:30:50 2002
+++ php4/ext/cyrus/config.m4Tue Dec 10 11:34:20 2002
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.11 2002/12/09 18:30:50 sniper Exp $
+dnl $Id: config.m4,v 1.12 2002/12/10 16:34:20 sniper Exp $
 dnl
 
 PHP_ARG_WITH(cyrus, for cyrus imap support,
@@ -18,10 +18,20 @@
   PHP_ADD_INCLUDE($i/include)
   PHP_ADD_LIBRARY_WITH_PATH(cyrus, $i/lib, CYRUS_SHARED_LIBADD)
   found_cyrus=yes
+  CYRUS_INCPATH=$i/include
   break 2
 fi
   done
 
+  dnl Check that imclient_connect() accepts 4 args
+  old_CPPFLAGS=$CPPFLAGS
+  CPPFLAGS=-I$CYRUS_INCPATH
+  AC_TRY_COMPILE([#include stdio.h
+#include cyrus/imclient.h], [imclient_connect(0,0,0,0)], [], [
+AC_MSG_ERROR(cyrus-imap version 2.0.8 or greater required)
+  ])
+  CPPFLAGS=$old_CPPFLAGS
+  
   if test $found_cyrus = no; then
 AC_MSG_RESULT(not found)
 AC_MSG_ERROR(Please Re-install the cyrus distribution)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/cyrus config.m4

2002-12-09 Thread Jani Taskinen
sniper  Mon Dec  9 13:05:37 2002 EDT

  Modified files:  
/php4/ext/cyrus config.m4 
  Log:
  Fix the build with new cyrus and sasl2 libs
  
  
Index: php4/ext/cyrus/config.m4
diff -u php4/ext/cyrus/config.m4:1.8 php4/ext/cyrus/config.m4:1.9
--- php4/ext/cyrus/config.m4:1.8Sun Sep  8 16:59:53 2002
+++ php4/ext/cyrus/config.m4Mon Dec  9 13:05:37 2002
@@ -1,9 +1,9 @@
 dnl
-dnl $Id: config.m4,v 1.8 2002/09/08 20:59:53 jon Exp $
+dnl $Id: config.m4,v 1.9 2002/12/09 18:05:37 sniper Exp $
 dnl
 
 PHP_ARG_WITH(cyrus, for cyrus imap support,
-[  --with-cyrusInclude Cyrus IMAP support])
+[  --with-cyrus[=dir]  Include Cyrus IMAP support])
 
 if test $PHP_CYRUS != no; then
   found_cyrus=no
@@ -19,12 +19,18 @@
 
 if test -r $i/include/sasl.h  test $found_sasl = no; then
   PHP_ADD_INCLUDE($i/include)
-  PHP_ADD_LIBRARY_WITH_PATH(sasl, $i/lib, CYRUS_SHARED_LIBADD)
   found_sasl=yes
 elif test -r $i/include/sasl/sasl.h  test $found_sasl = no; then
   PHP_ADD_INCLUDE($i/include/sasl)
-  PHP_ADD_LIBRARY_WITH_PATH(sasl, $i/lib, CYRUS_SHARED_LIBADD)
   found_sasl=yes
+fi
+
+if test $found_sasl = yes; then
+  if test -f $i/lib/libsasl2.a || test -f $i/lib/libsasl2.$SHLIB_SUFFIX_NAME; then
+PHP_ADD_LIBRARY_WITH_PATH(sasl2, $i/lib, CYRUS_SHARED_LIBADD)
+  else
+PHP_ADD_LIBRARY_WITH_PATH(sasl, $i/lib, CYRUS_SHARED_LIBADD)
+  fi
 fi
 
 if test -r $i/include/openssl/ssl.h  test $found_openssl = no  test 
$PHP_OPENSSL = no; then



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/cyrus config.m4

2002-12-09 Thread Jani Taskinen
sniper  Mon Dec  9 13:29:23 2002 EDT

  Modified files:  
/php4/ext/cyrus config.m4 
  Log:
  Make this actually work too.
  
  
Index: php4/ext/cyrus/config.m4
diff -u php4/ext/cyrus/config.m4:1.9 php4/ext/cyrus/config.m4:1.10
--- php4/ext/cyrus/config.m4:1.9Mon Dec  9 13:05:37 2002
+++ php4/ext/cyrus/config.m4Mon Dec  9 13:29:22 2002
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.9 2002/12/09 18:05:37 sniper Exp $
+dnl $Id: config.m4,v 1.10 2002/12/09 18:29:22 sniper Exp $
 dnl
 
 PHP_ARG_WITH(cyrus, for cyrus imap support,
@@ -10,13 +10,27 @@
   found_sasl=no
   found_openssl=no
 
-  for i in /usr /usr/local $PHP_CYRUS; do
+  dnl
+  dnl Cyrus
+  dnl
+  for i in $PHP_CYRUS /usr/local /usr; do
 if test -r $i/include/cyrus/imclient.h  test $found_cyrus = no; then
   PHP_ADD_INCLUDE($i/include)
   PHP_ADD_LIBRARY_WITH_PATH(cyrus, $i/lib, CYRUS_SHARED_LIBADD)
   found_cyrus=yes
+  break 2
 fi
+  done
+
+  if test $found_cyrus = no; then
+AC_MSG_RESULT(not found)
+AC_MSG_ERROR(Please Re-install the cyrus distribution)
+  fi
 
+  dnk
+  dnl sasl/sasl2 
+  dnl
+  for i in $PHP_CYRUS /usr/local /usr; do
 if test -r $i/include/sasl.h  test $found_sasl = no; then
   PHP_ADD_INCLUDE($i/include)
   found_sasl=yes
@@ -31,25 +45,28 @@
   else
 PHP_ADD_LIBRARY_WITH_PATH(sasl, $i/lib, CYRUS_SHARED_LIBADD)
   fi
-fi
-
-if test -r $i/include/openssl/ssl.h  test $found_openssl = no  test 
$PHP_OPENSSL = no; then
-  PHP_ADD_LIBRARY_WITH_PATH(ssl, $i/lib, CYRUS_SHARED_LIBADD)
-  PHP_ADD_LIBRARY_WITH_PATH(crypto, $i/lib, CYRUS_SHARED_LIBADD)
-  found_openssl=yes
+  break 2
 fi
   done
-
-  if test $found_cyrus = no; then
-AC_MSG_RESULT(not found)
-AC_MSG_ERROR(Please Re-install the cyrus distribution)
-  fi
-
+  
   if test $found_sasl = no; then
 AC_MSG_RESULT(sasl not found)
 AC_MSG_ERROR(Please Re-install the cyrus distribution)
   fi
 
+  dnk
+  dnl OpenSSL
+  dnl
+  if test $PHP_OPENSSL = no; then
+for i in $PHP_CYRUS /usr/local /usr; do
+  if test -r $i/include/openssl/ssl.h; then
+PHP_ADD_LIBRARY_WITH_PATH(ssl, $i/lib, CYRUS_SHARED_LIBADD)
+PHP_ADD_LIBRARY_WITH_PATH(crypto, $i/lib, CYRUS_SHARED_LIBADD)
+break 2
+  fi
+done
+  fi
+  
   PHP_NEW_EXTENSION(cyrus, cyrus.c, $ext_shared)
   PHP_SUBST(CYRUS_SHARED_LIBADD)
   AC_DEFINE(HAVE_CYRUS,1,[ ])



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/cyrus config.m4

2002-12-09 Thread Jani Taskinen
sniper  Mon Dec  9 13:30:51 2002 EDT

  Modified files:  
/php4/ext/cyrus config.m4 
  Log:
  fix typos
  
  
Index: php4/ext/cyrus/config.m4
diff -u php4/ext/cyrus/config.m4:1.10 php4/ext/cyrus/config.m4:1.11
--- php4/ext/cyrus/config.m4:1.10   Mon Dec  9 13:29:22 2002
+++ php4/ext/cyrus/config.m4Mon Dec  9 13:30:50 2002
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.10 2002/12/09 18:29:22 sniper Exp $
+dnl $Id: config.m4,v 1.11 2002/12/09 18:30:50 sniper Exp $
 dnl
 
 PHP_ARG_WITH(cyrus, for cyrus imap support,
@@ -27,7 +27,7 @@
 AC_MSG_ERROR(Please Re-install the cyrus distribution)
   fi
 
-  dnk
+  dnl
   dnl sasl/sasl2 
   dnl
   for i in $PHP_CYRUS /usr/local /usr; do
@@ -54,7 +54,7 @@
 AC_MSG_ERROR(Please Re-install the cyrus distribution)
   fi
 
-  dnk
+  dnl
   dnl OpenSSL
   dnl
   if test $PHP_OPENSSL = no; then



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php