- Put back the "--enable-visibility-support" flag into configure.

Now the visibility support is also disabled by default.


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1198 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
tchernobog 2006-09-16 16:21:22 +00:00
parent 4472ae0183
commit 961bcf6dc6
3 changed files with 23 additions and 2 deletions

View File

@ -82,6 +82,18 @@ else
AC_CHECK_CXXFLAG([CXXFLAGS], [DNDEBUG])
fi
dnl see if we have to enable visibility support
AC_ARG_ENABLE([visibility-support],
AS_HELP_STRING([--enable-visibility-support],
[enable the new GCC visibility support; requires GCC >= 4.0 to work.]),
[enable_gcc_visibility="$enableval"],
[enable_gcc_visibility="no"])
AC_MSG_CHECKING([whether to use new GCC visibility attributes])
if test "x$enable_gcc_visibility" = "xno"; then
CPPFLAGS="${CPPFLAGS} -DDISABLE_VISIBILITY_SUPPORT"
fi
AC_MSG_RESULT([$enable_gcc_visibility])
AC_PROG_INSTALL

View File

@ -35,7 +35,7 @@ src_compile() {
conf_opts="--disable-tests"
fi
conf_opts="${conf_opts} --disable-static"
conf_opts="${conf_opts} --enable-visibility-support"
mkdir build && cd build

View File

@ -1,7 +1,12 @@
#ifndef VISIBILITY_SUPPORT_HH
#define VISIBILITY_SUPPORT_HH 1
// -----------------------------------------------------------
// Visibility macros for GNU GCC
#if defined __GNUC__ && (__GNUC__) >= 4
#if defined __GNUC__ && (__GNUC__) >= 4 && (not defined DISABLE_VISIBILITY_SUPPORT)
/* Attribute for objects to be exported from DSOs */
#define SG_DLLEXPORT __attribute__ ((visibility("default")))
@ -30,3 +35,7 @@
#define SG_DLLPUBLIC /* Unsupported */
#endif
// ------------------------------------------------------------
#endif