]> granicus.if.org Git - curl/commitdiff
configure: fix the check for IdnToUnicode
authorJeremy Tan <jtanx@outlook.com>
Mon, 31 Jul 2017 11:24:38 +0000 (21:24 +1000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 31 Jul 2017 23:04:45 +0000 (01:04 +0200)
Fixes #1669
Closes #1713

configure.ac

index 5104c9ecd2c3fd8f3b995f9e4a864be8e3788bb8..edcb3931f5b574a8d7a50d8f3e97bbebbbac407b 100644 (file)
@@ -2782,6 +2782,7 @@ if test "$want_winidn" = "yes"; then
   clean_LDFLAGS="$LDFLAGS"
   clean_LIBS="$LIBS"
   WINIDN_LIBS="-lnormaliz"
+  WINIDN_CPPFLAGS="-DWINVER=0x0600"
   #
   if test "$want_winidn_path" != "default"; then
     dnl path has been specified
@@ -2797,7 +2798,11 @@ if test "$want_winidn" = "yes"; then
   #
   AC_MSG_CHECKING([if IdnToUnicode can be linked])
   AC_LINK_IFELSE([
-    AC_LANG_FUNC_LINK_TRY([IdnToUnicode])
+    AC_LANG_PROGRAM([[
+      #include <windows.h>
+    ]],[[
+      IdnToUnicode(0, NULL, 0, NULL, 0);
+    ]])
   ],[
     AC_MSG_RESULT([yes])
     tst_links_winidn="yes"