More Opus build work

This commit is contained in:
Jean-Marc Valin 2011-02-03 00:43:37 -05:00
parent 3a8f04db17
commit 51c786241b
2 changed files with 9 additions and 1 deletions

View file

@ -151,6 +151,7 @@ AC_ARG_ENABLE(assertions, [ --enable-assertions enable additional software
AC_DEFINE([ENABLE_ASSERTIONS], , [Assertions]) AC_DEFINE([ENABLE_ASSERTIONS], , [Assertions])
fi]) fi])
if test "$OPUS_BUILD" != "true" ; then
saved_CFLAGS="$CFLAGS" saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fvisibility=hidden" CFLAGS="$CFLAGS -fvisibility=hidden"
AC_MSG_CHECKING([if ${CXX} supports -fvisibility=hidden]) AC_MSG_CHECKING([if ${CXX} supports -fvisibility=hidden])
@ -160,6 +161,7 @@ AC_COMPILE_IFELSE([char foo;],
AC_MSG_RESULT([no])) AC_MSG_RESULT([no]))
CFLAGS="$saved_CFLAGS $SYMBOL_VISIBILITY" CFLAGS="$saved_CFLAGS $SYMBOL_VISIBILITY"
AC_SUBST(SYMBOL_VISIBILITY) AC_SUBST(SYMBOL_VISIBILITY)
fi
if test $ac_cv_c_compiler_gnu = yes ; then if test $ac_cv_c_compiler_gnu = yes ; then
CFLAGS="$CFLAGS -W -Wstrict-prototypes -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wno-parentheses -Wno-unused-parameter -Wno-sign-compare" CFLAGS="$CFLAGS -W -Wstrict-prototypes -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wno-parentheses -Wno-unused-parameter -Wno-sign-compare"
@ -202,7 +204,7 @@ fi
AC_SUBST(SIZE16) AC_SUBST(SIZE16)
AC_SUBST(SIZE32) AC_SUBST(SIZE32)
if test "$OPUS_BUILD" == "true" ; then if test "$OPUS_BUILD" = "true" ; then
AC_DEFINE(OPUS_BUILD, [], [We're part of Opus]) AC_DEFINE(OPUS_BUILD, [], [We're part of Opus])
fi fi

View file

@ -1597,6 +1597,7 @@ int celt_encode_with_ec_float(CELTEncoder * restrict st, const celt_sig * pcm, i
#ifdef FIXED_POINT #ifdef FIXED_POINT
#ifndef DISABLE_FLOAT_API #ifndef DISABLE_FLOAT_API
CELT_STATIC
int celt_encode_with_ec_float(CELTEncoder * restrict st, const float * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes, ec_enc *enc) int celt_encode_with_ec_float(CELTEncoder * restrict st, const float * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes, ec_enc *enc)
{ {
int j, ret, C, N; int j, ret, C, N;
@ -1625,6 +1626,7 @@ int celt_encode_with_ec_float(CELTEncoder * restrict st, const float * pcm, int
} }
#endif /*DISABLE_FLOAT_API*/ #endif /*DISABLE_FLOAT_API*/
#else #else
CELT_STATIC
int celt_encode_with_ec(CELTEncoder * restrict st, const celt_int16 * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes, ec_enc *enc) int celt_encode_with_ec(CELTEncoder * restrict st, const celt_int16 * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes, ec_enc *enc)
{ {
int j, ret, C, N; int j, ret, C, N;
@ -2122,9 +2124,11 @@ static void celt_decode_lost(CELTDecoder * restrict st, celt_word16 * restrict p
} }
#ifdef FIXED_POINT #ifdef FIXED_POINT
CELT_STATIC
int celt_decode_with_ec(CELTDecoder * restrict st, const unsigned char *data, int len, celt_int16 * restrict pcm, int frame_size, ec_dec *dec) int celt_decode_with_ec(CELTDecoder * restrict st, const unsigned char *data, int len, celt_int16 * restrict pcm, int frame_size, ec_dec *dec)
{ {
#else #else
CELT_STATIC
int celt_decode_with_ec_float(CELTDecoder * restrict st, const unsigned char *data, int len, celt_sig * restrict pcm, int frame_size, ec_dec *dec) int celt_decode_with_ec_float(CELTDecoder * restrict st, const unsigned char *data, int len, celt_sig * restrict pcm, int frame_size, ec_dec *dec)
{ {
#endif #endif
@ -2480,6 +2484,7 @@ int celt_decode_with_ec_float(CELTDecoder * restrict st, const unsigned char *da
#ifdef FIXED_POINT #ifdef FIXED_POINT
#ifndef DISABLE_FLOAT_API #ifndef DISABLE_FLOAT_API
CELT_STATIC
int celt_decode_with_ec_float(CELTDecoder * restrict st, const unsigned char *data, int len, float * restrict pcm, int frame_size, ec_dec *dec) int celt_decode_with_ec_float(CELTDecoder * restrict st, const unsigned char *data, int len, float * restrict pcm, int frame_size, ec_dec *dec)
{ {
int j, ret, C, N; int j, ret, C, N;
@ -2504,6 +2509,7 @@ int celt_decode_with_ec_float(CELTDecoder * restrict st, const unsigned char *da
} }
#endif /*DISABLE_FLOAT_API*/ #endif /*DISABLE_FLOAT_API*/
#else #else
CELT_STATIC
int celt_decode_with_ec(CELTDecoder * restrict st, const unsigned char *data, int len, celt_int16 * restrict pcm, int frame_size, ec_dec *dec) int celt_decode_with_ec(CELTDecoder * restrict st, const unsigned char *data, int len, celt_int16 * restrict pcm, int frame_size, ec_dec *dec)
{ {
int j, ret, C, N; int j, ret, C, N;