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)
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)
check_c_source_compiles("
#include <features.h>
#ifndef __GLIBC__
#error Not glibc
#endif
int main() { return 0; }
" HAVE_GLIBC)