zeek/cmake/CheckNameserCompat.cmake
Jon Siwek 570ee48cd9 Removing the --disable-nbdns config option.
- Asynchronous DNS resolver support assumed by default
- HAVE_ASYNC_DNS, HAVE_NB_DNS, and USE_NB_DNS preprocessor definitions
  removed
- In the process, I added FindBIND and CheckNameserCompat CMake modules
2010-11-17 20:38:33 -06:00

21 lines
672 B
CMake

include(CheckCSourcecompiles)
# Check whether the namser compatibility header is required
# This can be the case on the Darwin platform
check_c_source_compiles("
#include <arpa/nameser.h>
int main() { HEADER *hdr; int d = NS_IN6ADDRSZ; return 0; }"
have_nameser_header)
if (NOT have_nameser_header)
check_c_source_compiles("
#include <arpa/nameser.h>
#include <arpa/nameser_compat.h>
int main() { HEADER *hdr; int d = NS_IN6ADDRSZ; return 0; }"
NEED_NAMESER_COMPAT_H)
if (NOT NEED_NAMESER_COMPAT_H)
message(FATAL_ERROR
"Asynchronous DNS support compatibility check failed.")
endif ()
endif ()