1 dnl Process this file with autoconf to produce a configure script. -*-m4-*-
3 AC_INIT(libspeex/speex.c)
5 AM_CONFIG_HEADER([config.h])
10 SPEEX_EXTRA_VERSION=-svn
12 SPEEX_VERSION=$SPEEX_MAJOR_VERSION.$SPEEX_MINOR_VERSION.$SPEEX_MICRO_VERSION$SPEEX_EXTRA_VERSION
18 AC_SUBST(SPEEX_LT_CURRENT)
19 AC_SUBST(SPEEX_LT_REVISION)
20 AC_SUBST(SPEEX_LT_AGE)
23 VERSION=$SPEEX_VERSION
26 AC_SUBST(SPEEX_VERSION)
28 AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
40 AC_MSG_CHECKING(for C99 variable-size arrays)
45 [has_var_arrays=yes;AC_DEFINE([VAR_ARRAYS], [], [Use C99 variable-size arrays])
49 AC_MSG_RESULT($has_var_arrays)
51 AC_MSG_CHECKING(for alloca)
52 AC_TRY_COMPILE( [#include <alloca.h>], [
54 int *array = alloca(foo);
58 if test x$has_var_arrays = "xno" ; then
59 AC_DEFINE([USE_ALLOCA], [], [Make use of alloca])
64 AC_MSG_RESULT($has_alloca)
67 AC_CHECK_HEADERS(sys/soundcard.h sys/audioio.h)
69 XIPH_PATH_OGG([src="src"], [src=""])
74 # Check for getopt_long; if not found, use included source.
75 AC_CHECK_FUNCS([getopt_long],,
76 [# FreeBSD has a gnugetopt library.
77 AC_CHECK_LIB([gnugetopt],[getopt_long],
78 [AC_DEFINE([HAVE_GETOPT_LONG])],
79 [# Use the GNU replacement.
81 AC_LIBOBJ(getopt1)])])
83 AC_CHECK_LIB(winmm, main)
85 AC_DEFINE_UNQUOTED(SPEEX_VERSION, "${SPEEX_VERSION}", [Complete version string])
86 AC_DEFINE_UNQUOTED(SPEEX_MAJOR_VERSION, ${SPEEX_MAJOR_VERSION}, [Version major])
87 AC_DEFINE_UNQUOTED(SPEEX_MINOR_VERSION, ${SPEEX_MINOR_VERSION}, [Version minor])
88 AC_DEFINE_UNQUOTED(SPEEX_MICRO_VERSION, ${SPEEX_MICRO_VERSION}, [Version micro])
89 AC_DEFINE_UNQUOTED(SPEEX_EXTRA_VERSION, "${SPEEX_EXTRA_VERSION}", [Version extra])
91 AC_ARG_ENABLE(wideband, [ --disable-wideband Disable wideband codec],
92 [if test "$enableval" = no; then
93 AC_DEFINE([DISABLE_WIDEBAND], , [Disable wideband codec])
96 AC_ARG_ENABLE(vorbis-psy, [ --enable-vorbis-psy Enable Vorbis-style psychoacoustics],
97 [if test "$enableval" = yes; then
98 AC_DEFINE([VORBIS_PSYCHO], , [Enable Vorbis-style psychoacoustics])
101 AC_ARG_ENABLE(valgrind, [ --enable-valgrind Enable valgrind extra checks],
102 [if test "$enableval" = yes; then
103 AC_DEFINE([ENABLE_VALGRIND], , [Enable valgrind extra checks])
106 AC_ARG_ENABLE(sse, [ --enable-sse Enable SSE support], [if test "$enableval" = yes; then
107 AC_DEFINE([_USE_SSE], , [Enable SSE support])
108 CFLAGS="$CFLAGS -O3 -msse"
112 AC_ARG_ENABLE(fixed-point, [ --enable-fixed-point Compile as fixed-point],
113 [if test "$enableval" = yes; then
114 AC_DEFINE([FIXED_POINT], , [Compile as fixed-point])
117 AC_ARG_ENABLE(arm4-asm, [ --enable-arm4-asm Make use of ARM4 assembly optimizations],
118 [if test "$enableval" = yes; then
119 AC_DEFINE([ARM4_ASM], , [Make use of ARM4 assembly optimizations])
122 AC_ARG_ENABLE(arm5e-asm, [ --enable-arm5e-asm Make use of ARM5E assembly optimizations],
123 [if test "$enableval" = yes; then
124 AC_DEFINE([ARM5E_ASM], , [Make use of ARM5E assembly optimizations])
127 AC_ARG_ENABLE(blackfin-asm, [ --enable-blackfin-asm Make use of Blackfin assembly optimizations],
128 [if test "$enableval" = yes; then
129 AC_DEFINE([BFIN_ASM], , [Make use of Blackfin assembly optimizations])
130 LDFLAGS="-Wl,-elf2flt=-s100000"
133 AC_ARG_ENABLE(fixed-point-debug, [ --enable-fixed-point-debug Debug fixed-point implementation],
134 [if test "$enableval" = yes; then
135 AC_DEFINE([FIXED_DEBUG], , [Debug fixed-point implementation])
138 AC_ARG_ENABLE(epic-48k, [ --enable-epic-48k Enable support for Epic 4.8 kbps mode],
139 [if test "$enableval" = yes; then
140 AC_DEFINE([EPIC_48K], , [Enable support for Epic 4.8 kbps mode])
143 AC_ARG_ENABLE(ti-c55x, [ --enable-ti-c55x Enable support for TI C55X DSP],
144 [if test "$enableval" = yes; then
146 AC_DEFINE([TI_C55X], , [Enable support for TI C55X DSP])
149 AC_ARG_ENABLE(16bit-precision, [ --enable-16bit-precision Reduce precision to 16 bits (EXPERIMENTAL)],
150 [if test "$enableval" = yes; then
151 AC_DEFINE([PRECISION16], , [Reduce precision to 16 bits (EXPERIMENTAL)])
154 AC_CHECK_SIZEOF(short)
156 AC_CHECK_SIZEOF(long)
158 if test x$has_char16 = "xyes" ; then
160 $ac_cv_sizeof_short) SIZE16="short";;
161 $ac_cv_sizeof_int) SIZE16="int";;
165 $ac_cv_sizeof_short) SIZE16="short";;
166 $ac_cv_sizeof_int) SIZE16="int";;
170 if test x$has_char16 = "xyes" ; then
172 $ac_cv_sizeof_int) SIZE32="int";;
173 $ac_cv_sizeof_long) SIZE32="long";;
174 $ac_cv_sizeof_short) SIZE32="short";;
178 $ac_cv_sizeof_int) SIZE32="int";;
179 $ac_cv_sizeof_long) SIZE32="long";;
180 $ac_cv_sizeof_short) SIZE32="short";;
187 AC_OUTPUT([Makefile libspeex/Makefile src/Makefile doc/Makefile Speex.spec
188 include/Makefile include/speex/Makefile speex.pc
189 win32/Makefile win32/libspeex/Makefile win32/speexenc/Makefile
190 win32/speexdec/Makefile symbian/Makefile
191 win32/VS2003/Makefile win32/VS2005/Makefile
192 win32/VS2003/libspeex/Makefile
193 win32/VS2003/speexdec/Makefile
194 win32/VS2003/speexenc/Makefile
195 win32/VS2005/libspeex/Makefile
196 win32/VS2005/speexdec/Makefile
197 win32/VS2005/speexenc/Makefile
198 include/speex/speex_config_types.h ti/Makefile
199 ti/speex_C54_test/Makefile ti/speex_C55_test/Makefile
200 ti/speex_C64_test/Makefile ])
202 if test "x$src" = "x"; then
204 echo "You don't seem to have the development package for libogg (libogg-devel) installed. Only the Speex library (libspeex) will be built (no encoder/decoder executable)"
205 echo "You can download libogg from http://downloads.xiph.org/releases/ogg/"
208 echo "Type \"make; make install\" to compile and install Speex";