aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2011-06-09 22:55:16 +0200
committerYang Tse <yangsita@gmail.com>2011-06-09 22:55:16 +0200
commit6e0dd48f97e8a82a301463063afcfa4e67f84a1a (patch)
tree2e33cb12f46ab2bccdba0b9d6179724c00203725
parentcb2f300364a42b590d2c427e99c9fa2fc000c223 (diff)
configure: warn if OpenSSL headers and library versions don't match
-rw-r--r--configure.ac3
-rw-r--r--m4/curl-openssl.m428
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
+])