]> git.meshlink.io Git - meshlink/commitdiff
Ensure proper linking with OpenSSL with recent versions of MinGW.
authorGuus Sliepen <guus@tinc-vpn.org>
Sun, 8 May 2011 21:12:06 +0000 (23:12 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Sun, 8 May 2011 21:12:06 +0000 (23:12 +0200)
configure.in
m4/openssl.m4

index daeffefc134011d7d68867035a78c1282308c168..a19b2aa6a791218d5dc5c55ba5aa9878c3c65faa 100644 (file)
@@ -67,7 +67,7 @@ case $host_os in
   *mingw*)
     AC_DEFINE(HAVE_MINGW, 1, [MinGW])
     [ rm -f src/device.c; cp -f src/mingw/device.c src/device.c ]
-    LIBS="$LIBS -lws2_32"
+    LIBS="$LIBS -lws2_32 -lgdi32 -lcrypt32"
   ;;
   *)
     AC_MSG_ERROR("Unknown operating system.")
index 8d4a24bf6586854f7e18e3181b513f21767d0221..59f0d4504fb3b1ac71e30029588473138bcd8c61 100644 (file)
@@ -26,19 +26,15 @@ AC_DEFUN([tinc_OPENSSL],
     [AC_MSG_ERROR([OpenSSL header files not found.]); break]
   )
 
+  AC_CHECK_LIB(crypto, EVP_EncryptInit_ex,
+    [LIBS="-lcrypto $LIBS"],
+    [AC_MSG_ERROR([OpenSSL libraries not found.])]
+  )
+
 case $host_os in
   *mingw*)
-    AC_CHECK_LIB(crypto, EVP_EncryptInit_ex,
-      [LIBS="$LIBS -lcrypto -lgdi32 -lcrypt32"],
-      [AC_MSG_ERROR([OpenSSL libraries not found.])]
-    )
   ;;
   *)
-    AC_CHECK_LIB(crypto, EVP_EncryptInit_ex,
-      [LIBS="$LIBS -lcrypto"],
-      [AC_MSG_ERROR([OpenSSL libraries not found.])]
-    )
-
     AC_CHECK_FUNC(dlopen,
       [],
       [AC_CHECK_LIB(dl, dlopen,