test "$HAVE_OGG" = 'yes' -a "$HAVE_OPUS" = 'yes'
}])
########################################################################### faad
-have_faad=yes
-OLD_CPPFLAGS="$CPPFLAGS"
-OLD_LDFLAGS="$LDFLAGS"
-OLD_LIBS="$LIBS"
-AC_ARG_WITH(faad_headers, [AS_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, [AS_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)
- AC_SUBST(faad_cppflags)
- faad_ldflags="$faad_libs -lfaad"
- AC_SUBST(faad_ldflags)
-fi
-CPPFLAGS="$OLD_CPPFLAGS"
-LDFLAGS="$OLD_LDFLAGS"
-LIBS="$OLD_LIBS"
+STASH_FLAGS
+LIB_ARG_WITH([faad], [-lfaad])
+HAVE_FAAD=yes
+AC_CHECK_HEADER(neaacdec.h, [], HAVE_FAAD=no)
+AC_CHECK_LIB([faad], [NeAACDecOpen], [], HAVE_FAAD=no)
+LIB_SUBST_FLAGS(faad)
+UNSTASH_FLAGS
########################################################################### mad
have_mad="yes"
OLD_CPPFLAGS="$CPPFLAGS"
NEED_VORBIS_OBJECTS() && server_errlist_objs="$server_errlist_objs ogg_afh"
NEED_SPEEX_OBJECTS() && server_errlist_objs="$server_errlist_objs spx_afh spx_common"
NEED_OPUS_OBJECTS() && server_errlist_objs="$server_errlist_objs opus_afh opus_common"
- if test "$have_faad" = "yes"; then
- server_errlist_objs="$server_errlist_objs aac_afh aac_common"
- fi
+ test $HAVE_FAAD = yes && server_errlist_objs="$server_errlist_objs aac_afh aac_common"
if test "$have_flac" = "yes"; then
server_errlist_objs="$server_errlist_objs flac_afh"
fi
audiod_errlist_objs="$audiod_errlist_objs opusdec_filter opus_common"
audiod_audio_formats="$audiod_audio_formats opus"
}
- if test "$have_faad" = "yes"; then
+ if test $HAVE_FAAD = yes; then
audiod_errlist_objs="$audiod_errlist_objs aacdec_filter aac_common"
audiod_audio_formats="$audiod_audio_formats aac"
fi
filters="$filters opusdec"
filter_errlist_objs="$filter_errlist_objs opusdec_filter opus_common"
}
-if test "$have_faad" = "yes"; then
+if test $HAVE_FAAD = yes; then
filter_errlist_objs="$filter_errlist_objs aacdec_filter aac_common"
filters="$filters aacdec"
fi
NEED_SPEEX_OBJECTS && recv_errlist_objs="$recv_errlist_objs spx_afh spx_common"
NEED_OPUS_OBJECTS && recv_errlist_objs="$recv_errlist_objs opus_afh opus_common"
-if test "$have_faad" = "yes"; then
+if test $HAVE_FAAD = yes; then
recv_errlist_objs="$recv_errlist_objs aac_afh aac_common"
fi
if test "$have_flac" = "yes"; then
afh_errlist_objs="$afh_errlist_objs opus_afh opus_common"
audio_format_handlers="$audio_format_handlers opus"
}
-if test "$have_faad" = "yes"; then
+if test $HAVE_FAAD = yes; then
afh_errlist_objs="$afh_errlist_objs aac_common aac_afh"
audio_format_handlers="$audio_format_handlers aac"
fi
opus_afh
opus_common
"
-if test "$have_faad" = "yes"; then
+if test $HAVE_FAAD = yes; then
play_errlist_objs="$play_errlist_objs aacdec_filter aac_afh aac_common"
fi
if test "$have_mad" = "yes"; then