libFLAC: infer cpu type from compiler macros
[flac.git] / configure.ac
1 #  FLAC - Free Lossless Audio Codec
2 #  Copyright (C) 2001,2002,2003,2004,2005,2006,2007,2008,2009  Josh Coalson
3 #
4 #  This file is part the FLAC project.  FLAC is comprised of several
5 #  components distributed under different licenses.  The codec libraries
6 #  are distributed under Xiph.Org's BSD-like license (see the file
7 #  COPYING.Xiph in this distribution).  All other programs, libraries, and
8 #  plugins are distributed under the GPL (see COPYING.GPL).  The documentation
9 #  is distributed under the Gnu FDL (see COPYING.FDL).  Each file in the
10 #  FLAC distribution contains at the top the terms under which it may be
11 #  distributed.
12 #
13 #  Since this particular file is relevant to all components of FLAC,
14 #  it may be distributed under the Xiph.Org license, which is the least
15 #  restrictive of those mentioned above.  See the file COPYING.Xiph in this
16 #  distribution.
17
18 # NOTE that for many of the AM_CONDITIONALs we use the prefix FLaC__
19 # instead of FLAC__ since autoconf triggers off 'AC_' in strings
20
21 AC_PREREQ(2.60)
22 AC_INIT([flac], [1.3.1], [flac-dev@xiph.org], [flac], [https://www.xiph.org/flac/])
23 AC_CONFIG_HEADERS([config.h])
24 AC_CONFIG_SRCDIR([src/flac/main.c])
25 AC_CONFIG_MACRO_DIR([m4])
26 AM_INIT_AUTOMAKE([foreign 1.10 -Wall tar-pax no-dist-gzip dist-xz subdir-objects])
27 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
28
29 user_cflags=$CFLAGS
30
31 #Prefer whatever the current ISO standard is.
32 AC_PROG_CC_STDC
33 AC_USE_SYSTEM_EXTENSIONS
34 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
35 LT_INIT([win32-dll disable-static pic-only])
36 AM_PROG_AS
37 AC_PROG_CXX
38 XIPH_C_COMPILER_IS_CLANG
39 XIPH_GCC_REALLY_IS_GCC
40 AC_PROG_MAKE_SET
41 AC_PROG_MKDIR_P
42
43 AC_SYS_LARGEFILE
44 AC_FUNC_FSEEKO
45
46 AC_CHECK_SIZEOF(off_t,1)        # Fake default value.
47 AC_CHECK_SIZEOF([void*])
48 AC_SEARCH_LIBS([lround],[m], [AC_DEFINE(HAVE_LROUND,1,lround support)])
49
50 AC_LANG_PUSH([C++])
51 # c++ flavor first
52 AC_C_VARARRAYS
53 if test $ac_cv_c_vararrays = yes; then
54         AC_DEFINE([HAVE_CXX_VARARRAYS], 1, [Define to 1 if C++ supports variable-length arrays.])
55 fi
56 AC_LANG_POP([C++])
57
58 # c flavor
59 AC_HEADER_STDC
60 AM_PROG_CC_C_O
61 AC_C_INLINE
62 AC_C_VARARRAYS
63 AC_C_TYPEOF
64
65 AC_CHECK_HEADERS([stdint.h inttypes.h byteswap.h sys/param.h sys/ioctl.h termios.h x86intrin.h cpuid.h])
66
67 XIPH_C_BSWAP32
68 XIPH_C_BSWAP16
69
70 ac_cv_c_big_endian=0
71 ac_cv_c_little_endian=0
72 AC_C_BIGENDIAN([ac_cv_c_big_endian=1], [ac_cv_c_little_endian=1], [
73         AC_MSG_WARN([[*****************************************************************]])
74         AC_MSG_WARN([[*** Not able to determine endian-ness of target processor.       ]])
75         AC_MSG_WARN([[*** The constants CPU_IS_BIG_ENDIAN and CPU_IS_LITTLE_ENDIAN in  ]])
76         AC_MSG_WARN([[*** config.h may need to be hand editied.                        ]])
77         AC_MSG_WARN([[*****************************************************************]])
78 ])
79 AC_DEFINE_UNQUOTED(CPU_IS_BIG_ENDIAN, ${ac_cv_c_big_endian},
80                                         [Target processor is big endian.])
81 AC_DEFINE_UNQUOTED(CPU_IS_LITTLE_ENDIAN, ${ac_cv_c_little_endian},
82                                         [Target processor is little endian.])
83 AC_DEFINE_UNQUOTED(WORDS_BIGENDIAN, ${ac_cv_c_big_endian},
84                                         [Target processor is big endian.])
85
86 AC_ARG_ENABLE(asm-optimizations, AC_HELP_STRING([--disable-asm-optimizations], [Don't use any assembly optimization routines]), asm_opt=no, asm_opt=yes)
87 dnl ' Terminate the damn single quote
88 AM_CONDITIONAL(FLaC__NO_ASM, test "x$asm_opt" = xno)
89 if test "x$asm_opt" = xno ; then
90 AC_DEFINE(FLAC__NO_ASM)
91 AH_TEMPLATE(FLAC__NO_ASM, [define to disable use of assembly code])
92 fi
93
94 # For the XMMS plugin.
95 AC_CHECK_TYPES(socklen_t, [], [])
96
97 dnl check for getopt in standard library
98 dnl AC_CHECK_FUNCS(getopt_long , , [LIBOBJS="$LIBOBJS getopt.o getopt1.o"] )
99 AC_CHECK_FUNCS(getopt_long, [], [])
100
101 AC_CHECK_SIZEOF(void*,1)
102
103 asm_optimisation=no
104 case "$host_cpu" in
105         amd64|x86_64)
106                 case "$host" in
107                         *gnux32)
108                                 # x32 user space and 64 bit kernel.
109                                 cpu_x86_64=true
110                                 AC_DEFINE(FLAC__CPU_X86_64)
111                                 AH_TEMPLATE(FLAC__CPU_X86_64, [define if building for x86_64])
112                                 asm_optimisation=$asm_opt
113                                 ;;
114                         *)
115                                 if test $ac_cv_sizeof_voidp = 4 ; then
116                                         # This must be a 32 bit user space running on 64 bit kernel so treat
117                                         # this as ia32.
118                                         cpu_ia32=true
119                                         AC_DEFINE(FLAC__CPU_IA32)
120                                         AH_TEMPLATE(FLAC__CPU_IA32, [define if building for ia32/i386])
121                         else
122                                         # x86_64 user space and kernel.
123                                         cpu_x86_64=true
124                                         AC_DEFINE(FLAC__CPU_X86_64)
125                                         AH_TEMPLATE(FLAC__CPU_X86_64, [define if building for x86_64])
126                                 fi
127                                 asm_optimisation=$asm_opt
128                                 ;;
129                 esac
130                 ;;
131         i*86)
132                 cpu_ia32=true
133                 AC_DEFINE(FLAC__CPU_IA32)
134                 AH_TEMPLATE(FLAC__CPU_IA32, [define if building for ia32/i386])
135                 asm_optimisation=$asm_opt
136                 ;;
137         powerpc|powerpc64)
138                 cpu_ppc=true
139                 AC_DEFINE(FLAC__CPU_PPC)
140                 AH_TEMPLATE(FLAC__CPU_PPC, [define if building for PowerPC])
141                 asm_optimisation=$asm_opt
142                 ;;
143         sparc)
144                 cpu_sparc=true
145                 AC_DEFINE(FLAC__CPU_SPARC)
146                 AH_TEMPLATE(FLAC__CPU_SPARC, [define if building for SPARC])
147                 asm_optimisation=$asm_opt
148                 ;;
149 esac
150 AM_CONDITIONAL(FLAC__CPU_X86_64, test "x$cpu_x86_64" = xtrue)
151 AM_CONDITIONAL(FLaC__CPU_IA32, test "x$cpu_ia32" = xtrue)
152 AM_CONDITIONAL(FLaC__CPU_PPC, test "x$cpu_ppc" = xtrue)
153 AM_CONDITIONAL(FLaC__CPU_SPARC, test "x$cpu_sparc" = xtrue)
154
155 if test "x$ac_cv_header_x86intrin_h" = xyes; then
156 AC_DEFINE([FLAC__HAS_X86INTRIN], 1, [Set to 1 if <x86intrin.h> is available.])
157 fi
158
159 case "$host" in
160         i386-*-openbsd3.[[0-3]]) OBJ_FORMAT=aoutb ;;
161         *-*-cygwin|*mingw*) OBJ_FORMAT=win32 ;;
162         *-*-darwin*) OBJ_FORMAT=macho ;;
163         *emx*) OBJ_FORMAT=aout ;;
164         *) OBJ_FORMAT=elf ;;
165 esac
166 AC_SUBST(OBJ_FORMAT)
167 case "$host" in
168         *-gnuspe)
169                 abi_spe=true
170                 AC_DEFINE(FLAC__CPU_PPC_SPE)
171                 AH_TEMPLATE(FLAC__CPU_PPC_SPE, [define if building for PowerPC with SPE ABI])
172                 ;;
173 esac
174 AM_CONDITIONAL(FLaC__CPU_PPC_SPE, test "x$abi_spe" = xtrue)
175
176 os_is_windows=no
177 case "$host" in
178         *-*-cygwin|*mingw*)
179                 CPPFLAGS="-D__MSVCRT_VERSION__=0x0601 $CPPFLAGS"
180                 os_is_windows=yes
181                 ;;
182 esac
183
184 AM_CONDITIONAL(OS_IS_WINDOWS, test "x$os_is_windows" = xyes)
185
186 case "$host" in
187         *-pc-linux-gnu)
188                 sys_linux=true
189                 AC_DEFINE(FLAC__SYS_LINUX)
190                 AH_TEMPLATE(FLAC__SYS_LINUX, [define if building for Linux])
191                 ;;
192         *-*-darwin*)
193                 sys_darwin=true
194                 AC_DEFINE(FLAC__SYS_DARWIN)
195                 AH_TEMPLATE(FLAC__SYS_DARWIN, [define if building for Darwin / MacOS X])
196                 ;;
197 esac
198 AM_CONDITIONAL(FLaC__SYS_DARWIN, test "x$sys_darwin" = xtrue)
199 AM_CONDITIONAL(FLaC__SYS_LINUX, test "x$sys_linux" = xtrue)
200
201 if test "x$cpu_ia32" = xtrue || test "x$cpu_x86_64" = xtrue ; then
202 AC_DEFINE(FLAC__ALIGN_MALLOC_DATA)
203 AH_TEMPLATE(FLAC__ALIGN_MALLOC_DATA, [define to align allocated memory on 32-byte boundaries])
204 fi
205
206 AC_ARG_ENABLE(debug,
207 AC_HELP_STRING([--enable-debug], [Turn on debugging]),
208 [case "${enableval}" in
209         yes) debug=true ;;
210         no)  debug=false ;;
211         *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
212 esac],[debug=false])
213 AM_CONDITIONAL(DEBUG, test "x$debug" = xtrue)
214
215 AC_ARG_ENABLE(sse,
216 AC_HELP_STRING([--disable-sse], [Disable SSE if the OS does not support SSE instructions]),
217 [case "${enableval}" in
218         yes) sse_os=yes ;;
219         no)  sse_os=no ;;
220         *) AC_MSG_ERROR(bad value ${enableval} for --enable-sse) ;;
221 esac],[sse_os=yes])
222 AM_CONDITIONAL(FLaC__SSE_OS, test "x$sse_os" = xyes)
223 if test "x$sse_os" = xyes ; then
224 AC_DEFINE(FLAC__SSE_OS)
225 AH_TEMPLATE(FLAC__SSE_OS, [define if your operating system supports SSE instructions])
226 fi
227
228 AC_ARG_ENABLE(altivec,
229 AC_HELP_STRING([--disable-altivec], [Disable Altivec optimizations]),
230 [case "${enableval}" in
231         yes) use_altivec=true ;;
232         no)  use_altivec=false ;;
233         *) AC_MSG_ERROR(bad value ${enableval} for --enable-altivec) ;;
234 esac],[use_altivec=true])
235 AM_CONDITIONAL(FLaC__USE_ALTIVEC, test "x$use_altivec" = xtrue)
236 if test "x$use_altivec" = xtrue ; then
237 AC_DEFINE(FLAC__USE_ALTIVEC)
238 AH_TEMPLATE(FLAC__USE_ALTIVEC, [define to enable use of Altivec instructions])
239 fi
240
241 AC_ARG_ENABLE(avx,
242 AC_HELP_STRING([--disable-avx], [Disable AVX, AVX2 optimizations]),
243 [case "${enableval}" in
244         yes) use_avx=true ;;
245         no)  use_avx=false ;;
246         *) AC_MSG_ERROR(bad value ${enableval} for --enable-avx) ;;
247 esac],[use_avx=true])
248 AM_CONDITIONAL(FLaC__USE_AVX, test "x$use_avx" = xtrue)
249 if test "x$use_avx" = xtrue ; then
250 AC_DEFINE(FLAC__USE_AVX)
251 AH_TEMPLATE(FLAC__USE_AVX, [define to enable use of AVX instructions])
252 fi
253
254 AC_ARG_ENABLE(thorough-tests,
255 AC_HELP_STRING([--disable-thorough-tests], [Disable thorough (long) testing, do only basic tests]),
256 [case "${enableval}" in
257         yes) thorough_tests=true ;;
258         no)  thorough_tests=false ;;
259         *) AC_MSG_ERROR(bad value ${enableval} for --enable-thorough-tests) ;;
260 esac],[thorough_tests=true])
261 AC_ARG_ENABLE(exhaustive-tests,
262 AC_HELP_STRING([--enable-exhaustive-tests], [Enable exhaustive testing (VERY long)]),
263 [case "${enableval}" in
264         yes) exhaustive_tests=true ;;
265         no)  exhaustive_tests=false ;;
266         *) AC_MSG_ERROR(bad value ${enableval} for --enable-exhaustive-tests) ;;
267 esac],[exhaustive_tests=false])
268 if test "x$thorough_tests" = xfalse ; then
269 FLAC__TEST_LEVEL=0
270 elif test "x$exhaustive_tests" = xfalse ; then
271 FLAC__TEST_LEVEL=1
272 else
273 FLAC__TEST_LEVEL=2
274 fi
275 AC_SUBST(FLAC__TEST_LEVEL)
276
277 AC_ARG_ENABLE(werror,
278         AC_HELP_STRING([--enable-werror], [Enable -Werror in all Makefiles]))
279
280 AC_ARG_ENABLE(stack-smash-protection,
281         AC_HELP_STRING([--enable-stack-smash-protection], [Enable GNU GCC stack smash protection]))
282
283 AC_ARG_ENABLE(64-bit-words,
284         AC_HELP_STRING([--enable-64-bit-words], [Set FLAC__BYTES_PER_WORD to 8 (4 is the default)]))
285 if test "x$enable_64_bit_words" = xyes ; then
286         AC_DEFINE_UNQUOTED([ENABLE_64_BIT_WORDS],1,[Set FLAC__BYTES_PER_WORD to 8 (4 is the default)])
287 else
288         AC_DEFINE_UNQUOTED([ENABLE_64_BIT_WORDS],0)
289         fi
290 AC_SUBST(ENABLE_64_BIT_WORDS)
291
292 AC_ARG_ENABLE(valgrind-testing,
293 AC_HELP_STRING([--enable-valgrind-testing], [Run all tests inside Valgrind]),
294 [case "${enableval}" in
295         yes) FLAC__TEST_WITH_VALGRIND=yes ;;
296         no)  FLAC__TEST_WITH_VALGRIND=no ;;
297         *) AC_MSG_ERROR(bad value ${enableval} for --enable-valgrind-testing) ;;
298 esac],[FLAC__TEST_WITH_VALGRIND=no])
299 AC_SUBST(FLAC__TEST_WITH_VALGRIND)
300
301 AC_ARG_ENABLE(doxygen-docs,
302 AC_HELP_STRING([--disable-doxygen-docs], [Disable API documentation building via Doxygen]),
303 [case "${enableval}" in
304         yes) enable_doxygen_docs=true ;;
305         no)  enable_doxygen_docs=false ;;
306         *) AC_MSG_ERROR(bad value ${enableval} for --enable-doxygen-docs) ;;
307 esac],[enable_doxygen_docs=true])
308 if test "x$enable_doxygen_docs" != xfalse ; then
309         AC_CHECK_PROGS(DOXYGEN, doxygen)
310 fi
311 AM_CONDITIONAL(FLaC__HAS_DOXYGEN, test -n "$DOXYGEN")
312
313 AC_ARG_ENABLE(local-xmms-plugin,
314 AC_HELP_STRING([--enable-local-xmms-plugin], [Install XMMS plugin to ~/.xmms/Plugins instead of system location]),
315 [case "${enableval}" in
316         yes) install_xmms_plugin_locally=true ;;
317         no)  install_xmms_plugin_locally=false ;;
318         *) AC_MSG_ERROR(bad value ${enableval} for --enable-local-xmms-plugin) ;;
319 esac],[install_xmms_plugin_locally=false])
320 AM_CONDITIONAL(FLaC__INSTALL_XMMS_PLUGIN_LOCALLY, test "x$install_xmms_plugin_locally" = xtrue)
321
322 AC_ARG_ENABLE(xmms-plugin,
323 AC_HELP_STRING([--disable-xmms-plugin], [Do not build XMMS plugin]),
324 [case "${enableval}" in
325         yes) enable_xmms_plugin=true ;;
326         no)  enable_xmms_plugin=false ;;
327         *) AC_MSG_ERROR(bad value ${enableval} for --enable-xmms-plugin) ;;
328 esac],[enable_xmms_plugin=true])
329 if test "x$enable_xmms_plugin" != xfalse ; then
330         AM_PATH_XMMS(0.9.5.1, , AC_MSG_WARN([*** XMMS >= 0.9.5.1 not installed - XMMS support will not be built]))
331 fi
332 AM_CONDITIONAL(FLaC__HAS_XMMS, test -n "$XMMS_INPUT_PLUGIN_DIR")
333
334 dnl build FLAC++ or not
335 AC_ARG_ENABLE([cpplibs],
336 AC_HELP_STRING([--disable-cpplibs], [Do not build libFLAC++]),
337 [case "${enableval}" in
338         yes) disable_cpplibs=false ;;
339         no)  disable_cpplibs=true ;;
340         *)   AC_MSG_ERROR(bad value ${enableval} for --enable-cpplibs) ;;
341 esac], [disable_cpplibs=false])
342 AM_CONDITIONAL(FLaC__WITH_CPPLIBS, [test "x$disable_cpplibs" != xtrue])
343
344 dnl check for ogg library
345 AC_ARG_ENABLE([ogg],
346         AC_HELP_STRING([--disable-ogg], [Disable ogg support (default: test for libogg)]),
347         [ want_ogg=$enableval ], [ want_ogg=yes ] )
348
349 if test "x$want_ogg" != "xno"; then
350         XIPH_PATH_OGG(have_ogg=yes, AC_MSG_WARN([*** Ogg development enviroment not installed - Ogg support will not be built]))
351 fi
352
353 FLAC__HAS_OGG=0
354 AM_CONDITIONAL(FLaC__HAS_OGG, [test "x$have_ogg" = xyes])
355 if test "x$have_ogg" = xyes ; then
356         FLAC__HAS_OGG=1
357         OGG_PACKAGE="ogg"
358 else
359         have_ogg=no
360 fi
361 AC_DEFINE_UNQUOTED([FLAC__HAS_OGG],$FLAC__HAS_OGG,[define if you have the ogg library])
362 AC_SUBST(FLAC__HAS_OGG)
363 AC_SUBST(OGG_PACKAGE)
364
365 dnl check for i18n(internationalization); these are from libiconv/gettext
366 AM_ICONV
367 AM_LANGINFO_CODESET
368
369 AC_CHECK_PROGS(DOCBOOK_TO_MAN, docbook-to-man docbook2man)
370 AM_CONDITIONAL(FLaC__HAS_DOCBOOK_TO_MAN, test -n "$DOCBOOK_TO_MAN")
371 if test -n "$DOCBOOK_TO_MAN" ; then
372 AC_DEFINE(FLAC__HAS_DOCBOOK_TO_MAN)
373 AH_TEMPLATE(FLAC__HAS_DOCBOOK_TO_MAN, [define if you have docbook-to-man or docbook2man])
374 fi
375
376 AC_CHECK_LIB(rt, clock_gettime, have_clock_gettime=yes)
377 if test x$have_clock_gettime = xyes; then
378         AC_DEFINE(HAVE_CLOCK_GETTIME)
379         AH_TEMPLATE(HAVE_CLOCK_GETTIME, [define if you have clock_gettime])
380 fi
381
382 # only matters for x86
383 AC_CHECK_PROGS(NASM, nasm)
384 AM_CONDITIONAL(FLaC__HAS_NASM, test -n "$NASM")
385 if test -n "$NASM" ; then
386 AC_DEFINE(FLAC__HAS_NASM)
387 AH_TEMPLATE(FLAC__HAS_NASM, [define if you are compiling for x86 and have the NASM assembler])
388 fi
389
390 if test "x$debug" = xtrue; then
391         CPPFLAGS="-DDEBUG $CPPFLAGS"
392         CFLAGS="-g $CFLAGS"
393 else
394         CPPFLAGS="-DNDEBUG $CPPFLAGS"
395         CFLAGS=$(echo "$CFLAGS" | sed 's/-O2//')
396         CFLAGS="-O3 -funroll-loops $CFLAGS"
397 fi
398
399 XIPH_GCC_VERSION
400
401 if test x$ac_cv_c_compiler_gnu = xyes ; then
402         CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wnested-externs -Wshadow -Wundef -Wmissing-declarations -Winline " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Wconversion
403         CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Woverloaded-virtual -Wmissing-declarations
404
405         XIPH_ADD_CFLAGS([-Wdeclaration-after-statement])
406         XIPH_ADD_CFLAGS([-D_FORTIFY_SOURCE=2])
407
408         AC_LANG_PUSH([C++])
409         XIPH_ADD_CXXFLAGS([-Weffc++])
410         AC_LANG_POP([C++])
411
412         if test "$GCC_MAJOR_VERSION" -ge 4 && test "$OBJ_FORMAT" = elf; then
413                 CPPFLAGS="$CPPFLAGS -DFLAC__USE_VISIBILITY_ATTR"
414                 CFLAGS="$CFLAGS -fvisibility=hidden"
415                 CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
416                 fi
417
418         if test "$GCC_MAJOR_VERSION" -ge 4 && test "$OBJ_FORMAT" = macho; then
419                 CPPFLAGS="$CPPFLAGS -DFLAC__USE_VISIBILITY_ATTR"
420                 CFLAGS="$CFLAGS -fvisibility=hidden"
421                 CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
422                 fi
423
424         if test "x$GCC_MAJOR_VERSION$GCC_MINOR_VERSION" = "x42" ; then
425                 XIPH_ADD_CFLAGS([-fgnu89-inline])
426                 fi
427
428         if test "x$GCC_MAJOR_VERSION$GCC_MINOR_VERSION" = "x47" ; then
429                 XIPH_ADD_CFLAGS([-fno-inline-small-functions])
430                 fi
431
432         if test "x$asm_optimisation$sse_os" = "xyesyes" ; then
433                 XIPH_ADD_CFLAGS([-msse2])
434                 fi
435
436         fi
437
438 case "$host_os" in
439         "mingw32"|"os2")
440         if test "$host_cpu" = "i686"; then
441                 XIPH_ADD_CFLAGS([-mstackrealign])
442                 fi
443         esac
444
445 if test x$enable_werror = "xyes" ; then
446         XIPH_ADD_CFLAGS([-Werror])
447         AC_LANG_PUSH([C++])
448         XIPH_ADD_CXXFLAGS([-Werror])
449         AC_LANG_POP([C++])
450         fi
451
452 if test x$enable_stack_smash_protection = "xyes" ; then
453         XIPH_GCC_STACK_PROTECTOR
454         XIPH_GXX_STACK_PROTECTOR
455         fi
456
457 if test "x$sys_linux" = xtrue ; then
458        LIB_CLOCK_GETTIME=-lrt
459        fi
460 AC_SUBST(LIB_CLOCK_GETTIME)
461
462 AC_CONFIG_FILES([ \
463         Makefile \
464         src/Makefile \
465         src/libFLAC/Makefile \
466         src/libFLAC/flac.pc \
467         src/libFLAC/ia32/Makefile \
468         src/libFLAC/include/Makefile \
469         src/libFLAC/include/private/Makefile \
470         src/libFLAC/include/protected/Makefile \
471         src/libFLAC++/Makefile \
472         src/libFLAC++/flac++.pc \
473         src/flac/Makefile \
474         src/metaflac/Makefile \
475         src/plugin_common/Makefile \
476         src/plugin_xmms/Makefile \
477         src/share/Makefile \
478         src/test_grabbag/Makefile \
479         src/test_grabbag/cuesheet/Makefile \
480         src/test_grabbag/picture/Makefile \
481         src/test_libs_common/Makefile \
482         src/test_libFLAC/Makefile \
483         src/test_libFLAC++/Makefile \
484         src/test_seeking/Makefile \
485         src/test_streams/Makefile \
486         src/utils/Makefile \
487         src/utils/flacdiff/Makefile \
488         src/utils/flactimer/Makefile \
489         examples/Makefile \
490         examples/c/Makefile \
491         examples/c/decode/Makefile \
492         examples/c/decode/file/Makefile \
493         examples/c/encode/Makefile \
494         examples/c/encode/file/Makefile \
495         examples/cpp/Makefile \
496         examples/cpp/decode/Makefile \
497         examples/cpp/decode/file/Makefile \
498         examples/cpp/encode/Makefile \
499         examples/cpp/encode/file/Makefile \
500         include/Makefile \
501         include/FLAC/Makefile \
502         include/FLAC++/Makefile \
503         include/share/Makefile \
504         include/share/grabbag/Makefile \
505         include/test_libs_common/Makefile \
506         doc/Doxyfile \
507         doc/Makefile \
508         doc/html/Makefile \
509         doc/html/images/Makefile \
510         m4/Makefile \
511         man/Makefile \
512         test/common.sh \
513         test/Makefile \
514         test/cuesheets/Makefile \
515         test/flac-to-flac-metadata-test-files/Makefile \
516         test/metaflac-test-files/Makefile \
517         test/pictures/Makefile \
518         build/Makefile \
519         objs/Makefile \
520         objs/debug/Makefile \
521         objs/debug/bin/Makefile \
522         objs/debug/lib/Makefile \
523         objs/release/Makefile \
524         objs/release/bin/Makefile \
525         objs/release/lib/Makefile \
526         microbench/Makefile
527 ])
528 AC_OUTPUT
529
530 AC_MSG_RESULT([
531 -=-=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-=-=-=-=-=-=-=-
532
533   Configuration summary :
534
535     FLAC version : ........................ ${VERSION}
536
537     Host CPU : ............................ ${host_cpu}
538     Host Vendor : ......................... ${host_vendor}
539     Host OS : ............................. ${host_os}
540 ])
541
542         echo "    Compiler is GCC : ..................... ${ac_cv_c_compiler_gnu}"
543 if test x$ac_cv_c_compiler_gnu = xyes ; then
544         echo "    GCC version : ......................... ${GCC_VERSION}"
545 fi
546         echo "    Compiler is Clang : ................... ${xiph_cv_c_compiler_clang}"
547         echo "    SSE optimizations : ................... ${sse_os}"
548         echo "    Asm optimizations : ................... ${asm_optimisation}"
549         echo "    Ogg/FLAC support : .................... ${have_ogg}"
550 echo