]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
Fix-configure.ac: define PREFIX in config.h
authorlns <matzeton@googlemail.com>
Wed, 15 Jun 2022 18:08:32 +0000 (20:08 +0200)
committerMatthias Runge <mrunge@matthias-runge.de>
Thu, 21 Jul 2022 18:54:02 +0000 (20:54 +0200)
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 <matzeton@googlemail.com>
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
configure.ac

index dd53ac5d3ce92a3ddada52ea532b53f3e28c7e50..1737aff316ee16c3eccb347dbd604b1ee3512aed 100644 (file)
@@ -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])