blob: 84b33fc3590ddd4c15a657744032f363a28b6046 [file] [log] [blame]
Erik de Castro Lopo06ed05e2012-02-01 17:55:50 +11001# 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 difference 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
Cristian Rodríguez9b7cb222012-04-07 19:24:21 -030021AC_PREREQ(2.60)
Erik de Castro Lopo1ad32ef2013-03-09 22:06:12 +110022AC_INIT([flac], [1.3.0pre2], [flac-dev@xiph.org], [flac], [https://www.xiph.org/flac/])
Max Horn0b47ede2012-12-12 21:33:55 +010023AC_CONFIG_HEADERS([config.h])
Cristian Rodríguez9b7cb222012-04-07 19:24:21 -030024AC_CONFIG_SRCDIR([src/flac/main.c])
25AC_CONFIG_MACRO_DIR([m4])
Max Horn0b47ede2012-12-12 21:33:55 +010026AM_INIT_AUTOMAKE([foreign 1.11 -Wall tar-pax no-dist-gzip dist-xz subdir-objects])
Erik de Castro Lopo886b9602012-02-03 05:52:01 +110027m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
Erik de Castro Lopo06ed05e2012-02-01 17:55:50 +110028
Miroslav Lichvar18e01542012-12-03 21:04:56 +010029user_cflags=$CFLAGS
30
Cristian Rodríguezf0296252012-04-05 19:39:37 -030031#Prefer whatever the current ISO standard is.
32AC_PROG_CC_STDC
33AC_USE_SYSTEM_EXTENSIONS
Cristian Rodríguez63c874f2012-06-02 17:00:56 -040034m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
Cristian Rodríguez9b7cb222012-04-07 19:24:21 -030035LT_INIT([win32-dll disable-static pic-only])
Erik de Castro Lopo06ed05e2012-02-01 17:55:50 +110036AM_PROG_AS
37AC_PROG_CXX
38AC_PROG_MAKE_SET
39
40AC_SYS_LARGEFILE
41AC_FUNC_FSEEKO
42
Max Horn0b47ede2012-12-12 21:33:55 +010043AC_CHECK_SIZEOF([void*])
Cristian Rodríguez9b7cb222012-04-07 19:24:21 -030044AC_SEARCH_LIBS([lround],[m], [AC_DEFINE(HAVE_LROUND,1,lround support)])
Erik de Castro Lopo06ed05e2012-02-01 17:55:50 +110045
Max Horn0b47ede2012-12-12 21:33:55 +010046AC_LANG_PUSH([C++])
Erik de Castro Lopo06ed05e2012-02-01 17:55:50 +110047# c++ flavor first
48AC_C_VARARRAYS
49if test $ac_cv_c_vararrays = yes; then
50 AC_DEFINE([HAVE_CXX_VARARRAYS], 1, [Define to 1 if C++ supports variable-length arrays.])
51fi
Max Horn0b47ede2012-12-12 21:33:55 +010052AC_LANG_POP([C++])
Erik de Castro Lopo3abb6c92012-02-05 18:58:11 +110053
Erik de Castro Lopo06ed05e2012-02-01 17:55:50 +110054# c flavor
55AC_HEADER_STDC
Erik de Castro Lopoafedee12012-04-04 20:08:52 +100056AM_PROG_CC_C_O
Erik de Castro Lopo3abb6c92012-02-05 18:58:11 +110057AC_C_INLINE
58AC_C_VARARRAYS
Cristian Rodríguezf0296252012-04-05 19:39:37 -030059AC_C_TYPEOF
Erik de Castro Lopo06ed05e2012-02-01 17:55:50 +110060
Max Horn21f68f42012-12-12 21:33:54 +010061AC_CHECK_HEADERS([stdint.h inttypes.h byteswap.h sys/param.h])
Cristian Rodríguezf0296252012-04-05 19:39:37 -030062
Erik de Castro Lopod7bfc772012-02-06 07:15:48 +110063XIPH_C_BSWAP32
64
Max Hornf20164e2012-12-12 21:33:51 +010065ac_cv_c_big_endian=0
66ac_cv_c_little_endian=0
67AC_C_BIGENDIAN([ac_cv_c_big_endian=1], [ac_cv_c_little_endian=1], [
68 AC_MSG_WARN([[*****************************************************************]])
69 AC_MSG_WARN([[*** Not able to determine endian-ness of target processor. ]])
70 AC_MSG_WARN([[*** The constants CPU_IS_BIG_ENDIAN and CPU_IS_LITTLE_ENDIAN in ]])
71 AC_MSG_WARN([[*** config.h may need to be hand editied. ]])
72 AC_MSG_WARN([[*****************************************************************]])
73])
Erik de Castro Lopo3abb6c92012-02-05 18:58:11 +110074AC_DEFINE_UNQUOTED(CPU_IS_BIG_ENDIAN, ${ac_cv_c_big_endian},
75 [Target processor is big endian.])
76AC_DEFINE_UNQUOTED(CPU_IS_LITTLE_ENDIAN, ${ac_cv_c_little_endian},
77 [Target processor is little endian.])
78AC_DEFINE_UNQUOTED(WORDS_BIGENDIAN, ${ac_cv_c_big_endian},
79 [Target processor is big endian.])
Erik de Castro Lopo06ed05e2012-02-01 17:55:50 +110080
Erik de Castro Lopo3abb6c92012-02-05 18:58:11 +110081# For the XMMS plugin.
Erik de Castro Lopo06ed05e2012-02-01 17:55:50 +110082AC_CHECK_TYPES(socklen_t, [], [])
83
84dnl check for getopt in standard library
85dnl AC_CHECK_FUNCS(getopt_long , , [LIBOBJS="$LIBOBJS getopt.o getopt1.o"] )
86AC_CHECK_FUNCS(getopt_long, [], [])
87
88case "$host_cpu" in
89 i*86)
90 cpu_ia32=true
91 AC_DEFINE(FLAC__CPU_IA32)
92 AH_TEMPLATE(FLAC__CPU_IA32, [define if building for ia32/i386])
93 ;;
Erik de Castro Lopo592021e2012-12-28 09:49:50 +110094 powerpc|powerpc64)
Erik de Castro Lopo06ed05e2012-02-01 17:55:50 +110095 cpu_ppc=true
96 AC_DEFINE(FLAC__CPU_PPC)
97 AH_TEMPLATE(FLAC__CPU_PPC, [define if building for PowerPC])
98 ;;
99 sparc)
100 cpu_sparc=true
101 AC_DEFINE(FLAC__CPU_SPARC)
102 AH_TEMPLATE(FLAC__CPU_SPARC, [define if building for SPARC])
103 ;;
104esac
105AM_CONDITIONAL(FLaC__CPU_IA32, test "x$cpu_ia32" = xtrue)
106AM_CONDITIONAL(FLaC__CPU_PPC, test "x$cpu_ppc" = xtrue)
107AM_CONDITIONAL(FLaC__CPU_SPARC, test "x$cpu_sparc" = xtrue)
108
109case "$host" in
110 i386-*-openbsd3.[[0-3]]) OBJ_FORMAT=aoutb ;;
111 *-*-cygwin|*mingw*) OBJ_FORMAT=win32 ;;
112 *-*-darwin*) OBJ_FORMAT=macho ;;
Erik de Castro Lopo0fe97672012-02-05 16:29:43 +1100113 *emx*) OBJ_FORMAT=aout ;;
Erik de Castro Lopo06ed05e2012-02-01 17:55:50 +1100114 *) OBJ_FORMAT=elf ;;
115esac
116AC_SUBST(OBJ_FORMAT)
Erik de Castro Lopob6e64af2012-02-13 19:46:32 +1100117case "$host" in
118 *-gnuspe)
119 abi_spe=true
120 AC_DEFINE(FLAC__CPU_PPC_SPE)
121 AH_TEMPLATE(FLAC__CPU_PPC_SPE, [define if building for PowerPC with SPE ABI])
122 ;;
123esac
124AM_CONDITIONAL(FLaC__CPU_PPC_SPE, test "x$abi_spe" = xtrue)
Erik de Castro Lopo06ed05e2012-02-01 17:55:50 +1100125
126case "$host" in
Erik de Castro Lopo8b4bc4b2012-02-05 16:28:40 +1100127 *-*-cygwin|*mingw*|*emx*)
128 # define this variable for enabling strict exports with libtool; for now, it's supported by Win32 and OS/2
Erik de Castro Lopo06ed05e2012-02-01 17:55:50 +1100129 LT_NO_UNDEFINED="-no-undefined"
Erik de Castro Lopo06ed05e2012-02-01 17:55:50 +1100130 ;;
131 *)
132 LT_NO_UNDEFINED=
Erik de Castro Lopo06ed05e2012-02-01 17:55:50 +1100133 ;;
134esac
135AC_SUBST(LT_NO_UNDEFINED)
Erik de Castro Lopo06ed05e2012-02-01 17:55:50 +1100136
137case "$host" in
138 *-pc-linux-gnu)
139 sys_linux=true
140 AC_DEFINE(FLAC__SYS_LINUX)
141 AH_TEMPLATE(FLAC__SYS_LINUX, [define if building for Linux])
142 ;;
143 *-*-darwin*)
144 sys_darwin=true
145 AC_DEFINE(FLAC__SYS_DARWIN)
146 AH_TEMPLATE(FLAC__SYS_DARWIN, [define if building for Darwin / MacOS X])
147 ;;
148esac
149AM_CONDITIONAL(FLaC__SYS_DARWIN, test "x$sys_darwin" = xtrue)
150AM_CONDITIONAL(FLaC__SYS_LINUX, test "x$sys_linux" = xtrue)
151
152if test "x$cpu_ia32" = xtrue ; then
153AC_DEFINE(FLAC__ALIGN_MALLOC_DATA)
154AH_TEMPLATE(FLAC__ALIGN_MALLOC_DATA, [define to align allocated memory on 32-byte boundaries])
155fi
156
157AC_ARG_ENABLE(asm-optimizations, AC_HELP_STRING([--disable-asm-optimizations], [Don't use any assembly optimization routines]), asm_opt=no, asm_opt=yes)
158dnl ' Terminate the damn single quote
159AM_CONDITIONAL(FLaC__NO_ASM, test "x$asm_opt" = xno)
160if test "x$asm_opt" = xno ; then
161AC_DEFINE(FLAC__NO_ASM)
162AH_TEMPLATE(FLAC__NO_ASM, [define to disable use of assembly code])
163fi
164
165AC_ARG_ENABLE(debug,
166AC_HELP_STRING([--enable-debug], [Turn on debugging]),
167[case "${enableval}" in
168 yes) debug=true ;;
169 no) debug=false ;;
170 *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
171esac],[debug=false])
172AM_CONDITIONAL(DEBUG, test "x$debug" = xtrue)
173
174AC_ARG_ENABLE(sse,
175AC_HELP_STRING([--enable-sse], [Enable SSE support by asserting that the OS supports SSE instructions]),
176[case "${enableval}" in
177 yes) sse_os=true ;;
178 no) sse_os=false ;;
179 *) AC_MSG_ERROR(bad value ${enableval} for --enable-sse) ;;
180esac],[sse_os=false])
181AM_CONDITIONAL(FLaC__SSE_OS, test "x$sse_os" = xtrue)
182if test "x$sse_os" = xtrue ; then
183AC_DEFINE(FLAC__SSE_OS)
184AH_TEMPLATE(FLAC__SSE_OS, [define if your operating system supports SSE instructions])
185fi
186
187AC_ARG_ENABLE(3dnow,
188AC_HELP_STRING([--disable-3dnow], [Disable 3DNOW! optimizations]),
189[case "${enableval}" in
190 yes) use_3dnow=true ;;
191 no) use_3dnow=false ;;
192 *) AC_MSG_ERROR(bad value ${enableval} for --enable-3dnow) ;;
193esac],[use_3dnow=true])
194AM_CONDITIONAL(FLaC__USE_3DNOW, test "x$use_3dnow" = xtrue)
195if test "x$use_3dnow" = xtrue ; then
196AC_DEFINE(FLAC__USE_3DNOW)
197AH_TEMPLATE(FLAC__USE_3DNOW, [define to enable use of 3Dnow! instructions])
198fi
199
200AC_ARG_ENABLE(altivec,
201AC_HELP_STRING([--disable-altivec], [Disable Altivec optimizations]),
202[case "${enableval}" in
203 yes) use_altivec=true ;;
204 no) use_altivec=false ;;
205 *) AC_MSG_ERROR(bad value ${enableval} for --enable-altivec) ;;
206esac],[use_altivec=true])
207AM_CONDITIONAL(FLaC__USE_ALTIVEC, test "x$use_altivec" = xtrue)
208if test "x$use_altivec" = xtrue ; then
209AC_DEFINE(FLAC__USE_ALTIVEC)
210AH_TEMPLATE(FLAC__USE_ALTIVEC, [define to enable use of Altivec instructions])
211fi
212
213AC_ARG_ENABLE(thorough-tests,
214AC_HELP_STRING([--disable-thorough-tests], [Disable thorough (long) testing, do only basic tests]),
215[case "${enableval}" in
216 yes) thorough_tests=true ;;
217 no) thorough_tests=false ;;
218 *) AC_MSG_ERROR(bad value ${enableval} for --enable-thorough-tests) ;;
219esac],[thorough_tests=true])
220AC_ARG_ENABLE(exhaustive-tests,
221AC_HELP_STRING([--enable-exhaustive-tests], [Enable exhaustive testing (VERY long)]),
222[case "${enableval}" in
223 yes) exhaustive_tests=true ;;
224 no) exhaustive_tests=false ;;
225 *) AC_MSG_ERROR(bad value ${enableval} for --enable-exhaustive-tests) ;;
226esac],[exhaustive_tests=false])
227if test "x$thorough_tests" = xfalse ; then
228FLAC__TEST_LEVEL=0
229elif test "x$exhaustive_tests" = xfalse ; then
230FLAC__TEST_LEVEL=1
231else
232FLAC__TEST_LEVEL=2
233fi
234AC_SUBST(FLAC__TEST_LEVEL)
235
236AC_ARG_ENABLE(gcc-werror,
Erik de Castro Lopo195470f2013-03-13 18:58:16 +1100237 AC_HELP_STRING([--enable-gcc-werror], [Enable -Werror in all Makefiles]))
238
239AC_ARG_ENABLE(stack-smash-protection,
240 AC_HELP_STRING([--enable-stack-smash-protection], [Enable GNU GCC stack smash protection]))
Erik de Castro Lopo06ed05e2012-02-01 17:55:50 +1100241
242AC_ARG_ENABLE(valgrind-testing,
243AC_HELP_STRING([--enable-valgrind-testing], [Run all tests inside Valgrind]),
244[case "${enableval}" in
245 yes) FLAC__TEST_WITH_VALGRIND=yes ;;
246 no) FLAC__TEST_WITH_VALGRIND=no ;;
247 *) AC_MSG_ERROR(bad value ${enableval} for --enable-valgrind-testing) ;;
248esac],[FLAC__TEST_WITH_VALGRIND=no])
249AC_SUBST(FLAC__TEST_WITH_VALGRIND)
250
251AC_ARG_ENABLE(doxygen-docs,
252AC_HELP_STRING([--disable-doxygen-docs], [Disable API documentation building via Doxygen]),
253[case "${enableval}" in
254 yes) enable_doxygen_docs=true ;;
255 no) enable_doxygen_docs=false ;;
256 *) AC_MSG_ERROR(bad value ${enableval} for --enable-doxygen-docs) ;;
257esac],[enable_doxygen_docs=true])
258if test "x$enable_doxygen_docs" != xfalse ; then
259 AC_CHECK_PROGS(DOXYGEN, doxygen)
260fi
261AM_CONDITIONAL(FLaC__HAS_DOXYGEN, test -n "$DOXYGEN")
262
263AC_ARG_ENABLE(local-xmms-plugin,
264AC_HELP_STRING([--enable-local-xmms-plugin], [Install XMMS plugin to ~/.xmms/Plugins instead of system location]),
265[case "${enableval}" in
266 yes) install_xmms_plugin_locally=true ;;
267 no) install_xmms_plugin_locally=false ;;
268 *) AC_MSG_ERROR(bad value ${enableval} for --enable-local-xmms-plugin) ;;
269esac],[install_xmms_plugin_locally=false])
270AM_CONDITIONAL(FLaC__INSTALL_XMMS_PLUGIN_LOCALLY, test "x$install_xmms_plugin_locally" = xtrue)
271
272AC_ARG_ENABLE(xmms-plugin,
273AC_HELP_STRING([--disable-xmms-plugin], [Do not build XMMS plugin]),
274[case "${enableval}" in
275 yes) enable_xmms_plugin=true ;;
276 no) enable_xmms_plugin=false ;;
277 *) AC_MSG_ERROR(bad value ${enableval} for --enable-xmms-plugin) ;;
278esac],[enable_xmms_plugin=true])
279if test "x$enable_xmms_plugin" != xfalse ; then
280 AM_PATH_XMMS(0.9.5.1, , AC_MSG_WARN([*** XMMS >= 0.9.5.1 not installed - XMMS support will not be built]))
281fi
282AM_CONDITIONAL(FLaC__HAS_XMMS, test -n "$XMMS_INPUT_PLUGIN_DIR")
283
284dnl build FLAC++ or not
285AC_ARG_ENABLE([cpplibs],
286AC_HELP_STRING([--disable-cpplibs], [Do not build libFLAC++]),
287[case "${enableval}" in
288 yes) disable_cpplibs=false ;;
289 no) disable_cpplibs=true ;;
290 *) AC_MSG_ERROR(bad value ${enableval} for --enable-cpplibs) ;;
291esac], [disable_cpplibs=false])
292AM_CONDITIONAL(FLaC__WITH_CPPLIBS, [test "x$disable_cpplibs" != xtrue])
293
294dnl check for ogg library
295AC_ARG_ENABLE([ogg],
296 AC_HELP_STRING([--disable-ogg], [Disable ogg support (default: test for libogg)]),
297 [ want_ogg=$enableval ], [ want_ogg=yes ] )
298
299if test "x$want_ogg" != "xno"; then
300 XIPH_PATH_OGG(have_ogg=yes, AC_MSG_WARN([*** Ogg development enviroment not installed - Ogg support will not be built]))
301fi
302
303AM_CONDITIONAL(FLaC__HAS_OGG, [test "x$have_ogg" = xyes])
304if test "x$have_ogg" = xyes ; then
Erik de Castro Lopo3e2cd272012-07-04 19:53:31 +1000305 AC_DEFINE_UNQUOTED([FLAC__HAS_OGG],1,[define if you have the ogg library])
306else
307 AC_DEFINE_UNQUOTED([FLAC__HAS_OGG],0)
Erik de Castro Lopo06ed05e2012-02-01 17:55:50 +1100308fi
309
310dnl check for i18n(internationalization); these are from libiconv/gettext
311AM_ICONV
312AM_LANGINFO_CODESET
313
314AC_CHECK_PROGS(DOCBOOK_TO_MAN, docbook-to-man docbook2man)
315AM_CONDITIONAL(FLaC__HAS_DOCBOOK_TO_MAN, test -n "$DOCBOOK_TO_MAN")
316if test -n "$DOCBOOK_TO_MAN" ; then
317AC_DEFINE(FLAC__HAS_DOCBOOK_TO_MAN)
318AH_TEMPLATE(FLAC__HAS_DOCBOOK_TO_MAN, [define if you have docbook-to-man or docbook2man])
319fi
320
321# only matters for x86
322AC_CHECK_PROGS(NASM, nasm)
323AM_CONDITIONAL(FLaC__HAS_NASM, test -n "$NASM")
324if test -n "$NASM" ; then
325AC_DEFINE(FLAC__HAS_NASM)
326AH_TEMPLATE(FLAC__HAS_NASM, [define if you are compiling for x86 and have the NASM assembler])
327fi
328
329# only matters for PowerPC
330AC_CHECK_PROGS(AS, as, as)
331AC_CHECK_PROGS(GAS, gas, gas)
332
333# try -v (apple as) and --version (gas) at the same time
334test "$AS" = "as" && as --version -v < /dev/null 2>&1 | grep Apple >/dev/null || AS=gas
335
336AM_CONDITIONAL(FLaC__HAS_AS, test "$AS" = "as")
337AM_CONDITIONAL(FLaC__HAS_GAS, test "$AS" = "gas")
338if test "$AS" = "as" ; then
339AC_DEFINE(FLAC__HAS_AS)
340AH_TEMPLATE(FLAC__HAS_AS, [define if you are compiling for PowerPC and have the 'as' assembler])
341fi
342if test "$AS" = "gas" ; then
343# funniest. macro. ever.
344AC_DEFINE(FLAC__HAS_GAS)
345AH_TEMPLATE(FLAC__HAS_GAS, [define if you are compiling for PowerPC and have the 'gas' assembler])
346fi
347
Erik de Castro Lopo06ed05e2012-02-01 17:55:50 +1100348if test "x$debug" = xtrue; then
Cristian Rodríguez9b7cb222012-04-07 19:24:21 -0300349 CPPFLAGS="-DDEBUG $CPPFLAGS"
Erik de Castro Lopo06ed05e2012-02-01 17:55:50 +1100350 CFLAGS="-g $CFLAGS"
351else
352 CPPFLAGS="-DNDEBUG $CPPFLAGS"
Erik de Castro Lopo06ed05e2012-02-01 17:55:50 +1100353 if test "x$GCC" = xyes; then
Miroslav Lichvar18e01542012-12-03 21:04:56 +0100354 if test "x$user_cflags" = x; then
355 CFLAGS="-O3 -funroll-loops -Wall -W -Winline"
356 fi
Erik de Castro Lopo06ed05e2012-02-01 17:55:50 +1100357 fi
358fi
359
Erik de Castro Lopocaef93e2012-02-26 22:41:44 +1100360XIPH_GCC_VERSION
Erik de Castro Lopo06ed05e2012-02-01 17:55:50 +1100361
362if test x$ac_cv_c_compiler_gnu = xyes ; then
Erik de Castro Lopo06f38122013-03-10 22:34:18 +1100363 CFLAGS="$CFLAGS -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wnested-externs -Wshadow -Wundef -Wmissing-declarations " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Winline -Wconversion
364 CXXFLAGS="$CXXFLAGS -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
365
366
Erik de Castro Lopo06ed05e2012-02-01 17:55:50 +1100367 if test x$enable_gcc_werror = "xyes" ; then
Erik de Castro Lopo06f38122013-03-10 22:34:18 +1100368 CFLAGS="$CFLAGS -Wall -Wextra -Werror "
369 CXXFLAGS="$CXXFLAGS -Wall -Wextra -Werror "
Erik de Castro Lopo2860f172013-03-09 19:42:26 +1100370 fi
Erik de Castro Lopo06ed05e2012-02-01 17:55:50 +1100371
Miroslav Lichvar19c78e52012-12-03 21:04:57 +0100372 if test "$GCC_MAJOR_VERSION" -ge 4 && test "$OBJ_FORMAT" = elf; then
373 CPPFLAGS="$CPPFLAGS -DFLAC__USE_VISIBILITY_ATTR"
374 CFLAGS="$CFLAGS -fvisibility=hidden"
375 CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
Erik de Castro Lopo2860f172013-03-09 19:42:26 +1100376 fi
377
378 if test "x$GCC_MAJOR_VERSION$GCC_MINOR_VERSION" = "x42" ; then
379 XIPH_ADD_CFLAGS([-fgnu89-inline])
380 fi
Miroslav Lichvar19c78e52012-12-03 21:04:57 +0100381 fi
Miroslav Lichvar19c78e52012-12-03 21:04:57 +0100382
Erik de Castro Lopo06ed05e2012-02-01 17:55:50 +1100383
Erik de Castro Lopod5b03bc2013-03-09 08:55:37 +1100384XIPH_ADD_CFLAGS([-Wextra])
Erik de Castro Lopo06f38122013-03-10 22:34:18 +1100385XIPH_ADD_CFLAGS([-Wdeclaration-after-statement])
Erik de Castro Lopod5b03bc2013-03-09 08:55:37 +1100386XIPH_ADD_CFLAGS([-D_FORTIFY_SOURCE=2])
387
Erik de Castro Lopo195470f2013-03-13 18:58:16 +1100388if test x$enable_stack_smash_protection = "xyes" ; then
389 XIPH_GCC_STACK_PROTECTOR
390 XIPH_GXX_STACK_PROTECTOR
391 fi
Erik de Castro Lopod5b03bc2013-03-09 08:55:37 +1100392
Erik de Castro Lopo06ed05e2012-02-01 17:55:50 +1100393#@@@
394AM_CONDITIONAL(FLaC__HAS_AS__TEMPORARILY_DISABLED, test "yes" = "no")
395AM_CONDITIONAL(FLaC__HAS_GAS__TEMPORARILY_DISABLED, test "yes" = "no")
396
397AC_CONFIG_FILES([ \
398 Makefile \
399 src/Makefile \
400 src/libFLAC/Makefile \
401 src/libFLAC/flac.pc \
402 src/libFLAC/ia32/Makefile \
403 src/libFLAC/ppc/Makefile \
404 src/libFLAC/ppc/as/Makefile \
405 src/libFLAC/ppc/gas/Makefile \
406 src/libFLAC/include/Makefile \
407 src/libFLAC/include/private/Makefile \
408 src/libFLAC/include/protected/Makefile \
409 src/libFLAC++/Makefile \
410 src/libFLAC++/flac++.pc \
411 src/flac/Makefile \
412 src/metaflac/Makefile \
413 src/monkeys_audio_utilities/Makefile \
414 src/monkeys_audio_utilities/flac_mac/Makefile \
415 src/monkeys_audio_utilities/flac_ren/Makefile \
416 src/plugin_common/Makefile \
Erik de Castro Lopo06ed05e2012-02-01 17:55:50 +1100417 src/plugin_xmms/Makefile \
418 src/share/Makefile \
419 src/share/getopt/Makefile \
420 src/share/grabbag/Makefile \
421 src/share/replaygain_analysis/Makefile \
422 src/share/replaygain_synthesis/Makefile \
423 src/share/replaygain_synthesis/include/Makefile \
424 src/share/replaygain_synthesis/include/private/Makefile \
425 src/share/utf8/Makefile \
426 src/test_grabbag/Makefile \
427 src/test_grabbag/cuesheet/Makefile \
428 src/test_grabbag/picture/Makefile \
429 src/test_libs_common/Makefile \
430 src/test_libFLAC/Makefile \
431 src/test_libFLAC++/Makefile \
432 src/test_seeking/Makefile \
433 src/test_streams/Makefile \
434 src/utils/Makefile \
435 src/utils/flacdiff/Makefile \
436 src/utils/flactimer/Makefile \
437 examples/Makefile \
438 examples/c/Makefile \
439 examples/c/decode/Makefile \
440 examples/c/decode/file/Makefile \
441 examples/c/encode/Makefile \
442 examples/c/encode/file/Makefile \
443 examples/cpp/Makefile \
444 examples/cpp/decode/Makefile \
445 examples/cpp/decode/file/Makefile \
446 examples/cpp/encode/Makefile \
447 examples/cpp/encode/file/Makefile \
448 include/Makefile \
449 include/FLAC/Makefile \
450 include/FLAC++/Makefile \
451 include/share/Makefile \
452 include/share/grabbag/Makefile \
453 include/test_libs_common/Makefile \
Olivier Blinf6997882012-12-28 19:58:46 +0100454 doc/Doxyfile \
Erik de Castro Lopo06ed05e2012-02-01 17:55:50 +1100455 doc/Makefile \
456 doc/html/Makefile \
457 doc/html/images/Makefile \
458 doc/html/images/hw/Makefile \
459 doc/html/ru/Makefile \
460 m4/Makefile \
461 man/Makefile \
462 test/Makefile \
463 test/cuesheets/Makefile \
464 test/flac-to-flac-metadata-test-files/Makefile \
465 test/metaflac-test-files/Makefile \
466 test/pictures/Makefile \
467 build/Makefile \
Erik de Castro Lopo55788ea2012-12-28 11:06:38 +1100468 objs/Makefile \
469 objs/debug/Makefile \
470 objs/debug/bin/Makefile \
471 objs/debug/lib/Makefile \
472 objs/release/Makefile \
473 objs/release/bin/Makefile \
474 objs/release/lib/Makefile \
Erik de Castro Lopo06ed05e2012-02-01 17:55:50 +1100475])
476AC_OUTPUT
Erik de Castro Lopocaef93e2012-02-26 22:41:44 +1100477
478AC_MSG_RESULT([
479-=-=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-=-=-=-=-=-=-=-
480
481 Configuration summary :
482
483 FLAC version : ........................ ${VERSION}
484
485 Host CPU : ............................ ${host_cpu}
486 Host Vendor : ......................... ${host_vendor}
487 Host OS : ............................. ${host_os}
488])
489
Erik de Castro Lopocaef93e2012-02-26 22:41:44 +1100490 echo " Compiler is GCC : ..................... ${ac_cv_c_compiler_gnu}"
Max Horncdcb88b2012-12-12 21:33:53 +0100491if test x$ac_cv_c_compiler_gnu = xyes ; then
Erik de Castro Lopocaef93e2012-02-26 22:41:44 +1100492 echo " GCC version : ......................... ${GCC_VERSION}"
Max Horncdcb88b2012-12-12 21:33:53 +0100493fi
Erik de Castro Lopo592021e2012-12-28 09:49:50 +1100494echo