cURL / Mailing Lists / curl-library / Single Mail

curl-library

Detecting SSL in msys/mingw

From: Andres Garcia <fandom_at_retemail.es>
Date: Wed, 30 Mar 2005 16:59:36 +0200

Hi,

I had to put the libgdi32 detection before the libcrypto one, otherwise
the SSL would always fail due to undefined references.

Andres

diff -ru curl/configure.ac curl-new/configure.ac
--- curl/configure.ac Wed Mar 30 14:52:10 2005
+++ curl-new/configure.ac Wed Mar 30 11:33:47 2005
@@ -810,6 +810,20 @@
     fi
   fi
 
+ dnl This is for Msys/Mingw
+ AC_MSG_CHECKING([for gdi32])
+ my_ac_save_LIBS=$LIBS
+ LIBS="-lgdi32 $LIBS"
+ AC_TRY_LINK([#include <windef.h>
+ #include <wingdi.h>],
+ [GdiFlush();],
+ [ dnl worked!
+ AC_MSG_RESULT([yes])],
+ [ dnl failed, restore LIBS
+ LIBS=$my_ac_save_LIBS
+ AC_MSG_RESULT(no)]
+ )
+
   AC_CHECK_LIB(crypto, CRYPTO_lock,[
      HAVECRYPTO="yes"
      LIBS="-lcrypto $LIBS"
@@ -832,20 +846,6 @@
   else
     dnl This is only reasonable to do if crypto actually is there: check for
     dnl SSL libs NOTE: it is important to do this AFTER the crypto lib
-
- dnl This is for Msys/Mingw
- AC_MSG_CHECKING([for gdi32])
- my_ac_save_LIBS=$LIBS
- LIBS="-lgdi32 $LIBS"
- AC_TRY_LINK([#include <windef.h>
- #include <wingdi.h>],
- [GdiFlush();],
- [ dnl worked!
- AC_MSG_RESULT([yes])],
- [ dnl failed, restore LIBS
- LIBS=$my_ac_save_LIBS
- AC_MSG_RESULT(no)]
- )
 
     AC_CHECK_LIB(ssl, SSL_connect)
 
Received on 2005-03-30