diff --git a/CMakeLists.txt b/CMakeLists.txt index 3bd8315d8..575df907e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,6 +45,14 @@ check_symbol_exists( posix_memalign "stdlib.h" ECCODES_HAVE_POSIX_MEMALIGN ) check_symbol_exists( fmemopen "stdio.h" ECCODES_HAVE_FMEMOPEN ) check_symbol_exists( funopen "stdio.h" ECCODES_HAVE_FUNOPEN ) +check_c_source_compiles( + " typedef int foo_t; + static inline foo_t static_foo(){return 0;} + foo_t foo(){return 0;} + int main(int argc, char *argv[]){return 0;} + " ECCODES_HAVE_C_INLINE ) + + ############################################################################### # some variables/options of this project diff --git a/eccodes_config.h.in b/eccodes_config.h.in index 7e3464fad..e9a068d07 100644 --- a/eccodes_config.h.in +++ b/eccodes_config.h.in @@ -23,7 +23,7 @@ #define ECCODES_DEFINITION_PATH "@ECCODES_DEFINITION_PATH@" -#ifdef EC_HAVE_C_INLINE +#ifdef ECCODES_HAVE_C_INLINE #define GRIB_INLINE inline #endif