aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-03 16:48:12 +0100
committerMax Kellermann <max@duempel.org>2008-11-03 16:48:12 +0100
commitf70dccdce10f599be288431da166b5b09a53135c (patch)
treeb98d0b53a523e9a6402fc09ccc69eba41a8afbb8 /configure.ac
parent9074f924e9258e6801d96d7dbc8b9d525b7c6e2a (diff)
downloadmpd-f70dccdce10f599be288431da166b5b09a53135c.tar.gz
mpd-f70dccdce10f599be288431da166b5b09a53135c.tar.xz
mpd-f70dccdce10f599be288431da166b5b09a53135c.zip
configure.ac: separate the "aac" and "mp4" decoder tests
MPD used to have a copy of the mp4ff library. Since that has been removed, AAC suport was disabled when there was no libmp4ff. Separate the libmp4ff test, and enable AAC support no matter if libmp4ff is available.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac42
1 files changed, 39 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 0fbb4f16c..6a7940001 100644
--- a/configure.ac
+++ b/configure.ac
@@ -522,7 +522,7 @@ if test x$enable_aac = xyes; then
FAAD_LIBS="-L$faad_prefix/lib"
fi
- FAAD_LIBS="$FAAD_LIBS -lfaad -lmp4ff"
+ FAAD_LIBS="$FAAD_LIBS -lfaad"
if test "x$faad_includes" != "x" ; then
FAAD_CFLAGS="-I$faad_includes"
@@ -624,6 +624,36 @@ fi
AM_CONDITIONAL(HAVE_FAAD, test x$enable_aac = xyes)
+if test x$enable_aac = xyes; then
+ enable_mp4=yes
+ MP4FF_LIBS="-lmp4ff"
+
+ oldcflags=$CFLAGS
+ oldlibs=$LIBS
+ oldcppflags=$CPPFLAGS
+ CFLAGS="$CFLAGS $FAAD_CFLAGS"
+ LIBS="$LIBS $MP4FF_LIBS"
+ CPPFLAGS=$CFLAGS
+
+ AC_CHECK_HEADER(mp4ff.h,,enable_mp4=no)
+
+ if test x$enable_mp4 = xyes; then
+ AC_CHECK_LIB(mp4ff,mp4ff_open_read,,enable_mp4=no)
+ fi
+
+ if test x$enable_mp4 = xyes; then
+ AC_DEFINE(HAVE_MP4, 1, [Define to use FAAD2+mp4ff for MP4 decoding])
+ else
+ AC_MSG_WARN([libmp4ff needed for MP4 support -- disabling MP4 support])
+ fi
+
+ CFLAGS=$oldcflags
+ LIBS=$oldlibs
+ CPPFLAGS=$oldcppflags
+fi
+
+AM_CONDITIONAL(HAVE_MP4, test x$enable_mp4 = xyes)
+
if test x$use_tremor = xyes; then
if test "x$tremor_libraries" != "x" ; then
TREMOR_LIBS="-L$tremor_libraries"
@@ -996,9 +1026,15 @@ else
fi
if test x$enable_aac = xyes; then
- echo " MP4/AAC support ...............enabled"
+ echo " AAC support ...................enabled"
+else
+ echo " AAC support ...................disabled"
+fi
+
+if test x$enable_mp4 = xyes; then
+ echo " MP4 support ...................enabled"
else
- echo " MP4/AAC support ...............disabled"
+ echo " MP4 support ...................disabled"
fi
if test x$enable_mpc = xyes; then