Feature test C11 generics, since GCC lies about compliance

This commit is contained in:
o9000
2017-12-20 18:55:50 +01:00
parent 16a359f944
commit c635f46439
4 changed files with 20 additions and 1 deletions

View File

@@ -62,6 +62,14 @@ else()
set(BACKTRACE_L_FLAGS "")
endif()
check_c_source_compiles(
"#define print(x) _Generic((x), default : print_unknown)(x) \n void print_unknown(){} \n int main () { print(0); }"
HAS_GENERIC)
if(HAS_GENERIC)
add_definitions(-DHAS_GENERIC)
endif(HAS_GENERIC)
if( ENABLE_RSVG )
pkg_check_modules( RSVG librsvg-2.0>=2.14.0 )
endif( ENABLE_RSVG )