From 51c786241b1977c7d67e88d24bbae35c4775bf79 Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca> Date: Thu, 3 Feb 2011 00:43:37 -0500 Subject: [PATCH] More Opus build work --- configure.ac | 4 +++- libcelt/celt.c | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 4c21ec0bd..6e20747ab 100644 --- a/configure.ac +++ b/configure.ac @@ -151,6 +151,7 @@ AC_ARG_ENABLE(assertions, [ --enable-assertions enable additional software AC_DEFINE([ENABLE_ASSERTIONS], , [Assertions]) fi]) +if test "$OPUS_BUILD" != "true" ; then saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fvisibility=hidden" AC_MSG_CHECKING([if ${CXX} supports -fvisibility=hidden]) @@ -160,6 +161,7 @@ AC_COMPILE_IFELSE([char foo;], AC_MSG_RESULT([no])) CFLAGS="$saved_CFLAGS $SYMBOL_VISIBILITY" AC_SUBST(SYMBOL_VISIBILITY) +fi 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" @@ -202,7 +204,7 @@ fi AC_SUBST(SIZE16) AC_SUBST(SIZE32) -if test "$OPUS_BUILD" == "true" ; then +if test "$OPUS_BUILD" = "true" ; then AC_DEFINE(OPUS_BUILD, [], [We're part of Opus]) fi diff --git a/libcelt/celt.c b/libcelt/celt.c index e9642462e..9fafc3a3a 100644 --- a/libcelt/celt.c +++ b/libcelt/celt.c @@ -1597,6 +1597,7 @@ int celt_encode_with_ec_float(CELTEncoder * restrict st, const celt_sig * pcm, i #ifdef FIXED_POINT #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 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*/ #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 j, ret, C, N; @@ -2122,9 +2124,11 @@ static void celt_decode_lost(CELTDecoder * restrict st, celt_word16 * restrict p } #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) { #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) { #endif @@ -2480,6 +2484,7 @@ int celt_decode_with_ec_float(CELTDecoder * restrict st, const unsigned char *da #ifdef FIXED_POINT #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 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*/ #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 j, ret, C, N; -- GitLab