summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-12-25 06:46:07 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-12-25 06:46:07 +0100
commitbc5175023f3f0587391699d736071d1ccc4eff05 (patch)
tree7f46b665906641f1a11f5ad7cb9f6b8ee69cda26 /configure.ac
parent92bd6722d4dfc0526d5f2f12e99440b0e18d7479 (diff)
downloaddabmod-bc5175023f3f0587391699d736071d1ccc4eff05.tar.gz
dabmod-bc5175023f3f0587391699d736071d1ccc4eff05.tar.bz2
dabmod-bc5175023f3f0587391699d736071d1ccc4eff05.zip
Portability: check for SO_NOSIGPIPE
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac19
1 files changed, 19 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 261d444..9adb831 100644
--- a/configure.ac
+++ b/configure.ac
@@ -185,6 +185,25 @@ AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[
AC_DEFINE(HAVE_PRCTL, 1, [Define this symbol if you have prctl and PR_SET_NAME]) ],
[ AC_MSG_RESULT(no) ])
+# Linux defines MSG_NOSIGNAL, some other systems have SO_NOSIGPIPE instead
+AC_MSG_CHECKING(for MSG_NOSIGNAL)
+AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[
+ #include <sys/socket.h>
+ int f = MSG_NOSIGNAL;
+ ]])],
+ [ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_MSG_NOSIGNAL, 1, [Define this symbol if you have MSG_NOSIGNAL]) ],
+ [ AC_MSG_RESULT(no) ])
+
+AC_MSG_CHECKING(for SO_NOSIGPIPE)
+AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[
+ #include <sys/socket.h>
+ int f = SO_NOSIGPIPE;
+ ]])],
+ [ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_SO_NOSIGPIPE, 1, [Define this symbol if you have SO_NOSIGPIPE]) ],
+ [ AC_MSG_RESULT(no) ])
+
# Check for march
AS_IF([test "x$enable_native" = "xyes"],
[AC_MSG_CHECKING(if we can add -march=native to CFLAGS)