On some platforms it is a macro and not a function. So we need to check
if the macro exists.
Signed-off-by: Andreas Schneider <asn@samba.org>
# add definitions
include(DefineCMakeDefaults)
include(DefinePlatformDefaults)
-include(DefineCompilerFlags)
include(DefineInstallationPaths)
include(DefineOptions.cmake)
include(CPackConfig.cmake)
include(ConfigureChecks.cmake)
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
+# Add compiler flags for the project now.
+include(DefineCompilerFlags)
+
# check subdirectories
add_subdirectory(src)
check_function_exists(res_nsearch HAVE_RES_NSEARCH)
check_function_exists(__res_nsearch HAVE___RES_NSEARCH)
-check_function_exists(ns_name_compress HAVE_NS_NAME_COMPRESS)
+check_symbol_exists(ns_name_compress "sys/types.h;arpa/nameser.h" HAVE_NS_NAME_COMPRESS)
if (UNIX)
if (NOT LINUX)