aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2014-08-28 21:36:08 +0100
committerAvatar David Leverton <levertond@googlemail.com> 2014-08-28 21:36:08 +0100
commit0a1c24adf81bced6328a585e956a1d05246e1acf (patch)
tree382e34afbc9d449a39a4e6e7c1e58d7f63160554
parent134128bbb7f2907e80987f23e7a605ec30becf77 (diff)
downloadpaludis-0a1c24adf81bced6328a585e956a1d05246e1acf.tar.gz
paludis-0a1c24adf81bced6328a585e956a1d05246e1acf.tar.xz
Remove --enable-visibility
Always enable for GCC (versions that don't have it are way too old anyway). Disable for clang for now because of http://llvm.org/bugs/show_bug.cgi?id=20521
-rw-r--r--configure.ac38
1 files changed, 19 insertions, 19 deletions
diff --git a/configure.ac b/configure.ac
index a99e142..8640008 100644
--- a/configure.ac
+++ b/configure.ac
@@ -450,25 +450,25 @@ CXXFLAGS="$save_CXXFLAGS"
dnl {{{ visibility support
AC_MSG_CHECKING([whether to enable visibility])
-AC_ARG_ENABLE([visibility],
- AS_HELP_STRING([--enable-visibility], [Enable visibility (g++-4.1)]),
- [ENABLE_VISIBILITY=$enableval],
- [ENABLE_VISIBILITY=no])
-AC_MSG_RESULT([$ENABLE_VISIBILITY])
-AC_SUBST([ENABLE_VISIBILITY])
-if test "x$ENABLE_VISIBILITY" = "xyes" ; then
- AC_MSG_CHECKING([for appropriate compiler visibility flags])
- old_PALUDIS_CXXFLAGS=$PALUDIS_CXXFLAGS
- PALUDIS_CXXFLAGS=
- CHECK_CXXFLAG([-fvisibility-inlines-hidden])
- CHECK_CXXFLAG([-fvisibility=hidden])
- AC_MSG_RESULT([$PALUDIS_CXXFLAGS])
- PALUDIS_CXXFLAGS_VISIBILITY="$PALUDIS_CXXFLAGS -DPALUDIS_ENABLE_VISIBILITY=1"
- PALUDIS_CXXFLAGS=$old_PALUDIS_CXXFLAGS
- PALUDIS_ENABLE_VISIBILITY=1
-else
- PALUDIS_ENABLE_VISIBILITY=0
-fi
+AC_PREPROC_IFELSE([AC_LANG_SOURCE([
+#if ! defined(__GNUC__) || defined(__clang__)
+# error no/broken visibility
+#endif
+])],
+ [AC_MSG_RESULT([yes])
+ AC_MSG_CHECKING([for appropriate compiler visibility flags])
+ old_PALUDIS_CXXFLAGS=$PALUDIS_CXXFLAGS
+ PALUDIS_CXXFLAGS=
+ CHECK_CXXFLAG([-fvisibility-inlines-hidden])
+ CHECK_CXXFLAG([-fvisibility=hidden])
+ AC_MSG_RESULT([$PALUDIS_CXXFLAGS])
+ PALUDIS_CXXFLAGS_VISIBILITY="$PALUDIS_CXXFLAGS -DPALUDIS_ENABLE_VISIBILITY=1"
+ PALUDIS_CXXFLAGS=$old_PALUDIS_CXXFLAGS
+ PALUDIS_ENABLE_VISIBILITY=1
+ ],
+ [AC_MSG_RESULT([no])
+ PALUDIS_ENABLE_VISIBILITY=0
+ ])
AC_SUBST([PALUDIS_ENABLE_VISIBILITY])
AC_SUBST([PALUDIS_CXXFLAGS_VISIBILITY])
dnl }}}