<p>Harald Welte <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/10553">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">configure: Find correct libgsm's gsm.h header<br><br>Some distributions (archlinux) or versions of libgsm install gsm.h in<br>/usr/include/gsm/gsm.h<br><br>Since libgsm doesn't come with a pkfconfig, let's first check if gsm.h<br>and take the correct path in the build setup.<br><br>Backport from osmo-mgw.git<br><br>Change-Id: I07d3c03903e0d4bb80e843c7ed917a27b791ea53<br>---<br>M openbsc/configure.ac<br>M openbsc/include/openbsc/mgcp_transcode.h<br>2 files changed, 11 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/openbsc/configure.ac b/openbsc/configure.ac</span><br><span>index ae9e69e..c3615d6 100644</span><br><span>--- a/openbsc/configure.ac</span><br><span>+++ b/openbsc/configure.ac</span><br><span>@@ -81,6 +81,13 @@</span><br><span> AC_ARG_WITH([g729], [AS_HELP_STRING([--with-g729], [Enable G.729 encoding/decoding.])], [osmo_ac_with_g729="$withval"],[osmo_ac_with_g729="no"])</span><br><span> </span><br><span> if test "$osmo_ac_mgcp_transcoding" = "yes" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+    AC_CHECK_HEADERS([gsm.h gsm/gsm.h], [osmo_ac_found_gsm_headers=yes])</span><br><span style="color: hsl(120, 100%, 40%);">+    if test "$osmo_ac_found_gsm_headers" != "yes" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+        AC_MSG_ERROR([Unable to find the libgsm headers])</span><br><span style="color: hsl(120, 100%, 40%);">+    fi</span><br><span style="color: hsl(120, 100%, 40%);">+    AC_SUBST(HAVE_GSM_H)</span><br><span style="color: hsl(120, 100%, 40%);">+    AC_SUBST(HAVE_GSM_GSM_H)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>     AC_SEARCH_LIBS([gsm_create], [gsm], [LIBRARY_GSM="$LIBS";LIBS=""], [AC_MSG_ERROR([--enable-mgcp-transcoding: cannot find usable libgsm])])</span><br><span>     AC_SUBST(LIBRARY_GSM)</span><br><span>     if test "$osmo_ac_with_g729" = "yes" ; then</span><br><span>diff --git a/openbsc/include/openbsc/mgcp_transcode.h b/openbsc/include/openbsc/mgcp_transcode.h</span><br><span>index 147e48b..6892deb 100644</span><br><span>--- a/openbsc/include/openbsc/mgcp_transcode.h</span><br><span>+++ b/openbsc/include/openbsc/mgcp_transcode.h</span><br><span>@@ -21,7 +21,11 @@</span><br><span> </span><br><span> #include "bscconfig.h"</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+#if HAVE_GSM_H</span><br><span> #include <gsm.h></span><br><span style="color: hsl(120, 100%, 40%);">+#elif HAVE_GSM_GSM_H</span><br><span style="color: hsl(120, 100%, 40%);">+#include <gsm/gsm.h></span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span> #ifdef HAVE_BCG729</span><br><span> #include <bcg729/decoder.h></span><br><span> #include <bcg729/encoder.h></span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/10553">change 10553</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.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.osmocom.org/10553"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: openbsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I07d3c03903e0d4bb80e843c7ed917a27b791ea53 </div>
<div style="display:none"> Gerrit-Change-Number: 10553 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>