Don't depend on libosmo-abis (by default)

The only reason we have a libosmo-netif -> libosmo-abis
dependency is the lapd examples whihc are built but not even installed.

Let's build those only if --enable-lapd-examples is specified at the
command line, and remove the dependency to libosmo-abis in all other
cases.

Change-Id: Ida8157cd9111b196e4bf08782c45d0e3d393f1c9
Closes: OS#4726
This commit is contained in:
Harald Welte 2021-02-11 15:38:18 +01:00
parent 637025b2f7
commit fa74cc5c68
5 changed files with 17 additions and 7 deletions

View File

@ -91,8 +91,19 @@ AM_CONFIG_HEADER(config.h)
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.3.0)
PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.3.0)
dnl FIXME: We depend on libosmoabis by now until we can move LAPD code here
PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 0.6.0)
AC_ARG_ENABLE([lapd_examples],
[AS_HELP_STRING(
[--enable-lapd-examples],
[Build some lapd examples]
)],
[lapd_examples=$enableval], [lapd_examples="no"])
AS_IF([test "x$lapd_examples" = "xyes"], [
PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 0.6.0)
AC_DEFINE([ENABLE_LAPD], [1], [Enable LAPD examples])
])
AM_CONDITIONAL(ENABLE_LAPD, test "x$lapd_examples" = "xyes")
AC_SUBST(ENABLE_LAPD)
AC_ARG_ENABLE([libsctp], [AS_HELP_STRING([--disable-libsctp], [Do not enable socket multiaddr APIs requiring libsctp])],
[ENABLE_LIBSCTP=$enableval], [ENABLE_LIBSCTP="yes"])

View File

@ -35,7 +35,7 @@ echo
set -x
autoreconf --install --force
./configure --enable-sanitize --enable-werror
./configure --enable-sanitize --enable-werror --enable-lapd-examples
$MAKE $PARALLEL_MAKE
$MAKE $PARALLEL_MAKE distcheck \
|| cat-testlogs.sh

View File

@ -24,7 +24,6 @@ BuildRequires: automake
BuildRequires: libtool >= 2
BuildRequires: lksctp-tools-devel
BuildRequires: pkgconfig >= 0.20
BuildRequires: pkgconfig(libosmoabis) >= 0.6.0
BuildRequires: pkgconfig(libosmocore) >= 1.0.0
BuildRequires: pkgconfig(libosmogsm) >= 1.0.0

1
debian/control vendored
View File

@ -12,7 +12,6 @@ Build-Depends: debhelper (>= 9),
git,
doxygen,
libosmocore-dev (>= 1.3.0),
libosmo-abis-dev (>= 0.6.0),
pkg-config,
libpcap0.8-dev,
libsctp-dev

View File

@ -4,8 +4,6 @@ AM_LDFLAGS = $(COVERAGE_LDFLAGS)
noinst_PROGRAMS = ipa-stream-client \
ipa-stream-server \
lapd-over-datagram-user \
lapd-over-datagram-network \
stream-client \
stream-server \
rs232-read \
@ -27,6 +25,8 @@ ipa_stream_server_SOURCES = ipa-stream-server.c
ipa_stream_server_LDADD = $(top_builddir)/src/libosmonetif.la \
$(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS)
if ENABLE_LAPD
noinst_PROGRAMS += lapd-over-datagram-user lapd-over-datagram-network
lapd_over_datagram_user_SOURCES = lapd-over-datagram-user.c
lapd_over_datagram_user_LDADD = $(top_builddir)/src/libosmonetif.la \
$(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) \
@ -36,6 +36,7 @@ lapd_over_datagram_network_SOURCES = lapd-over-datagram-network.c
lapd_over_datagram_network_LDADD = $(top_builddir)/src/libosmonetif.la \
$(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) \
$(LIBOSMOABIS_LIBS)
endif
stream_client_SOURCES = stream-client.c
stream_client_LDADD = $(top_builddir)/src/libosmonetif.la \