diff options
author | Erik de Castro Lopo <erikd@mega-nerd.com> | 2014-05-25 19:42:53 +1000 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2014-05-25 19:42:57 +1000 |
commit | be0a894278a3f5b0d08441081214eb12fa4e7a4f (patch) | |
tree | 3fb3a02436659cc27d95ae0cdebeb9e6f8391162 /configure.ac | |
parent | 2be824a1e3fa91c06f9a8024688b971364fe72be (diff) | |
download | flac-be0a894278a3f5b0d08441081214eb12fa4e7a4f.tar.gz |
configure.ac : Add -fvisibility=hidden to OSX build.
Patch-from : Ozkan Sezer <sezeroz@gmail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 6d0fa00e..d3c302aa 100644 --- a/configure.ac +++ b/configure.ac @@ -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 |