[opus] opus: do not use visibility attributes when targetting windows

Ozkan Sezer sezeroz at gmail.com
Thu Nov 26 11:28:27 PST 2015


Seems like opun configury still enables visibility attributes when
targeting windows.  The following patch disables that.  (Relies on
the top-level AC_MINGW32 check, can possibly be done better.)

diff --git a/configure.ac b/configure.ac
index eabad3a..3bede12 100644
--- a/configure.ac
+++ b/configure.ac
@@ -759,14 +759,15 @@ saved_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -fvisibility=hidden"
 AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden])
 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[char foo;]])],
     [ AC_MSG_RESULT([yes]) ],
     [ AC_MSG_RESULT([no])
       CFLAGS="$saved_CFLAGS"
     ])
+AS_IF([test x"$MINGW32" = x"yes"], [CFLAGS="$saved_CFLAGS"])

 CFLAGS="$CFLAGS -W"

 warn_CFLAGS="-Wall -Wextra -Wcast-align -Wnested-externs -Wshadow
-Wstrict-prototypes"
 saved_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS $warn_CFLAGS"
 AC_MSG_CHECKING([if ${CC} supports ${warn_CFLAGS}])

--
O.S.


More information about the opus mailing list