From 7b24a70d51f586e18663f9e29b856c717fffa5f0 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Wed, 14 May 2008 16:14:35 +0000 Subject: skip checks for Windows specific header files when build target is not a native Windows one --- configure.ac | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index da728ed..d1755bb 100644 --- a/configure.ac +++ b/configure.ac @@ -123,6 +123,28 @@ dnl gethostbyname_r() version dnl ********************************************************************** CURL_DETECT_ICC([CFLAGS="$CFLAGS -we 147"]) +dnl ********************************************************************** +dnl Make sure that our checks for headers windows.h winsock.h winsock2.h +dnl and ws2tcpip.h take precedence over any other further checks which +dnl could be done later using AC_CHECK_HEADER or AC_CHECK_HEADERS for +dnl this specific header files. And do them before its results are used. +dnl ********************************************************************** + +CURL_CHECK_HEADER_WINDOWS +CURL_CHECK_NATIVE_WINDOWS +case X-"$ac_cv_native_windows" in + X-yes) + CURL_CHECK_HEADER_WINSOCK + CURL_CHECK_HEADER_WINSOCK2 + CURL_CHECK_HEADER_WS2TCPIP + ;; + *) + ac_cv_header_winsock_h="no" + ac_cv_header_winsock2_h="no" + ac_cv_header_ws2tcpip_h="no" + ;; +esac + dnl ********************************************************************** dnl platform/compiler/architecture specific checks/flags dnl ********************************************************************** @@ -365,18 +387,6 @@ dnl ********************************************************************** dnl Checks for header files. AC_HEADER_STDC -dnl ********************************************************************** -dnl Make sure that our checks for headers windows.h winsock.h winsock2.h -dnl and ws2tcpip.h take precedence over any other further checks which -dnl could be done later using AC_CHECK_HEADER or AC_CHECK_HEADERS for -dnl this specific header files. And do them before its results are used. -dnl ********************************************************************** - -CURL_CHECK_HEADER_WINDOWS -CURL_CHECK_HEADER_WINSOCK -CURL_CHECK_HEADER_WINSOCK2 -CURL_CHECK_HEADER_WS2TCPIP - CURL_CHECK_HEADER_MALLOC dnl check for a few basic system headers we need -- cgit v1.2.3