sniper          Mon Dec  9 14:16:12 2002 EDT

  Modified files:              (Branch: PHP_4_3)
    /php4/ext/cyrus     config.m4 
  Log:
  MFH
  
  
Index: php4/ext/cyrus/config.m4
diff -u php4/ext/cyrus/config.m4:1.8 php4/ext/cyrus/config.m4:1.8.2.1
--- php4/ext/cyrus/config.m4:1.8        Sun Sep  8 16:59:53 2002
+++ php4/ext/cyrus/config.m4    Mon Dec  9 14:16:12 2002
@@ -1,49 +1,72 @@
 dnl
-dnl $Id: config.m4,v 1.8 2002/09/08 20:59:53 jon Exp $
+dnl $Id: config.m4,v 1.8.2.1 2002/12/09 19:16:12 sniper Exp $
 dnl
 
 PHP_ARG_WITH(cyrus, for cyrus imap support,
-[  --with-cyrus            Include Cyrus IMAP support])
+[  --with-cyrus[=dir]      Include Cyrus IMAP support])
 
 if test "$PHP_CYRUS" != "no"; then
   found_cyrus=no
   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
+
+  dnl
+  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)
-      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 -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
+    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
+      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
 
+  dnl
+  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

Reply via email to