diff --git a/configure b/configure index 25e02a2322..3827035f33 100755 --- a/configure +++ b/configure @@ -5379,7 +5379,6 @@ fi eval "$wx_cv_use_libcurl" -if test "$USE_WIN32" = 1; then withstring= defaultval=$wxUSE_ALL_FEATURES @@ -5409,7 +5408,6 @@ fi eval "$wx_cv_use_winhttp" -fi if test "$USE_DARWIN" = 1; then withstring= @@ -23136,11 +23134,12 @@ fi LIBS="$LIBS -loleacc" fi if test "$wxUSE_WINHTTP" = "yes" ; then - ac_fn_c_check_header_mongrel "$LINENO" "winhttp.h" "ac_cv_header_winhttp_h" "$ac_includes_default" + ac_fn_c_check_header_compile "$LINENO" "winhttp.h" "ac_cv_header_winhttp_h" "#include +" if test "x$ac_cv_header_winhttp_h" = xyes; then : else - wxUSE_WINHTTP=no + wxUSE_WINHTTP=no fi diff --git a/configure.in b/configure.in index 0626e73532..77bcf7b436 100644 --- a/configure.in +++ b/configure.in @@ -577,9 +577,9 @@ WX_ARG_SYS_WITH(zlib, [ --with-zlib use zlib for LZW compressi WX_ARG_SYS_WITH(expat, [ --with-expat enable XML support using expat parser], wxUSE_EXPAT) WX_ARG_WITH(libcurl, [ --with-libcurl use libcurl-based wxWebRequest], wxUSE_LIBCURL) -if test "$USE_WIN32" = 1; then +dnl USE_WIN32 is not defined yet, so we always define this option even if it's +dnl MSW-specific, which is not ideal, but better than never defining it. WX_ARG_WITH(winhttp, [ --with-winhttp use WinHTTP-based wxWebRequest], wxUSE_WINHTTP) -fi if test "$USE_DARWIN" = 1; then WX_ARG_WITH(urlsession, [ --with-urlsession use NSURLSession-based wxWebRequest], wxUSE_URLSESSION) fi @@ -2999,7 +2999,7 @@ if test "$USE_WIN32" = 1 ; then LIBS="$LIBS -loleacc" fi if test "$wxUSE_WINHTTP" = "yes" ; then - AC_CHECK_HEADER(winhttp.h,,[ wxUSE_WINHTTP=no ]) + AC_CHECK_HEADER(winhttp.h,,[wxUSE_WINHTTP=no],[#include ]) if test "$wxUSE_WINHTTP" = "yes" ; then LIBS="$LIBS -lwinhttp"