])
AM_CONDITIONAL(USE_GSS, test x$need_gss = xyes)
-AC_ARG_ENABLE(ssl, [ --enable-ssl Enable SSL support for IMAP],
+AC_ARG_WITH(ssl, [ --with-ssl[=PFX] Compile in SSL socket support for IMAP],
[ if test "$need_imap" != "yes"; then
AC_MSG_ERROR([SSL support is only for IMAP, but IMAP is not enabled])
fi
-
+
+ if test "x$withval" != "x"; 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_DEFINE(USE_SSL)