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.ac

    r5199 r5239  
    17621762              ]) 
    17631763 
     1764dnl # Do not use default OPUS installation if we are cross-compiling 
     1765if test "x$ac_cross_compile" != "x" -a "x$with_opus" = "xno"; then 
     1766    enable_opus=no 
     1767fi 
     1768 
     1769dnl # OPUS prefix 
     1770AC_ARG_WITH(opus, 
     1771    AC_HELP_STRING([--with-opus=DIR], 
     1772                   [Specify alternate OPUS prefix]), 
     1773    [], 
     1774    [with_opus=no] 
     1775    ) 
     1776 
     1777dnl # Include OPUS support 
     1778AC_SUBST(ac_no_opus) 
     1779AC_ARG_ENABLE(opus, 
     1780              AC_HELP_STRING([--disable-opus], 
     1781                             [Exclude OPUS support from the build (default: autodetect)]) 
     1782              , 
     1783              [ 
     1784                if test "$enable_opus" = "no"; then 
     1785                 [ac_no_opus=1] 
     1786                 AC_DEFINE(PJMEDIA_HAS_OPUS_CODEC,0) 
     1787                 AC_MSG_RESULT([Checking if OPUS support is disabled... yes]) 
     1788                fi 
     1789              ], 
     1790              [ 
     1791                AC_MSG_RESULT([checking for OPUS installations..]) 
     1792                if test "x$with_opus" != "xno" -a "x$with_opus" != "x"; then 
     1793                    CFLAGS="$CFLAGS -I$with_opus/include" 
     1794                    CPPFLAGS="$CPPFLAGS -I$with_opus/include" 
     1795                    LDFLAGS="$LDFLAGS -L$with_opus/lib" 
     1796                    AC_MSG_RESULT([Using OPUS prefix... $with_opus]) 
     1797                fi 
     1798                AC_SUBST(opus_h_present) 
     1799                AC_SUBST(opus_present) 
     1800                AC_CHECK_HEADER(opus/opus.h,[opus_h_present=1]) 
     1801                AC_CHECK_LIB(opus,opus_repacketizer_get_size,[opus_present=1 && LIBS="$LIBS -lopus"]) 
     1802                if test "x$opus_h_present" = "x1" -a "x$opus_present" = "x1"; then 
     1803                        AC_MSG_RESULT([OPUS library found, OPUS support enabled]) 
     1804                        AC_DEFINE(PJMEDIA_HAS_OPUS_CODEC,1) 
     1805                else 
     1806                        [ac_no_opus=1] 
     1807                        AC_MSG_RESULT([OPUS library not found, OPUS support disabled]) 
     1808                        AC_DEFINE(PJMEDIA_HAS_OPUS_CODEC,0) 
     1809                fi 
     1810              ]) 
     1811 
    17641812 
    17651813dnl ########################################## 
Note: See TracChangeset for help on using the changeset viewer.