ElektraInitiative/libelektra
src/bindings/intercept/env/CMakeLists.txt
:2
check_symbol_exists (__GNU_LIBRARY__ "features.h" HAVE_GLIBC)
check_symbol_exists (__GNU_LIBRARY__ "features.h" HAVE_GLIBC)
elseif (NOT HAVE_GLIBC)
check_symbol_exists (__GNU_LIBRARY__ "features.h" HAVE_GLIBC)
elseif (NOT HAVE_GLIBC)
check_symbol_exists (__GNU_LIBRARY__ "features.h" HAVE_GLIBC)
check_symbol_exists(__GLIBC__ "features.h" HAVE_GLIBC)
check_c_source_compiles("#include <gnu/libc-version.h>\nint main() { return (gnu_get_libc_version() && gnu_get_libc_release()) ? 0 : 1; }" HAVE_GLIBC)
add_definitions(-DHAVE_GLIBC)
check_symbol_exists(__GLIBC__ features.h HAVE_GLIBC)
endif(HAVE_GLIBC)
check_cxx_source_compiles("
#define _GNU_SOURCE 1
#include <string.h>\n
int main(){\n
char errbuf[200];\n
return strerror_r(13, errbuf, sizeof(errbuf)) == errbuf;\n
}\n"
HAVE_GLIBC)
add_definitions(-DHAVE_GLIBC=1)