rwrap: improve logging messages by including getprogname()
[resolv_wrapper.git] / ConfigureChecks.cmake
index ae817d9eb32e274e17128449749edd2dead79098..ae9437bd92fa53029190a4a1b16b86b69061532f 100644 (file)
@@ -44,7 +44,17 @@ check_include_file(sys/types.h HAVE_SYS_TYPES_H)
 check_include_file(resolv.h HAVE_RESOLV_H)
 check_include_file(arpa/nameser.h HAVE_ARPA_NAMESER_H)
 
+# SYMBOLS
+set(CMAKE_REQUIRED_FLAGS -D_GNU_SOURCE)
+check_symbol_exists(program_invocation_short_name
+                    "errno.h"
+                    HAVE_PROGRAM_INVOCATION_SHORT_NAME)
+unset(CMAKE_REQUIRED_FLAGS)
+
 # FUNCTIONS
+check_function_exists(getprogname HAVE_GETPROGNAME)
+check_function_exists(getexecname HAVE_GETEXECNAME)
+
 find_library(RESOLV_LIRBRARY resolv)
 if (RESOLV_LIRBRARY)
     set(HAVE_LIBRESOLV TRUE)