From 2ca09bf8ef6af7643a08f6c30b497ff9c2f6ab51 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Tue, 8 Jan 2019 18:17:11 +0100 Subject: [PATCH] [aubio_priv.h] include blas first (see gh-225) --- src/aubio_priv.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/aubio_priv.h b/src/aubio_priv.h index ab6afb28..5795f1e3 100644 --- a/src/aubio_priv.h +++ b/src/aubio_priv.h @@ -74,12 +74,8 @@ #include #endif -#if defined(HAVE_ACCELERATE) -#define HAVE_ATLAS 1 -#define HAVE_BLAS 1 -#include -#elif defined(HAVE_ATLAS_CBLAS_H) -#elif defined(HAVE_BLAS) +#if defined(HAVE_BLAS) // --enable-blas=true +// check which cblas header we found #if defined(HAVE_ATLAS_CBLAS_H) #define HAVE_ATLAS 1 #include @@ -87,11 +83,17 @@ #include #elif defined(HAVE_CBLAS_H) #include -#endif +#elif !defined(HAVE_ACCELERATE) +#error "HAVE_BLAS was defined, but no blas header was found" +#endif /* end of cblas includes */ #endif -#ifdef HAVE_ACCELERATE +#if defined(HAVE_ACCELERATE) +// include accelerate framework after blas +#define HAVE_ATLAS 1 +#define HAVE_BLAS 1 #include + #ifndef HAVE_AUBIO_DOUBLE #define aubio_vDSP_mmov vDSP_mmov #define aubio_vDSP_vmul vDSP_vmul -- 2.11.0