From 0034db60ba359d592d15cfea3b25ef05dc708abd Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 11 Jul 2002 02:11:30 +0000 Subject: [PATCH] reviewed: marka check whether linking with OpenSSL works at all before checking whether the version is compatible --- configure.in | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index fe31657fb8..73fdd1970f 100644 --- a/configure.in +++ b/configure.in @@ -13,7 +13,7 @@ # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -AC_REVISION($Revision: 1.294.2.9 $) +AC_REVISION($Revision: 1.294.2.10 $) AC_INIT(lib/dns/name.c) AC_PREREQ(2.13) @@ -311,11 +311,26 @@ case "$use_openssl" in DNS_OPENSSL_LIBS="-L$use_openssl/lib -lcrypto" AC_MSG_RESULT(using openssl from $use_openssl/lib and $use_openssl/include) - AC_MSG_CHECKING(OpenSSL library version) saved_cflags="$CFLAGS" saved_libs="$LIBS" CFLAGS="$CFLAGS $DST_OPENSSL_INC" LIBS="$LIBS $DNS_OPENSSL_LIBS" + AC_MSG_CHECKING(whether linking with OpenSSL works) + AC_TRY_RUN([ +#include +int main() { + ERR_clear_error(); + return (0); +} +], + [AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no) + AC_MSG_ERROR(Could not run test program using OpenSSL from +$use_openssl/lib and $use_openssl/include. +Please check the argument to --with-openssl and your +shared library configuration (e.g., LD_LIBRARY_PATH).)], + [AC_MSG_RESULT(assuming it does work on target platform)]) + AC_MSG_CHECKING(OpenSSL library version) AC_TRY_RUN([ #include #include