<<< Date Index >>>     <<< Thread Index >>>

configure: Don't treat --enable-ssl without POP or IMAP as an error



The current configure script treats --enable-ssl as an error when
there's no POP or IMAP built in.  That's not necessary, a warning
will do.

Changeset attached.
-- 
Thomas Roessler   <roessler@xxxxxxxxxxxxxxxxxx>
# HG changeset patch
# User Thomas Roessler <roessler@xxxxxxxxxxxxxxxxxx>
# Date 1172827781 -3600
# Node ID 904ecad78c996ee6640170f8474cba09c4dad852
# Parent  f1c800817281830877f76916331866a3113f4ddd
Make --enable-ssl without pop or imap a mere warning.

diff -r f1c800817281 -r 904ecad78c99 configure.in
--- a/configure.in      Fri Mar 02 01:25:41 2007 +0000
+++ b/configure.in      Fri Mar 02 10:29:41 2007 +0100
@@ -638,28 +638,27 @@ AC_ARG_WITH(ssl, AC_HELP_STRING([--with-
 [       if test "$with_ssl" != "no"
         then
           if test "$need_socket" != "yes"; then
-           AC_MSG_ERROR([SSL support is only useful with POP or IMAP support])
+           AC_MSG_WARN([SSL support is only useful with POP or IMAP support])
+         else
+            if test "$with_ssl" != "yes"
+            then
+             LDFLAGS="$LDFLAGS -L$withval/lib"
+             CPPFLAGS="$CPPFLAGS -I$withval/include"
+            fi
+            saved_LIBS="$LIBS"
+
+            AC_CHECK_LIB(crypto, X509_new,, AC_MSG_ERROR([Unable to find SSL 
library]))
+            AC_CHECK_LIB(ssl, SSL_new,, AC_MSG_ERROR([Unable to find SSL 
library]), -lcrypto)
+
+            AC_CHECK_FUNCS(RAND_status RAND_egd)
+
+            AC_DEFINE(USE_SSL,1,[ Define if you want support for SSL. ])
+            AC_DEFINE(USE_SSL_OPENSSL,1,[ Define if you want support for SSL 
via OpenSSL. ])
+            LIBS="$saved_LIBS"
+            MUTTLIBS="$MUTTLIBS -lssl -lcrypto"
+            MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_ssl.o"
+            need_ssl=yes
           fi
-
-          if test "$with_ssl" != "yes"
-          then
-           LDFLAGS="$LDFLAGS -L$withval/lib"
-           CPPFLAGS="$CPPFLAGS -I$withval/include"
-          fi
-          saved_LIBS="$LIBS"
-
-          AC_CHECK_LIB(crypto, X509_new,, AC_MSG_ERROR([Unable to find SSL 
library]))
-          AC_CHECK_LIB(ssl, SSL_new,, AC_MSG_ERROR([Unable to find SSL 
library]), -lcrypto)
-
-          AC_CHECK_FUNCS(RAND_status RAND_egd)
-
-          AC_DEFINE(USE_SSL,1,[ Define if you want support for SSL. ])
-          AC_DEFINE(USE_SSL_OPENSSL,1,[ Define if you want support for SSL via 
OpenSSL. ])
-          LIBS="$saved_LIBS"
-          MUTTLIBS="$MUTTLIBS -lssl -lcrypto"
-          MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_ssl.o"
-          need_ssl=yes
-
         fi
 ])