+ # speex
+ if test -n "$with_speex_headers"; then
+ speex_cppflags="-I$with_speex_headers"
+ CPPFLAGS="$CPPFLAGS $speex_cppflags"
+ fi
+ if test -n "$with_speex_libs"; then
+ speex_libs="-L$with_speex_libs"
+ LDFLAGS="$LDFLAGS $speex_libs"
+ fi
+ AC_CHECK_LIB([speex], [speex_decoder_init], [], [ have_speex="no" ])
+ AC_CHECK_HEADERS([speex/speex.h], [], [ have_speex="no" ])
+
+ # opus
+ if test -n "$with_opus_headers"; then
+ opus_cppflags="-I$with_opus_headers"
+ CPPFLAGS="$CPPFLAGS $opus_cppflags"
+ fi
+ if test -n "$with_opus_libs"; then
+ speex_libs="-L$with_opus_libs"
+ LDFLAGS="$LDFLAGS $opus_libs"
+ fi
+ AC_CHECK_LIB([opus], [opus_multistream_decode], [], [ have_opus="no" ])
+ AC_CHECK_HEADERS([opus/opus.h], [], [ have_opus="no" ])
+else
+ AC_MSG_WARN([vorbis/speex/opus depend on libogg, which was not detected])
+ have_vorbis="no"
+ have_speex="no"
+ have_opus="no"
+fi
+
+msg="support in para_server/para_filter/para_afh"
+if test "$have_vorbis" = "yes" || \
+ test "$have_speex" = "yes" || \
+ test "$have_opus" = "yes"; then
+ AC_SUBST(ogg_cppflags)
+ ogg_libs="$ogg_libs -logg"
+ if test "$OSTYPE" = "Darwin"; then
+ ogg_libs="-Wl,-bind_at_load $ogg_libs"
+ fi
+ server_ldflags="$server_ldflags $ogg_libs"
+ filter_ldflags="$filter_ldflags $ogg_libs"
+ audiod_ldflags="$audiod_ldflags $ogg_libs"
+ play_ldflags="$play_ldflags $ogg_libs"
+ afh_ldflags="$afh_ldflags $ogg_libs"
+ recv_ldflags="$recv_ldflags $ogg_libs"
+ all_errlist_objs="$all_errlist_objs ogg_afh_common"
+ afh_errlist_objs="$afh_errlist_objs ogg_afh_common"
+ recv_errlist_objs="$recv_errlist_objs ogg_afh_common"
+ server_errlist_objs="$server_errlist_objs ogg_afh_common"
+ play_errlist_objs="$play_errlist_objs ogg_afh_common"
+fi
+if test "$have_vorbis" = "yes"; then
+ all_errlist_objs="$all_errlist_objs oggdec_filter ogg_afh"
+ AC_DEFINE(HAVE_OGGVORBIS, 1, define to 1 to turn on ogg/vorbis support)
+ filters="$filters oggdec"
+ vorbis_libs="-lvorbis -lvorbisfile"
+ server_ldflags="$server_ldflags $vorbis_libs"
+ filter_ldflags="$filter_ldflags $vorbis_libs"
+ audiod_ldflags="$audiod_ldflags $vorbis_libs"
+ play_ldflags="$play_ldflags $vorbis_libs"
+ afh_ldflags="$afh_ldflags $vorbis_libs"
+ recv_ldflags="$recv_ldflags $vorbis_libs"