diff --git a/configure b/configure index ca59623e9..38ce0128d 100755 --- a/configure +++ b/configure @@ -1657,6 +1657,39 @@ EOF } +# +# Check for libopus +# +check_libopus() +{ + if [ -z "$BUILD_LIBOPUS" ]; then + test_header libopus + if which_wrapper pkg-config > /dev/null; then + libopus_ver=`pkg-config opus --modversion 2>> $LOG` + if [ $? -eq 0 ]; then + FLGOPUS=`pkg-config opus --cflags` + INCOPUS=`strip_I "$FLGOPUS"` + LIBOPUS=`pkg-config opus --libs` + fi + cat > $ODIR.tmp_src.cc << EOF +#include +extern "C" int main(void) +{ + OpusEncoder *test; +} +EOF + [ -n "$INCOPUS" ] && I_INCOPUS=`prefix_I "$INCOPUS"` + if test_compile "$LIBOPUS $I_INCOPUS" opus opus; then + if test_execute; then + cnf_append "SDK_VBOX_OPUS_INCS" "$INCOPUS" + cnf_append "SDK_VBOX_OPUS_LIBS" "`strip_l "$LIBOPUS"`" + fi + fi + fi + fi +} + + # # Check for libvpx #