diff options
author | Alexander Shaduri <ashaduri@gmail.com> | 2009-05-31 22:42:50 +0200 |
---|---|---|
committer | Armin Burgmeier <armin@arbur.net> | 2009-05-31 23:10:21 +0200 |
commit | e3aaf4725b763f36ed0d220589f75adea9d87e2f (patch) | |
tree | 83b7e1deb12277ff51c39030c270781ef2fa4aa4 /glib/glibmmconfig.h.in | |
parent | 5834a1cafbeaee34d806f7d1c218e97c71542840 (diff) | |
download | glibmm-e3aaf4725b763f36ed0d220589f75adea9d87e2f.tar.gz |
Build static libraries correctly under Windows/MinGW
* configure.ac: Define GLIBMM_STATIC_LIB and GIOMM_STATIC_LIB when
--enable-static is specified.
* gio/giommconfig.h.in: Add GIOMM_STATIC_LIB and don't define GIOMM_DLL
when using MinGW unless GIOMM_STATIC_LIB is defined.
* glib/glibmmconfig.h.in: Add GLIBMM_STATIC_LIB and don't define
GLIBMM_DLL when using MinGW unless GLIBMM_STATIC_LIB is defined.
Signed-off-by: Armin Burgmeier <armin@arbur.net>
Diffstat (limited to 'glib/glibmmconfig.h.in')
-rw-r--r-- | glib/glibmmconfig.h.in | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/glib/glibmmconfig.h.in b/glib/glibmmconfig.h.in index 739ac191..b4dcddec 100644 --- a/glib/glibmmconfig.h.in +++ b/glib/glibmmconfig.h.in @@ -17,7 +17,6 @@ #define GLIBMM_CONFIGURE #elif defined(__MINGW32__) #define GLIBMM_WIN32 -#define GLIBMM_DLL #define GLIBMM_CONFIGURE #else //AIX clR compiler complains about this even though it doesn't get this far: @@ -28,6 +27,7 @@ #endif /* _WIN32 */ #ifdef GLIBMM_CONFIGURE +#undef GLIBMM_STATIC_LIB #undef GLIBMM_CXX_HAVE_MUTABLE #undef GLIBMM_CXX_HAVE_NAMESPACES #undef GLIBMM_HAVE_WIDE_STREAM @@ -75,6 +75,11 @@ # define GLIBMM_USING_STD(Symbol) /* empty */ #endif +// Enable DLL-specific stuff only when not building a static library +#if !defined(__CYGWIN__) && defined(__MINGW32__) && !defined(GLIBMM_STATIC_LIB) + #define GLIBMM_DLL +#endif + #ifdef GLIBMM_DLL #if defined(GLIBMM_BUILD) && defined(_WINDLL) /* Do not dllexport as it is handled by gendef on MSVC */ |