From: Michael Tremer Date: Tue, 11 Nov 2025 16:54:05 +0000 (+0000) Subject: configure: Link against libnl-3 and libnl-route-3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ee671dc8d74ae5f86eb6b1984495c44eca9a229;p=telemetry.git configure: Link against libnl-3 and libnl-route-3 Signed-off-by: Michael Tremer --- diff --git a/Jenkinsfile b/Jenkinsfile index e0ec06c..342e5ba 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -210,6 +210,7 @@ def installBuildDepsRedHat(distro, compier) { \ iptables-devel \ libatasmart-devel \ + libnl3-devel \ lm_sensors-devel \ rrdtool-devel \ systemd-devel @@ -234,6 +235,7 @@ def installBuildDepsArchLinux(distro, compiler) { \ iptables \ libatasmart \ + libnl3 \ lm_sensors \ rrdtool \ systemd @@ -258,6 +260,8 @@ def installBuildDepsDebian(distro, compiler, arch) { \ libatasmart-dev \ libiptc-dev \ + libnl-3-dev \ + libnl-route-3-dev \ libsensors-dev \ librrd-dev \ libsystemd-dev \ diff --git a/Makefile.am b/Makefile.am index 00de270..b40ca2a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -215,6 +215,8 @@ telemetryd_CFLAGS = \ $(AM_CFLAGS) \ $(LIBATASMART_CFLAGS) \ $(LIBIPTC_CFLAGS) \ + $(LIBNL3_CFLAGS) \ + $(LIBNL3_ROUTE_CFLAGS) \ $(RRD_CFLAGS) \ $(SENSORS_CFLAGS) \ $(SYSTEMD_CFLAGS) \ @@ -224,6 +226,8 @@ telemetryd_LDFLAGS = \ $(AM_LDFLAGS) \ $(LIBATASMART_LDFLAGS) \ $(LIBIPTC_LDFLAGS) \ + $(LIBNL3_LDFLAGS) \ + $(LIBNL3_ROUTE_LDFLAGS) \ $(RRD_LDFLAGS) \ $(SENSORS_LDFLAGS) \ $(SYSTEMD_LDFLAGS) \ @@ -232,6 +236,8 @@ telemetryd_LDFLAGS = \ telemetryd_LDADD = \ $(LIBATASMART_LIBS) \ $(LIBIPTC_LIBS) \ + $(LIBNL3_LIBS) \ + $(LIBNL3_ROUTE_LIBS) \ $(RRD_LIBS) \ $(SENSORS_LIBS) \ $(SYSTEMD_LIBS) \ diff --git a/configure.ac b/configure.ac index b6496ef..155ded9 100644 --- a/configure.ac +++ b/configure.ac @@ -157,6 +157,22 @@ if test "x$have_libatasmart" = "xyes"; then AC_DEFINE([HAVE_LIBATASMART], [1], [Define if you have libatasmart]) fi +# libnl-3 +PKG_CHECK_MODULES([LIBNL3], [libnl-3.0], + [have_libnl3=yes], [have_libnl3=no]) + +if test "x$have_libnl3" = "xyes"; then + AC_DEFINE([HAVE_LIBNL3], [1], [Define if you have libnl-3]) +fi + +# libnl-3 route +PKG_CHECK_MODULES([LIBNL3_ROUTE], [libnl-route-3.0], + [have_libnl3_route=yes], [have_libnl3_route=no]) + +if test "x$have_libnl3_route" = "xyes"; then + AC_DEFINE([HAVE_LIBNL3_ROUTE], [1], [Define if you have libnl-3-route]) +fi + save_LIBS="$LIBS" # lm-sensors @@ -243,5 +259,7 @@ AC_MSG_RESULT([ libatasmart: ${have_libatasmart} libiptc: ${have_libiptc} + libnl-3: ${have_libnl3} + libnl-3-route: ${have_libnl3_route} sensors: ${have_sensors} ])