<p>laforge <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/15871">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  roox: Looks good to me, approved
  laforge: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">configure: Introduce --disable-libsctp and error by default if libsctp not found<br><br>This way libosmocore build fails during configuring phase if expected<br>default behavior (building with libsctp support enabled and providing<br>osmo_sock_init2_multiaddr() API) fails. User is still provided with<br>--disable-libsctp option in case he doesn't need those features or his<br>environment doesn't provide required libsctp APIs.<br><br>Change-Id: I710c9cb1c6da0e5fc94b792df8bf60194a72208f<br>---<br>M configure.ac<br>M contrib/jenkins_arm.sh<br>2 files changed, 18 insertions(+), 11 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/configure.ac b/configure.ac</span><br><span>index 2f12d86..6c54e66 100644</span><br><span>--- a/configure.ac</span><br><span>+++ b/configure.ac</span><br><span>@@ -100,17 +100,6 @@</span><br><span> </span><br><span> AC_CHECK_FUNCS(clock_gettime localtime_r)</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-old_LIBS=$LIBS</span><br><span style="color: hsl(0, 100%, 40%);">-AC_SEARCH_LIBS([sctp_bindx], [sctp], [</span><br><span style="color: hsl(0, 100%, 40%);">-      AC_DEFINE(HAVE_LIBSCTP, 1, [Define 1 to enable SCTP support])</span><br><span style="color: hsl(0, 100%, 40%);">-   AC_SUBST(HAVE_LIBSCTP, [1])</span><br><span style="color: hsl(0, 100%, 40%);">-     if test -n "$ac_lib"; then</span><br><span style="color: hsl(0, 100%, 40%);">-            AC_SUBST(LIBSCTP_LIBS, [-l$ac_lib])</span><br><span style="color: hsl(0, 100%, 40%);">-     fi</span><br><span style="color: hsl(0, 100%, 40%);">-      ], [</span><br><span style="color: hsl(0, 100%, 40%);">-    AC_MSG_WARN([sctp_bindx not found in searched libs])])</span><br><span style="color: hsl(0, 100%, 40%);">-LIBS=$old_LIBS</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span> AC_DEFUN([CHECK_TM_INCLUDES_TM_GMTOFF], [</span><br><span>   AC_CACHE_CHECK(</span><br><span>     [whether struct tm has tm_gmtoff member],</span><br><span>@@ -171,6 +160,22 @@</span><br><span>       AC_DEFINE([USE_GNUTLS], [1], [Use GnuTLS as a fallback for missing getrandom()])</span><br><span> fi</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+AC_ARG_ENABLE([libsctp], [AS_HELP_STRING([--disable-libsctp], [Do not enable socket multiaddr APIs requiring libsctp])],</span><br><span style="color: hsl(120, 100%, 40%);">+  [ENABLE_LIBSCTP=$enableval], [ENABLE_LIBSCTP="yes"])</span><br><span style="color: hsl(120, 100%, 40%);">+AM_CONDITIONAL(ENABLE_LIBSCTP, test x"$ENABLE_LIBSCTP" = x"yes")</span><br><span style="color: hsl(120, 100%, 40%);">+AS_IF([test "x$ENABLE_LIBSCTP" = "xyes"], [</span><br><span style="color: hsl(120, 100%, 40%);">+ old_LIBS=$LIBS</span><br><span style="color: hsl(120, 100%, 40%);">+        AC_SEARCH_LIBS([sctp_bindx], [sctp], [</span><br><span style="color: hsl(120, 100%, 40%);">+                AC_DEFINE(HAVE_LIBSCTP, 1, [Define 1 to enable SCTP support])</span><br><span style="color: hsl(120, 100%, 40%);">+         AC_SUBST(HAVE_LIBSCTP, [1])</span><br><span style="color: hsl(120, 100%, 40%);">+           if test -n "$ac_lib"; then</span><br><span style="color: hsl(120, 100%, 40%);">+                  AC_SUBST(LIBSCTP_LIBS, [-l$ac_lib])</span><br><span style="color: hsl(120, 100%, 40%);">+           fi</span><br><span style="color: hsl(120, 100%, 40%);">+            ], [</span><br><span style="color: hsl(120, 100%, 40%);">+          AC_MSG_ERROR([sctp_bindx not found in searched libs])])</span><br><span style="color: hsl(120, 100%, 40%);">+       LIBS=$old_LIBS</span><br><span style="color: hsl(120, 100%, 40%);">+])</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> AC_ARG_ENABLE(plugin,</span><br><span>        [AS_HELP_STRING(</span><br><span>             [--disable-plugin],</span><br><span>@@ -279,6 +284,7 @@</span><br><span>    AM_CONDITIONAL(ENABLE_UTILITIES, false)</span><br><span>      AM_CONDITIONAL(ENABLE_GB, false)</span><br><span>     AM_CONDITIONAL(ENABLE_GNUTLS, false)</span><br><span style="color: hsl(120, 100%, 40%);">+  AM_CONDITIONAL(ENABLE_LIBSCTP, false)</span><br><span>        AM_CONDITIONAL(ENABLE_PCSC, false)</span><br><span>   AM_CONDITIONAL(ENABLE_PSEUDOTALLOC, true)</span><br><span>    AM_CONDITIONAL(ENABLE_SERCOM_STUB, true)</span><br><span>diff --git a/contrib/jenkins_arm.sh b/contrib/jenkins_arm.sh</span><br><span>index e3a6cd1..8ee90f0 100755</span><br><span>--- a/contrib/jenkins_arm.sh</span><br><span>+++ b/contrib/jenkins_arm.sh</span><br><span>@@ -18,6 +18,7 @@</span><br><span>    --enable-embedded \</span><br><span>  --disable-doxygen \</span><br><span>  --disable-shared \</span><br><span style="color: hsl(120, 100%, 40%);">+    --disable-libsctp \</span><br><span>  --enable-external-tests \</span><br><span>    CFLAGS="-Os -ffunction-sections -fdata-sections -nostartfiles -nodefaultlibs $WERROR_FLAGS"</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/15871">change 15871</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/c/libosmocore/+/15871"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I710c9cb1c6da0e5fc94b792df8bf60194a72208f </div>
<div style="display:none"> Gerrit-Change-Number: 15871 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: roox <mardnh@gmx.de> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>