4 AM_INIT_AUTOMAKE([foreign subdir-objects color-tests])
5 AM_CONFIG_HEADER(config.h)
7 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
11 AC_PREFIX_DEFAULT(/usr/local)
23 AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization],
24 [disable code optimization through compiler]), [
25 if (test "${enableval}" = "no"); then
30 AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],
31 [enable compiling with debugging information]), [
32 if (test "${enableval}" = "yes" &&
33 test "${ac_cv_prog_cc_g}" = "yes"); then
38 AC_ARG_ENABLE(pie, AC_HELP_STRING([--enable-pie],
39 [enable position independent executables flag]), [
40 if (test "${enableval}" = "yes" &&
41 test "${ac_cv_prog_cc_pie}" = "yes"); then
42 CFLAGS="$CFLAGS -fPIE"
43 LDFLAGS="$LDFLAGS -pie"
47 AC_ARG_ENABLE(tools, AC_HELP_STRING([--disable-tools],
48 [disable SBC tools]), [enable_tools=${enableval}])
49 AM_CONDITIONAL(TOOLS, test "${enable_tools}" != "no")
51 AC_ARG_ENABLE(sbctester, AC_HELP_STRING([--disable-sbctester],
52 [disable SBC tester]), [enable_sbctester=${enableval}])
53 if (test "${enable_sbctester}" != "no"); then
54 PKG_CHECK_MODULES(SNDFILE, sndfile, dummy=yes,
55 AC_MSG_ERROR(sndfile library is required))
56 AC_SUBST(SNDFILE_CFLAGS)
57 AC_SUBST(SNDFILE_LIBS)
59 AM_CONDITIONAL(SBCTESTER, test "${enable_sbctester}" != "no")