aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-04-16 10:15:25 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-04-16 10:15:25 +0200
commit5e08ec5d0d71857b21536221f6fda9c936afa7e0 (patch)
tree6492bc3d1315aa285ad0424e0f71a8de7bee5f4c /configure.ac
parenta878abd2aa41f530a558ee83639832d907a24029 (diff)
downloaddabmod-5e08ec5d0d71857b21536221f6fda9c936afa7e0.tar.gz
dabmod-5e08ec5d0d71857b21536221f6fda9c936afa7e0.tar.bz2
dabmod-5e08ec5d0d71857b21536221f6fda9c936afa7e0.zip
Do not compile useless files for easydabv3
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 10 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 1d5cf4e..da26c64 100644
--- a/configure.ac
+++ b/configure.ac
@@ -97,16 +97,21 @@ AS_IF([test "x$enable_trace" != "xno"],
# Define conditionals for Makefile.am
AM_CONDITIONAL([IS_GIT_REPO], [test -d '.git'])
+AM_CONDITIONAL([COMPILE_FOR_EASYDABV3], [test "x$enable_easydabv3" = "xyes"])
# Defines for config.h
AX_PTHREAD([], AC_MSG_ERROR([requires pthread]))
-PKG_CHECK_MODULES([SOAPYSDR], [SoapySDR], enable_soapysdr=yes, enable_soapysdr=no)
+AS_IF([test "x$enable_easydabv3" = "xno"],
+ [PKG_CHECK_MODULES([SOAPYSDR], [SoapySDR], enable_soapysdr=yes, enable_soapysdr=no)])
AC_SUBST([CFLAGS], ["$CFLAGS $EXTRA $FFTW_CFLAGS $SOAPYSDR_CFLAGS $PTHREAD_CFLAGS"])
AC_SUBST([CXXFLAGS], ["$CXXFLAGS $EXTRA $FFTW_CFLAGS $SOAPYSDR_CFLAGS $PTHREAD_CFLAGS"])
AC_SUBST([LIBS], ["$FFTW_LIBS $SOAPYSDR_LIBS $PTHREAD_LIBS $ZMQ_LIBS"])
+AS_IF([test "x$enable_easydabv3" = "xyes" && test "x$enable_output_uhd" == "xyes"],
+ AC_MSG_ERROR([Cannot enable both EasyDABv3 and UHD output]))
+
# Checks for UHD.
AS_IF([test "x$enable_output_uhd" = "xyes"],
[ AC_CHECK_LIB([uhd], [main], [], [AC_MSG_ERROR([library uhd is missing])])
@@ -128,8 +133,10 @@ AS_IF([test "x$enable_easydabv3" = "xno"],
AX_BOOST_SYSTEM
AX_BOOST_ASIO ])
-AC_DEFINE(HAVE_BOOST, [test "x$enable_easydabv3" = "xno"], [Define if boost is available])
-AC_DEFINE(BUILD_FOR_EASYDABV3, [test "x$enable_easydabv3" = "xyes"], [Define if we are building for EasyDABv3])
+AS_IF([test "x$enable_easydabv3" = "xno"],
+ AC_DEFINE(HAVE_BOOST, [1], [Define if boost is available]))
+AS_IF([test "x$enable_easydabv3" = "xyes"],
+ AC_DEFINE(BUILD_FOR_EASYDABV3, [1], [Define if we are building for EasyDABv3]))
# Checks for header files.