From: Jens Axboe Date: Sat, 25 Jan 2014 02:56:34 +0000 (-0800) Subject: configure: add test for whether required IPv6 helpers X-Git-Tag: fio-2.1.5~26 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=ecad55e9baebeb2a69a8e3661a9f58ff2e6224c8 configure: add test for whether required IPv6 helpers Signed-off-by: Jens Axboe --- diff --git a/configure b/configure index 2dda1423..6baa579a 100755 --- a/configure +++ b/configure @@ -1091,6 +1091,31 @@ if compile_prog "" "" "pwritev"; then fi echo "pwritev/preadv $pwritev" +########################################## +# Check whether we have the required functions for ipv6 +ipv6="no" +cat > $TMPC << EOF +#include +#include +#include +#include +int main(int argc, char **argv) +{ + struct addrinfo hints; + struct in6_addr addr; + int ret; + + ret = getaddrinfo(NULL, NULL, &hints, NULL); + freeaddrinfo(NULL); + printf("%s\n", gai_strerror(ret)); + addr = in6addr_any; + return 0; +} +EOF +if compile_prog "" "" "ipv6"; then + ipv6="yes" +fi +echo "IPv6 helpers $ipv6" ############################################################################# @@ -1210,6 +1235,9 @@ fi if test "$pwritev" = "yes" ; then output_sym "CONFIG_PWRITEV" fi +if test "$ipv6" = "yes" ; then + output_sym "CONFIG_IPV6" +fi echo "LIBS+=$LIBS" >> $config_host_mak echo "CFLAGS+=$CFLAGS" >> $config_host_mak