1 # NOTE that for many of the AM_CONDITIONALs we use the prefix FLaC__
2 # instead of FLAC__ since autoconf triggers off 'AC_' in strings
4 AC_INIT(src/flac/main.c)
5 AM_INIT_AUTOMAKE(flac, 0.9)
7 # We need two libtools, one that builds both shared and static, and
8 # one that builds only static. This is because the resulting libtool
9 # does not allow us to choose which to build at runtime.
11 sed -e 's/^build_old_libs=yes/build_old_libs=no/' libtool > libtool-disable-static
12 chmod +x libtool-disable-static
18 i*86) cpu_ia32=true ; AC_DEFINE(FLAC__CPU_IA32) ;;
19 powerpc) cpu_ppc=true ; AC_DEFINE(FLAC__CPU_PPC) ;;
20 sparc) cpu_sparc=true ; AC_DEFINE(FLAC__CPU_SPARC) ;;
22 AM_CONDITIONAL(FLaC__CPU_IA32, test x$cpu_ia32 = xtrue)
23 AM_CONDITIONAL(FLaC__CPU_PPC, test x$cpu_ppc = xtrue)
24 AM_CONDITIONAL(FLaC__CPU_SPARC, test x$cpu_sparc = xtrue)
26 if test x$cpu_ia32 = xtrue ; then
27 AC_DEFINE(FLAC__ALIGN_MALLOC_DATA)
30 AC_ARG_ENABLE(asm-optimizations, [ --disable-asm-optimizations Don't use any assembly optimization routines], asm_opt=no, asm_opt=yes)
31 AM_CONDITIONAL(FLaC__NO_ASM, test x$asm_opt = xno)
32 if test x$asm_opt = xno ; then
33 AC_DEFINE(FLAC__NO_ASM)
37 [ --enable-debug Turn on debugging],
38 [case "${enableval}" in
41 *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
43 AM_CONDITIONAL(DEBUG, test x$debug = xtrue)
45 AM_PATH_XMMS(0.9.5.1, , AC_MSG_WARN([*** XMMS >= 0.9.5.1 not installed - xmms support will not be built]))
46 AM_CONDITIONAL(FLaC__HAS_XMMS, test x$XMMS_INPUT_PLUGIN_DIR != x)
48 AC_CHECK_PROGS(NASM, nasm)
49 AM_CONDITIONAL(FLaC__HAS_NASM, test -n "$NASM")
50 if test -n "$NASM" ; then
51 AC_DEFINE(FLAC__HAS_NASM)
54 CFLAGS='-I./include -I $(top_srcdir)/include -Wall -W'
55 if test x$debug = xtrue; then
56 CFLAGS="$CFLAGS -g -O0 -DDEBUG"
58 CFLAGS="$CFLAGS -O3 -fomit-frame-pointer -funroll-loops -ffast-math -finline-functions -DNDEBUG"
63 src/libFLAC/Makefile \
64 src/libFLAC/i386/Makefile \
66 src/metaflac/Makefile \
67 src/plugin_xmms/Makefile \
68 src/test_streams/Makefile \
69 src/test_unit/Makefile \