summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 9 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index ce672cf46..8dc2e6cda 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2139,14 +2139,20 @@ dnl ---------------------------------------------
CC_ATTRIBUTE_ALIGNED
-CC_ATTRIBUTE_VISIBILITY([
+CC_ATTRIBUTE_VISIBILITY([protected], [visibility_export="protected"],
+ [CC_ATTRIBUTE_VISIBILITY([default], [visibility_export="default"])]
+)
+
+if test "x$visibility_export" != "x"; then
CC_FLAG_VISIBILITY([
AC_DEFINE([EXPORTED], [__attribute__((visibility("default")))],
[Mark a symbol as being exported if visibility is changed])
VISIBILITY_FLAG="-fvisibility=hidden"
], [AC_DEFINE([EXPORTED], [], [Dummy mark as being exported])
- ])], [AC_DEFINE([EXPORTED], [], [Dummy mark as being exported])
-])
+ ])
+else
+ AC_DEFINE([EXPORTED], [], [Dummy mark as being exported])
+fi
AC_SUBST([VISIBILITY_FLAG])