configure.ac : Add -fvisibility=hidden to OSX build.

Patch-from : Ozkan Sezer <sezeroz@gmail.com>
This commit is contained in:
Erik de Castro Lopo 2014-05-25 19:42:53 +10:00
parent 2be824a1e3
commit be0a894278
1 changed files with 6 additions and 1 deletions

View File

@ -395,7 +395,6 @@ if test x$ac_cv_c_compiler_gnu = xyes ; then
CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wnested-externs -Wshadow -Wundef -Wmissing-declarations -Wunreachable-code " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Winline -Wconversion
CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef -Wunreachable-code " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Woverloaded-virtual -Wmissing-declarations
XIPH_ADD_CFLAGS([-Wdeclaration-after-statement])
XIPH_ADD_CFLAGS([-D_FORTIFY_SOURCE=2])
@ -409,6 +408,12 @@ if test x$ac_cv_c_compiler_gnu = xyes ; then
CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
fi
if test "$GCC_MAJOR_VERSION" -ge 4 && test "$OBJ_FORMAT" = macho; then
CPPFLAGS="$CPPFLAGS -DFLAC__USE_VISIBILITY_ATTR"
CFLAGS="$CFLAGS -fvisibility=hidden"
CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
fi
if test "x$GCC_MAJOR_VERSION$GCC_MINOR_VERSION" = "x42" ; then
XIPH_ADD_CFLAGS([-fgnu89-inline])
fi