[buddy] Probe for -fvisibility and -fvisibility-inlines-hidden.
* configure.ac: Check gcc and g++ for -fvisibility and -fvisibility-inlines-hidden. Add these options to CFLAGS and CXXFLAGS. * m4/ax_check_compile_flag.m4: New file. * src/Makefile.am: Build BuDDy as a single library, reverting part of the changes introduced in my previous patch to this file. Since the options are set in CFLAGS/CXXFLAGS, there is no possibility for -fvisibility-inlines-hidden to be passed to the C compiler.
This commit is contained in:
parent
e4abcfddfc
commit
cee552689a
3 changed files with 18 additions and 12 deletions
|
|
@ -20,6 +20,18 @@ AC_PROG_CXX
|
|||
|
||||
LT_INIT([win32-dll])
|
||||
|
||||
# Use -Werror since using -fvisibility under MinGW is only a warning.
|
||||
# (The option is ignored anyway since this does not make sense under windows).
|
||||
AX_CHECK_COMPILE_FLAG([-Werror -fvisibility=hidden],
|
||||
[CFLAGS="$CFLAGS -fvisibility=hidden"])
|
||||
AC_LANG(C++)
|
||||
AX_CHECK_COMPILE_FLAG([-Werror -fvisibility=hidden],
|
||||
[CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
|
||||
AX_CHECK_COMPILE_FLAG([-fvisibility-inlines-hidden],
|
||||
[CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"])])
|
||||
AC_LANG(C)
|
||||
|
||||
|
||||
adl_ENABLE_DEBUG
|
||||
ad_GCC_OPTIM
|
||||
adl_NDEBUG
|
||||
|
|
@ -31,6 +43,7 @@ if test x$enable_warnings = xyes; then
|
|||
CF_GCC_WARNINGS
|
||||
fi
|
||||
|
||||
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue