4 AM_INIT_AUTOMAKE([foreign subdir-objects color-tests])
5 AC_CONFIG_HEADERS(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(high-precision, AC_HELP_STRING([--enable-high-precision],
48 [enable SBC high precision support]),
49 [enable_high_precision=${enableval}])
50 if (test "${enable_high_precision}" = "yes"); then
51 AC_DEFINE(SBC_HIGH_PRECISION, 1,
52 [Define to 1 to enable high precision build of SBC encoder])
55 AC_ARG_ENABLE(tools, AC_HELP_STRING([--disable-tools],
56 [disable SBC tools]), [enable_tools=${enableval}])
57 AM_CONDITIONAL(TOOLS, test "${enable_tools}" != "no")
59 AC_ARG_ENABLE(tester, AC_HELP_STRING([--disable-tester],
60 [disable SBC tester]), [enable_tester=${enableval}])
61 if (test "${enable_tester}" != "no"); then
62 PKG_CHECK_MODULES(SNDFILE, sndfile, dummy=yes,
63 AC_MSG_ERROR(sndfile library is required))
64 AC_SUBST(SNDFILE_CFLAGS)
65 AC_SUBST(SNDFILE_LIBS)
67 AM_CONDITIONAL(TESTER, test "${enable_tester}" != "no")
69 AC_OUTPUT(Makefile sbc/sbc.pc)