From f85c67501c2bef578eeb53741d0dfecaa0c723df Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 18 Oct 2013 11:50:44 -0400 Subject: reverse the visibility.h files assumptions that we don't build shared libs by default This avoids having to define define LIBFOO_DLL=1 all over the place. If we ever go with static libs we will need to define LIBFOO_STATIC=1 but hopefully in some central location like the top level wscript. Oh, and I also dropped support for gcc older than version 4.x because ardour will already not build on such an old version. --- libs/ardour/ardour/libardour_visibility.h | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) (limited to 'libs/ardour/ardour/libardour_visibility.h') diff --git a/libs/ardour/ardour/libardour_visibility.h b/libs/ardour/ardour/libardour_visibility.h index ed5cacf261..a41afca14d 100644 --- a/libs/ardour/ardour/libardour_visibility.h +++ b/libs/ardour/ardour/libardour_visibility.h @@ -30,27 +30,21 @@ #define LIBARDOUR_DLL_EXPORT __declspec(dllexport) #define LIBARDOUR_DLL_LOCAL #else - #if __GNUC__ >= 4 - #define LIBARDOUR_DLL_IMPORT __attribute__ ((visibility ("default"))) - #define LIBARDOUR_DLL_EXPORT __attribute__ ((visibility ("default"))) - #define LIBARDOUR_DLL_LOCAL __attribute__ ((visibility ("hidden"))) - #else - #define LIBARDOUR_DLL_IMPORT - #define LIBARDOUR_DLL_EXPORT - #define LIBARDOUR_DLL_LOCAL - #endif + #define LIBARDOUR_DLL_IMPORT __attribute__ ((visibility ("default"))) + #define LIBARDOUR_DLL_EXPORT __attribute__ ((visibility ("default"))) + #define LIBARDOUR_DLL_LOCAL __attribute__ ((visibility ("hidden"))) #endif -#ifdef LIBARDOUR_DLL // libardour is a DLL -#ifdef LIBARDOUR_DLL_EXPORTS // defined if we are building the libardour DLL (instead of using it) - #define LIBARDOUR_API LIBARDOUR_DLL_EXPORT -#else - #define LIBARDOUR_API LIBARDOUR_DLL_IMPORT -#endif -#define LIBARDOUR_LOCAL LIBARDOUR_DLL_LOCAL -#else /* static lib, not DLL */ +#ifdef LIBARDOUR_STATIC // libardour is not a DLL #define LIBARDOUR_API #define LIBARDOUR_LOCAL +#else + #ifdef LIBARDOUR_DLL_EXPORTS // defined if we are building the libardour DLL (instead of using it) + #define LIBARDOUR_API LIBARDOUR_DLL_EXPORT + #else + #define LIBARDOUR_API LIBARDOUR_DLL_IMPORT + #endif + #define LIBARDOUR_LOCAL LIBARDOUR_DLL_LOCAL #endif #endif /* __libardour_libardour_visibility_h__ */ -- cgit v1.2.3