Laplace details
[opus.git] / configure.ac
index 486c739..fe16c10 100644 (file)
@@ -5,7 +5,7 @@ AC_INIT(libcelt/arch.h)
 AM_CONFIG_HEADER([config.h])
 
 CELT_MAJOR_VERSION=0
-CELT_MINOR_VERSION=3
+CELT_MINOR_VERSION=5
 CELT_MICRO_VERSION=1
 CELT_EXTRA_VERSION=
 CELT_VERSION=$CELT_MAJOR_VERSION.$CELT_MINOR_VERSION.$CELT_MICRO_VERSION$CELT_EXTRA_VERSION
@@ -35,6 +35,7 @@ AC_C_CONST
 AC_C_INLINE
 AC_C_RESTRICT
 
+AC_DEFINE([CELT_BUILD], [], [This is a build of CELT])
 
 AC_MSG_CHECKING(for C99 variable-size arrays)
 AC_TRY_COMPILE( , [
@@ -63,7 +64,6 @@ has_alloca=no
 )
 AC_MSG_RESULT($has_alloca)
 
-
 AC_CHECK_HEADERS(sys/soundcard.h sys/audioio.h)
 
 XIPH_PATH_OGG([tools="tools"], [tools=""])
@@ -113,11 +113,23 @@ AC_ARG_ENABLE(assertions, [  --enable-assertions],
   AC_DEFINE([ENABLE_ASSERTIONS], , [Assertions])
 fi])
 
+saved_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -fvisibility=hidden"
+AC_MSG_CHECKING([if ${CXX} supports -fvisibility=hidden])
+AC_COMPILE_IFELSE([char foo;],
+      [ AC_MSG_RESULT([yes])
+        SYMBOL_VISIBILITY="-fvisibility=hidden" ],
+        AC_MSG_RESULT([no]))
+CFLAGS="$saved_CFLAGS $SYMBOL_VISIBILITY"
+AC_SUBST(SYMBOL_VISIBILITY)
+
 if test $ac_cv_c_compiler_gnu = yes ; then
-        CFLAGS="$CFLAGS -fvisibility=hidden -W -Wstrict-prototypes -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wno-parentheses -Wno-unused-parameter -Wno-sign-compare"
-        #CFLAGS="$CFLAGS -fvisibility=hidden -W -Wstrict-prototypes -Wmissing-prototypes -Wall -Waggregate-return -Wcast-align -Wcast-qual -Wnested-externs -Wshadow -Wno-parentheses"
+        CFLAGS="$CFLAGS -W -Wstrict-prototypes -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wno-parentheses -Wno-unused-parameter -Wno-sign-compare"
 fi
 
+AC_C99_FUNC_LRINTF
+AC_C99_FUNC_LRINT
+
 AC_CHECK_SIZEOF(short)
 AC_CHECK_SIZEOF(int)
 AC_CHECK_SIZEOF(long)