<p>Alexander Traud has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/8565">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">BuildSystem: Check for header file of OGG.<br><br>Asterisk uses various symbols of the shared library libogg within the module<br>format_ogg_vorbis. However, the source code of that module did not include the<br>header file of libogg explicitly but implicitly. Because that header was not<br>included before Asterisk 14, the script ./configure was told not to check for<br>it.<br><br>Anyway, even Asterisk 13 LTS uses symbols of libogg. Therefore, that header<br>should be included explicitly. Therefore, ./configure should check for that<br>header.<br><br>Change-Id: I98c50d56311b68880d1084fcc62c35ab2f8692db<br>---<br>M configure<br>M configure.ac<br>M formats/format_ogg_vorbis.c<br>3 files changed, 24 insertions(+), 13 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/65/8565/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/configure b/configure<br>index eeb7467..52f2392 100755<br>--- a/configure<br>+++ b/configure<br>@@ -23568,9 +23568,9 @@<br> <br>       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"<br>       CFLAGS="${CFLAGS} "<br>-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ogg_sync_init in -logg" >&5<br>-$as_echo_n "checking for ogg_sync_init in -logg... " >&6; }<br>-if ${ac_cv_lib_ogg_ogg_sync_init+:} false; then :<br>+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ogg_stream_init in -logg" >&5<br>+$as_echo_n "checking for ogg_stream_init in -logg... " >&6; }<br>+if ${ac_cv_lib_ogg_ogg_stream_init+:} false; then :<br>   $as_echo_n "(cached) " >&6<br> else<br>   ac_check_lib_save_LIBS=$LIBS<br>@@ -23584,27 +23584,27 @@<br> #ifdef __cplusplus<br> extern "C"<br> #endif<br>-char ogg_sync_init ();<br>+char ogg_stream_init ();<br> int<br> main ()<br> {<br>-return ogg_sync_init ();<br>+return ogg_stream_init ();<br>   ;<br>   return 0;<br> }<br> _ACEOF<br> if ac_fn_c_try_link "$LINENO"; then :<br>-  ac_cv_lib_ogg_ogg_sync_init=yes<br>+  ac_cv_lib_ogg_ogg_stream_init=yes<br> else<br>-  ac_cv_lib_ogg_ogg_sync_init=no<br>+  ac_cv_lib_ogg_ogg_stream_init=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>-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ogg_ogg_sync_init" >&5<br>-$as_echo "$ac_cv_lib_ogg_ogg_sync_init" >&6; }<br>-if test "x$ac_cv_lib_ogg_ogg_sync_init" = xyes; then :<br>+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ogg_ogg_stream_init" >&5<br>+$as_echo "$ac_cv_lib_ogg_ogg_stream_init" >&6; }<br>+if test "x$ac_cv_lib_ogg_ogg_stream_init" = xyes; then :<br>   AST_OGG_FOUND=yes<br> else<br>   AST_OGG_FOUND=no<br>@@ -23622,8 +23622,18 @@<br>       fi<br>       OGG_INCLUDE="${OGG_INCLUDE} "<br> <br>-         # no header, assume found<br>-         OGG_HEADER_FOUND="1"<br>+         # check for the header<br>+         ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"<br>+         CPPFLAGS="${CPPFLAGS} ${OGG_INCLUDE}"<br>+         ac_fn_c_check_header_mongrel "$LINENO" "ogg/ogg.h" "ac_cv_header_ogg_ogg_h" "$ac_includes_default"<br>+if test "x$ac_cv_header_ogg_ogg_h" = xyes; then :<br>+  OGG_HEADER_FOUND=1<br>+else<br>+  OGG_HEADER_FOUND=0<br>+fi<br>+<br>+<br>+         CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"<br> <br>       if test "x${OGG_HEADER_FOUND}" = "x0" ; then<br>          OGG_LIB=""<br>diff --git a/configure.ac b/configure.ac<br>index c920bae..bc243de 100644<br>--- a/configure.ac<br>+++ b/configure.ac<br>@@ -2141,7 +2141,7 @@<br> <br> AST_EXT_LIB_CHECK([UNIXODBC], [odbc], [SQLConnect], [sql.h], [])<br> <br>-AST_EXT_LIB_CHECK([OGG], [ogg], [ogg_sync_init], [])<br>+AST_EXT_LIB_CHECK([OGG], [ogg], [ogg_stream_init], [ogg/ogg.h])<br> <br> # Non-glibc platforms require libexecinfo for backtrace support<br> AST_EXT_LIB_CHECK([BKTR], [execinfo], [backtrace], [execinfo.h])<br>diff --git a/formats/format_ogg_vorbis.c b/formats/format_ogg_vorbis.c<br>index cb0798a..9d906e0 100644<br>--- a/formats/format_ogg_vorbis.c<br>+++ b/formats/format_ogg_vorbis.c<br>@@ -35,6 +35,7 @@<br> <br> ASTERISK_FILE_VERSION(__FILE__, "$Revision$")<br> <br>+#include <ogg/ogg.h><br> #include <vorbis/codec.h><br> #include <vorbis/vorbisenc.h><br> #include <vorbis/vorbisfile.h><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/8565">change 8565</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/8565"/><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: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I98c50d56311b68880d1084fcc62c35ab2f8692db </div>
<div style="display:none"> Gerrit-Change-Number: 8565 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alexander Traud <pabstraud@compuserve.com> </div>