making codec draft more compliant with IETF submission rules
[opus.git] / configure.ac
index d90c216..aa2e4c9 100644 (file)
@@ -5,8 +5,8 @@ AC_INIT(libcelt/arch.h)
 AM_CONFIG_HEADER([config.h])
 
 CELT_MAJOR_VERSION=0
-CELT_MINOR_VERSION=3
-CELT_MICRO_VERSION=0
+CELT_MINOR_VERSION=5
+CELT_MICRO_VERSION=2
 CELT_EXTRA_VERSION=
 CELT_VERSION=$CELT_MAJOR_VERSION.$CELT_MINOR_VERSION.$CELT_MICRO_VERSION$CELT_EXTRA_VERSION
 
@@ -30,11 +30,13 @@ AM_MAINTAINER_MODE
 AC_CANONICAL_HOST
 AM_PROG_LIBTOOL
 
+AC_PROG_CC_C99
 AC_C_BIGENDIAN
 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,10 +65,11 @@ has_alloca=no
 )
 AC_MSG_RESULT($has_alloca)
 
-
 AC_CHECK_HEADERS(sys/soundcard.h sys/audioio.h)
 
-XIPH_PATH_OGG([tools="tools"], [tools=""])
+AS_IF([test "x$with_ogg" != xno],
+ [XIPH_PATH_OGG([tools="tools"], [tools=""])],
+ [tools=""])
 AC_SUBST(tools)
 
 AC_CHECK_LIB(m, sin)
@@ -113,11 +116,28 @@ AC_ARG_ENABLE(assertions, [  --enable-assertions],
   AC_DEFINE([ENABLE_ASSERTIONS], , [Assertions])
 fi])
 
+AC_ARG_ENABLE(new-plc, [  --enable-new-plc],
+[if test "$enableval" = yes; then
+  AC_DEFINE([NEW_PLC], , [Use new PLC code])
+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)
@@ -152,11 +172,12 @@ fi
 AC_SUBST(SIZE16)
 AC_SUBST(SIZE32)
 
-AC_OUTPUT([Makefile libcelt/Makefile tests/Makefile celt.pc tools/Makefile])
+AC_OUTPUT([Makefile libcelt/Makefile tests/Makefile 
+           celt.pc tools/Makefile libcelt.spec ])
 
 if test "x$tools" = "x"; then 
 echo "**IMPORTANT**"
-echo "You don't seem to have the development package for libogg (libogg-devel) installed. Only the library will be built (no encoder/decoder executable)"
+echo "You don't seem to have the development package for libogg (libogg-devel) available. Only the library will be built (no encoder/decoder executable)"
 echo "You can download libogg from http://www.vorbis.com/download.psp"
 fi