From 6e0dd48f97e8a82a301463063afcfa4e67f84a1a Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Thu, 9 Jun 2011 22:55:16 +0200 Subject: configure: warn if OpenSSL headers and library versions don't match --- configure.ac | 3 +-- m4/curl-openssl.m4 | 28 +++++++++++++++++++++++++++- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 8bac56274..03731e366 100644 --- a/configure.ac +++ b/configure.ac @@ -1533,8 +1533,7 @@ if test X"$OPT_SSL" != Xno; then fi CURL_CHECK_OPENSSL_ADD_ALL_ALGORITHMS_API CURL_CHECK_OPENSSL_DES_RANDOM_KEY_API - CURL_CHECK_OPENSSL_API_HEADERS - CURL_CHECK_OPENSSL_API_LIBRARY + CURL_CHECK_OPENSSL_API fi fi diff --git a/m4/curl-openssl.m4 b/m4/curl-openssl.m4 index 4e3cdb332..c7bf18208 100644 --- a/m4/curl-openssl.m4 +++ b/m4/curl-openssl.m4 @@ -21,7 +21,7 @@ #*************************************************************************** # File version for 'aclocal' use. Keep it a single number. -# serial 3 +# serial 4 dnl CURL_CHECK_OPENSSL_ADD_ALL_ALGORITHMS_API @@ -326,3 +326,29 @@ AC_DEFUN([CURL_CHECK_OPENSSL_API_LIBRARY], [ fi curl_openssl_api_library=$tst_api ]) + + +dnl CURL_CHECK_OPENSSL_API +dnl ------------------------------------------------- + +AC_DEFUN([CURL_CHECK_OPENSSL_API], [ + # + CURL_CHECK_OPENSSL_API_HEADERS + CURL_CHECK_OPENSSL_API_LIBRARY + # + tst_match="yes" + # + AC_MSG_CHECKING([for OpenSSL headers and library versions matching]) + if test "$curl_openssl_api_headers" = "unknown" || + test "$curl_openssl_api_library" = "unknown"; then + tst_match="fail" + tst_warns="Can not compare OpenSSL headers and library versions." + elif test "$curl_openssl_api_headers" != "$curl_openssl_api_library"; then + tst_match="no" + tst_warns="OpenSSL headers and library versions do not match." + fi + AC_MSG_RESULT([$tst_match]) + if test "$tst_match" != "yes"; then + AC_MSG_WARN([$tst_warns]) + fi +]) -- cgit v1.2.3