diff options
author | Ingo Klöcker <[email protected]> | 2022-03-28 15:21:44 +0000 |
---|---|---|
committer | Ingo Klöcker <[email protected]> | 2022-03-28 15:22:48 +0000 |
commit | 3b3b36a60749ea5c3b166bb1c8f3f6dda8ce6fcd (patch) | |
tree | a886e76e62f4977fe1367aa9893d440ba03bbe53 /configure.ac | |
parent | cpp: Set default visibility of all symbols to hidden (diff) | |
download | gpgme-3b3b36a60749ea5c3b166bb1c8f3f6dda8ce6fcd.tar.gz gpgme-3b3b36a60749ea5c3b166bb1c8f3f6dda8ce6fcd.zip |
qt: Set default visibility of all symbols to hidden
* configure.ac: Add -fvisibility=hidden to GPGME_QT_CFLAGS if gcc
supports the flag.
--
With this change all defined symbols are hidden by default, so that they
are not exported anymore. All symbols that are part of the ABI and that
shall still be exported are already marked as having default visibility.
GnuPG-bug-id: 5906
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 78824962..8e66c7a0 100644 --- a/configure.ac +++ b/configure.ac @@ -402,6 +402,16 @@ if test "$found" = "1"; then fi fi fi + +# Check if compiler supports visibility attribute (if qt is enabled) +LIST_MEMBER("qt", $enabled_languages) +if test "$found" = "1"; then + AX_GCC_FUNC_ATTRIBUTE(visibility) + if test "$ax_cv_have_func_attribute_visibility" = "yes"; then + GPGME_QT_CFLAGS="$GPGME_QT_CFLAGS -fvisibility=hidden" + fi +fi + AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"]) if test -n "$GRAPHVIZ"; then |