From 59df544d4db83db4a0988aba47394983ca891e4b Mon Sep 17 00:00:00 2001 From: lns Date: Wed, 15 Jun 2022 20:08:32 +0200 Subject: [PATCH] Fix-configure.ac: define PREFIX in config.h PREFIX was never defined and therefore set to the default value `/opt/collectd`. collectd searched in this path for desired files e.g. typesdb, plugins, etc no matter if it was configured with `--prefix`. Signed-off-by: lns Signed-off-by: Toni Uhlig --- configure.ac | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure.ac b/configure.ac index dd53ac5d3..1737aff31 100644 --- a/configure.ac +++ b/configure.ac @@ -145,6 +145,10 @@ if test "x$ac_system" = "xAIX"; then AC_DEFINE([_THREAD_SAFE_ERRNO], [1], [Define to use the thread-safe version of errno under AIX.]) fi +if test "x${prefix}" != xNONE; then + AC_DEFINE_UNQUOTED([PREFIX], ["${prefix}"], [Define the install prefix.]) +fi + # Where to install .pc files. pkgconfigdir="${libdir}/pkgconfig" AC_SUBST([pkgconfigdir]) -- 2.47.2