configure: link against libsctp

osmo-hnodeb calls sctp_recvmsg directly, which is provided by libsctp.
Hence, we need to depend and link on it.

Change-Id: I793d6fe8601cf9a8dd72bf6884b469204b513c11
This commit is contained in:
Pau Espin 2021-10-29 18:31:01 +02:00
parent 7fece4d7e8
commit 18ac28abd6
2 changed files with 11 additions and 0 deletions

View File

@ -44,6 +44,16 @@ m4_ifdef([AX_CHECK_COMPILE_FLAG], [], [
dnl checks for libraries
AC_SEARCH_LIBS([dlopen], [dl dld], [LIBRARY_DL="$LIBS";LIBS=""])
AC_SUBST(LIBRARY_DL)
old_LIBS=$LIBS
AC_SEARCH_LIBS([sctp_recvmsg], [sctp], [
AC_DEFINE(HAVE_LIBSCTP, 1, [Define 1 to enable SCTP support])
AC_SUBST(HAVE_LIBSCTP, [1])
if test -n "$ac_lib"; then
AC_SUBST(LIBSCTP_LIBS, [-l$ac_lib])
fi
], [
AC_MSG_ERROR([sctp_recvmsg not found in searched libs])])
LIBS=$old_LIBS
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.5.0)
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.5.0)

View File

@ -37,4 +37,5 @@ osmo_hnodeb_LDADD = \
$(COVERAGE_LDFLAGS) \
$(LIBOSMOABIS_LIBS) \
$(LIBOSMOSIGTRAN_LIBS) \
$(LIBSCTP_LIBS) \
$(NULL)