Browse Source

[cmake] Fix ipv6 detection

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2360 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.21
Stefan Bühler 13 years ago
parent
commit
a64e7cd46b
  1. 11
      src/CMakeLists.txt
  2. 1
      src/config.h.cmake

11
src/CMakeLists.txt

@ -1,3 +1,4 @@
INCLUDE(CheckCSourceCompiles)
INCLUDE(CheckIncludeFiles)
INCLUDE(CheckFunctionExists)
INCLUDE(CheckVariableExists)
@ -119,7 +120,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)

1
src/config.h.cmake

@ -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

Loading…
Cancel
Save