summaryrefslogtreecommitdiff
path: root/configure.in
blob: f0e80dab5aa161139b52f964addc38fbf0333eb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
AC_INIT(src/flac/main.c)
AM_INIT_AUTOMAKE(flac, 0.8)

# We need two libtools, one that builds both shared and static, and
# one that builds only static.  This is because the resulting libtool
# does not allow us to choose which to build at runtime.
AM_PROG_LIBTOOL
sed -e 's/^build_old_libs=yes/build_old_libs=no/' libtool > libtool-disable-static
chmod +x libtool-disable-static

AC_PROG_MAKE_SET

AC_ARG_ENABLE(debug,
    [  --enable-debug    Turn on debugging],
    [case "${enableval}" in
	yes) debug=true ;;
	no)  debug=false ;;
	*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
    esac],[debug=false])
AM_CONDITIONAL(DEBUG, test x$debug = xtrue)

AM_PATH_XMMS(0.9.5.1, , AC_MSG_WARN([*** XMMS >= 0.9.5.1 not installed - xmms support will not be built]))
AM_CONDITIONAL(XMMS, test x$XMMS_INPUT_PLUGIN_DIR != x)

CFLAGS='-I./include -I $(top_srcdir)/include -Wall -W'
if test x$debug = xtrue; then
  CFLAGS="$CFLAGS  -g -O0 -DDEBUG"
else
  CFLAGS="$CFLAGS -O3 -fomit-frame-pointer -funroll-loops -ffast-math -finline-functions -DNDEBUG"
fi

AC_OUTPUT(	Makefile	\
		src/Makefile	\
		src/libFLAC/Makefile	\
		src/flac/Makefile	\
		src/plugin_xmms/Makefile	\
		src/test_streams/Makefile	\
		src/test_unit/Makefile	\
		test/Makefile	\
    	)