Loading ares/configure.ac +38 −14 Original line number Diff line number Diff line Loading @@ -226,20 +226,44 @@ fi if test "$HAVE_GETHOSTBYNAME" != "1" then dnl This is for Msys/Mingw AC_MSG_CHECKING([for gethostbyname in ws2_32]) dnl This is for winsock systems if test "$ac_cv_header_windows_h" = "yes"; then if test "$ac_cv_header_winsock_h" = "yes"; then winsock_LIB="-lwinsock" fi if test "$ac_cv_header_winsock2_h" = "yes"; then winsock_LIB="-lws2_32" fi if test ! -z "$winsock_LIB"; then my_ac_save_LIBS=$LIBS LIBS="-lws2_32 $LIBS" AC_TRY_LINK([#include <winsock2.h>], [gethostbyname("www.dummysite.com");], [ dnl worked! ws2="yes" LIBS="$winsock_LIB $LIBS" AC_MSG_CHECKING([for gethostbyname in $winsock_LIB]) AC_TRY_LINK([ #ifdef HAVE_WINDOWS_H #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif #include <windows.h> #ifdef HAVE_WINSOCK2_H #include <winsock2.h> #else #ifdef HAVE_WINSOCK_H #include <winsock.h> #endif #endif #endif ],[ gethostbyname("www.dummysite.com"); ],[ AC_MSG_RESULT([yes]) HAVE_GETHOSTBYNAME="1"], [ dnl failed, restore LIBS HAVE_GETHOSTBYNAME="1" ],[ AC_MSG_RESULT([no]) winsock_LIB="" LIBS=$my_ac_save_LIBS AC_MSG_RESULT(no)] ) ]) fi fi fi if test "$HAVE_GETHOSTBYNAME" != "1" Loading configure.ac +42 −18 Original line number Diff line number Diff line Loading @@ -503,20 +503,44 @@ fi if test "$HAVE_GETHOSTBYNAME" != "1" then dnl This is for Msys/Mingw AC_MSG_CHECKING([for gethostbyname in ws2_32]) dnl This is for winsock systems if test "$ac_cv_header_windows_h" = "yes"; then if test "$ac_cv_header_winsock_h" = "yes"; then winsock_LIB="-lwinsock" fi if test "$ac_cv_header_winsock2_h" = "yes"; then winsock_LIB="-lws2_32" fi if test ! -z "$winsock_LIB"; then my_ac_save_LIBS=$LIBS LIBS="-lws2_32 $LIBS" AC_TRY_LINK([#include <winsock2.h>], [gethostbyname("www.dummysite.com");], [ dnl worked! ws2="yes" LIBS="$winsock_LIB $LIBS" AC_MSG_CHECKING([for gethostbyname in $winsock_LIB]) AC_TRY_LINK([ #ifdef HAVE_WINDOWS_H #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif #include <windows.h> #ifdef HAVE_WINSOCK2_H #include <winsock2.h> #else #ifdef HAVE_WINSOCK_H #include <winsock.h> #endif #endif #endif ],[ gethostbyname("www.dummysite.com"); ],[ AC_MSG_RESULT([yes]) HAVE_GETHOSTBYNAME="1"], [ dnl failed, restore LIBS HAVE_GETHOSTBYNAME="1" ],[ AC_MSG_RESULT([no]) winsock_LIB="" LIBS=$my_ac_save_LIBS AC_MSG_RESULT(no)] ) ]) fi fi fi if test "$HAVE_GETHOSTBYNAME" != "1" Loading Loading @@ -2039,7 +2063,7 @@ fi dnl For some reason, the check above doesn't properly detect select() with dnl Msys/Mingw if test "$ac_cv_func_select" = "no"; then AC_MSG_CHECKING([for select in ws2_32]) AC_MSG_CHECKING([for select in $winsock_LIB]) AC_TRY_LINK([ #undef inline #ifdef HAVE_WINDOWS_H Loading Loading @@ -2426,15 +2450,15 @@ AC_HELP_STRING([--disable-hidden-symbols],[Leave all symbols with default visibi ) dnl ************************************************************ if test "x$ws2" = "xyes"; then if test ! -z "$winsock_LIB"; 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" TEST_SERVER_LIBS="$TEST_SERVER_LIBS -lws2_32" LIBS="$LIBS $winsock_LIB" TEST_SERVER_LIBS="$TEST_SERVER_LIBS $winsock_LIB" fi Loading Loading
ares/configure.ac +38 −14 Original line number Diff line number Diff line Loading @@ -226,20 +226,44 @@ fi if test "$HAVE_GETHOSTBYNAME" != "1" then dnl This is for Msys/Mingw AC_MSG_CHECKING([for gethostbyname in ws2_32]) dnl This is for winsock systems if test "$ac_cv_header_windows_h" = "yes"; then if test "$ac_cv_header_winsock_h" = "yes"; then winsock_LIB="-lwinsock" fi if test "$ac_cv_header_winsock2_h" = "yes"; then winsock_LIB="-lws2_32" fi if test ! -z "$winsock_LIB"; then my_ac_save_LIBS=$LIBS LIBS="-lws2_32 $LIBS" AC_TRY_LINK([#include <winsock2.h>], [gethostbyname("www.dummysite.com");], [ dnl worked! ws2="yes" LIBS="$winsock_LIB $LIBS" AC_MSG_CHECKING([for gethostbyname in $winsock_LIB]) AC_TRY_LINK([ #ifdef HAVE_WINDOWS_H #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif #include <windows.h> #ifdef HAVE_WINSOCK2_H #include <winsock2.h> #else #ifdef HAVE_WINSOCK_H #include <winsock.h> #endif #endif #endif ],[ gethostbyname("www.dummysite.com"); ],[ AC_MSG_RESULT([yes]) HAVE_GETHOSTBYNAME="1"], [ dnl failed, restore LIBS HAVE_GETHOSTBYNAME="1" ],[ AC_MSG_RESULT([no]) winsock_LIB="" LIBS=$my_ac_save_LIBS AC_MSG_RESULT(no)] ) ]) fi fi fi if test "$HAVE_GETHOSTBYNAME" != "1" Loading
configure.ac +42 −18 Original line number Diff line number Diff line Loading @@ -503,20 +503,44 @@ fi if test "$HAVE_GETHOSTBYNAME" != "1" then dnl This is for Msys/Mingw AC_MSG_CHECKING([for gethostbyname in ws2_32]) dnl This is for winsock systems if test "$ac_cv_header_windows_h" = "yes"; then if test "$ac_cv_header_winsock_h" = "yes"; then winsock_LIB="-lwinsock" fi if test "$ac_cv_header_winsock2_h" = "yes"; then winsock_LIB="-lws2_32" fi if test ! -z "$winsock_LIB"; then my_ac_save_LIBS=$LIBS LIBS="-lws2_32 $LIBS" AC_TRY_LINK([#include <winsock2.h>], [gethostbyname("www.dummysite.com");], [ dnl worked! ws2="yes" LIBS="$winsock_LIB $LIBS" AC_MSG_CHECKING([for gethostbyname in $winsock_LIB]) AC_TRY_LINK([ #ifdef HAVE_WINDOWS_H #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif #include <windows.h> #ifdef HAVE_WINSOCK2_H #include <winsock2.h> #else #ifdef HAVE_WINSOCK_H #include <winsock.h> #endif #endif #endif ],[ gethostbyname("www.dummysite.com"); ],[ AC_MSG_RESULT([yes]) HAVE_GETHOSTBYNAME="1"], [ dnl failed, restore LIBS HAVE_GETHOSTBYNAME="1" ],[ AC_MSG_RESULT([no]) winsock_LIB="" LIBS=$my_ac_save_LIBS AC_MSG_RESULT(no)] ) ]) fi fi fi if test "$HAVE_GETHOSTBYNAME" != "1" Loading Loading @@ -2039,7 +2063,7 @@ fi dnl For some reason, the check above doesn't properly detect select() with dnl Msys/Mingw if test "$ac_cv_func_select" = "no"; then AC_MSG_CHECKING([for select in ws2_32]) AC_MSG_CHECKING([for select in $winsock_LIB]) AC_TRY_LINK([ #undef inline #ifdef HAVE_WINDOWS_H Loading Loading @@ -2426,15 +2450,15 @@ AC_HELP_STRING([--disable-hidden-symbols],[Leave all symbols with default visibi ) dnl ************************************************************ if test "x$ws2" = "xyes"; then if test ! -z "$winsock_LIB"; 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" TEST_SERVER_LIBS="$TEST_SERVER_LIBS -lws2_32" LIBS="$LIBS $winsock_LIB" TEST_SERVER_LIBS="$TEST_SERVER_LIBS $winsock_LIB" fi Loading