aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2021-02-11 15:38:18 +0100
committerHarald Welte <laforge@osmocom.org>2021-02-11 15:40:54 +0100
commitfa74cc5c68610ce49ddae58542f4a55c08d3fb5a (patch)
treef0051b7b3ec3e4a12dc5147e241abcd951695769
parent637025b2f7e0e4c266a8c30025f56dd7a103e3bc (diff)
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
-rw-r--r--configure.ac15
-rwxr-xr-xcontrib/jenkins.sh2
-rw-r--r--contrib/libosmo-netif.spec.in1
-rw-r--r--debian/control1
-rw-r--r--examples/Makefile.am5
5 files changed, 17 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 36c2f49..1b2a459 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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"])
diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index bf04643..543671c 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -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
diff --git a/contrib/libosmo-netif.spec.in b/contrib/libosmo-netif.spec.in
index 98d021b..95690a7 100644
--- a/contrib/libosmo-netif.spec.in
+++ b/contrib/libosmo-netif.spec.in
@@ -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
diff --git a/debian/control b/debian/control
index d242b48..8b76089 100644
--- a/debian/control
+++ b/debian/control
@@ -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
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 4125243..6d74238 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -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 \