mirror of
https://github.com/tmux/tmux.git
synced 2024-12-13 10:08:47 +00:00
Check if UNIX 03 is needed for CMSG_DATA, for newer Solaris. From Eric N Vander
Weele.
This commit is contained in:
parent
e2e5169f84
commit
4f638c0e31
24
configure.ac
24
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
|
||||
|
Loading…
Reference in New Issue
Block a user