aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-04-24 18:49:03 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-04-24 19:17:22 +0200
commitf3d7f443a01e2a021a32cdbb402a38fdcedd2fee (patch)
tree7a2823c8395e719867e6b5da11c040cbd1bc0d31 /configure.ac
parente564f0fd846a359944e050a92a5b50c4f2bdf3d0 (diff)
Build one osmo-trx binary for each device support enabled
Same way as we do in osmo-bts. After this commit, osmo-trx no longer exists. Instead, osmo-trx-uhd and osmo-trx-usrp1 are generated based on configure flags enabled. A new flag --with(out)-uhd has been added to enable/disable build of osmo-trx with UHD backend. It is left enabled by default to keep compatibility with older build scripts. Binary with USRP1 backend must still be manually enabled with --with-usrp1 flag. Change-Id: Iea8c0d7434762713a53440d29bf3ebd84accb262
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 7 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 70a8f4b..2b2dab7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -90,6 +90,11 @@ then
LDFLAGS="$LDFLAGS -fsanitize=address -fsanitize=undefined"
fi
+AC_ARG_WITH(uhd, [
+ AS_HELP_STRING([--with-uhd],
+ [enable UHD based transceiver])
+])
+
AC_ARG_WITH(usrp1, [
AS_HELP_STRING([--with-usrp1],
[enable USRP1 gnuradio based transceiver])
@@ -128,7 +133,7 @@ AS_IF([test "x$with_usrp1" = "xyes"], [
PKG_CHECK_MODULES(USRP, usrp >= 3.3)
])
-AS_IF([test "x$with_usrp1" != "xyes"],[
+AS_IF([test "x$with_uhd" != "xno"],[
PKG_CHECK_MODULES(UHD, uhd >= 003.011,
[AC_DEFINE(USE_UHD_3_11, 1, UHD version 3.11.0 or higher)],
[PKG_CHECK_MODULES(UHD, uhd >= 003.009,
@@ -136,7 +141,6 @@ AS_IF([test "x$with_usrp1" != "xyes"],[
[PKG_CHECK_MODULES(UHD, uhd >= 003.005)]
)]
)
- AC_DEFINE(USE_UHD, 1, All UHD versions)
])
AS_IF([test "x$with_singledb" = "xyes"], [
@@ -178,6 +182,7 @@ dnl Check if the compiler supports runtime SIMD detection
CHECK_BUILTIN_SUPPORT([__builtin_cpu_supports],
[Runtime SIMD detection will be disabled])
+AM_CONDITIONAL(DEVICE_UHD, [test "x$with_uhd" != "xno"])
AM_CONDITIONAL(DEVICE_USRP1, [test "x$with_usrp1" = "xyes"])
AM_CONDITIONAL(ARCH_ARM, [test "x$with_neon" = "xyes" || test "x$with_neon_vfpv4" = "xyes"])
AM_CONDITIONAL(ARCH_ARM_A15, [test "x$with_neon_vfpv4" = "xyes"])