SoapySDR: Fixed API change from version 0.8.0

The last API check was wrong. 0.7.2 is still old api, but 0.8.0 is new.
pull/1/head
Andreas Eversberg 1 year ago
parent c0aab6d60e
commit 869625cfcd
  1. 6
      configure.ac
  2. 4
      src/libsdr/soapy.c

@ -28,7 +28,7 @@ AC_CHECK_LIB([m], [main], [], [echo "Failed to find lib!" ; exit -1])
AC_CHECK_LIB([pthread], [main], [], [echo "Failed to find lib!" ; exit -1])
with_sdr=no
soapy_0_7_1_or_higher=
soapy_0_8_0_or_higher=
AC_ARG_WITH([alsa], [AS_HELP_STRING([--with-alsa], [compile with Alsa driver @<:@default=check@:>@]) ], [], [with_alsa="check"])
AC_ARG_WITH([uhd], [AS_HELP_STRING([--with-uhd], [compile with UHD driver @<:@default=check@:>@]) ], [], [with_uhd="check"])
AC_ARG_WITH([soapy], [AS_HELP_STRING([--with-soapy], [compile with SoapySDR driver @<:@default=check@:>@]) ], [], [with_soapy="check"])
@ -36,7 +36,7 @@ AC_ARG_WITH([imagemagick], [AS_HELP_STRING([--with-imagemagick], [compile with I
AC_ARG_WITH([fuse], [AS_HELP_STRING([--with-fuse], [compile with FUSE support @<:@default=check@:>@]) ], [], [with_fuse="check"])
AS_IF([test "x$with_alsa" != xno], [PKG_CHECK_MODULES(ALSA, alsa >= 1.0, with_alsa=yes, with_alsa=no)])
AS_IF([test "x$with_uhd" != xno], [PKG_CHECK_MODULES(UHD, uhd >= 3.0.0, with_sdr=yes with_uhd=yes, with_uhd=no)])
AS_IF([test "x$with_soapy" != xno], [PKG_CHECK_MODULES(SOAPY, SoapySDR >= 0.7.1, soapy_0_7_1_or_higher="-DSOAPY_0_7_1_OR_HIGHER", soapy_0_7_1_or_higher=)])
AS_IF([test "x$with_soapy" != xno], [PKG_CHECK_MODULES(SOAPY, SoapySDR >= 0.8.0, soapy_0_8_0_or_higher="-DSOAPY_0_8_0_OR_HIGHER", soapy_0_8_0_or_higher=)])
AS_IF([test "x$with_soapy" != xno], [PKG_CHECK_MODULES(SOAPY, SoapySDR >= 0.5.0, with_sdr=yes with_soapy=yes, with_soapy=no)])
AS_IF([test "x$with_imagemagick" != xno], [PKG_CHECK_MODULES(IMAGEMAGICK, ImageMagick >= 7.0.0, with_imagemagick=yes, with_imagemagick=no)])
AS_IF([test "x$with_fuse" != xno], with_fuse=check)
@ -58,7 +58,7 @@ AS_IF([test "x$with_fuse" == "xyes"],[AC_MSG_NOTICE( Compiling with FUSE )],[AC_
AS_IF([test "x$with_alsa" != "xyes" -a "x$with_sdr" != "xyes"],[AC_MSG_NOTICE( Without sound nor SDR support this project does not make sense. Please support sound card for analog transceivers or better SDR!" )],[])
SOAPY_CFLAGS="$soapy_0_7_1_or_higher"
SOAPY_CFLAGS="$soapy_0_8_0_or_higher"
AC_OUTPUT(
src/liboptions/Makefile

@ -279,7 +279,7 @@ int soapy_open(size_t channel, const char *_device_args, const char *_stream_arg
}
/* set up streamer */
#ifdef SOAPY_0_7_1_OR_HIGHER
#ifdef SOAPY_0_8_0_OR_HIGHER
if (!(rxStream = SoapySDRDevice_setupStream(sdr, SOAPY_SDR_RX, SOAPY_SDR_CF32, &channel, 1, &stream_args)))
#else
if (SoapySDRDevice_setupStream(sdr, &rxStream, SOAPY_SDR_RX, SOAPY_SDR_CF32, &channel, 1, &stream_args) != 0)
@ -404,7 +404,7 @@ int soapy_open(size_t channel, const char *_device_args, const char *_stream_arg
}
/* set up streamer */
#ifdef SOAPY_0_7_1_OR_HIGHER
#ifdef SOAPY_0_8_0_OR_HIGHER
if (!(txStream = SoapySDRDevice_setupStream(sdr, SOAPY_SDR_TX, SOAPY_SDR_CF32, &channel, 1, &stream_args)))
#else
if (SoapySDRDevice_setupStream(sdr, &txStream, SOAPY_SDR_TX, SOAPY_SDR_CF32, &channel, 1, &stream_args) != 0)

Loading…
Cancel
Save