[Libreoffice-commits] libmspub.git: 2 commits - configure.ac .gitignore inc/libmspub
David Tardon
dtardon at redhat.com
Mon Nov 24 07:23:10 PST 2014
.gitignore | 1 +
configure.ac | 19 +++++++++++++++++++
inc/libmspub/MSPUBDocument.h | 4 ++++
3 files changed, 24 insertions(+)
New commits:
commit 616f5070061e28c54cbb513859141e02f4fd5dc6
Author: David Tardon <dtardon at redhat.com>
Date: Mon Nov 24 16:20:24 2014 +0100
add compile script to .gitignore
Change-Id: I543c0db6c0d00e5c68fac05031a99204dd716d4b
diff --git a/.gitignore b/.gitignore
index 612cbb4..19907e3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,7 @@ Makefile.in
ar-lib
aclocal.m4
autom4te.cache
+compile
config.guess
config.h
config.h.in
commit c5c20a694baa5629ddb65ea37f19da89411887fe
Author: David Tardon <dtardon at redhat.com>
Date: Fri Aug 29 13:31:09 2014 +0200
only export public symbols
diff --git a/configure.ac b/configure.ac
index d3384f2..aa171e2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -162,6 +162,25 @@ AS_CASE([$host],
AC_MSG_RESULT([$platform_win32])
AM_CONDITIONAL([PLATFORM_WIN32], [test "x$platform_win32" = "xyes"])
+AS_IF([test $platform_win32 == yes],
+ [],
+ [
+ AC_MSG_CHECKING([for -fvisibility=hidden compiler flag])
+ saved_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
+ AC_TRY_COMPILE([], [],
+ [
+ AC_MSG_RESULT([yes])
+ CXXFLAGS="$CXXFLAGS -DLIBMSPUB_VISIBILITY"
+ ],
+ [
+ AC_MSG_RESULT([no])
+ CXXFLAGS="$saved_CXXFLAGS"
+ ]
+ )
+ ]
+)
+
# ================
# Check for cflags
# ================
diff --git a/inc/libmspub/MSPUBDocument.h b/inc/libmspub/MSPUBDocument.h
index 5d4de33..be0cfbc 100644
--- a/inc/libmspub/MSPUBDocument.h
+++ b/inc/libmspub/MSPUBDocument.h
@@ -18,9 +18,13 @@
#else
#define PUBAPI __declspec(dllimport)
#endif
+#else // !DLL_EXPORT
+#ifdef LIBMSPUB_VISIBILITY
+#define PUBAPI __attribute__((visibility("default")))
#else
#define PUBAPI
#endif
+#endif
namespace libmspub
{
More information about the Libreoffice-commits
mailing list