diff --git a/build/detect/config/config_detect.c b/build/detect/config/config_detect.c index 2b59f78bf..8ffb300ac 100644 --- a/build/detect/config/config_detect.c +++ b/build/detect/config/config_detect.c @@ -33,8 +33,20 @@ */ +// The BLIS_ENABLE_SYSTEM macro must be defined so that the proper branches in +// bli_system.h are processed. (This macro is normally defined in bli_config.h.) +#define BLIS_ENABLE_SYSTEM + +// Use C-style static inline functions for the static inline functions that are +// defined by the headers below. (This macro is normally defined in +// bli_config_macro_defs.h.) #define BLIS_INLINE static + +// Since we're not building a shared library, we can forego the use of the +// BLIS_EXPORT_BLIS annotations by #defining them to be nothing. (This macro is +// normally defined in bli_config_macro_defs.h.) #define BLIS_EXPORT_BLIS + #include "bli_system.h" #include "bli_type_defs.h" #include "bli_arch.h" diff --git a/frame/include/bli_system.h b/frame/include/bli_system.h index 2541018ac..79333017b 100644 --- a/frame/include/bli_system.h +++ b/frame/include/bli_system.h @@ -70,7 +70,7 @@ #endif // Determine the target operating system. -//#if defined(BLIS_ENABLE_SYSTEM) +#if defined(BLIS_ENABLE_SYSTEM) #if defined(_WIN32) || defined(__CYGWIN__) #define BLIS_OS_WINDOWS 1 #elif defined(__gnu_hurd__) @@ -94,9 +94,9 @@ #else #error "Cannot determine operating system" #endif -//#else // #if defined(BLIS_DISABLE_SYSTEM) -// #define BLIS_OS_NONE -//#endif +#else // #if defined(BLIS_DISABLE_SYSTEM) + #define BLIS_OS_NONE +#endif // A few changes that may be necessary in Windows environments. #if BLIS_OS_WINDOWS diff --git a/frame/include/blis.h b/frame/include/blis.h index a42c7cce8..b374e8539 100644 --- a/frame/include/blis.h +++ b/frame/include/blis.h @@ -48,6 +48,15 @@ extern "C" { // NOTE: PLEASE DON'T CHANGE THE ORDER IN WHICH HEADERS ARE INCLUDED UNLESS // YOU ARE SURE THAT IT DOESN'T BREAK INTER-HEADER MACRO DEPENDENCIES. +// -- configure definitions -- + +// NOTE: bli_config.h header must be included before any BLIS header. +// It is bootstrapped by ./configure and does not depend on later +// headers. Moreover, these configuration variables are necessary to change +// some default behaviors (e.g. disable OS-detection in bli_system.h in case +// of --disable-system). +#include "bli_config.h" + // -- System and language-related headers -- // NOTE: bli_system.h header must be included before bli_config_macro_defs.h. @@ -55,9 +64,8 @@ extern "C" { #include "bli_lang_defs.h" -// -- configure definitions -- +// -- configure default definitions -- -#include "bli_config.h" #include "bli_config_macro_defs.h"