[PATCH] osmo-pcu[master]: Allow specifying sysmocom headers explicitly

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Max gerrit-no-reply at lists.osmocom.org
Mon Jan 15 16:05:11 UTC 2018


Hello Harald Welte, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/5796

to look at the new patch set (#4).

Allow specifying sysmocom headers explicitly

The headers for LC1.5 are specified explicitly. Add corresponding option
to specify sysmoBTS headers location and use it in jenkins build. While
at it, unify header fixup code with the one used in OsmoBTS.

Change-Id: I5248e8b389fd240b4d5a0bcf6c954d6115262462
---
M configure.ac
M contrib/jenkins.sh
M src/Makefile.am
3 files changed, 17 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/96/5796/4

diff --git a/configure.ac b/configure.ac
index 8a8b93c..1e640fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -64,8 +64,19 @@
 		AC_HELP_STRING([--enable-sysmocom-dsp],
 				[enable code for sysmocom DSP [default=no]]),
 		[enable_sysmocom_dsp="$enableval"],[enable_sysmocom_dsp="no"])
+AC_ARG_WITH([sysmocom], [AS_HELP_STRING([--with-sysmocom=INCLUDE_DIR], [Location of the sysmocom API header files])],
+			 [sysmocom_cflags="-I$withval"],[sysmocom_cflags=""])
+AC_SUBST([SYSMOCOM_CFLAGS], $sysmocom_cflags)
 AC_MSG_RESULT([$enable_sysmocom_dsp])
 AM_CONDITIONAL(ENABLE_SYSMODSP, test "x$enable_sysmocom_dsp" = "xyes")
+if test "$enable_sysmocom" = "yes"; then
+	oldCPPFLAGS=$CPPFLAGS
+	CPPFLAGS="$CPPFLAGS $SYSMOCOM_CFLAGS -I$srcdir/include $LIBOSMOCORE_CFLAGS"
+	AC_CHECK_HEADER([sysmocom/femtobts/superfemto.h],[],
+			[AC_MSG_ERROR([sysmocom/femtobts/superfemto.h can not be found using $sysmocom_cflags])],
+			[#include <sysmocom/femtobts/superfemto.h>])
+	CPPFLAGS=$oldCPPFLAGS
+fi
 
 AC_MSG_CHECKING([whether to enable direct PHY access for PDCH of NuRAN Wireless Litecell 1.5 BTS])
 AC_ARG_ENABLE(lc15bts-phy,
diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index b7cfc3d..ec5398e 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -26,15 +26,13 @@
 # Collect configure options for osmo-pcu
 PCU_CONFIG=""
 if [ "$with_dsp" = sysmo ]; then
-  PCU_CONFIG="$PCU_CONFIG --enable-sysmocom-dsp"
+  PCU_CONFIG="$PCU_CONFIG --enable-sysmocom-dsp --with-sysmocom=$deps/layer1-headers/"
 
   # For direct sysmo DSP access, provide the SysmoBTS Layer 1 API
   cd "$deps"
   osmo-layer1-headers.sh sysmo
-  cd layer1-headers
-  api_incl="$inst/include/sysmocom/femtobts/"
-  mkdir -p "$api_incl"
-  cp include/*.h "$api_incl"
+  mkdir -p "$inst/include/sysmocom/femtobts"
+  ln -s $deps/layer1-headers/include/* "$inst/include/sysmocom/femtobts/"
   cd "$base"
 
 elif [ "$with_dsp" = lc15 ]; then
@@ -78,7 +76,7 @@
 
 autoreconf --install --force
 ./configure $PCU_CONFIG
-$MAKE $PARALLEL_MAKE
+$MAKE $PARALLEL_MAKE V=1
 DISTCHECK_CONFIGURE_FLAGS="$PCU_CONFIG" AM_DISTCHECK_CONFIGURE_FLAGS="$PCU_CONFIG" \
   $MAKE distcheck \
   || cat-testlogs.sh
diff --git a/src/Makefile.am b/src/Makefile.am
index a6e98e5..118cfa7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -103,7 +103,8 @@
 osmo_pcu_SOURCES = pcu_main.cpp
 
 if ENABLE_SYSMODSP
-AM_CPPFLAGS += -I$(srcdir)/osmo-bts-sysmo
+AM_CPPFLAGS += $(SYSMOCOM_CFLAGS) -I$(srcdir)/osmo-bts-sysmo
+AM_CFLAGS = $(SYSMOCOM_CFLAGS)
 
 EXTRA_DIST = \
 	osmo-bts-sysmo/sysmo_l1_if.c \

-- 
To view, visit https://gerrit.osmocom.org/5796
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I5248e8b389fd240b4d5a0bcf6c954d6115262462
Gerrit-PatchSet: 4
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list