mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
if ws2_32 is used, append the lib last in the LIBS list (too) to make it
build and link fine with c-ares
This commit is contained in:
parent
76c24a0d82
commit
9f3d9da119
12
configure.ac
12
configure.ac
@ -318,6 +318,7 @@ then
|
|||||||
AC_TRY_LINK([#include <winsock2.h>],
|
AC_TRY_LINK([#include <winsock2.h>],
|
||||||
[gethostbyname("www.dummysite.com");],
|
[gethostbyname("www.dummysite.com");],
|
||||||
[ dnl worked!
|
[ dnl worked!
|
||||||
|
ws2="yes"
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
HAVE_GETHOSTBYNAME="1"],
|
HAVE_GETHOSTBYNAME="1"],
|
||||||
[ dnl failed, restore LIBS
|
[ dnl failed, restore LIBS
|
||||||
@ -1665,6 +1666,17 @@ AC_HELP_STRING([--disable-cookies],[Disable cookies support]),
|
|||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if test "x$ws2" = "xyes"; then
|
||||||
|
|
||||||
|
dnl If ws2_32 is wanted, make sure it is the _last_ lib in LIBS (makes
|
||||||
|
dnl things work when built with c-ares). But we can't just move it last
|
||||||
|
dnl since then other stuff (SSL) won't build. So we simply append it to the
|
||||||
|
dnl end.
|
||||||
|
|
||||||
|
LIBS="$LIBS -lws2_32"
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
AM_CONDITIONAL(CROSSCOMPILING, test x$cross_compiling = xyes)
|
AM_CONDITIONAL(CROSSCOMPILING, test x$cross_compiling = xyes)
|
||||||
|
|
||||||
AC_CONFIG_FILES([Makefile \
|
AC_CONFIG_FILES([Makefile \
|
||||||
|
Loading…
Reference in New Issue
Block a user