diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-10-18 11:50:44 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-10-18 11:50:44 -0400 |
commit | f85c67501c2bef578eeb53741d0dfecaa0c723df (patch) | |
tree | 2704e1cbf2ed747c996bb48b1433298e62d4e331 /libs/evoral/evoral/visibility.h | |
parent | 683496c501641fb5d7d47bdf9064aed72755ca61 (diff) |
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.
Diffstat (limited to 'libs/evoral/evoral/visibility.h')
-rw-r--r-- | libs/evoral/evoral/visibility.h | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/libs/evoral/evoral/visibility.h b/libs/evoral/evoral/visibility.h index 380caca2fd..17c0b7730b 100644 --- a/libs/evoral/evoral/visibility.h +++ b/libs/evoral/evoral/visibility.h @@ -30,27 +30,21 @@ #define LIBEVORAL_DLL_EXPORT __declspec(dllexport) #define LIBEVORAL_DLL_LOCAL #else - #if __GNUC__ >= 4 - #define LIBEVORAL_DLL_IMPORT __attribute__ ((visibility ("default"))) - #define LIBEVORAL_DLL_EXPORT __attribute__ ((visibility ("default"))) - #define LIBEVORAL_DLL_LOCAL __attribute__ ((visibility ("hidden"))) - #else - #define LIBEVORAL_DLL_IMPORT - #define LIBEVORAL_DLL_EXPORT - #define LIBEVORAL_DLL_LOCAL - #endif + #define LIBEVORAL_DLL_IMPORT __attribute__ ((visibility ("default"))) + #define LIBEVORAL_DLL_EXPORT __attribute__ ((visibility ("default"))) + #define LIBEVORAL_DLL_LOCAL __attribute__ ((visibility ("hidden"))) #endif -#ifdef LIBEVORAL_DLL // libevoral is a DLL -#ifdef LIBEVORAL_DLL_EXPORTS // defined if we are building the libevoral DLL (instead of using it) - #define LIBEVORAL_API LIBEVORAL_DLL_EXPORT +#ifdef LIBEVORAL_STATIC // libevoral is not a DLL + #define LIBEVORAL_API + #define LIBEVORAL_LOCAL #else + #ifdef LIBEVORAL_DLL_EXPORTS // defined if we are building the libevoral DLL (instead of using it) + #define LIBEVORAL_API LIBEVORAL_DLL_EXPORT + #else #define LIBEVORAL_API LIBEVORAL_DLL_IMPORT -#endif -#define LIBEVORAL_LOCAL LIBEVORAL_DLL_LOCAL -#else /* static lib, not DLL */ -#define LIBEVORAL_API -#define LIBEVORAL_LOCAL + #endif + #define LIBEVORAL_LOCAL LIBEVORAL_DLL_LOCAL #endif #endif /* __libevoral_visibility_h__ */ |