]> granicus.if.org Git - php/commitdiff
Make this actually work too.
authorfoobar <sniper@php.net>
Mon, 9 Dec 2002 18:29:22 +0000 (18:29 +0000)
committerfoobar <sniper@php.net>
Mon, 9 Dec 2002 18:29:22 +0000 (18:29 +0000)
ext/cyrus/config.m4

index 87d3d68e547ababa01e645d4e50303e9f0d228d0..c189c5dd8a3d44e8323ef4fb66b4ed00cc982df6 100644 (file)
@@ -10,13 +10,27 @@ if test "$PHP_CYRUS" != "no"; then
   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 @@ if test "$PHP_CYRUS" != "no"; then
       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,[ ])