]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
gmond plugin: Look for RPC headers in /usr/include/tirpc.
authorFlorian Forster <octo@collectd.org>
Sat, 25 Nov 2023 22:47:47 +0000 (23:47 +0100)
committerFlorian Forster <octo@collectd.org>
Sat, 25 Nov 2023 22:59:28 +0000 (23:59 +0100)
glibc removed the SunRPC headers, and the replacement headers are in a
different location. Try and look for them there.

configure.ac

index 234391a0ad911182302bce20cf1a904589202986..78b18ecedff06613cbf8ac264074fa340bc8efe5 100644 (file)
@@ -2633,6 +2633,25 @@ if test "x$with_libganglia" = "xyes"; then
   fi
 fi
 
+AC_CHECK_HEADERS([rpc/types.h],
+  [have_rpc_types_h="yes"],
+  [have_rpc_types_h="no"]
+)
+AS_UNSET([ac_cv_header_rpc_types_h])
+if test "x$have_rpc_types_h" = "xno"; then
+  # SunRPC has been removed from glibc.
+  # Replacement headers are in the "tirpc" subdirectory.
+  SAVE_CPPFLAGS="$CPPFLAGS"
+  CPPFLAGS="$CPPFLAGS -I/usr/include/tirpc"
+
+  AC_CHECK_HEADERS([rpc/types.h],
+    [GANGLIA_CPPFLAGS="$GANGLIA_CPPFLAGS -I/usr/include/tirpc"],
+    [with_libganglia="no (rpc/types.h not found)"]
+  )
+
+  CPPFLAGS="$SAVE_CPPFLAGS"
+fi
+
 SAVE_CPPFLAGS="$CPPFLAGS"
 SAVE_LDFLAGS="$LDFLAGS"
 CPPFLAGS="$CPPFLAGS $GANGLIA_CPPFLAGS"