summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-02-10 11:31:05 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-02-10 11:31:05 +0100
commit51afbb4f9d0009b88de6cb065bbbb25a4c97f711 (patch)
treedf0163a2387e1424ebe104439333ad09361bfed6 /configure.ac
parent245e62aed2fd55ef3b6569e5c0b8466f5aa72cbd (diff)
downloaddabmod-51afbb4f9d0009b88de6cb065bbbb25a4c97f711.tar.gz
dabmod-51afbb4f9d0009b88de6cb065bbbb25a4c97f711.tar.bz2
dabmod-51afbb4f9d0009b88de6cb065bbbb25a4c97f711.zip
Add support for SoapySDR
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 9 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index f622471..e2a7dd5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -105,9 +105,11 @@ AM_CONDITIONAL([IS_GIT_REPO], [test -d '.git'])
# Defines for config.h
AX_PTHREAD([], AC_MSG_ERROR([requires pthread]))
-AC_SUBST([CFLAGS], ["$EXTRA $FFTW_CFLAGS $PTHREAD_CFLAGS"])
-AC_SUBST([CXXFLAGS], ["$CXXFLAGS $EXTRA $FFTW_CFLAGS $PTHREAD_CFLAGS"])
-AC_SUBST([LIBS], ["$FFTW_LIBS $PTHREAD_LIBS $ZMQ_LIBS"])
+PKG_CHECK_MODULES([SOAPYSDR], [SoapySDR], enable_soapysdr=yes, enable_soapysdr=no)
+
+AC_SUBST([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"])
# Checks for UHD.
AS_IF([test "x$enable_output_uhd" = "xyes"],
@@ -117,6 +119,9 @@ AS_IF([test "x$enable_output_uhd" = "xyes"],
AS_IF([test "x$enable_output_uhd" = "xyes"],
[AC_DEFINE(HAVE_OUTPUT_UHD, [1], [Define if UHD output is enabled])])
+AS_IF([test "x$enable_soapysdr" = "xyes"],
+ [AC_DEFINE(HAVE_SOAPYSDR, [1], [Define if SoapySDR output is enabled])])
+
AX_BOOST_BASE([1.54.0], [], AC_MSG_ERROR([BOOST 1.54 or later is required]))
AC_CHECK_LIB([boost_system], [main], [], [AC_MSG_ERROR([library boost_system is missing])])
AC_CHECK_LIB([boost_thread], [main], [], [AC_MSG_ERROR([library boost_thread is missing])])
@@ -192,7 +197,7 @@ echo "***********************************************"
echo
enabled=""
disabled=""
-for feat in debug prof trace output_uhd zeromq
+for feat in debug prof trace output_uhd zeromq soapysdr
do
eval var=\$enable_$feat
AS_IF([test "x$var" = "xyes"],