From 512b9ac19446999d457c53783e54d3151391e823 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Mon, 19 May 2008 02:50:29 +0000 Subject: [PATCH] if WINSOCK2 API is used link with 'ws2_32', else if WINSOCK API is used under WinCE link with 'winsock', else if WINSOCK API is used link with 'wsock32'. --- ares/configure.ac | 19 +++++++++++++------ configure.ac | 9 ++++++++- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/ares/configure.ac b/ares/configure.ac index 5689a9e55..9653a2a7e 100644 --- a/ares/configure.ac +++ b/ares/configure.ac @@ -19,9 +19,9 @@ AM_PROG_CC_C_O AC_PROG_INSTALL case $host_os in -solaris*) - AC_DEFINE(ETC_INET, 1, [if a /etc/inet dir is being used]) - ;; + solaris*) + AC_DEFINE(ETC_INET, 1, [if a /etc/inet dir is being used]) + ;; esac dnl support building of Windows DLLs @@ -228,9 +228,16 @@ if test "$HAVE_GETHOSTBYNAME" != "1" then 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_winsock_h" = "yes"; then + case $host in + *-*-mingw32ce*) + winsock_LIB="-lwinsock" + ;; + *) + winsock_LIB="-lwsock32" + ;; + esac + fi if test "$ac_cv_header_winsock2_h" = "yes"; then winsock_LIB="-lws2_32" fi diff --git a/configure.ac b/configure.ac index 80d91fb6b..cdd2d9fcc 100644 --- a/configure.ac +++ b/configure.ac @@ -506,7 +506,14 @@ then 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" + case $host in + *-*-mingw32ce*) + winsock_LIB="-lwinsock" + ;; + *) + winsock_LIB="-lwsock32" + ;; + esac fi if test "$ac_cv_header_winsock2_h" = "yes"; then winsock_LIB="-lws2_32"