aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMatthew Zipkin <pinheadmz@gmail.com>2023-04-13 13:31:08 -0400
committerMatthew Zipkin <pinheadmz@gmail.com>2024-03-01 13:11:26 -0500
commitadb3a3e51de205cc69b1a58647c65c04fa6c6362 (patch)
tree07cf4a7a81afc7f600606f1c55958d3e6a5157ee /configure.ac
parent8da62a1041bfaf8ce4e40a4b31c7281cbe8bb916 (diff)
downloadbitcoin-adb3a3e51de205cc69b1a58647c65c04fa6c6362.tar.xz
configure: test for unix domain sockets
Copied from https://github.com/bitcoin/bitcoin/pull/9979 Co-authored-by: laanwj <126646+laanwj@users.noreply.github.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac15
1 files changed, 14 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 4f71515873..6a5c872272 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1195,10 +1195,23 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
]], [[
getauxval(AT_HWCAP);
]])],
- [ AC_MSG_RESULT([yes]); HAVE_STRONG_GETAUXVAL=1; AC_DEFINE([HAVE_STRONG_GETAUXVAL], [1], [Define this symbol to build code that uses getauxval)]) ],
+ [ AC_MSG_RESULT([yes]); HAVE_STRONG_GETAUXVAL=1; AC_DEFINE([HAVE_STRONG_GETAUXVAL], [1], [Define this symbol to build code that uses getauxval]) ],
[ AC_MSG_RESULT([no]); HAVE_STRONG_GETAUXVAL=0 ]
)
+# Check for UNIX sockets
+AC_MSG_CHECKING(for sockaddr_un)
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/socket.h>
+ #include <sys/un.h>
+ ]], [[
+ struct sockaddr_un addr;
+ addr.sun_family = AF_UNIX;
+ ]])],
+ [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_SOCKADDR_UN], [1], [Define this symbol if platform supports unix domain sockets]) ],
+ [ AC_MSG_RESULT([no]); ]
+)
+
have_any_system=no
AC_MSG_CHECKING([for std::system])
AC_LINK_IFELSE(