Author: cazfi Date: Wed Jan 20 12:02:40 2016 New Revision: 31512 URL: http://svn.gna.org/viewcvs/freeciv?rev=31512&view=rev Log: Make configure checks for functions required for IPv6 support to also pass if it finds them as macros and/or require including <ws2tcpip.h>
See patch #6820 Modified: trunk/configure.ac Modified: trunk/configure.ac URL: http://svn.gna.org/viewcvs/freeciv/trunk/configure.ac?rev=31512&r1=31511&r2=31512&view=diff ============================================================================== --- trunk/configure.ac (original) +++ trunk/configure.ac Wed Jan 20 12:02:40 2016 @@ -221,8 +221,28 @@ esac], [ipv6=test]) if test x$ipv6 != xno ; then if test "x$have_getaddrinfo" = "xyes" ; then - AC_CHECK_FUNCS([inet_pton inet_ntop getnameinfo], -[enable_ipv6=yes], [enable_ipv6=no]) + enable_ipv6=yes + AC_CHECK_FUNCS([inet_pton], [], + [AC_MSG_CHECKING([inet_pton() as a macro]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([ +#ifdef FREECIV_HAVE_WS2TCPIP_H +#include <ws2tcpip.h> +#endif], [inet_pton(0, NULL, NULL);])], [ + AC_MSG_RESULT([yes])], [enable_ipv6=no])]) + AC_CHECK_FUNCS([inet_ntop], [], + [AC_MSG_CHECKING([inet_ntop() as a macro]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([ +#ifdef FREECIV_HAVE_WS2TCPIP_H +#include <ws2tcpip.h> +#endif], [inet_ntop(0, NULL, NULL, 0);])], [ + AC_MSG_RESULT([yes])], [enable_ipv6=no])]) + AC_CHECK_FUNCS([getnameinfo], [], + [AC_MSG_CHECKING([getnameinfo() as a macro]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([ +#ifdef FREECIV_HAVE_WS2TCPIP_H +#include <ws2tcpip.h> +#endif], [getnameinfo(NULL, 0, NULL, 0, NULL, 0, 0);])], [ + AC_MSG_RESULT([yes])], [enable_ipv6=no])]) else enable_ipv6=no fi _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits