From 0a0dfc3d12342e7fb23febca76206a86ab32469f Mon Sep 17 00:00:00 2001 From: Pavel Siska Date: Mon, 16 Dec 2024 08:08:55 +0100 Subject: [PATCH 1/2] configure.ac - add checks for telemetry and appfs libraries - Added AC_CHECK_LIB for 'telemetry' and 'appfs' to verify library availability. - Ensured 'LIBS' includes '-lappFs -ltelemetry' for proper linking. - Updated RPM dependencies by appending 'telemetry' to RPM_REQUIRES and RPM_BUILDREQ. --- configure.ac | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/configure.ac b/configure.ac index d3038b14..d9610585 100644 --- a/configure.ac +++ b/configure.ac @@ -382,6 +382,20 @@ AC_ARG_WITH([stem], [withstem="no"] ) +# Check if the telemetry library is available +AC_CHECK_LIB([telemetry], [main], + [AC_MSG_RESULT([Found telemetry library.])], + [AC_MSG_ERROR([The telemetry library is required but was not found. Try to install telemetry.])]) + +# Check if the appfs library is available +AC_CHECK_LIB([appFs], [main], + [AC_MSG_RESULT([Found appfs library.])], + [AC_MSG_ERROR([The appfs library is required but was not found. Try to install telemetry])]) + +LIBS="-lappFs -ltelemetry $LIBS" +RPM_REQUIRES+=" telemetry" +RPM_BUILDREQ+=" telemetry" + AM_CONDITIONAL(WITH_STEM, test x${withstem} = xyes) if [[ -z "$WITH_STEM_TRUE" ]]; then AC_DEFINE([WITH_STEM], [1], [Define to 1 to use flexprobe testing interface]) From 762f872ad777f7206047759e3fec8b568d1fdcb4 Mon Sep 17 00:00:00 2001 From: Pavel Siska Date: Mon, 16 Dec 2024 08:26:11 +0100 Subject: [PATCH 2/2] README - update build requirements --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 04bb9495..d4b39f83 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,7 @@ Here are the examples of various plugins usage: ### Requirements - libatomic +- [telemetry](https://github.com/CESNET/telemetry) (mandatory) — can be installed from the [COPR repository](https://copr.fedorainfracloud.org/coprs/g/CESNET/NEMEA-stable/package/telemetry/) or built from source code - kernel version at least 3.19 when using raw sockets input plugin enabled by default (disable with `--without-raw` parameter for `./configure`) - [libpcap](http://www.tcpdump.org/) when compiling with pcap plugin (`--with-pcap` parameter) - netcope-common [COMBO cards](https://www.liberouter.org/technologies/cards/) when compiling with ndp plugin (`--with-ndp` parameter)