aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2018-01-18 15:39:52 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2018-01-19 15:06:15 +0100
commite81347f21687642cfd222e59b4402c78c6b5c398 (patch)
treea0bb5c011617738f07540151ba457c201e625a77
parentd1f0a7e927a0915906d13e26c9bbcfd74582d731 (diff)
Allow specifying sysmocom headers explicitly
Add configure option --with-sysmobts=$INCDIR (like for LC1.5). Use to fix the jenkins build to fix the build after migration to stow, where we can no longer use a commin -I to include the sysmobts headers as well. Tweaked-by: neels Change-Id: I0416a9f4c428189cd9c3909c8bd016ca2908128a
-rw-r--r--configure.ac17
-rwxr-xr-xcontrib/jenkins_sysmobts.sh2
-rw-r--r--src/osmo-bts-sysmo/Makefile.am2
3 files changed, 19 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 2181743e..55e3a34f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -67,10 +67,27 @@ AC_ARG_ENABLE(sysmocom-bts,
AC_HELP_STRING([--enable-sysmocom-bts],
[enable code for sysmoBTS L1/PHY [default=no]]),
[enable_sysmocom_bts="yes"],[enable_sysmocom_bts="no"])
+AC_ARG_WITH([sysmobts], [AS_HELP_STRING([--with-sysmobts=INCLUDE_DIR], [Location of the sysmobts API header files, implies --enable-sysmocom-bts])],
+ [sysmobts_incdir="$withval"],[sysmobts_incdir="$incdir"])
+if test "x$sysmobts_incdir" != "x"; then
+ # --with-sysmobts was passed, imply enable_sysmocom_bts
+ enable_sysmocom_bts="yes"
+fi
+if test "x$enable_sysmocom_bts" = "xyes" -a "x$sysmobts_incdir" = "x"; then
+ # --enable-sysmocom-bts was passed but no --with-sysmobts. Use default.
+ sysmobts_incdir="."
+fi
+AC_SUBST([SYSMOBTS_INCDIR], $sysmobts_incdir)
AC_MSG_RESULT([$enable_sysmocom_bts])
AM_CONDITIONAL(ENABLE_SYSMOBTS, test "x$enable_sysmocom_bts" = "xyes")
if test "$enable_sysmocom_bts" = "yes"; then
+ oldCPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS -I$SYSMOBTS_INCDIR -I$srcdir/include"
+ AC_CHECK_HEADER([sysmocom/femtobts/superfemto.h],[],
+ [AC_MSG_ERROR([sysmocom/femtobts/superfemto.h can not be found in $sysmobts_incdir])],
+ [#include <sysmocom/femtobts/superfemto.h>])
PKG_CHECK_MODULES(LIBGPS, libgps)
+ CPPFLAGS=$oldCPPFLAGS
fi
AC_MSG_CHECKING([whether to enable support for osmo-trx based L1/PHY support])
diff --git a/contrib/jenkins_sysmobts.sh b/contrib/jenkins_sysmobts.sh
index 852542bd..3e07050f 100755
--- a/contrib/jenkins_sysmobts.sh
+++ b/contrib/jenkins_sysmobts.sh
@@ -16,7 +16,7 @@ osmo-layer1-headers.sh sysmo "$FIRMWARE_VERSION"
mkdir -p "$inst/include/sysmocom/femtobts"
ln -s $deps/layer1-headers/include/* "$inst/include/sysmocom/femtobts/"
-configure_flags="--enable-sysmocom-bts"
+configure_flags="--enable-sysmocom-bts --with-sysmobts=$inst/include/"
# This will not work for the femtobts
if [ $FIRMWARE_VERSION != "femtobts_v2.7" ]; then
diff --git a/src/osmo-bts-sysmo/Makefile.am b/src/osmo-bts-sysmo/Makefile.am
index 6e917e74..b837d3a3 100644
--- a/src/osmo-bts-sysmo/Makefile.am
+++ b/src/osmo-bts-sysmo/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include
+AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(SYSMOBTS_INCDIR)
AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOCODEC_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(LIBOSMOTRAU_CFLAGS) $(LIBOSMOABIS_CFLAGS) $(LIBOSMOCTRL_CFLAGS) $(LIBOSMOABIS_CFLAGS) $(LIBGPS_CFLAGS) $(ORTP_CFLAGS)
COMMON_LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOCODEC_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) $(LIBOSMOTRAU_LIBS) $(LIBOSMOABIS_LIBS) $(LIBOSMOCTRL_LIBS) $(ORTP_LIBS)