1 # FLAC - Free Lossless Audio Codec
2 # Copyright (C) 2001,2002,2003,2004 Josh Coalson
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
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
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
21 AC_INIT(src/flac/main.c)
22 AM_INIT_AUTOMAKE(flac, 1.1.1)
24 # Don't automagically regenerate autoconf/automake generated files unless
25 # explicitly requested. Eases autobuilding -mdz
28 # We need two libtools, one that builds both shared and static, and
29 # one that builds only static. This is because the resulting libtool
30 # does not allow us to choose which to build at runtime.
32 sed -e 's/^build_old_libs=yes/build_old_libs=no/' libtool > libtool-disable-static
33 chmod +x libtool-disable-static
39 dnl check for getopt in standard library
40 dnl AC_CHECK_FUNCS(getopt_long , , [LIBOBJS="$LIBOBJS getopt.o getopt1.o"] )
41 AC_CHECK_FUNCS(getopt_long, [], [])
45 i*86) cpu_ia32=true ; AC_DEFINE(FLAC__CPU_IA32) ;;
46 powerpc) cpu_ppc=true ; AC_DEFINE(FLAC__CPU_PPC) ;;
47 sparc) cpu_sparc=true ; AC_DEFINE(FLAC__CPU_SPARC) ;;
49 AM_CONDITIONAL(FLaC__CPU_IA32, test x$cpu_ia32 = xtrue)
50 AM_CONDITIONAL(FLaC__CPU_PPC, test x$cpu_ppc = xtrue)
51 AM_CONDITIONAL(FLaC__CPU_SPARC, test x$cpu_sparc = xtrue)
53 i386-*-openbsd3.[[0-3]]) OBJ_FORMAT=aoutb ;;
58 if test x$cpu_ia32 = xtrue ; then
59 AC_DEFINE(FLAC__ALIGN_MALLOC_DATA)
62 AC_ARG_ENABLE(asm-optimizations, [ --disable-asm-optimizations Don't use any assembly optimization routines], asm_opt=no, asm_opt=yes)
63 AM_CONDITIONAL(FLaC__NO_ASM, test x$asm_opt = xno)
64 if test x$asm_opt = xno ; then
65 AC_DEFINE(FLAC__NO_ASM)
69 [ --enable-debug Turn on debugging],
70 [case "${enableval}" in
73 *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
75 AM_CONDITIONAL(DEBUG, test x$debug = xtrue)
78 [ --enable-sse Enable SSE support by asserting that the OS supports SSE instructions],
79 [case "${enableval}" in
82 *) AC_MSG_ERROR(bad value ${enableval} for --enable-sse) ;;
84 AM_CONDITIONAL(FLaC__SSE_OS, test x$sse_os = xtrue)
85 if test x$sse_os = xtrue ; then
86 AC_DEFINE(FLAC__SSE_OS)
90 [ --disable-3dnow Disable 3DNOW! optimizations],
91 [case "${enableval}" in
92 yes) use_3dnow=true ;;
93 no) use_3dnow=false ;;
94 *) AC_MSG_ERROR(bad value ${enableval} for --enable-3dnow) ;;
95 esac],[use_3dnow=true])
96 AM_CONDITIONAL(FLaC__USE_3DNOW, test x$use_3dnow = xtrue)
97 if test x$use_3dnow = xtrue ; then
98 AC_DEFINE(FLAC__USE_3DNOW)
101 AC_ARG_ENABLE(altivec,
102 [ --disable-altivec Disable Altivec optimizations],
103 [case "${enableval}" in
104 yes) use_altivec=true ;;
105 no) use_altivec=false ;;
106 *) AC_MSG_ERROR(bad value ${enableval} for --enable-altivec) ;;
107 esac],[use_altivec=true])
108 AM_CONDITIONAL(FLaC__USE_ALTIVEC, test x$use_altivec = xtrue)
109 if test x$use_altivec = xtrue ; then
110 AC_DEFINE(FLAC__USE_ALTIVEC)
113 AC_ARG_ENABLE(local-xmms-plugin,
114 [ --enable-local-xmms-plugin Install XMMS plugin to ~/.xmms/Plugins instead of system location],
115 [case "${enableval}" in
116 yes) install_xmms_plugin_locally=true ;;
117 no) install_xmms_plugin_locally=false ;;
118 *) AC_MSG_ERROR(bad value ${enableval} for --enable-local-xmms-plugin) ;;
119 esac],[install_xmms_plugin_locally=false])
120 AM_CONDITIONAL(FLaC__INSTALL_XMMS_PLUGIN_LOCALLY, test x$install_xmms_plugin_locally = xtrue)
122 AC_ARG_ENABLE(exhaustive-tests,
123 [ --enable-exhaustive-tests Enable exhaustive testing],
124 [case "${enableval}" in
125 yes) exhaustive_tests=true ;;
126 no) exhaustive_tests=false ;;
127 *) AC_MSG_ERROR(bad value ${enableval} for --enable-exhaustive-tests) ;;
128 esac],[exhaustive_tests=false])
129 AM_CONDITIONAL(FLaC__EXHAUSTIVE_TESTS, test x$exhaustive_tests = xtrue)
130 if test x$exhaustive_tests = xtrue ; then
131 AC_DEFINE(FLAC__EXHAUSTIVE_TESTS)
134 AC_ARG_ENABLE(valgrind-testing,
135 [ --enable-valgrind-testing Run all tests inside Valgrind],
136 [case "${enableval}" in
137 yes) valgrind_testing=true ;;
138 no) valgrind_testing=false ;;
139 *) AC_MSG_ERROR(bad value ${enableval} for --enable-valgrind-testing) ;;
140 esac],[valgrind_testing=false])
141 AM_CONDITIONAL(FLaC__VALGRIND_TESTING, test x$valgrind_testing = xtrue)
142 if test x$valgrind_testing = xtrue ; then
143 AC_DEFINE(FLAC__VALGRIND_TESTING)
146 dnl check for ogg library
147 XIPH_PATH_OGG(have_ogg=yes, AC_MSG_WARN([*** Ogg development enviroment not installed - Ogg support will not be built]))
148 AM_CONDITIONAL(FLaC__HAS_OGG, [test x$have_ogg = xyes])
149 if test x$have_ogg = xyes ; then
150 AC_DEFINE(FLAC__HAS_OGG)
153 AM_PATH_XMMS(0.9.5.1, , AC_MSG_WARN([*** XMMS >= 0.9.5.1 not installed - xmms support will not be built]))
154 AM_CONDITIONAL(FLaC__HAS_XMMS, test x$XMMS_INPUT_PLUGIN_DIR != x)
156 dnl check for i18n(internationalization); these are from libiconv/gettext
160 AC_CHECK_PROGS(DOXYGEN, doxygen)
161 AM_CONDITIONAL(FLaC__HAS_DOXYGEN, test -n "$DOXYGEN")
162 if test -n "$DOXYGEN" ; then
163 AC_DEFINE(FLAC__HAS_DOXYGEN)
166 AC_CHECK_PROGS(DOCBOOK_TO_MAN, docbook-to-man docbook2man)
167 AM_CONDITIONAL(FLaC__HAS_DOCBOOK_TO_MAN, test -n "$DOCBOOK_TO_MAN")
168 if test -n "$DOCBOOK_TO_MAN" ; then
169 AC_DEFINE(FLAC__HAS_DOCBOOK_TO_MAN)
172 AC_CHECK_PROGS(NASM, nasm)
173 AM_CONDITIONAL(FLaC__HAS_NASM, test -n "$NASM")
174 if test -n "$NASM" ; then
175 AC_DEFINE(FLAC__HAS_NASM)
178 OUR_CFLAGS_HEAD='-I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include'
179 if test x$debug = xtrue; then
180 OUR_CFLAGS_HEAD="$OUR_CFLAGS_HEAD -g -O0 -DDEBUG"
182 OUR_CFLAGS_HEAD="$OUR_CFLAGS_HEAD -O2 -DNDEBUG"
183 if test x$GCC = xyes; then
184 OUR_CFLAGS_HEAD="$OUR_CFLAGS_HEAD -O3 -fomit-frame-pointer -funroll-loops -finline-functions -Wall -W -Winline -DFLaC__INLINE=__inline__"
187 CFLAGS="$OUR_CFLAGS_HEAD $CFLAGS"
188 CXXFLAGS="$OUR_CFLAGS_HEAD $CXXFLAGS"
190 AM_CONFIG_HEADER(config.h)
191 AH_TEMPLATE(FLAC__ALIGN_MALLOC_DATA, [define to align allocated memory on 32-byte boundaries])
192 AH_TEMPLATE(FLAC__CPU_IA32, [define if building for ia32/i386])
193 AH_TEMPLATE(FLAC__CPU_PPC, [define if building for PowerPC])
194 AH_TEMPLATE(FLAC__CPU_SPARC, [define if building for SPARC])
195 AH_TEMPLATE(FLAC__EXHAUSTIVE_TESTS, [define to run even more tests])
196 AH_TEMPLATE(FLAC__VALGRIND_TESTING, [define to enable use of Valgrind in testers])
197 AH_TEMPLATE(FLAC__HAS_DOXYGEN, [define if you have Doxygen])
198 AH_TEMPLATE(FLAC__HAS_DOCBOOK_TO_MAN, [define if you have docbook-to-man or docbook2man])
199 AH_TEMPLATE(FLAC__HAS_NASM, [define if you have the NASM assembler])
200 AH_TEMPLATE(FLAC__HAS_OGG, [define if you have the ogg library])
201 AH_TEMPLATE(FLAC__NO_ASM, [define to disable use of assembly code])
202 AH_TEMPLATE(FLAC__SSE_OS, [define if your operating system supports SSE instructions])
203 AH_TEMPLATE(FLAC__USE_3DNOW, [define to enable use of 3Dnow! instructions])
204 AH_TEMPLATE(FLAC__USE_ALTIVEC, [define to enable use of Altivec instructions])
209 src/libFLAC/Makefile \
210 src/libFLAC/ia32/Makefile \
211 src/libFLAC/ppc/Makefile \
212 src/libFLAC/include/Makefile \
213 src/libFLAC/include/private/Makefile \
214 src/libFLAC/include/protected/Makefile \
215 src/libFLAC++/Makefile \
216 src/libOggFLAC/Makefile \
217 src/libOggFLAC/include/Makefile \
218 src/libOggFLAC/include/private/Makefile \
219 src/libOggFLAC/include/protected/Makefile \
220 src/libOggFLAC++/Makefile \
222 src/metaflac/Makefile \
223 src/monkeys_audio_utilities/Makefile \
224 src/monkeys_audio_utilities/flac_mac/Makefile \
225 src/monkeys_audio_utilities/flac_ren/Makefile \
226 src/plugin_common/Makefile \
227 src/plugin_winamp2/Makefile \
228 src/plugin_winamp2/include/Makefile \
229 src/plugin_winamp2/include/winamp2/Makefile \
230 src/plugin_xmms/Makefile \
232 src/share/getopt/Makefile \
233 src/share/grabbag/Makefile \
234 src/share/replaygain_analysis/Makefile \
235 src/share/replaygain_synthesis/Makefile \
236 src/share/replaygain_synthesis/include/Makefile \
237 src/share/replaygain_synthesis/include/private/Makefile \
238 src/share/utf8/Makefile \
239 src/test_grabbag/Makefile \
240 src/test_grabbag/cuesheet/Makefile \
241 src/test_libFLAC/Makefile \
242 src/test_libFLAC++/Makefile \
243 src/test_libOggFLAC/Makefile \
244 src/test_libOggFLAC++/Makefile \
245 src/test_seeking/Makefile \
246 src/test_streams/Makefile \
248 include/FLAC/Makefile \
249 include/FLAC++/Makefile \
250 include/OggFLAC/Makefile \
251 include/OggFLAC++/Makefile \
252 include/share/Makefile \
253 include/share/grabbag/Makefile \
256 doc/html/images/Makefile \
257 doc/html/ru/Makefile \
260 test/cuesheets/Makefile \
264 obj/debug/bin/Makefile \
265 obj/debug/lib/Makefile \
266 obj/release/Makefile \
267 obj/release/bin/Makefile \
268 obj/release/lib/Makefile \
269 flac.pbproj/Makefile \