+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+{ echo "configure: error: Cannot find development headers for libfaad..." 1>&2; exit 1; }
+fi
+done
+
+ echo $ac_n "checking for faacDecOpen in -lfaad""... $ac_c" 1>&6
+echo "configure:7172: checking for faacDecOpen in -lfaad" >&5
+ac_lib_var=`echo faad'_'faacDecOpen | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lfaad $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 7180 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char faacDecOpen();
+
+int main() {
+faacDecOpen()
+; return 0; }
+EOF
+if { (eval echo configure:7191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+
+ PLUGINS="${PLUGINS} codec/faad/faad"
+ faad_LDFLAGS="${faad_LDFLAGS} -lfaad"
+else
+ echo "$ac_t""no" 1>&6
+ { echo "configure: error: Cannot find libfaad library..." 1>&2; exit 1; }
+fi
+
+ LDFLAGS="${save_LDFLAGS}"
+ CFLAGS="${save_CFLAGS}"
+ fi
+fi
+
+
+
+# Check whether --enable-mp4 or --disable-mp4 was given.
+if test "${enable_mp4+set}" = set; then
+ enableval="$enable_mp4"
+ :
+fi
+
+if test "x${enable_mp4}" != "xno"
+then
+
+ PLUGINS="${PLUGINS} demux/mp4/mp4"
+ for ac_hdr in zlib.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:7235: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 7240 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:7245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ mp4_LDFLAGS="${mp4_LDFLAGS} -lz"
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+fi
+
+# Check whether --enable-a52 or --disable-a52 was given.
+if test "${enable_a52+set}" = set; then
+ enableval="$enable_a52"
+ :
+fi
+
+if test "x${enable_a52}" != "xno"
+then
+ # Check whether --with-a52 or --without-a52 was given.
+if test "${with_a52+set}" = set; then
+ withval="$with_a52"
+ :
+fi
+
+ # Check whether --with-a52-tree or --without-a52-tree was given.
+if test "${with_a52_tree+set}" = set; then
+ withval="$with_a52_tree"
+ :
+fi
+
+ if test "x${with_a52_tree}" != "xno" -a "x${with_a52_tree}" != "x"
+ then
+ real_a52_tree="`cd ${with_a52_tree} 2>/dev/null && pwd`"
+ if test "x${real_a52_tree}" = "x"
+ then
+ echo "$ac_t""no" 1>&6
+ { echo "configure: error: ${with_a52_tree} directory doesn't exist" 1>&2; exit 1; }
+ fi
+ echo $ac_n "checking for a52.h in ${real_a52_tree}/include""... $ac_c" 1>&6
+echo "configure:7302: checking for a52.h in ${real_a52_tree}/include" >&5
+ if test -f ${real_a52_tree}/include/a52.h
+ then
+ echo "$ac_t""yes" 1>&6
+ a52_CFLAGS="${a52_CFLAGS} -I${real_a52_tree}"
+ a52_LDFLAGS="${a52_LDFLAGS} -L${real_a52_tree}/liba52/.libs"
+ LDFLAGS="${save_LDFLAGS} ${a52_LDFLAGS}"
+ echo $ac_n "checking for a52_free in -la52""... $ac_c" 1>&6
+echo "configure:7310: checking for a52_free in -la52" >&5
+ac_lib_var=`echo a52'_'a52_free | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-la52 -lm $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 7318 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char a52_free();
+
+int main() {
+a52_free()
+; return 0; }
+EOF
+if { (eval echo configure:7329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+
+ BUILTINS="${BUILTINS} codec/a52"
+ a52_LDFLAGS="${a52_LDFLAGS} -la52 -lm"
+ a52_CFLAGS="${a52_CFLAGS} -DUSE_A52DEC_TREE"
+
+else
+ echo "$ac_t""no" 1>&6
+
+ if test -f ${real_a52_tree}/liba52/.libs/liba52.a
+ then
+ { echo "configure: error: make sure you have at least a52dec-0.7.3" 1>&2; exit 1; }
+ else
+ { echo "configure: error: the specified tree hasn't been compiled" 1>&2; exit 1; }
+ fi
+
+fi
+
+ LDFLAGS="${save_LDFLAGS}"
+ else
+ echo "$ac_t""no" 1>&6
+ { echo "configure: error: the specified tree doesn't have a52.h" 1>&2; exit 1; }
+ fi
+ else
+ if test "x${with_a52}" = "x"
+ then
+ test_LDFLAGS=""
+ test_CFLAGS=""
+ else
+ test_LDFLAGS="-L${with_a52}/lib"
+ test_CFLAGS="-I${with_a52}/include"
+ fi
+ save_CPPFLAGS="${CPPFLAGS}"
+ save_LDFLAGS="${LDFLAGS}"
+ CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}"
+ LDFLAGS="${save_LDFLAGS} ${test_LDFLAGS}"
+ for ac_hdr in a52dec/a52.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:7383: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 7388 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:7393: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+ echo $ac_n "checking for a52_free in -la52""... $ac_c" 1>&6
+echo "configure:7415: checking for a52_free in -la52" >&5
+ac_lib_var=`echo a52'_'a52_free | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-la52 -lm $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 7423 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char a52_free();
+
+int main() {
+a52_free()
+; return 0; }