Ignore:
Timestamp:
Feb 4, 2016 6:11:58 AM (8 years ago)
Author:
ming
Message:

Fixed #1904: Support for Opus codec

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/aconfigure

    r5199 r5239  
    624624ac_host 
    625625ac_linux_poll 
     626opus_present 
     627opus_h_present 
     628ac_no_opus 
    626629silk_present 
    627630silk_h_present 
     
    817820with_silk 
    818821enable_silk 
     822with_opus 
     823enable_opus 
    819824' 
    820825      ac_precious_vars='build_alias 
     
    14811486 
    14821487  --disable-silk          Exclude SILK support from the build (default: 
     1488                          autodetect) 
     1489 
     1490  --disable-opus          Exclude OPUS support from the build (default: 
    14831491                          autodetect) 
    14841492 
     
    15241532                          Specify alternate libvo-amrwbenc prefix 
    15251533  --with-silk=DIR         Specify alternate SILK prefix 
     1534  --with-opus=DIR         Specify alternate OPUS prefix 
    15261535 
    15271536Some influential environment variables: 
     
    82278236 
    82288237 
     8238if test "x$ac_cross_compile" != "x" -a "x$with_opus" = "xno"; then 
     8239    enable_opus=no 
     8240fi 
     8241 
     8242 
     8243# Check whether --with-opus was given. 
     8244if test "${with_opus+set}" = set; then : 
     8245  withval=$with_opus; 
     8246else 
     8247  with_opus=no 
     8248 
     8249fi 
     8250 
     8251 
     8252 
     8253# Check whether --enable-opus was given. 
     8254if test "${enable_opus+set}" = set; then : 
     8255  enableval=$enable_opus; 
     8256                if test "$enable_opus" = "no"; then 
     8257                 ac_no_opus=1 
     8258                 $as_echo "#define PJMEDIA_HAS_OPUS_CODEC 0" >>confdefs.h 
     8259 
     8260                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if OPUS support is disabled... yes" >&5 
     8261$as_echo "Checking if OPUS support is disabled... yes" >&6; } 
     8262                fi 
     8263 
     8264else 
     8265 
     8266                { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for OPUS installations.." >&5 
     8267$as_echo "checking for OPUS installations.." >&6; } 
     8268                if test "x$with_opus" != "xno" -a "x$with_opus" != "x"; then 
     8269                    CFLAGS="$CFLAGS -I$with_opus/include" 
     8270                    CPPFLAGS="$CPPFLAGS -I$with_opus/include" 
     8271                    LDFLAGS="$LDFLAGS -L$with_opus/lib" 
     8272                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using OPUS prefix... $with_opus" >&5 
     8273$as_echo "Using OPUS prefix... $with_opus" >&6; } 
     8274                fi 
     8275 
     8276 
     8277                ac_fn_c_check_header_mongrel "$LINENO" "opus/opus.h" "ac_cv_header_opus_opus_h" "$ac_includes_default" 
     8278if test "x$ac_cv_header_opus_opus_h" = xyes; then : 
     8279  opus_h_present=1 
     8280fi 
     8281 
     8282 
     8283                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opus_repacketizer_get_size in -lopus" >&5 
     8284$as_echo_n "checking for opus_repacketizer_get_size in -lopus... " >&6; } 
     8285if ${ac_cv_lib_opus_opus_repacketizer_get_size+:} false; then : 
     8286  $as_echo_n "(cached) " >&6 
     8287else 
     8288  ac_check_lib_save_LIBS=$LIBS 
     8289LIBS="-lopus  $LIBS" 
     8290cat confdefs.h - <<_ACEOF >conftest.$ac_ext 
     8291/* end confdefs.h.  */ 
     8292 
     8293/* Override any GCC internal prototype to avoid an error. 
     8294   Use char because int might match the return type of a GCC 
     8295   builtin and then its argument prototype would still apply.  */ 
     8296#ifdef __cplusplus 
     8297extern "C" 
     8298#endif 
     8299char opus_repacketizer_get_size (); 
     8300int 
     8301main () 
     8302{ 
     8303return opus_repacketizer_get_size (); 
     8304  ; 
     8305  return 0; 
     8306} 
     8307_ACEOF 
     8308if ac_fn_c_try_link "$LINENO"; then : 
     8309  ac_cv_lib_opus_opus_repacketizer_get_size=yes 
     8310else 
     8311  ac_cv_lib_opus_opus_repacketizer_get_size=no 
     8312fi 
     8313rm -f core conftest.err conftest.$ac_objext \ 
     8314    conftest$ac_exeext conftest.$ac_ext 
     8315LIBS=$ac_check_lib_save_LIBS 
     8316fi 
     8317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_opus_opus_repacketizer_get_size" >&5 
     8318$as_echo "$ac_cv_lib_opus_opus_repacketizer_get_size" >&6; } 
     8319if test "x$ac_cv_lib_opus_opus_repacketizer_get_size" = xyes; then : 
     8320  opus_present=1 && LIBS="$LIBS -lopus" 
     8321fi 
     8322 
     8323                if test "x$opus_h_present" = "x1" -a "x$opus_present" = "x1"; then 
     8324                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: OPUS library found, OPUS support enabled" >&5 
     8325$as_echo "OPUS library found, OPUS support enabled" >&6; } 
     8326                        $as_echo "#define PJMEDIA_HAS_OPUS_CODEC 1" >>confdefs.h 
     8327 
     8328                else 
     8329                        ac_no_opus=1 
     8330                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: OPUS library not found, OPUS support disabled" >&5 
     8331$as_echo "OPUS library not found, OPUS support disabled" >&6; } 
     8332                        $as_echo "#define PJMEDIA_HAS_OPUS_CODEC 0" >>confdefs.h 
     8333 
     8334                fi 
     8335 
     8336fi 
     8337 
     8338 
    82298339 
    82308340 
Note: See TracChangeset for help on using the changeset viewer.