Skip to content

Commit

Permalink
configure: warn if OpenSSL headers and library versions don't match
Browse files Browse the repository at this point in the history
  • Loading branch information
yangtse committed Jun 9, 2011
1 parent cb2f300 commit 6e0dd48
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
3 changes: 1 addition & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
28 changes: 27 additions & 1 deletion m4/curl-openssl.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
])

0 comments on commit 6e0dd48

Please sign in to comment.