<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/7001">View Change</a></p><div style="white-space:pre-wrap">Approvals:
George Joseph: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, but someone else must approve
Matthew Fredrickson: Looks good to me, approved
Jenkins2: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">configure: Add autoconf check for libopusfile.<br><br>This check is being added to make it easier for end-users of third party<br>open source Opus modules. This was removed by ASTERISK-26426 but only<br>the module needed to be removed.<br><br>Change-Id: I62b9cd0c4fa8a77596ab0e042948a643a1152677<br>---<br>M build_tools/menuselect-deps.in<br>M configure<br>M configure.ac<br>M include/asterisk/autoconfig.h.in<br>M makeopts.in<br>5 files changed, 169 insertions(+), 18 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/build_tools/menuselect-deps.in b/build_tools/menuselect-deps.in<br>index b2f73bc..1d25145 100644<br>--- a/build_tools/menuselect-deps.in<br>+++ b/build_tools/menuselect-deps.in<br>@@ -44,6 +44,7 @@<br> OGG=@PBX_OGG@<br> OPENH323=@PBX_OPENH323@<br> OPUS=@PBX_OPUS@<br>+OPUSFILE=@PBX_OPUSFILE@<br> OSPTK=@PBX_OSPTK@<br> OSS=@PBX_OSS@<br> PGSQL=@PBX_PGSQL@<br>diff --git a/configure b/configure<br>index 268347b..d4271af 100755<br>--- a/configure<br>+++ b/configure<br>@@ -984,6 +984,10 @@<br> OSPTK_DIR<br> OSPTK_INCLUDE<br> OSPTK_LIB<br>+PBX_OPUSFILE<br>+OPUSFILE_DIR<br>+OPUSFILE_INCLUDE<br>+OPUSFILE_LIB<br> PBX_OPUS<br> OPUS_DIR<br> OPUS_INCLUDE<br>@@ -1331,7 +1335,6 @@<br> docdir<br> oldincludedir<br> includedir<br>-runstatedir<br> localstatedir<br> sharedstatedir<br> sysconfdir<br>@@ -1407,6 +1410,7 @@<br> with_ogg<br> with_openr2<br> with_opus<br>+with_opusfile<br> with_osptk<br> with_oss<br> with_postgres<br>@@ -1513,7 +1517,6 @@<br> sysconfdir='${prefix}/etc'<br> sharedstatedir='${prefix}/com'<br> localstatedir='${prefix}/var'<br>-runstatedir='${localstatedir}/run'<br> includedir='${prefix}/include'<br> oldincludedir='/usr/include'<br> docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'<br>@@ -1766,15 +1769,6 @@<br> | -silent | --silent | --silen | --sile | --sil)<br> silent=yes ;;<br> <br>- -runstatedir | --runstatedir | --runstatedi | --runstated \<br>- | --runstate | --runstat | --runsta | --runst | --runs \<br>- | --run | --ru | --r)<br>- ac_prev=runstatedir ;;<br>- -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \<br>- | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \<br>- | --run=* | --ru=* | --r=*)<br>- runstatedir=$ac_optarg ;;<br>-<br> -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)<br> ac_prev=sbindir ;;<br> -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \<br>@@ -1912,7 +1906,7 @@<br> for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \<br> datadir sysconfdir sharedstatedir localstatedir includedir \<br> oldincludedir docdir infodir htmldir dvidir pdfdir psdir \<br>- libdir localedir mandir runstatedir<br>+ libdir localedir mandir<br> do<br> eval ac_val=\$$ac_var<br> # Remove trailing slashes.<br>@@ -2065,7 +2059,6 @@<br> --sysconfdir=DIR read-only single-machine data [PREFIX/etc]<br> --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]<br> --localstatedir=DIR modifiable single-machine data [PREFIX/var]<br>- --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]<br> --libdir=DIR object code libraries [EPREFIX/lib]<br> --includedir=DIR C header files [PREFIX/include]<br> --oldincludedir=DIR C header files for non-gcc [/usr/include]<br>@@ -2170,6 +2163,7 @@<br> --with-ogg=PATH use OGG files in PATH<br> --with-openr2=PATH use MFR2 files in PATH<br> --with-opus=PATH use Opus files in PATH<br>+ --with-opusfile=PATH use Opusfile files in PATH<br> --with-osptk=PATH use OSP Toolkit files in PATH<br> --with-oss=PATH use Open Sound System files in PATH<br> --with-postgres=PATH use PostgreSQL files in PATH<br>@@ -11298,6 +11292,38 @@<br> <br> <br> <br>+ OPUSFILE_DESCRIP="Opusfile"<br>+ OPUSFILE_OPTION="opusfile"<br>+ PBX_OPUSFILE=0<br>+<br>+# Check whether --with-opusfile was given.<br>+if test "${with_opusfile+set}" = set; then :<br>+ withval=$with_opusfile;<br>+ case ${withval} in<br>+ n|no)<br>+ USE_OPUSFILE=no<br>+ # -1 is a magic value used by menuselect to know that the package<br>+ # was disabled, other than 'not found'<br>+ PBX_OPUSFILE=-1<br>+ ;;<br>+ y|ye|yes)<br>+ ac_mandatory_list="${ac_mandatory_list} OPUSFILE"<br>+ ;;<br>+ *)<br>+ OPUSFILE_DIR="${withval}"<br>+ ac_mandatory_list="${ac_mandatory_list} OPUSFILE"<br>+ ;;<br>+ esac<br>+<br>+fi<br>+<br>+<br>+<br>+<br>+<br>+<br>+<br>+<br> OSPTK_DESCRIP="OSP Toolkit"<br> OSPTK_OPTION="osptk"<br> PBX_OSPTK=0<br>@@ -14720,7 +14746,7 @@<br> We can't simply define LARGE_OFF_T to be 9223372036854775807,<br> since some C++ compilers masquerading as C compilers<br> incorrectly reject 9223372036854775807. */<br>-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))<br>+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))<br> int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721<br> && LARGE_OFF_T % 2147483647 == 1)<br> ? 1 : -1];<br>@@ -14766,7 +14792,7 @@<br> We can't simply define LARGE_OFF_T to be 9223372036854775807,<br> since some C++ compilers masquerading as C compilers<br> incorrectly reject 9223372036854775807. */<br>-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))<br>+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))<br> int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721<br> && LARGE_OFF_T % 2147483647 == 1)<br> ? 1 : -1];<br>@@ -14790,7 +14816,7 @@<br> We can't simply define LARGE_OFF_T to be 9223372036854775807,<br> since some C++ compilers masquerading as C compilers<br> incorrectly reject 9223372036854775807. */<br>-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))<br>+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))<br> int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721<br> && LARGE_OFF_T % 2147483647 == 1)<br> ? 1 : -1];<br>@@ -14835,7 +14861,7 @@<br> We can't simply define LARGE_OFF_T to be 9223372036854775807,<br> since some C++ compilers masquerading as C compilers<br> incorrectly reject 9223372036854775807. */<br>-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))<br>+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))<br> int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721<br> && LARGE_OFF_T % 2147483647 == 1)<br> ? 1 : -1];<br>@@ -14859,7 +14885,7 @@<br> We can't simply define LARGE_OFF_T to be 9223372036854775807,<br> since some C++ compilers masquerading as C compilers<br> incorrectly reject 9223372036854775807. */<br>-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))<br>+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))<br> int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721<br> && LARGE_OFF_T % 2147483647 == 1)<br> ? 1 : -1];<br>@@ -29846,6 +29872,116 @@<br> fi<br> <br> <br>+# opusfile.h includes <opus_multistream.h> so we need to make sure that<br>+# either $OPUS_INCLUDE or /usr/include/opus is added to the search path.<br>+__opus_include=${OPUS_INCLUDE}<br>+if test -z "$__opus_include" -o x"$__opus_include" = x" " ; then<br>+ __opus_include=-I/usr/include/opus<br>+fi<br>+<br>+if test "x${PBX_OPUSFILE}" != "x1" -a "${USE_OPUSFILE}" != "no"; then<br>+ pbxlibdir=""<br>+ # if --with-OPUSFILE=DIR has been specified, use it.<br>+ if test "x${OPUSFILE_DIR}" != "x"; then<br>+ if test -d ${OPUSFILE_DIR}/lib; then<br>+ pbxlibdir="-L${OPUSFILE_DIR}/lib"<br>+ else<br>+ pbxlibdir="-L${OPUSFILE_DIR}"<br>+ fi<br>+ fi<br>+ pbxfuncname="op_open_callbacks"<br>+ if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers<br>+ AST_OPUSFILE_FOUND=yes<br>+ else<br>+ ast_ext_lib_check_save_CFLAGS="${CFLAGS}"<br>+ CFLAGS="${CFLAGS} $__opus_include"<br>+ as_ac_Lib=`$as_echo "ac_cv_lib_opusfile_${pbxfuncname}" | $as_tr_sh`<br>+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lopusfile" >&5<br>+$as_echo_n "checking for ${pbxfuncname} in -lopusfile... " >&6; }<br>+if eval \${$as_ac_Lib+:} false; then :<br>+ $as_echo_n "(cached) " >&6<br>+else<br>+ ac_check_lib_save_LIBS=$LIBS<br>+LIBS="-lopusfile ${pbxlibdir} $LIBS"<br>+cat confdefs.h - <<_ACEOF >conftest.$ac_ext<br>+/* end confdefs.h. */<br>+<br>+/* Override any GCC internal prototype to avoid an error.<br>+ Use char because int might match the return type of a GCC<br>+ builtin and then its argument prototype would still apply. */<br>+#ifdef __cplusplus<br>+extern "C"<br>+#endif<br>+char ${pbxfuncname} ();<br>+int<br>+main ()<br>+{<br>+return ${pbxfuncname} ();<br>+ ;<br>+ return 0;<br>+}<br>+_ACEOF<br>+if ac_fn_c_try_link "$LINENO"; then :<br>+ eval "$as_ac_Lib=yes"<br>+else<br>+ eval "$as_ac_Lib=no"<br>+fi<br>+rm -f core conftest.err conftest.$ac_objext \<br>+ conftest$ac_exeext conftest.$ac_ext<br>+LIBS=$ac_check_lib_save_LIBS<br>+fi<br>+eval ac_res=\$$as_ac_Lib<br>+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5<br>+$as_echo "$ac_res" >&6; }<br>+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :<br>+ AST_OPUSFILE_FOUND=yes<br>+else<br>+ AST_OPUSFILE_FOUND=no<br>+fi<br>+<br>+ CFLAGS="${ast_ext_lib_check_save_CFLAGS}"<br>+ fi<br>+<br>+ # now check for the header.<br>+ if test "${AST_OPUSFILE_FOUND}" = "yes"; then<br>+ OPUSFILE_LIB="${pbxlibdir} -lopusfile "<br>+ # if --with-OPUSFILE=DIR has been specified, use it.<br>+ if test "x${OPUSFILE_DIR}" != "x"; then<br>+ OPUSFILE_INCLUDE="-I${OPUSFILE_DIR}/include"<br>+ fi<br>+ OPUSFILE_INCLUDE="${OPUSFILE_INCLUDE} $__opus_include"<br>+ if test "xopus/opusfile.h" = "x" ; then # no header, assume found<br>+ OPUSFILE_HEADER_FOUND="1"<br>+ else # check for the header<br>+ ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"<br>+ CPPFLAGS="${CPPFLAGS} ${OPUSFILE_INCLUDE}"<br>+ ac_fn_c_check_header_mongrel "$LINENO" "opus/opusfile.h" "ac_cv_header_opus_opusfile_h" "$ac_includes_default"<br>+if test "x$ac_cv_header_opus_opusfile_h" = xyes; then :<br>+ OPUSFILE_HEADER_FOUND=1<br>+else<br>+ OPUSFILE_HEADER_FOUND=0<br>+fi<br>+<br>+<br>+ CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"<br>+ fi<br>+ if test "x${OPUSFILE_HEADER_FOUND}" = "x0" ; then<br>+ OPUSFILE_LIB=""<br>+ OPUSFILE_INCLUDE=""<br>+ else<br>+ if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library<br>+ OPUSFILE_LIB=""<br>+ fi<br>+ PBX_OPUSFILE=1<br>+ cat >>confdefs.h <<_ACEOF<br>+#define HAVE_OPUSFILE 1<br>+_ACEOF<br>+<br>+ fi<br>+ fi<br>+fi<br>+<br>+<br> <br> if test "${USE_PWLIB}" != "no"; then<br> if test -n "${PWLIB_DIR}"; then<br>diff --git a/configure.ac b/configure.ac<br>index ea6bef1..da04005 100644<br>--- a/configure.ac<br>+++ b/configure.ac<br>@@ -503,6 +503,7 @@<br> AST_EXT_LIB_SETUP([OGG], [OGG], [ogg])<br> AST_EXT_LIB_SETUP([OPENR2], [MFR2], [openr2])<br> AST_EXT_LIB_SETUP([OPUS], [Opus], [opus])<br>+AST_EXT_LIB_SETUP([OPUSFILE], [Opusfile], [opusfile])<br> AST_EXT_LIB_SETUP([OSPTK], [OSP Toolkit], [osptk])<br> AST_EXT_LIB_SETUP([OSS], [Open Sound System], [oss])<br> AST_EXT_LIB_SETUP([PGSQL], [PostgreSQL], [postgres])<br>@@ -2309,6 +2310,13 @@<br> AST_EXT_LIB_CHECK([OPENR2], [openr2], [openr2_chan_new], [openr2.h])<br> <br> AST_EXT_LIB_CHECK([OPUS], [opus], [opus_encoder_create], [opus/opus.h])<br>+# opusfile.h includes <opus_multistream.h> so we need to make sure that<br>+# either $OPUS_INCLUDE or /usr/include/opus is added to the search path.<br>+__opus_include=${OPUS_INCLUDE}<br>+if test -z "$__opus_include" -o x"$__opus_include" = x" " ; then<br>+ __opus_include=-I/usr/include/opus<br>+fi<br>+AST_EXT_LIB_CHECK([OPUSFILE], [opusfile], [op_open_callbacks], [opus/opusfile.h], [], [$__opus_include])<br> <br> if test "${USE_PWLIB}" != "no"; then<br> if test -n "${PWLIB_DIR}"; then<br>diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in<br>index b0b8e82..d142fe9 100644<br>--- a/include/asterisk/autoconfig.h.in<br>+++ b/include/asterisk/autoconfig.h.in<br>@@ -567,6 +567,9 @@<br> /* Define to 1 if you have the Opus library. */<br> #undef HAVE_OPUS<br> <br>+/* Define to 1 if you have the Opusfile library. */<br>+#undef HAVE_OPUSFILE<br>+<br> /* Define this to indicate the ${OSPTK_DESCRIP} library */<br> #undef HAVE_OSPTK<br> <br>diff --git a/makeopts.in b/makeopts.in<br>index 1050c91..b79df04 100644<br>--- a/makeopts.in<br>+++ b/makeopts.in<br>@@ -229,6 +229,9 @@<br> OPUS_INCLUDE=@OPUS_INCLUDE@<br> OPUS_LIB=@OPUS_LIB@<br> <br>+OPUSFILE_INCLUDE=@OPUSFILE_INCLUDE@<br>+OPUSFILE_LIB=@OPUSFILE_LIB@<br>+<br> OSPTK_INCLUDE=@OSPTK_INCLUDE@<br> OSPTK_LIB=@OSPTK_LIB@<br> <br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7001">change 7001</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/7001"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I62b9cd0c4fa8a77596ab0e042948a643a1152677 </div>
<div style="display:none"> Gerrit-Change-Number: 7001 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Matthew Fredrickson <creslin@digium.com> </div>