client: Unbreak standalone build
[empserver] / m4 / my_working_in6_is_addr_v4mapped.m4
1 AC_DEFUN([MY_WORKING_IN6_IS_ADDR_V4MAPPED], [
2     AC_CACHE_CHECK([whether IN6_IS_ADDR_V4MAPPED works],
3                    my_cv_func_in6_is_addr_v4mapped, [
4         AC_COMPILE_IFELSE(
5             [AC_LANG_SOURCE([[#include <netinet/in.h>
6 int foo(struct sockaddr_in6 *sap6)
7 {
8     return IN6_IS_ADDR_V4MAPPED(&sap6->sin6_addr);
9 }]])],
10             [my_cv_func_in6_is_addr_v4mapped=yes],
11             [my_cv_func_in6_is_addr_v4mapped=no])])
12     AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_addr.s6_addr],
13                      [my_member_sockaddr_in6_sin6_addr_s6_addr=yes],
14                      [my_member_sockaddr_in6_sin6_addr_s6_addr=no],
15                      [[#include <netinet/in.h>]])
16     if test "x$my_cv_func_in6_is_addr_v4mapped$my_member_sockaddr_in6_sin6_addr_s6_addr" = xyesyes; then
17         AC_DEFINE([HAVE_WORKING_IN6_IS_ADDR_V4MAPPED], [1],
18                   [Define if you have a working IN6_IS_ADDR_V4MAPPED()])
19     fi
20 ])