--- a/aconfigure.ac 2020-02-14 09:48:27.000000000 -0000 +++ b/aconfigure.ac 2021-10-11 19:57:55.416969979 -0000 @@ -1927,33 +1927,35 @@ [Exclude OPUS support from the build (default: autodetect)]) , [ - if test "$enable_opus" = "no"; then - [ac_no_opus=1] - AC_DEFINE(PJMEDIA_HAS_OPUS_CODEC,0) - AC_MSG_RESULT([Checking if OPUS support is disabled... yes]) - fi + if test "$enable_opus" = "no"; then + [ac_no_opus=1] + AC_DEFINE(PJMEDIA_HAS_OPUS_CODEC,0) + AC_MSG_RESULT([Checking if OPUS support is disabled... yes]) + fi ], [ - AC_MSG_RESULT([checking for OPUS installations..]) - if test "x$with_opus" != "xno" -a "x$with_opus" != "x"; then - CFLAGS="$CFLAGS -I$with_opus/include" - CPPFLAGS="$CPPFLAGS -I$with_opus/include" - LDFLAGS="$LDFLAGS -L$with_opus/lib" - AC_MSG_RESULT([Using OPUS prefix... $with_opus]) - fi - AC_SUBST(opus_h_present) - AC_SUBST(opus_present) - AC_CHECK_HEADER(opus/opus.h,[opus_h_present=1]) - AC_CHECK_LIB(opus,opus_repacketizer_get_size,[opus_present=1 && LIBS="-lopus $LIBS"]) - if test "x$opus_h_present" = "x1" -a "x$opus_present" = "x1"; then - AC_MSG_RESULT([OPUS library found, OPUS support enabled]) - AC_DEFINE(PJMEDIA_HAS_OPUS_CODEC,1) - else - [ac_no_opus=1] - AC_MSG_RESULT([OPUS library not found, OPUS support disabled]) - AC_DEFINE(PJMEDIA_HAS_OPUS_CODEC,0) - fi ]) +if test "x$ac_no_opus" = "x"; then + AC_MSG_RESULT([checking for OPUS installations..]) + if test "x$with_opus" != "xno" -a "x$with_opus" != "x"; then + CFLAGS="$CFLAGS -I$with_opus/include" + CPPFLAGS="$CPPFLAGS -I$with_opus/include" + LDFLAGS="$LDFLAGS -L$with_opus/lib" + AC_MSG_RESULT([Using OPUS prefix... $with_opus]) + fi + AC_SUBST(opus_h_present) + AC_SUBST(opus_present) + AC_CHECK_HEADER(opus/opus.h,[opus_h_present=1]) + AC_CHECK_LIB(opus,opus_repacketizer_get_size,[opus_present=1 && LIBS="-lopus $LIBS"]) + if test "x$opus_h_present" = "x1" -a "x$opus_present" = "x1"; then + AC_MSG_RESULT([OPUS library found, OPUS support enabled]) + AC_DEFINE(PJMEDIA_HAS_OPUS_CODEC,1) + else + [ac_no_opus=1] + AC_MSG_RESULT([OPUS library not found, OPUS support disabled]) + AC_DEFINE(PJMEDIA_HAS_OPUS_CODEC,0) + fi +fi dnl # bcg729 prefix AC_ARG_WITH(bcg729,