Skip to content

Commit

Permalink
Merge pull request #242 from CESNET/telemetry-lib-check
Browse files Browse the repository at this point in the history
autoconf - telemetry library dependency
  • Loading branch information
SiskaPavel authored Dec 16, 2024
2 parents 7ee2138 + 762f872 commit 10fea0b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
14 changes: 14 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 10fea0b

Please sign in to comment.