diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 17 |
1 files changed, 17 insertions, 0 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]) |