Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
if (RES_SEND_IN_LIBRESOLV OR __RES_SEND_IN_LIBRESOLV)
set(HAVE_LIBRESOLV TRUE)
endif()
+
+ # If we have a libresolv, we need to check functions linking the library
+ set(CMAKE_REQUIRED_LIBRARIES ${RESOLV_LIRBRARY})
endif()
check_function_exists(res_init HAVE_RES_INIT)
check_function_exists(res_nsearch HAVE_RES_NSEARCH)
check_function_exists(__res_nsearch HAVE___RES_NSEARCH)
+unset(CMAKE_REQUIRED_LIBRARIES)
+
check_symbol_exists(ns_name_compress "sys/types.h;arpa/nameser.h" HAVE_NS_NAME_COMPRESS)
if (UNIX)