diff options
Diffstat (limited to 'gl/m4/sockpfaf.m4')
-rw-r--r-- | gl/m4/sockpfaf.m4 | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/gl/m4/sockpfaf.m4 b/gl/m4/sockpfaf.m4 index 89557b1..6c6dc2f 100644 --- a/gl/m4/sockpfaf.m4 +++ b/gl/m4/sockpfaf.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # sockpfaf.m4 serial 8 | 1 | # sockpfaf.m4 serial 10 |
2 | dnl Copyright (C) 2004, 2006, 2009-2013 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2004, 2006, 2009-2023 Free Software Foundation, Inc. |
3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl with or without modifications, as long as this notice is preserved. | 5 | dnl with or without modifications, as long as this notice is preserved. |
@@ -13,11 +13,11 @@ dnl From Bruno Haible. | |||
13 | 13 | ||
14 | AC_DEFUN([gl_SOCKET_FAMILIES], | 14 | AC_DEFUN([gl_SOCKET_FAMILIES], |
15 | [ | 15 | [ |
16 | AC_REQUIRE([gl_HEADER_SYS_SOCKET]) | 16 | AC_REQUIRE([gl_SYS_SOCKET_H]) |
17 | AC_CHECK_HEADERS_ONCE([netinet/in.h]) | 17 | AC_CHECK_HEADERS_ONCE([netinet/in.h]) |
18 | 18 | ||
19 | AC_MSG_CHECKING([for IPv4 sockets]) | 19 | AC_CACHE_CHECK([for IPv4 sockets], |
20 | AC_CACHE_VAL([gl_cv_socket_ipv4], | 20 | [gl_cv_socket_ipv4], |
21 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> | 21 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
22 | #ifdef HAVE_SYS_SOCKET_H | 22 | #ifdef HAVE_SYS_SOCKET_H |
23 | #include <sys/socket.h> | 23 | #include <sys/socket.h> |
@@ -31,13 +31,12 @@ AC_DEFUN([gl_SOCKET_FAMILIES], | |||
31 | [[int x = AF_INET; struct in_addr y; struct sockaddr_in z; | 31 | [[int x = AF_INET; struct in_addr y; struct sockaddr_in z; |
32 | if (&x && &y && &z) return 0;]])], | 32 | if (&x && &y && &z) return 0;]])], |
33 | gl_cv_socket_ipv4=yes, gl_cv_socket_ipv4=no)]) | 33 | gl_cv_socket_ipv4=yes, gl_cv_socket_ipv4=no)]) |
34 | AC_MSG_RESULT([$gl_cv_socket_ipv4]) | ||
35 | if test $gl_cv_socket_ipv4 = yes; then | 34 | if test $gl_cv_socket_ipv4 = yes; then |
36 | AC_DEFINE([HAVE_IPV4], [1], [Define to 1 if <sys/socket.h> defines AF_INET.]) | 35 | AC_DEFINE([HAVE_IPV4], [1], [Define to 1 if <sys/socket.h> defines AF_INET.]) |
37 | fi | 36 | fi |
38 | 37 | ||
39 | AC_MSG_CHECKING([for IPv6 sockets]) | 38 | AC_CACHE_CHECK([for IPv6 sockets], |
40 | AC_CACHE_VAL([gl_cv_socket_ipv6], | 39 | [gl_cv_socket_ipv6], |
41 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> | 40 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
42 | #ifdef HAVE_SYS_SOCKET_H | 41 | #ifdef HAVE_SYS_SOCKET_H |
43 | #include <sys/socket.h> | 42 | #include <sys/socket.h> |
@@ -54,7 +53,6 @@ AC_DEFUN([gl_SOCKET_FAMILIES], | |||
54 | [[int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z; | 53 | [[int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z; |
55 | if (&x && &y && &z) return 0;]])], | 54 | if (&x && &y && &z) return 0;]])], |
56 | gl_cv_socket_ipv6=yes, gl_cv_socket_ipv6=no)]) | 55 | gl_cv_socket_ipv6=yes, gl_cv_socket_ipv6=no)]) |
57 | AC_MSG_RESULT([$gl_cv_socket_ipv6]) | ||
58 | if test $gl_cv_socket_ipv6 = yes; then | 56 | if test $gl_cv_socket_ipv6 = yes; then |
59 | AC_DEFINE([HAVE_IPV6], [1], [Define to 1 if <sys/socket.h> defines AF_INET6.]) | 57 | AC_DEFINE([HAVE_IPV6], [1], [Define to 1 if <sys/socket.h> defines AF_INET6.]) |
60 | fi | 58 | fi |
@@ -62,11 +60,11 @@ AC_DEFUN([gl_SOCKET_FAMILIES], | |||
62 | 60 | ||
63 | AC_DEFUN([gl_SOCKET_FAMILY_UNIX], | 61 | AC_DEFUN([gl_SOCKET_FAMILY_UNIX], |
64 | [ | 62 | [ |
65 | AC_REQUIRE([gl_HEADER_SYS_SOCKET]) | 63 | AC_REQUIRE([gl_SYS_SOCKET_H]) |
66 | AC_CHECK_HEADERS_ONCE([sys/un.h]) | 64 | AC_CHECK_HEADERS_ONCE([sys/un.h]) |
67 | 65 | ||
68 | AC_MSG_CHECKING([for UNIX domain sockets]) | 66 | AC_CACHE_CHECK([for UNIX domain sockets], |
69 | AC_CACHE_VAL([gl_cv_socket_unix], | 67 | [gl_cv_socket_unix], |
70 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> | 68 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
71 | #ifdef HAVE_SYS_SOCKET_H | 69 | #ifdef HAVE_SYS_SOCKET_H |
72 | #include <sys/socket.h> | 70 | #include <sys/socket.h> |
@@ -80,7 +78,6 @@ AC_DEFUN([gl_SOCKET_FAMILY_UNIX], | |||
80 | [[int x = AF_UNIX; struct sockaddr_un y; | 78 | [[int x = AF_UNIX; struct sockaddr_un y; |
81 | if (&x && &y) return 0;]])], | 79 | if (&x && &y) return 0;]])], |
82 | gl_cv_socket_unix=yes, gl_cv_socket_unix=no)]) | 80 | gl_cv_socket_unix=yes, gl_cv_socket_unix=no)]) |
83 | AC_MSG_RESULT([$gl_cv_socket_unix]) | ||
84 | if test $gl_cv_socket_unix = yes; then | 81 | if test $gl_cv_socket_unix = yes; then |
85 | AC_DEFINE([HAVE_UNIXSOCKET], [1], [Define to 1 if <sys/socket.h> defines AF_UNIX.]) | 82 | AC_DEFINE([HAVE_UNIXSOCKET], [1], [Define to 1 if <sys/socket.h> defines AF_UNIX.]) |
86 | fi | 83 | fi |