]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix check for openssl on Windows.
authorAndres Mejia <amejia004@gmail.com>
Fri, 8 Feb 2013 21:15:37 +0000 (16:15 -0500)
committerAndres Mejia <amejia004@gmail.com>
Fri, 8 Feb 2013 21:15:37 +0000 (16:15 -0500)
OpenSSL libraries are named differently on Windows.

configure.ac

index 541390ede1ae84e17e5763dcef9c7d7b8ba1ce52..3159728cf1ffc52ad494a59a2eec0d7af465af83 100644 (file)
@@ -732,7 +732,24 @@ fi
 if test "x$with_openssl" != "xno"; then
     AC_CHECK_HEADERS([openssl/evp.h])
     saved_LIBS=$LIBS
-    AC_CHECK_LIB(crypto,main)
+    case "$host_os" in
+      *mingw* | *cygwin*)
+        case "$host_cpu" in
+          x86_64)
+            AC_CHECK_LIB(eay64,main)
+            if test "x$ac_cv_lib_eay64_main" != "xyes"; then
+              AC_CHECK_LIB(eay32,main)
+            fi
+            ;;
+          *)
+            AC_CHECK_LIB(eay32,main)
+            ;;
+        esac
+        ;;
+      *)
+        AC_CHECK_LIB(crypto,main)
+        ;;
+    esac
     CRYPTO_CHECK(MD5, OPENSSL, md5, -lcrypto)
     CRYPTO_CHECK(RMD160, OPENSSL, rmd160, -lcrypto)
     CRYPTO_CHECK(SHA1, OPENSSL, sha1, -lcrypto)