From: Gerhard Sittig Date: Sun, 26 Dec 2021 06:51:14 +0000 (+0100) Subject: configure: check version dependent sigrokdecode features X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=4db16cc5bcc9fddf1c478da91541d5b61703aee0;p=sigrok-cli.git configure: check version dependent sigrokdecode features Check for the presence of the srd_session_send_eof() API routine which depends on the libsigrokdecode library version. --- diff --git a/configure.ac b/configure.ac index ef0ea0b..f7e689b 100644 --- a/configure.ac +++ b/configure.ac @@ -91,6 +91,15 @@ AC_SYS_LARGEFILE PKG_CHECK_MODULES([SIGROK_CLI], [glib-2.0 >= 2.32.0 libsigrok >= 0.5.0 $SC_PKGLIBS]) +# Check for version dependent availability of functions. +srd_save_cflags=$CFLAGS +srd_save_libs=$LIBS +CFLAGS="$SIGROK_CLI_CFLAGS $CFLAGS" +LIBS="$SIGROK_CLI_LIBS $LIBS" +AC_CHECK_FUNCS([srd_session_send_eof]) +CFLAGS=$srd_save_cflags +LIBS=$srd_save_libs + sc_glib_version=`$PKG_CONFIG --modversion glib-2.0 2>&AS_MESSAGE_LOG_FD` sc_libsigrok_version=`$PKG_CONFIG --modversion libsigrok 2>&AS_MESSAGE_LOG_FD`