summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2016-01-31 14:42:21 +0000
committerTim-Philipp Müller <tim@centricular.com>2016-01-31 14:42:21 +0000
commit861ca5ab7b1521572042357d2e553c669f562deb (patch)
tree39d4f272cd7f818dad08b5272c1d16f4af178b1c /configure.ac
parent0770fa4ed55f375cdb54bf22742a7eef6da8808e (diff)
downloadgstreamer-plugins-bad-861ca5ab7b1521572042357d2e553c669f562deb.tar.gz
faad: simplify configure check and require faad >= 2.7
Just check whether LATM is defined which is only available in 2.7 and later. Allows us to simplify the configure check a little and we can get rid of some hackish workarounds for problems with earlier version headers.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac61
1 files changed, 14 insertions, 47 deletions
diff --git a/configure.ac b/configure.ac
index 186a8c3a8..bb1e270a5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2159,60 +2159,27 @@ AG_GST_CHECK_FEATURE(FAAC, [AAC encoder plug-in], faac, [
AC_SUBST(FAAC_LIBS)
])
-dnl **** Free AAC Decoder (FAAD) ****
+dnl **** Free AAC Decoder (FAAD2) ****
translit(dnm, m, l) AM_CONDITIONAL(USE_FAAD, true)
-AG_GST_CHECK_FEATURE(FAAD, [AAC decoder plug-in], faad, [
- HAVE_FAAD="yes"
- faad_hdr=""
- AG_GST_CHECK_LIBHEADER(FAAD, faad, faacDecOpen, $LIBM, faad.h,
- FAAD_LIBS="-lfaad $LIBM", HAVE_FAAD="no")
- if test $HAVE_FAAD = "no"; then
- AG_GST_CHECK_LIBHEADER(FAAD, faad, NeAACDecOpen, $LIBM, neaacdec.h,
- [ FAAD_LIBS="-lfaad $LIBM"
- AC_DEFINE(FAAD_IS_NEAAC, 1, [Define if AAC is using new api prefix])
- faad_hdr="neaacdec.h"
- ], [
- HAVE_FAAD="no"
- ],)
- else
- faad_hdr="faad.h"
- fi
- if test $HAVE_FAAD = "yes"; then
- AC_MSG_CHECKING([Checking for FAAD >= 2.0])
+AG_GST_CHECK_FEATURE(FAAD, [FAAD2 AAC decoder plug-in], faad, [
+ AG_GST_CHECK_LIBHEADER(FAAD, faad, NeAACDecOpen, $LIBM, neaacdec.h, [
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <faad.h>]], [[
- #if !defined(FAAD2_VERSION) || !defined(FAAD_FMT_DOUBLE)
- #error Not faad2
- #else
- /* Release candidate of 2.0 is not good enough for us. This field
- * was added only in 2.0 final and does not exist in 2.0-RC3 */
- faacDecConfiguration conf; conf.dontUpSampleImplicitSBR = 1;
- #endif
+ #if !defined(FAAD2_VERSION) || !defined(FAAD_FMT_DOUBLE)
+ #error Not faad2
+ #elif !defined(LATM)
+ #error Not faad2 >= 2.7
+ #endif
]])],[
HAVE_FAAD="yes"
-
- AC_MSG_CHECKING([Checking FAAD2 version in $faad_hdr])
- for minor in 10 9 8 7 6 5 0; do
- if test x$faad2_minor_version = "x"; then
- AC_EGREP_CPP([\"2\.$minor\"$], [
- #include <$faad_hdr>
- FAAD2_VERSION
- ], [
- faad2_minor_version=$minor
- ])
- fi
- done
- if test x$faad2_minor_version = "x"; then
- AC_MSG_RESULT([no idea])
- else
- AC_MSG_RESULT([2.$faad2_minor_version])
- AC_DEFINE_UNQUOTED([FAAD2_MINOR_VERSION], [$faad2_minor_version], [The x in 2.x])
- fi
- ],[
+ FAAD_LIBS="-lfaad"
+ ], [
+ AC_MSG_WARN([Found libfaad, but version not recent enough. Need faad2 >= 2.7])
HAVE_FAAD="no"
])
- fi
+ ], [
+ HAVE_FAAD="no"
+ ])
AC_SUBST(FAAD_LIBS)
- AC_SUBST(FAAD_IS_NEAAC)
])
dnl *** fbdev ***