diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2020-09-25 10:04:52 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2020-09-25 10:04:52 +0100 |
commit | 4f638c0e31240b2fed9aa5035c25dc08e309ae15 (patch) | |
tree | b6b95c494eba1e29dfb60b77f29feb01456ac5a3 | |
parent | e2e5169f84723e3d8e34b7915f723ebbad3bb140 (diff) | |
download | rtmux-4f638c0e31240b2fed9aa5035c25dc08e309ae15.tar.gz rtmux-4f638c0e31240b2fed9aa5035c25dc08e309ae15.tar.bz2 rtmux-4f638c0e31240b2fed9aa5035c25dc08e309ae15.zip |
Check if UNIX 03 is needed for CMSG_DATA, for newer Solaris. From Eric N Vander
Weele.
-rw-r--r-- | configure.ac | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index f89c590b..82be9254 100644 --- a/configure.ac +++ b/configure.ac @@ -328,8 +328,9 @@ AC_SEARCH_LIBS(inet_ntoa, nsl) AC_SEARCH_LIBS(socket, socket) AC_CHECK_LIB(xnet, socket) -# Check for CMSG_DATA. Some platforms require _XOPEN_SOURCE_EXTENDED (for -# example see xopen_networking(7) on HP-UX). +# Check for CMSG_DATA. On some platforms like HP-UX this requires UNIX 95 +# (_XOPEN_SOURCE and _XOPEN_SOURCE_EXTENDED) (see xopen_networking(7)). On +# others, UNIX 03 (_XOPEN_SOURCE 600, see standards(7) on Solaris). XOPEN_DEFINES= AC_MSG_CHECKING(for CMSG_DATA) AC_EGREP_CPP( @@ -362,6 +363,25 @@ if test "x$found_cmsg_data" = xno; then AC_MSG_RESULT($found_cmsg_data) if test "x$found_cmsg_data" = xyes; then XOPEN_DEFINES="-D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED" + fi +fi +if test "x$found_cmsg_data" = xno; then + AC_MSG_CHECKING(if CMSG_DATA needs _XOPEN_SOURCE 600) + AC_EGREP_CPP( + yes, + [ + #define _XOPEN_SOURCE 600 + #include <sys/socket.h> + #ifdef CMSG_DATA + yes + #endif + ], + found_cmsg_data=yes, + found_cmsg_data=no + ) + AC_MSG_RESULT($found_cmsg_data) + if test "x$found_cmsg_data" = xyes; then + XOPEN_DEFINES="-D_XOPEN_SOURCE=600" else AC_MSG_ERROR("CMSG_DATA not found") fi |