lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/41307?usp=email )
Change subject: build-system: depend on libosmo-asn1-tcap ......................................................................
build-system: depend on libosmo-asn1-tcap
To support tcap based loadsharing, tcap must be decoded.
Co-authored-by: Daniel Willmann dwillmann@sysmocom.de Related: SYS#5423 Change-Id: Ib485f786217166635377f931ab894e43a0680634 --- M configure.ac M contrib/jenkins.sh M libosmo-sigtran.pc.in M src/Makefile.am 4 files changed, 29 insertions(+), 1 deletion(-)
Approvals: pespin: Looks good to me, but someone else must approve lynxis lazus: Looks good to me, approved Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve
diff --git a/configure.ac b/configure.ac index 37489b8..c26ad5d 100644 --- a/configure.ac +++ b/configure.ac @@ -41,6 +41,18 @@ PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.11.0) PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 1.6.0)
+# TCAP loadsharing +AC_ARG_ENABLE([tcap-loadsharing], [AS_HELP_STRING([--enable-tcap-loadsharing], [Build with TCAP loadsharing. Requires libosmo-asn1-tcap [default=no]])], + [osmo_ac_tcap="$enableval"],[osmo_ac_tcap="no"]) +if test "x$osmo_ac_tcap" = "xyes" ; then + PKG_CHECK_MODULES(LIBOSMOASN1TCAP, libosmo-asn1-tcap) + AC_DEFINE(WITH_TCAP_LOADSHARING, 1, [Define to build with TCAP LOADSHARING]) + AC_SUBST(TCAP_LIBS_PC, [libosmo-asn1-tcap]) +fi +AC_MSG_CHECKING([whether to enable tcap loadsharing]) +AC_MSG_RESULT([$osmo_ac_tcap]) +AM_CONDITIONAL(BUILD_WITH_TCAP_LOADSHARING, test "x$osmo_ac_tcap" = "xyes") + old_LIBS=$LIBS AC_SEARCH_LIBS([sctp_recvmsg], [sctp], [ AC_DEFINE(HAVE_LIBSCTP, 1, [Define 1 to enable SCTP support]) diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 3ea3813..6976ed9 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -38,6 +38,11 @@ CONFIG="--enable-manuals" fi
+if [ "$WITH_TCAP" = "1" ]; then + osmo-build-dep.sh libosmo-asn1-tcap + CONFIG="$CONFIG --enable-tcap-loadsharing" +fi + set +x echo echo diff --git a/libosmo-sigtran.pc.in b/libosmo-sigtran.pc.in index afdbce5..594a1ee 100644 --- a/libosmo-sigtran.pc.in +++ b/libosmo-sigtran.pc.in @@ -8,4 +8,5 @@ Version: @VERSION@ Libs: -L${libdir} -losmo-sigtran Cflags: -I${includedir}/ -Requires.private: libosmo-netif libosmocore +Requires.private: @TCAP_LIBS_PC@ libosmo-netif libosmocore + diff --git a/src/Makefile.am b/src/Makefile.am index 0dc965e..62c7e9d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -95,3 +95,13 @@ $(LIBOSMOCORE_LIBS) \ $(LIBSCTP_LIBS) \ $(NULL) + +if BUILD_WITH_TCAP_LOADSHARING +AM_CFLAGS += \ + $(LIBOSMOASN1TCAP_CFLAGS) + $(NULL) + +libosmo_sigtran_la_LIBADD += \ + $(LIBOSMOASN1TCAP_LIBS) \ + $(NULL) +endif