diff --git a/configure b/configure index f4af7bb..200c6eb 100755 --- a/configure +++ b/configure @@ -10778,25 +10778,23 @@ _ACEOF fi - fi - if test x"$ac_cv_lib_ssl_SSL_accept" = x"yes"; then +fi -cat >>confdefs.h <<\_ACEOF -#define HAVE_SSL 1 -_ACEOF - - else - if test x"$with_ssl" = x"yes"; then - { { echo "$as_me:$LINENO: error: --with-ssl given, but could not find OpenSSL. + if test x"$ac_cv_lib_ssl_SSL_accept" != x"yes"; then + if test x"$with_ssl" = x"yes"; then + { { echo "$as_me:$LINENO: error: --with-ssl given, but could not find OpenSSL. See \`config.log' for more details." >&5 echo "$as_me: error: --with-ssl given, but could not find OpenSSL. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } - else - { echo "$as_me:$LINENO: WARNING: OpenSSL not found, will not have SSL support." >&5 +else + { echo "$as_me:$LINENO: WARNING: OpenSSL not found, will not have SSL support." >&5 echo "$as_me: WARNING: OpenSSL not found, will not have SSL support." >&2;} - fi - fi +fi + + +fi + ;; esac diff --git a/configure.in b/configure.in index 3694a7f..3b4df86 100644 --- a/configure.in +++ b/configure.in @@ -563,19 +563,12 @@ esac case "$with_ssl" in yes|check) AC_CHECK_LIB([crypto], [ERR_get_error], [], [], []) - if test x"$ac_cv_lib_crypto_ERR_get_error" = x"yes"; then - AC_CHECK_LIB([ssl], [SSL_accept], [], [], []) - fi - if test x"$ac_cv_lib_ssl_SSL_accept" = x"yes"; then - dnl This would be unnecessary if we used HAVE_LIBSSL in the code - AC_DEFINE(HAVE_SSL, 1, Define this if the system has SSL support.) - else - if test x"$with_ssl" = x"yes"; then - AC_MSG_FAILURE([--with-ssl given, but could not find OpenSSL.]) - else - AC_MSG_WARN([OpenSSL not found, will not have SSL support.]) - fi - fi + AS_IF([test x"$ac_cv_lib_crypto_ERR_get_error" = x"yes"], [AC_CHECK_LIB([ssl], [SSL_accept], [], [], [])], []) + AS_IF([test x"$ac_cv_lib_ssl_SSL_accept" != x"yes"], + [AS_IF([test x"$with_ssl" = x"yes"], + [AC_MSG_FAILURE([--with-ssl given, but could not find OpenSSL.])], + [AC_MSG_WARN([OpenSSL not found, will not have SSL support.])]) + ], []) ;; esac diff --git a/include/defs.h.in b/include/defs.h.in index 189633b..732b189 100644 --- a/include/defs.h.in +++ b/include/defs.h.in @@ -222,9 +222,6 @@ /* Define to 1 if the system has the type `socklen_t'. */ #undef HAVE_SOCKLEN_T -/* Define this if the system has SSL support. */ -#undef HAVE_SSL - /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H