From 452db816211a3a5322caaedc28fa17ffff72161d Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Mon, 6 Oct 2008 15:35:42 +0200 Subject: [PATCH] configure.in: Correct the `--enable-' code. The new behavior is documented in the `README' file, too. --- README | 8 +++++--- configure.in | 13 ++++++++----- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/README b/README index 904e7c73..97b66f79 100644 --- a/README +++ b/README @@ -389,9 +389,11 @@ Configuring / Compiling / Installing disable all plugins whose requirements cannot be fulfilled (any other plugin will be enabled). To enable a plugin, install missing dependencies (see section `Prerequisites' above) and rerun `configure'. If you specify the - `--enable-' configure option, you can force the plugin to be built. - This will most likely fail though unless you're working in a very unusual - setup and you really know what you're doing. + `--enable-' configure option, the script will fail if the depen- + dencies for the specified plugin are not met. If you specify the + `--disable-' configure option, the plugin will not be built. Both + options are meant for package maintainers and should not be used in everyday + situations. By default, collectd will be installed into `/opt/collectd'. You can adjust this setting by specifying the `--prefix' configure option - see INSTALL for diff --git a/configure.in b/configure.in index 88b13daa..bc4d3213 100644 --- a/configure.in +++ b/configure.in @@ -2276,12 +2276,15 @@ AC_DEFUN( enable_plugin="no" fi ]) - if test "x$enable_plugin" = "xyes" && test "x$2" = "xyes" + if test "x$enable_plugin" = "xyes" then - AC_DEFINE([HAVE_PLUGIN_]my_toupper([$1]), 1, [Define to 1 if the $1 plugin is enabled.]) - else - dependency_error="yes" - test "x$enable_plugin" = "xyes" && enable_plugin="failed (missing dependency)" + if test "x$2" = "xyes" + then + AC_DEFINE([HAVE_PLUGIN_]my_toupper([$1]), 1, [Define to 1 if the $1 plugin is enabled.]) + else # User passed "yes" but dependency checking yielded "no" => Dependency problem. + dependency_error="yes" + enable_plugin="no (dependency error)" + fi fi AM_CONDITIONAL([BUILD_PLUGIN_]my_toupper([$1]), test "x$enable_plugin" = "xyes") enable_$1="$enable_plugin" -- 2.11.0