+########################################################################### faad
+have_faad=yes
+OLD_CPPFLAGS="$CPPFLAGS"
+OLD_LD_FLAGS="$LDFLAGS"
+AC_ARG_WITH(faad_headers, [AC_HELP_STRING(--with-faad-headers=dir,
+ [look for neaacdec.h also in dir])])
+if test -n "$with_faad_headers"; then
+ faad_cppflags="-I$with_faad_headers"
+ CPPFLAGS="$CPPFLAGS $faad_cppflags"
+fi
+AC_ARG_WITH(faad_libs, [AC_HELP_STRING(--with-faad-libs=dir,
+ [look for libfaad also in dir])])
+if test -n "$with_faad_libs"; then
+ faad_libs="-L$with_faad_libs"
+ LDFLAGS="$LDFLAGS $faad_libs"
+fi
+AC_CHECK_HEADER(neaacdec.h, [], have_faad=no)
+AC_CHECK_LIB([faad], [NeAACDecOpen], [], have_faad=no)
+if test "$have_faad" = "yes"; then
+ AC_DEFINE(HAVE_FAAD, 1, define to 1 if you want to build the aacdec filter)
+ filter_errlist_objs="$filter_errlist_objs aacdec aac_common"
+ filter_filters="$filter_filters aacdec"
+ audiod_errlist_objs="$audiod_errlist_objs aacdec aac_common"
+ server_errlist_objs="$server_errlist_objs aac_afh aac_common"
+ server_ldflags="$server_ldflags $faad_libs -lfaad"
+ filter_ldflags="$filter_ldflags $faad_libs -lfaad"
+ audiod_ldflags="$audiod_ldflags $faad_libs -lfaad"
+ audiod_audio_formats="$audiod_audio_formats aac"
+ server_audio_formats="$server_audio_formats aac"
+ filters="$filters aacdec"
+ AC_SUBST(faad_cppflags)
+ AC_SUBST(faad_libs)
+else
+ AC_MSG_WARN([no aac support in para_audiod/para_filter])
+fi
+CPPFLAGS="$OLD_CPPFLAGS"
+LDFLAGS="$OLD_LDFLAGS"