diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-04-21 14:08:13 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-04-21 14:08:13 +0200 |
commit | 90201eb5ff37340b85348f762effd8124449f27f (patch) | |
tree | 898b19d6755ca3ea8bab6d1528c70b039bbbc39f | |
parent | 2321b849f810f335ad238aa32d52cf30c52b017f (diff) | |
download | ODR-AudioEnc-90201eb5ff37340b85348f762effd8124449f27f.tar.gz ODR-AudioEnc-90201eb5ff37340b85348f762effd8124449f27f.tar.bz2 ODR-AudioEnc-90201eb5ff37340b85348f762effd8124449f27f.zip |
Add check for MSG_NOSIGNAL and SO_NOSIGPIPE
-rw-r--r-- | configure.ac | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 4e83fd3..7986682 100644 --- a/configure.ac +++ b/configure.ac @@ -38,6 +38,26 @@ AX_CHECK_COMPILE_FLAG([-Wduplicated-branches], [CXXFLAGS="$CXXFLAGS -Wduplicated AX_CHECK_COMPILE_FLAG([-Wlogical-op], [CXXFLAGS="$CXXFLAGS -Wlogical-op"], [], ["-Werror"]) AX_CHECK_COMPILE_FLAG([-Wrestrict], [CXXFLAGS="$CXXFLAGS -Wrestrict"], [], ["-Werror"]) AX_CHECK_COMPILE_FLAG(["-Wformat=2"], [CXXFLAGS="$CXXFLAGS -Wformat=2"], [], ["-Werror"]) + +# 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) ]) + AC_LANG_POP([C++]) # Check for options |