blob: 139b8ddbe4f9b9033837f821e30ad610b48af1bd [file] [log] [blame]
AC_INIT(src/flac/main.c)
AM_INIT_AUTOMAKE(flac, 0.9)
# 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/metaflac/Makefile \
src/plugin_xmms/Makefile \
src/test_streams/Makefile \
src/test_unit/Makefile \
test/Makefile \
)