Rename struct audio format to audio_format_handler
[paraslash.git] / configure.ac
index a28d4114486c0cc476e77a165929bdeb57ea581a..897209020d91794d53d8a7f74561825128553c66 100644 (file)
@@ -215,6 +215,35 @@ if test "$have_ogg" = "yes"; then
 else
        AC_MSG_WARN([no ogg vorbis support in para_server/para_filter])
 fi
 else
        AC_MSG_WARN([no ogg vorbis support in para_server/para_filter])
 fi
+########################################################################### faad
+have_faad=yes
+AC_ARG_ENABLE(faad_headers, [AC_HELP_STRING(--enable-faad-headers=dir,
+       [look for neaacdec.h also in dir])])
+if test -n "$enable_faad_headers"; then
+       faad_cppflags="-I$enable_faad_headers"
+       CPPFLAGS="$CPPFLAGS $faad_cppflags"
+fi
+AC_ARG_ENABLE(faad_libs, [AC_HELP_STRING(--enable-fadd-libs=dir,
+       [look for libfaad also in dir])])
+if test -n "$enable_faad_libs"; then
+       faad_libs="-L$enable_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"
+       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"
+       AC_SUBST(faad_cppflags)
+       AC_SUBST(faad_libs)
+else
+       AC_MSG_WARN([no aac support in para_audiod/para_filter])
+fi
 ########################################################################### mad
 have_mad="yes"
 AC_CHECK_HEADERS([mad.h], [], [
 ########################################################################### mad
 have_mad="yes"
 AC_CHECK_HEADERS([mad.h], [], [
@@ -364,13 +393,14 @@ AC_SUBST(gui_objs, add_dot_o($gui_objs))
 
 AC_OUTPUT
 AC_MSG_NOTICE([creating Makefile.deps])
 
 AC_OUTPUT
 AC_MSG_NOTICE([creating Makefile.deps])
-gcc -MM -MG $mysql_cppflags *.c > Makefile.deps
+gcc -MM -MG $mysql_cppflags $faad_cppflags *.c > Makefile.deps
 AC_MSG_NOTICE([
 paraslash configuration:
 ~~~~~~~~~~~~~~~~~~~~~~~~
 mysql support: $have_mysql
 ogg vorbis support: $have_ogg
 mp3dec support (libmad): $have_mad
 AC_MSG_NOTICE([
 paraslash configuration:
 ~~~~~~~~~~~~~~~~~~~~~~~~
 mysql support: $have_mysql
 ogg vorbis support: $have_ogg
 mp3dec support (libmad): $have_mad
+aac support (libfaad): $have_faad
 ortp support: $have_ortp
 unix socket credentials: $have_ucred
 supported writers for para_write: $write_writers
 ortp support: $have_ortp
 unix socket credentials: $have_ucred
 supported writers for para_write: $write_writers