LIB_SUBST_FLAGS(faad)
UNSTASH_FLAGS
########################################################################### mad
-have_mad="yes"
-OLD_CPPFLAGS="$CPPFLAGS"
-OLD_LDFLAGS="$LDFLAGS"
-OLD_LIBS="$LIBS"
-
-AC_ARG_WITH(mad_headers, [AS_HELP_STRING(--with-mad-headers=dir,
- [look for mad.h also in dir])])
-if test -n "$with_mad_headers"; then
- mad_cppflags="-I$with_mad_headers"
- CPPFLAGS="$CPPFLAGS $mad_cppflags"
-fi
-AC_ARG_WITH(mad_libs, [AS_HELP_STRING(--with-mad-libs=dir,
- [look for libmad also in dir])])
-if test -n "$with_mad_libs"; then
- mad_libs="-L$with_mad_libs"
- LDFLAGS="$LDFLAGS $mad_libs"
-fi
-AC_CHECK_HEADERS([mad.h], [], [
- have_mad="no"
-])
-AC_CHECK_LIB([mad], [mad_stream_init], [], [
- have_mad="no"
-])
-if test "$have_mad" = "yes"; then
- AC_DEFINE(HAVE_MAD, 1, define to 1 if you want to build the mp3dec filter)
- AC_SUBST(mad_cppflags)
- mad_ldflags="$mad_libs -lmad"
- AC_SUBST(mad_ldflags)
-else
- AC_MSG_WARN([no mp3dec support in para_audiod/para_filter])
-fi
-CPPFLAGS="$OLD_CPPFLAGS"
-LDFLAGS="$OLD_LDFLAGS"
-LIBS="$OLD_LIBS"
+STASH_FLAGS
+LIB_ARG_WITH([mad], [-lmad])
+HAVE_MAD=yes
+AC_CHECK_HEADER(mad.h, [], HAVE_MAD=no)
+AC_CHECK_LIB([mad], [mad_stream_init], [], HAVE_MAD=no)
+LIB_SUBST_FLAGS(mad)
+UNSTASH_FLAGS
###################################################################### libid3tag
OLD_CPPFLAGS="$CPPFLAGS"
OLD_LDFLAGS="$LDFLAGS"
audiod_errlist_objs="$audiod_errlist_objs aacdec_filter aac_common"
audiod_audio_formats="$audiod_audio_formats aac"
fi
- if test "$have_mad" = "yes"; then
+ if test $HAVE_MAD = yes; then
audiod_audio_formats="$audiod_audio_formats mp3"
audiod_cmdline_objs="$audiod_cmdline_objs mp3dec_filter"
audiod_errlist_objs="$audiod_errlist_objs mp3dec_filter"
filter_errlist_objs="$filter_errlist_objs aacdec_filter aac_common"
filters="$filters aacdec"
fi
-if test "$have_mad" = "yes"; then
+if test $HAVE_MAD = yes; then
filter_cmdline_objs="$filter_cmdline_objs mp3dec_filter"
filter_errlist_objs="$filter_errlist_objs mp3dec_filter"
filters="$filters mp3dec"
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
+if test $HAVE_MAD = yes; then
play_cmdline_objs="$play_cmdline_objs mp3dec_filter"
play_errlist_objs="$play_errlist_objs mp3dec_filter"
fi