blob: ac759b56a8fe4ac2d7663da197a9f6d9df648de6 [file] [log] [blame]
dnl Process this file with autoconf to produce a configure script. -*-m4-*-
AC_INIT(libspeex/speex.h)
SPEEX_MAJOR_VERSION=0
SPEEX_MINOR_VERSION=4
SPEEX_MICRO_VERSION=0
SPEEX_VERSION=$SPEEX_MAJOR_VERSION.$SPEEX_MINOR_VERSION.$SPEEX_MICRO_VERSION
SPEEX_BINARY_AGE=0
SPEEX_INTERFACE_AGE=0
# libtool versioning
LT_RELEASE=$SPEEX_MAJOR_VERSION.$SPEEX_MINOR_VERSION
LT_CURRENT=`expr $SPEEX_MICRO_VERSION - $SPEEX_INTERFACE_AGE`
LT_REVISION=$SPEEX_INTERFACE_AGE
LT_AGE=`expr $SPEEX_BINARY_AGE - $SPEEX_INTERFACE_AGE`
AC_SUBST(LT_RELEASE)
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)
# For automake.
VERSION=$SPEEX_VERSION
PACKAGE=Speex
AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
AM_MAINTAINER_MODE
AC_CANONICAL_HOST
AC_DISABLE_SHARED
dnl AC_DISABLE_STATIC
AM_PROG_LIBTOOL
AC_C_BIGENDIAN
AC_CHECK_HEADERS(sys/soundcard.h)
src=src
AC_CHECK_HEADERS(ogg/ogg.h, [], [src=])
AC_CHECK_LIB(m, sin)
AC_CHECK_LIB(ogg, ogg_stream_init, [LIB_OGG='-logg'; AC_SUBST(LIB_OGG)] , [ src=])
AC_SUBST(src)
dnl AC_CHECK_LIB(ogg, ogg_stream_init, [LIB_OGG='-logg'; AC_SUBST(LIB_OGG)] , [ echo; echo "error: libogg is now required by speex"; echo "Get it from: http://www.ogg.org/ogg/index.html"; exit 1 ])
AC_FUNC_ALLOCA
dnl AC_DEFINE(VERSION, "$VERSION")
AC_DEFINE_UNQUOTED(VERSION, "${VERSION}")
dnl Output the makefiles and version.h.
AC_OUTPUT([Makefile libspeex/Makefile src/Makefile Speex.spec ])
if test "x$src" = "x"; then
echo "You don't seem to have libogg installed. Only the Speex library (libspeex) will be built (no encoder/decoder executable)"
echo "You can download libogg from http://www.ogg.org/ogg/index.html"
fi
echo "Type \"make; make install\" to compile and install Speex";