summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJay Satiro <raysatiro@yahoo.com>2015-10-23 17:17:54 -0400
committerJay Satiro <raysatiro@yahoo.com>2015-10-23 17:17:54 -0400
commit72d99f2e7b7594545bca9f13ddfa0ba7f0e51066 (patch)
tree751cd9b1e8a015b1261c0c7184859878a246c1e3 /configure.ac
parent2f4f4108d6c39f8599febe4c787b6456dc2c6aba (diff)
downloadcurl-72d99f2e7b7594545bca9f13ddfa0ba7f0e51066.tar.gz
build: Fix mingw ssl gdi32 order
- If mingw ssl make sure -lgdi32 comes after ssl libs - Allow PKG_CONFIG to set pkg-config location and options Bug: https://github.com/bagder/curl/pull/501 Reported-by: Kang Lin
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac36
1 files changed, 18 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac
index e78270a40..e51be4f93 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1399,6 +1399,24 @@ if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then
CLEANCPPFLAGS="$CPPFLAGS"
CLEANLIBS="$LIBS"
+ dnl This is for Msys/Mingw
+ case $host in
+ *-*-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)]
+ )
+ ;;
+ esac
+
case "$OPT_SSL" in
yes)
dnl --with-ssl (without path) used
@@ -1477,24 +1495,6 @@ if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then
CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS"
LDFLAGS="$LDFLAGS $SSL_LDFLAGS"
- dnl This is for Msys/Mingw
- case $host in
- *-*-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)]
- )
- ;;
- esac
-
AC_CHECK_LIB(crypto, HMAC_Update,[
HAVECRYPTO="yes"
LIBS="-lcrypto $LIBS"