<p>Alexander Traud has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/8563">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/63/8563/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/configure b/configure<br>index afe61aa..34d1e3a 100755<br>--- a/configure<br>+++ b/configure<br>@@ -24016,9 +24016,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>@@ -24032,27 +24032,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>@@ -24070,8 +24070,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 4b9b830..805b78b 100644<br>--- a/configure.ac<br>+++ b/configure.ac<br>@@ -2181,7 +2181,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 be5bb2b..ba86842 100644<br>--- a/formats/format_ogg_vorbis.c<br>+++ b/formats/format_ogg_vorbis.c<br>@@ -33,6 +33,7 @@<br> <br> #include "asterisk.h"<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/8563">change 8563</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/8563"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </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: 8563 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alexander Traud <pabstraud@compuserve.com> </div>