comparison spandsp-0.0.6pre17/configure.ac @ 4:26cd8f1ef0b1

import spandsp-0.0.6pre17
author Peter Meerwald <pmeerw@cosy.sbg.ac.at>
date Fri, 25 Jun 2010 15:50:58 +0200
parents
children
comparison
equal deleted inserted replaced
3:c6c5a16ce2f2 4:26cd8f1ef0b1
1 #
2 # SpanDSP - a series of DSP components for telephony
3 #
4 # configure.ac - Process this file with autoconf to produce configure
5 #
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU Lesser General Public License version 2.1,
8 # as published by the Free Software Foundation.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU Lesser General Public License for more details.
14 #
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with this program; if not, write to the Free Software
17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 #
19 # $Id: configure.ac,v 1.73 2009/10/03 04:37:25 steveu Exp $
20
21 # @start 1
22
23 AC_INIT
24
25 m4_include(config/ax_compiler_vendor.m4)
26 m4_include(config/ax_check_real_file.m4)
27 m4_include(config/ax_fixed_point_machine.m4)
28 m4_include(config/ax_misaligned_access_fails.m4)
29 m4_include(config/ax_c99_features.m4)
30 m4_include(config/ax_check_export_capability.m4)
31
32 SPANDSP_MAJOR_VERSION=0
33 SPANDSP_MINOR_VERSION=0
34 SPANDSP_MICRO_VERSION=6
35
36 SPANDSP_LT_CURRENT=2
37 SPANDSP_LT_REVISION=0
38 SPANDSP_LT_AGE=0
39
40 VERSION=$SPANDSP_MAJOR_VERSION.$SPANDSP_MINOR_VERSION.$SPANDSP_MICRO_VERSION
41 PACKAGE=spandsp
42
43 AC_SUBST(SPANDSP_LT_CURRENT)
44 AC_SUBST(SPANDSP_LT_REVISION)
45 AC_SUBST(SPANDSP_LT_AGE)
46
47 AC_CONFIG_SRCDIR([src/tone_generate.c])
48 AC_CONFIG_AUX_DIR(config)
49 AC_CONFIG_HEADERS([src/config.h:config-h.in])
50 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
51
52 AC_CANONICAL_HOST
53 #AC_CANONICAL_BUILD
54 AC_PROG_CC
55 AC_PROG_CXX
56 AC_PROG_GCC_TRADITIONAL
57 AC_PROG_LIBTOOL
58 AC_LANG([C])
59
60 AX_COMPILER_VENDOR
61
62 if test "${build}" != "${host}"
63 then
64 # If we are doing a Canadian Cross, in which the host and build systems
65 # are not the same, we set reasonable default values for the tools.
66
67 CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
68 CPPFLAGS_FOR_BUILD="\$(CPPFLAGS)"
69 CC=${CC-${host_alias}-gcc}
70 CFLAGS=${CFLAGS-"-g -O2"}
71 CXX=${CXX-${host_alias}-c++}
72 CXXFLAGS=${CXXFLAGS-"-g -O2"}
73 else
74 # Set reasonable default values for some tools even if not Canadian.
75 # Of course, these are different reasonable default values, originally
76 # specified directly in the Makefile.
77 # We don't export, so that autoconf can do its job.
78 # Note that all these settings are above the fragment inclusion point
79 # in Makefile.in, so can still be overridden by fragments.
80 # This is all going to change when we autoconfiscate...
81 CC_FOR_BUILD="\$(CC)"
82 CPPFLAGS_FOR_BUILD="\$(CPPFLAGS)"
83 AC_PROG_CC
84
85 # We must set the default linker to the linker used by gcc for the correct
86 # operation of libtool. If LD is not defined and we are using gcc, try to
87 # set the LD default to the ld used by gcc.
88 if test -z "$LD"
89 then
90 if test "$GCC" = yes
91 then
92 case $build in
93 *-*-mingw*)
94 gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;;
95 *)
96 gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;;
97 esac
98 case $gcc_prog_ld in
99 # Accept absolute paths.
100 [[\\/]* | [A-Za-z]:[\\/]*)]
101 LD="$gcc_prog_ld" ;;
102 esac
103 fi
104 fi
105
106 CXX=${CXX-"c++"}
107 CFLAGS=${CFLAGS-"-g -O2"}
108 CXXFLAGS=${CXXFLAGS-"-g -O2"}
109 fi
110
111 AC_DEFUN([REMOVE_FROM_VAR],[
112 new_val=""
113 removed=0
114 for i in $$1; do
115 if test "x$i" != "x$2"; then
116 new_val="$new_val $i"
117 else
118 removed=1
119 fi
120 done
121 if test $removed = "1"; then
122 echo " removed \"$2\" from $1"
123 $1=$new_val
124 fi
125 ])
126
127 AC_C_CONST
128 AC_C_INLINE
129 AC_C_VOLATILE
130
131 AC_CHECK_TYPES(long long)
132 AC_CHECK_TYPES(long double)
133
134 AC_TYPE_SIGNAL
135
136 AC_ARG_ENABLE(doc, [ --enable-doc Build the documentation])
137 AC_ARG_ENABLE(tests, [ --enable-tests Build the test programs])
138 AC_ARG_ENABLE(test_data, [ --enable-test-data Build TIFF test files for some ITU test images])
139 AC_ARG_ENABLE(mmx, [ --enable-mmx Enable MMX support])
140 AC_ARG_ENABLE(sse, [ --enable-sse Enable SSE support])
141 AC_ARG_ENABLE(sse2, [ --enable-sse2 Enable SSE2 support])
142 AC_ARG_ENABLE(sse3, [ --enable-sse3 Enable SSE3 support])
143 AC_ARG_ENABLE(ssse3, [ --enable-ssse3 Enable SSSE3 support])
144 AC_ARG_ENABLE(sse4_1, [ --enable-sse4-1 Enable SSE4.1 support])
145 AC_ARG_ENABLE(sse4_2, [ --enable-sse4-2 Enable SSE4.2 support])
146 AC_ARG_ENABLE(sse4a, [ --enable-sse4a Enable SSE4A support])
147 AC_ARG_ENABLE(sse5, [ --enable-sse5 Enable SSE5 support])
148 AC_ARG_ENABLE(fixed_point, [ --enable-fixed-point Enable fixed point support])
149 # The following is for MSVC, where we may be using a local copy of libtiff, built alongside spandsp
150 AC_ARG_ENABLE(builtin_tiff,
151 [AC_HELP_STRING([--enable-builtin-tiff],[build with builtin libtiff])],[enable_builtin_tiff="$enableval"],[enable_builtin_tiff="no"])
152
153 AC_FUNC_ERROR_AT_LINE
154 AC_FUNC_VPRINTF
155 AC_FUNC_MALLOC
156 AC_FUNC_MEMCMP
157 AC_FUNC_REALLOC
158 AC_FUNC_SELECT_ARGTYPES
159
160 AX_C99_FUNC_LRINT
161 AX_C99_FUNC_LRINTF
162 AX_C99_FUNC_LLRINT
163 AX_C99_FUNC_LLRINTF
164
165 if test "x$ac_cv_c99_lrint" = "xno" ; then
166 if test "x$ac_cv_c99_lrintf" = "xno" ; then
167 AC_MSG_WARN([[*** Missing C99 standard functions lrint() and lrintf().]])
168 AC_MSG_WARN([[*** This may cause benign compiler warnings on some systems (ie Solaris).]])
169 fi
170 fi
171
172 AX_C99_FLEXIBLE_ARRAY
173
174 AC_CHECK_FUNCS([memmove])
175 AC_CHECK_FUNCS([memset])
176 AC_CHECK_FUNCS([select])
177 AC_CHECK_FUNCS([strcasecmp])
178 AC_CHECK_FUNCS([strchr])
179 AC_CHECK_FUNCS([strdup])
180 AC_CHECK_FUNCS([strerror])
181 AC_CHECK_FUNCS([strstr])
182 AC_CHECK_FUNCS([strtol])
183 AC_CHECK_FUNCS([gettimeofday])
184 AC_CHECK_FUNCS([drand48])
185
186 AC_HEADER_STDC
187 AC_HEADER_SYS_WAIT
188 AC_HEADER_TIME
189
190 # Check for header files.
191 AC_CHECK_HEADERS([socket.h])
192 AC_CHECK_HEADERS([inttypes.h], [INSERT_INTTYPES_HEADER="#include <inttypes.h>"])
193 AC_CHECK_HEADERS([stdint.h], [INSERT_STDINT_HEADER="#include <stdint.h>"])
194 AC_CHECK_HEADERS([unistd.h])
195 AC_CHECK_HEADERS([stdlib.h])
196 AC_CHECK_HEADERS([string.h])
197 AC_CHECK_HEADERS([strings.h])
198 AC_CHECK_HEADERS([malloc.h])
199 AC_CHECK_HEADERS([tgmath.h], [INSERT_TGMATH_HEADER="#include <tgmath.h>"])
200 AC_CHECK_HEADERS([math.h], [INSERT_MATH_HEADER="#include <math.h>"])
201 AC_CHECK_HEADERS([float.h])
202 AC_CHECK_HEADERS([fcntl.h])
203 AC_CHECK_HEADERS([sys/time.h])
204 AC_CHECK_HEADERS([sys/select.h])
205 AC_CHECK_HEADERS([sys/ioctl.h])
206 AC_CHECK_HEADERS([sys/fcntl.h])
207 AC_CHECK_HEADERS([sndfile.h])
208 AC_CHECK_HEADERS([fftw3.h], , [AC_CHECK_HEADERS([fftw.h])])
209 AC_CHECK_HEADERS([pthread.h])
210 if test "${build}" == "${host}"
211 then
212 AC_CHECK_HEADERS([X11/X.h])
213 fi
214
215 # Determine XML2 include path
216 AC_MSG_CHECKING(for libxml/xmlmemory.h)
217
218 # Can we include headers using system include dirs?
219 AC_TRY_COMPILE([#include <libxml/xmlmemory.h>], [int a = 1;],
220 XML2_INCLUDE=" ",
221 XML2_INCLUDE=
222 )
223
224 # Hunt through several possible directories to find the includes for libxml2
225 if test "x$XML2_INCLUDE" = "x"; then
226 old_CPPFLAGS="$CPPFLAGS"
227 for i in $xml2_include_dir /usr/include /usr/local/include /usr/include/libxml2 /usr/local/include/libxml2 ; do
228 CPPFLAGS="$old_CPPFLAGS -I$i"
229 AC_TRY_COMPILE([#include <libxml/xmlmemory.h>], [int a = 1;],
230 XML2_INCLUDE="-I$i",
231 XML2_INCLUDE=
232 )
233 if test "x$XML2_INCLUDE" != "x"; then
234 break;
235 fi
236 done
237 CPPFLAGS="$old_CPPFLAGS $XML2_INCLUDE"
238 fi
239
240 AC_CHECK_HEADERS([libxml/xmlmemory.h])
241 AC_CHECK_HEADERS([libxml/parser.h])
242 AC_CHECK_HEADERS([libxml/xinclude.h])
243
244 AC_LANG([C++])
245 AC_CHECK_HEADERS([FL/Fl.H])
246 AC_CHECK_HEADERS([FL/Fl_Overlay_Window.H])
247 AC_CHECK_HEADERS([FL/Fl_Light_Button.H])
248 AC_CHECK_HEADERS([FL/fl_draw.H])
249 AC_CHECK_HEADERS([FL/Fl_Cartesian.H], [], [], [],[[#include <FL/Fl.H>
250 ]])
251 AC_CHECK_HEADERS([FL/Fl_Audio_Meter.H], [], [], [],[[#include <FL/Fl.H>
252 ]])
253
254 AC_LANG([C])
255
256 if test "${build}" == "${host}"
257 then
258 case "${host}" in
259 x86_64-*)
260 # X86_64 Linux machines may have both 64 bit and 32 bit libraries. We need to choose the right set
261 AX_CHECK_REAL_FILE([${prefix}/lib64], libdir='$(exec_prefix)/lib64')
262 AX_CHECK_REAL_FILE([/usr/X11R6/lib64], [TESTLIBS="$TESTLIBS -L/usr/X11R6/lib64"], AC_CHECK_FILE([/usr/X11R6/lib], [TESTLIBS="$TESTLIBS -L/usr/X11R6/lib"]))
263 # The very oldest AMD 64 bit chips support SSE2, SSE and MMX
264 enable_sse2="yes"
265 ;;
266 esac
267 fi
268
269 AC_CHECK_LIB([m], [cos])
270 # Some platforms still seem to lack the basic single precision trig and power related function.
271 AC_SEARCH_LIBS([sinf], [m], AC_DEFINE([HAVE_SINF], [1], [Define to 1 if you have the sinf() function.]))
272 AC_SEARCH_LIBS([cosf], [m], AC_DEFINE([HAVE_COSF], [1], [Define to 1 if you have the cosf() function.]))
273 AC_SEARCH_LIBS([tanf], [m], AC_DEFINE([HAVE_TANF], [1], [Define to 1 if you have the tanf() function.]))
274 AC_SEARCH_LIBS([asinf], [m], AC_DEFINE([HAVE_ASINF], [1], [Define to 1 if you have the asinf() function.]))
275 AC_SEARCH_LIBS([acosf], [m], AC_DEFINE([HAVE_ACOSF], [1], [Define to 1 if you have the acosf() function.]))
276 AC_SEARCH_LIBS([atanf], [m], AC_DEFINE([HAVE_ATANF], [1], [Define to 1 if you have the atanf() function.]))
277 AC_SEARCH_LIBS([atan2f], [m], AC_DEFINE([HAVE_ATAN2F], [1], [Define to 1 if you have the atan2f() function.]))
278 AC_SEARCH_LIBS([ceilf], [m], AC_DEFINE([HAVE_CEILF], [1], [Define to 1 if you have the ceilf() function.]))
279 AC_SEARCH_LIBS([floorf], [m], AC_DEFINE([HAVE_FLOORF], [1], [Define to 1 if you have the floorf() function.]))
280 AC_SEARCH_LIBS([powf], [m], AC_DEFINE([HAVE_POWF], [1], [Define to 1 if you have the powf() function.]))
281 AC_SEARCH_LIBS([expf], [m], AC_DEFINE([HAVE_EXPF], [1], [Define to 1 if you have the expf() function.]))
282 AC_SEARCH_LIBS([logf], [m], AC_DEFINE([HAVE_LOGF], [1], [Define to 1 if you have the logf() function.]))
283 AC_SEARCH_LIBS([log10f], [m], AC_DEFINE([HAVE_LOG10F], [1], [Define to 1 if you have the log10f() function.]))
284
285 # Checks for libraries.
286 AC_CHECK_LIB([xml2], [xmlParseFile], [AC_DEFINE([HAVE_LIBXML2], [1], [Define to 1 if you have the 'libxml2' library (-lxml2).]) SIMLIBS="$SIMLIBS -lxml2"])
287
288 if test -n "$enable_tests" ; then
289 AC_LANG([C])
290 AC_CHECK_LIB([sndfile], [sf_open], SIMLIBS="$SIMLIBS -lsndfile", AC_MSG_ERROR("Can't make tests without libsndfile (does your system require a libsndfile-devel package?)"))
291 AC_CHECK_LIB([fftw3], [fftw_plan_dft_1d], SIMLIBS="$SIMLIBS -lfftw3", [AC_CHECK_LIB([fftw], [fftw_create_plan], SIMLIBS="$SIMLIBS -lfftw", AC_MSG_ERROR("Can't make tests without FFTW 2 or 3 (does your system require an fftw?-devel package?)"))])
292 AC_CHECK_LIB([pthread], [pthread_attr_init], TESTLIBS="$TESTLIBS -lpthread")
293 AC_CHECK_LIB([dl], [dlopen], TESTLIBS="$TESTLIBS -ldl")
294 AC_CHECK_LIB([Xft], [XftFontOpen], TESTLIBS="$TESTLIBS -lXft",, $TESTLIBS)
295 AC_CHECK_LIB([Xext], [XextCreateExtension], TESTLIBS="$TESTLIBS -lXext",, $TESTLIBS)
296 AC_CHECK_LIB([X11], [XOpenDisplay], TESTLIBS="$TESTLIBS -lX11",, $TESTLIBS)
297 AC_LANG([C++])
298 AC_CHECK_LIB([fltk], [main], TESTLIBS="$TESTLIBS -lfltk -lsupc++",, $TESTLIBS)
299 AC_CHECK_LIB([fltk_cartesian], [main], TESTLIBS="-lfltk_cartesian $TESTLIBS",, $TESTLIBS)
300 AC_CHECK_LIB([fltk_audio_meter], [main], TESTLIBS="-lfltk_audio_meter $TESTLIBS",, $TESTLIBS)
301 AC_LANG([C])
302 fi
303
304 AX_CHECK_EXPORT_CAPABILITY([$host],
305 [AC_DEFINE([SPANDSP_USE_EXPORT_CAPABILITY], [1], [Use the library symbol export capability of the compiler])
306 SPANDSP_USE_EXPORT_CAPABILITY="#define SPANDSP_USE_EXPORT_CAPABILITY 1"],
307 [SPANDSP_USE_EXPORT_CAPABILITY="#undef SPANDSP_USE_EXPORT_CAPABILITY"])
308
309 case "${ax_cv_c_compiler_vendor}" in
310 gnu)
311 COMP_VENDOR_CFLAGS="-std=gnu99 -ffast-math -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes $COMP_VENDOR_CFLAGS"
312 if test "$enable_sse5" = "yes" ; then
313 COMP_VENDOR_CFLAGS="-msse5 $COMP_VENDOR_CFLAGS"
314 fi
315 if test "$enable_sse4a" = "yes" ; then
316 COMP_VENDOR_CFLAGS="-msse4a $COMP_VENDOR_CFLAGS"
317 fi
318 if test "$enable_sse4_2" = "yes" ; then
319 COMP_VENDOR_CFLAGS="-msse42 $COMP_VENDOR_CFLAGS"
320 fi
321 if test "$enable_sse4_1" = "yes" ; then
322 COMP_VENDOR_CFLAGS="-msse41 $COMP_VENDOR_CFLAGS"
323 fi
324 if test "$enable_ssse3" = "yes" ; then
325 COMP_VENDOR_CFLAGS="-mssse3 $COMP_VENDOR_CFLAGS"
326 fi
327 if test "$enable_sse3" = "yes" ; then
328 COMP_VENDOR_CFLAGS="-msse3 $COMP_VENDOR_CFLAGS"
329 fi
330 if test "$enable_sse2" = "yes" ; then
331 COMP_VENDOR_CFLAGS="-msse2 $COMP_VENDOR_CFLAGS"
332 fi
333 if test "$enable_sse" = "yes" ; then
334 COMP_VENDOR_CFLAGS="-msse $COMP_VENDOR_CFLAGS"
335 fi
336 if test "$enable_mmx" = "yes" ; then
337 COMP_VENDOR_CFLAGS="-mmmx $COMP_VENDOR_CFLAGS"
338 fi
339 case $host_os in
340 mingw* | cygwin*)
341 COMP_VENDOR_LDFLAGS="-no-undefined"
342 ;;
343 *)
344 COMP_VENDOR_LDFLAGS=
345 ;;
346 esac
347 ;;
348 sun)
349 COMP_VENDOR_CFLAGS="-xc99=all -mt -xCC -errwarn=%all -xvpara $COMP_VENDOR_CFLAGS"
350 if test "$enable_sse3" = "yes" ; then
351 COMP_VENDOR_CFLAGS="-native -fast $COMP_VENDOR_CFLAGS"
352 fi
353 if test "$enable_sse2" = "yes" ; then
354 COMP_VENDOR_CFLAGS="-native -fast $COMP_VENDOR_CFLAGS"
355 fi
356 if test "$enable_sse" = "yes" ; then
357 COMP_VENDOR_CFLAGS="-native -fast $COMP_VENDOR_CFLAGS"
358 fi
359 if test "$enable_mmx" = "yes" ; then
360 COMP_VENDOR_CFLAGS="-native -fast $COMP_VENDOR_CFLAGS"
361 fi
362 COMP_VENDOR_LDFLAGS=
363 REMOVE_FROM_VAR(CFLAGS, -Xc)
364 ;;
365 *)
366 COMP_VENDOR_CFLAGS="-std=c99 -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes $COMP_VENDOR_CFLAGS"
367 COMP_VENDOR_LDFLAGS=
368 ;;
369 esac
370
371 COMP_VENDOR_CFLAGS="-DNDEBUG $COMP_VENDOR_CFLAGS"
372
373 AM_CONDITIONAL([COND_DOC], [test "$enable_doc" = yes])
374 AM_CONDITIONAL([COND_TESTS], [test "$enable_tests" = yes])
375 AM_CONDITIONAL([COND_TESTDATA], [test "$enable_test_data" = yes])
376 AM_CONDITIONAL([COND_MMX], [test "$enable_mmx" = yes])
377 AM_CONDITIONAL([COND_SSE], [test "$enable_sse" = yes])
378 AM_CONDITIONAL([COND_SSE2], [test "$enable_sse2" = yes])
379 AM_CONDITIONAL([COND_SSE3], [test "$enable_sse3" = yes])
380 AM_CONDITIONAL([COND_SSSE3], [test "$enable_ssse3" = yes])
381 AM_CONDITIONAL([COND_SSE4_1], [test "$enable_sse4_1" = yes])
382 AM_CONDITIONAL([COND_SSE4_2], [test "$enable_sse4_2" = yes])
383 AM_CONDITIONAL([COND_SSE4A], [test "$enable_sse4a" = yes])
384 AM_CONDITIONAL([COND_SSE5], [test "$enable_sse5" = yes])
385 if test "$enable_fixed_point" = "yes" ; then
386 AC_DEFINE([SPANDSP_USE_FIXED_POINT], [1], [Enable fixed point processing, where possible, instead of floating point])
387 SPANDSP_USE_FIXED_POINT="#define SPANDSP_USE_FIXED_POINT 1"
388 else
389 AX_FIXED_POINT_MACHINE([$host],
390 [AC_DEFINE([SPANDSP_USE_FIXED_POINT], [1], [Enable fixed point processing, where possible, instead of floating point])
391 SPANDSP_USE_FIXED_POINT="#define SPANDSP_USE_FIXED_POINT 1"],
392 [SPANDSP_USE_FIXED_POINT="#undef SPANDSP_USE_FIXED_POINT"])
393 fi
394 AX_MISALIGNED_ACCESS_FAILS([$host],
395 [AC_DEFINE([SPANDSP_MISALIGNED_ACCESS_FAILS], [1], [Do not expect a misaligned memory access to work correctly])
396 SPANDSP_MISALIGNED_ACCESS_FAILS="#define SPANDSP_MISALIGNED_ACCESS_FAILS 1"],
397 [SPANDSP_MISALIGNED_ACCESS_FAILS="#undef SPANDSP_MISALIGNED_ACCESS_FAILS"])
398
399 if test "$enable_sse5" = "yes" ; then
400 AC_DEFINE([SPANDSP_USE_SSE5], [1], [Use the SSE5 instruction set (i386 and x86_64 only).])
401 enable_sse4a="yes"
402 fi
403 if test "$enable_sse4a" = "yes" ; then
404 AC_DEFINE([SPANDSP_USE_SSE4A], [1], [Use the SSE4A instruction set (i386 and x86_64 only).])
405 enable_sse4_2="yes"
406 fi
407 if test "$enable_sse4_2" = "yes" ; then
408 AC_DEFINE([SPANDSP_USE_SSE4_2], [1], [Use the SSE4.2 instruction set (i386 and x86_64 only).])
409 enable_sse4_1="yes"
410 fi
411 if test "$enable_sse4_1" = "yes" ; then
412 AC_DEFINE([SPANDSP_USE_SSE4_1], [1], [Use the SSE4.1 instruction set (i386 and x86_64 only).])
413 enable_ssse3="yes"
414 fi
415 if test "$enable_ssse3" = "yes" ; then
416 AC_DEFINE([SPANDSP_USE_SSSE3], [1], [Use the SSSE3 instruction set (i386 and x86_64 only).])
417 enable_sse3="yes"
418 fi
419 if test "$enable_sse3" = "yes" ; then
420 AC_DEFINE([SPANDSP_USE_SSE3], [1], [Use the SSE3 instruction set (i386 and x86_64 only).])
421 enable_sse2="yes"
422 fi
423 if test "$enable_sse2" = "yes" ; then
424 AC_DEFINE([SPANDSP_USE_SSE2], [1], [Use the SSE2 instruction set (i386 and x86_64 only).])
425 enable_sse="yes"
426 fi
427 if test "$enable_sse" = "yes" ; then
428 AC_DEFINE([SPANDSP_USE_SSE], [1], [Use the SSE instruction set (i386 and x86_64 only).])
429 enable_mmx="yes"
430 fi
431 if test "$enable_mmx" = "yes" ; then
432 AC_DEFINE([SPANDSP_USE_MMX], [1], [Use the MMX instruction set (i386 and x86_64 only).])
433 fi
434
435 if test "$enable_builtin_tiff" = "yes" ; then
436 abs_tiffdir="`cd $srcdir/../tiff-3.8.2/ && pwd`"
437 save_CFLAGS=$CFLAGS
438 CFLAGS="$CFLAGS -I$abs_tiffdir/libtiff"
439 AC_CHECK_HEADERS([tiffio.h])
440 CFLAGS="$save_CFLAGS"
441 COMP_VENDOR_CFLAGS="-I$abs_tiffdir/libtiff $COMP_VENDOR_CFLAGS"
442 COMP_VENDOR_LDFLAGS="-L$abs_tiffdir/libtiff $COMP_VENDOR_LDFLAGS"
443 LIBS="$LIBS $abs_tiffdir/libtiff/libtiff.la"
444 AC_DEFINE([HAVE_LIBTIFF], [1], [Define to 1 if you have the `tiff' library (-ltiff).])
445 else
446 AC_CHECK_HEADERS([tiffio.h])
447 AC_CHECK_LIB([tiff], [TIFFOpen], , AC_MSG_ERROR("Can't build without libtiff (does your system require a libtiff-devel package?)"), -lm)
448 fi
449
450 TESTLIBS="$SIMLIBS $TESTLIBS"
451
452 AC_SUBST(CC_FOR_BUILD)
453 AC_SUBST(CPPFLAGS_FOR_BUILD)
454 AC_SUBST(COMP_VENDOR_CFLAGS)
455 AC_SUBST(COMP_VENDOR_LDFLAGS)
456 AC_SUBST(SIMLIBS)
457 AC_SUBST(TESTLIBS)
458 AC_SUBST(SPANDSP_USE_FIXED_POINT)
459 AC_SUBST(SPANDSP_MISALIGNED_ACCESS_FAILS)
460 AC_SUBST(SPANDSP_USE_EXPORT_CAPABILITY)
461 AC_SUBST(INSERT_INTTYPES_HEADER)
462 AC_SUBST(INSERT_STDINT_HEADER)
463 AC_SUBST(INSERT_TGMATH_HEADER)
464 AC_SUBST(INSERT_MATH_HEADER)
465
466 AC_CONFIG_FILES([Makefile
467 doc/Makefile
468 doc/doxygen
469 src/Makefile
470 src/spandsp.h
471 spandsp-sim/Makefile
472 test-data/Makefile
473 test-data/etsi/Makefile
474 test-data/etsi/fax/Makefile
475 test-data/itu/Makefile
476 test-data/itu/fax/Makefile
477 test-data/local/Makefile
478 tests/Makefile
479 spandsp.pc
480 spandsp.spec])
481
482 AC_OUTPUT
483
484 # @end 1

Repositories maintained by Peter Meerwald, pmeerw@pmeerw.net.