2
0
Fork 0

Fix cmake ipv6 detection

This commit is contained in:
Stefan Bühler 2008-12-09 21:30:37 +01:00
parent 736d8c6192
commit 4ef644de88
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,4 @@
INCLUDE(CheckCSourceCompiles)
INCLUDE(CheckIncludeFiles)
INCLUDE(CheckFunctionExists)
INCLUDE(CheckVariableExists)
@ -104,7 +105,15 @@ CHECK_FUNCTION_EXISTS(strptime HAVE_STRPTIME)
CHECK_FUNCTION_EXISTS(syslog HAVE_SYSLOG)
CHECK_FUNCTION_EXISTS(writev HAVE_WRITEV)
CHECK_FUNCTION_EXISTS(inet_aton HAVE_INET_ATON)
CHECK_FUNCTION_EXISTS(inet_atop HAVE_IPV6)
CHECK_C_SOURCE_COMPILES("
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
int main() {
struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] = 0;
return 0;
}" HAVE_IPV6)
## refactor me
MACRO(XCONFIG _package _include_DIR _link_DIR _link_FLAGS _cflags)

View File

@ -23,6 +23,7 @@
#cmakedefine HAVE_UNISTD_H
#cmakedefine HAVE_PTHREAD_H
#cmakedefine HAVE_INET_ATON
#cmakedefine HAVE_IPV6
/* XATTR */
#cmakedefine HAVE_ATTR_ATTRIBUTES_H