X-Git-Url: http://git.xiph.org/?p=opus.git;a=blobdiff_plain;f=configure.ac;h=8da18e6c06b4bbc6e0e2959dd6d61610e3d2cdd0;hp=02caaeb278ed58ef93dc7f94d641ce3123323613;hb=b91d00d1e2bbaa8939e031a36770f555bf4eb459;hpb=6c28805c56d562bec56cc0b31c0d5905ebb5a6ac diff --git a/configure.ac b/configure.ac index 02caaeb2..8da18e6c 100644 --- a/configure.ac +++ b/configure.ac @@ -1,36 +1,51 @@ dnl Process this file with autoconf to produce a configure script. -*-m4-*- -AC_INIT(libcelt/arch.h) +AC_INIT(src/opus_encoder.c) AM_CONFIG_HEADER([config.h]) -CELT_MAJOR_VERSION=0 -CELT_MINOR_VERSION=11 -CELT_MICRO_VERSION=3 -CELT_EXTRA_VERSION= -CELT_VERSION=$CELT_MAJOR_VERSION.$CELT_MINOR_VERSION.$CELT_MICRO_VERSION$CELT_EXTRA_VERSION -LIBCELT_SUFFIX=0 +dnl enable silent rules on automake 1.11 and later +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -CELT_LT_CURRENT=2 -CELT_LT_REVISION=0 -CELT_LT_AGE=0 +OPUS_MAJOR_VERSION=0 +OPUS_MINOR_VERSION=9 +OPUS_MICRO_VERSION=6 +OPUS_EXTRA_VERSION= -AC_SUBST(CELT_LT_CURRENT) -AC_SUBST(CELT_LT_REVISION) -AC_SUBST(CELT_LT_AGE) -AC_SUBST(LIBCELT_SUFFIX) +OPUS_VERSION="$OPUS_MAJOR_VERSION.$OPUS_MINOR_VERSION.$OPUS_MICRO_VERSION$OPUS_EXTRA_VERSION" +AC_MSG_CHECKING([git revision]) +GIT_VERSION=$(git describe --tags --match 'v*' 2>/dev/null | sed 's/^v//') +if test -z "$GIT_VERSION"; then + AC_MSG_RESULT([no]) +else + AC_MSG_RESULT([$GIT_VERSION]) + OPUS_VERSION="$GIT_VERSION" +fi + +LIBOPUS_SUFFIX=0 + +OPUS_LT_CURRENT=0 +OPUS_LT_REVISION=0 +OPUS_LT_AGE=0 + +AC_SUBST(OPUS_LT_CURRENT) +AC_SUBST(OPUS_LT_REVISION) +AC_SUBST(OPUS_LT_AGE) +AC_SUBST(LIBOPUS_SUFFIX) # For automake. -VERSION=$CELT_VERSION -PACKAGE=celt +VERSION=$OPUS_VERSION +PACKAGE=opus -AC_SUBST(CELT_VERSION) +# For our version string +AC_SUBST(OPUS_VERSION) AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define) AM_MAINTAINER_MODE AC_CANONICAL_HOST AM_PROG_LIBTOOL +AM_PROG_CC_C_O AC_PROG_CC_C99 AC_C_BIGENDIAN @@ -38,7 +53,7 @@ AC_C_CONST AC_C_INLINE AC_C_RESTRICT -AC_DEFINE([CELT_BUILD], [], [This is a build of CELT]) +AC_DEFINE([OPUS_BUILD], [], [This is a build of OPUS]) AC_MSG_CHECKING(for C99 variable-size arrays) AC_TRY_COMPILE( , [ @@ -67,31 +82,13 @@ has_alloca=no ) AC_MSG_RESULT($has_alloca) -AC_CHECK_HEADERS(sys/soundcard.h sys/audioio.h) - -AS_IF([test "x$with_ogg" != xno], - [XIPH_PATH_OGG([tools="tools"], [tools=""])], - [tools=""]) -AC_SUBST(tools) - AC_CHECK_LIB(m, sin) -# Check for getopt_long; if not found, use included source. -AC_CHECK_FUNCS([getopt_long],, -[# FreeBSD has a gnugetopt library. - AC_CHECK_LIB([gnugetopt],[getopt_long], -[AC_DEFINE([HAVE_GETOPT_LONG])], -[# Use the GNU replacement. -AC_LIBOBJ(getopt) -AC_LIBOBJ(getopt1)])]) - -AC_CHECK_LIB(winmm, main) - -AC_DEFINE_UNQUOTED(CELT_VERSION, "${CELT_VERSION}", [Complete version string]) -AC_DEFINE_UNQUOTED(CELT_MAJOR_VERSION, ${CELT_MAJOR_VERSION}, [Version major]) -AC_DEFINE_UNQUOTED(CELT_MINOR_VERSION, ${CELT_MINOR_VERSION}, [Version minor]) -AC_DEFINE_UNQUOTED(CELT_MICRO_VERSION, ${CELT_MICRO_VERSION}, [Version micro]) -AC_DEFINE_UNQUOTED(CELT_EXTRA_VERSION, "${CELT_EXTRA_VERSION}", [Version extra]) +AC_DEFINE_UNQUOTED(OPUS_VERSION, "${OPUS_VERSION}", [Complete version string]) +AC_DEFINE_UNQUOTED(OPUS_MAJOR_VERSION, ${OPUS_MAJOR_VERSION}, [Version major]) +AC_DEFINE_UNQUOTED(OPUS_MINOR_VERSION, ${OPUS_MINOR_VERSION}, [Version minor]) +AC_DEFINE_UNQUOTED(OPUS_MICRO_VERSION, ${OPUS_MICRO_VERSION}, [Version micro]) +AC_DEFINE_UNQUOTED(OPUS_EXTRA_VERSION, "${OPUS_EXTRA_VERSION}", [Version extra]) has_float_approx=no #case "$host_cpu" in @@ -104,7 +101,7 @@ ac_enable_fixed="no"; AC_ARG_ENABLE(fixed-point, [ --enable-fixed-point compile as fixed-point], [if test "$enableval" = yes; then ac_enable_fixed="yes"; - AC_DEFINE([FIXED_POINT], , [Compile as fixed-point]) + AC_DEFINE([FIXED_POINT], [1], [Compile as fixed-point]) else AC_DEFINE([FLOATING_POINT], , [Compile as floating-point]) fi], @@ -117,13 +114,6 @@ AC_ARG_ENABLE(fixed-point-debug, [ --enable-fixed-point-debug debug fixed-poin AC_DEFINE([FIXED_DEBUG], , [Debug fixed-point implementation]) fi]) -ac_enable_experimental_postfilter="no" -AC_ARG_ENABLE(experimental-postfilter, [ --enable-experimental-postfilter Enable this for testing only if you know what you're doing ], -[if test "$enableval" = yes; then - ac_enable_experimental_postfilter="yes" - AC_DEFINE([ENABLE_POSTFILTER], , [Postfilter]) -fi]) - ac_enable_custom_modes="no" AC_ARG_ENABLE(custom-modes, [ --enable-custom-modes Enable non-Opus modes, like 44.1 kHz and powers of two ], [if test "$enableval" = yes; then @@ -208,8 +198,9 @@ if test "$OPUS_BUILD" = "true" ; then AC_DEFINE(OPUS_BUILD, [], [We're part of Opus]) fi -AC_OUTPUT([Makefile libcelt/Makefile tests/Makefile - celt.pc tools/Makefile libcelt.spec ]) +AM_CONDITIONAL([FIXED_POINT], [test x$ac_enable_fixed = xyes]) + +AC_OUTPUT([Makefile]) AC_MSG_RESULT([ ------------------------------------------------------------------------ @@ -231,11 +222,5 @@ AC_MSG_RESULT([ ------------------------------------------------------------------------ ]) -if test "x$tools" = "x"; then -echo "**IMPORTANT**" -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 - echo "Type \"make; make install\" to compile and install"; echo "Type \"make check\" to run the test suite";