diff --git a/configure b/configure index dbb5dd60b..96de5503f 100755 --- a/configure +++ b/configure @@ -6050,8 +6050,14 @@ if test $ac_cv_header_openssl_ssl_h = yes; then : else use_openssl="no" + if test "$with_openssl" = "yes"; then + { { echo "$as_me:$LINENO: error: OpenSSL was explicitly requested but openssl/ssl.h was not found. Try the --with-openssl=DIR argument to give the location of OpenSSL or run configure with --without-openssl." >&5 +echo "$as_me: error: OpenSSL was explicitly requested but openssl/ssl.h was not found. Try the --with-openssl=DIR argument to give the location of OpenSSL or run configure with --without-openssl." >&2;} + { (exit 1); exit 1; }; } + fi { echo "$as_me:$LINENO: WARNING: Failed to find openssl/ssl.h so OpenSSL will not be used. If it is installed you can try the --with-openssl=DIR argument" >&5 echo "$as_me: WARNING: Failed to find openssl/ssl.h so OpenSSL will not be used. If it is installed you can try the --with-openssl=DIR argument" >&2;} + fi @@ -6123,8 +6129,14 @@ if test $ac_cv_lib_crypto_BIO_int_ctrl = yes; then use_openssl="yes" else use_openssl="no" + if test "$with_openssl" = "yes"; then + { { echo "$as_me:$LINENO: error: OpenSSL was explicitly requested but libcrypto was not found. Try the --with-openssl=DIR argument to give the location of OpenSSL or run configure with --without-openssl." >&5 +echo "$as_me: error: OpenSSL was explicitly requested but libcrypto was not found. Try the --with-openssl=DIR argument to give the location of OpenSSL or run configure with --without-openssl." >&2;} + { (exit 1); exit 1; }; } + fi { echo "$as_me:$LINENO: WARNING: Failed to find libcrypto so OpenSSL will not be used. If it is installed you can try the --with-openssl=DIR argument" >&5 echo "$as_me: WARNING: Failed to find libcrypto so OpenSSL will not be used. If it is installed you can try the --with-openssl=DIR argument" >&2;} + fi fi @@ -6195,6 +6207,11 @@ if test $ac_cv_lib_ssl_SSL_new = yes; then use_openssl="yes" else use_openssl="no" + if test "$with_openssl" = "yes"; then + { { echo "$as_me:$LINENO: error: OpenSSL was explicitly requested but libssl was not found. Try the --with-openssl=DIR argument to give the location of OpenSSL or run configure with --without-openssl." >&5 +echo "$as_me: error: OpenSSL was explicitly requested but libssl was not found. Try the --with-openssl=DIR argument to give the location of OpenSSL or run configure with --without-openssl." >&2;} + { (exit 1); exit 1; }; } + fi { echo "$as_me:$LINENO: WARNING: Failed to find libssl so OpenSSL will not be used. If it is installed you can try the --with-openssl=DIR argument" >&5 echo "$as_me: WARNING: Failed to find libssl so OpenSSL will not be used. If it is installed you can try the --with-openssl=DIR argument" >&2;} fi diff --git a/configure.ac b/configure.ac index 8dab66e74..bedb45b41 100644 --- a/configure.ac +++ b/configure.ac @@ -252,20 +252,31 @@ AC_HELP_STRING([--with-openssl=DIR],[Use optional openssl libs and includes from if test "$use_openssl" = "yes" -a -z "$specialssldir"; then AC_CHECK_HEADER(openssl/ssl.h,, [ use_openssl="no" - AC_MSG_WARN([Failed to find openssl/ssl.h so OpenSSL will not be used. If it is installed you can try the --with-openssl=DIR argument]) ]) + if test "$with_openssl" = "yes"; then + AC_MSG_ERROR([OpenSSL was explicitly requested but openssl/ssl.h was not found. Try the --with-openssl=DIR argument to give the location of OpenSSL or run configure with --without-openssl.]) + fi + AC_MSG_WARN([Failed to find openssl/ssl.h so OpenSSL will not be used. If it is installed you can try the --with-openssl=DIR argument]) + ]) # use_openssl="yes" given explicitly in next 2 rules to avoid adding lib to $LIBS if test "$use_openssl" = "yes"; then AC_CHECK_LIB(crypto, BIO_int_ctrl, [ use_openssl="yes"], [ use_openssl="no" - AC_MSG_WARN([Failed to find libcrypto so OpenSSL will not be used. If it is installed you can try the --with-openssl=DIR argument]) ]) + if test "$with_openssl" = "yes"; then + AC_MSG_ERROR([OpenSSL was explicitly requested but libcrypto was not found. Try the --with-openssl=DIR argument to give the location of OpenSSL or run configure with --without-openssl.]) + fi + AC_MSG_WARN([Failed to find libcrypto so OpenSSL will not be used. If it is installed you can try the --with-openssl=DIR argument]) + ]) fi if test "$use_openssl" = "yes"; then AC_CHECK_LIB(ssl, SSL_new, [ use_openssl="yes" ], [ use_openssl="no" + if test "$with_openssl" = "yes"; then + AC_MSG_ERROR([OpenSSL was explicitly requested but libssl was not found. Try the --with-openssl=DIR argument to give the location of OpenSSL or run configure with --without-openssl.]) + fi AC_MSG_WARN([Failed to find libssl so OpenSSL will not be used. If it is installed you can try the --with-openssl=DIR argument]) ], [ -lcrypto ]) fi