From: Sebastian Harl Date: Sun, 10 May 2009 16:47:41 +0000 (+0200) Subject: configure: Added the --enable-all-plugins option. X-Git-Tag: collectd-4.7.0~1^2~3 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=2fd1f725afd1e9353e7d5df5c45d1748ee4b1219;p=collectd.git configure: Added the --enable-all-plugins option. This option may be used to enable or disable all plugins by default. The default may be overwritten by explicitly enabling or disabling a plugin using the --enable- option. --- diff --git a/README b/README index 83e431ea..8deaf0eb 100644 --- a/README +++ b/README @@ -554,9 +554,12 @@ Configuring / Compiling / Installing section `Prerequisites' above) and rerun `configure'. If you specify the `--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. + `--disable-' configure option, the plugin will not be built. If you + specify the `--enable-all-plugins' or `--disable-all-plugins' configure + options, all plugins will be enabled or disabled respectively by default. + Explicitly enabling or disabling a plugin overwrites the default for the + specified plugin. These 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 e37a8ab2..a62914d3 100644 --- a/configure.in +++ b/configure.in @@ -3233,12 +3233,17 @@ AC_DEFUN( fi ], [ - if test "x$2" = "xyes" - then - enable_plugin="yes" - else - enable_plugin="no" - fi + if test "x$enable_all_plugins" = "xauto" + then + if test "x$2" = "xyes" + then + enable_plugin="yes" + else + enable_plugin="no" + fi + else + enable_plugin="$enable_all_plugins" + fi ]) if test "x$enable_plugin" = "xyes" then @@ -3506,6 +3511,24 @@ fi m4_divert_once([HELP_ENABLE], [ collectd plugins:]) +AC_ARG_ENABLE([all-plugins], + AC_HELP_STRING([--enable-all-plugins], + [enable all plugins (auto by def)]), + [ + if test "x$enableval" = "xyes" + then + enable_all_plugins="yes" + else if test "x$enableval" = "xauto" + then + enable_all_plugins="auto" + else + enable_all_plugins="no" + fi; fi + ], + [enable_all_plugins="auto"]) + +m4_divert_once([HELP_ENABLE], []) + AC_PLUGIN([apache], [$with_libcurl], [Apache httpd statistics]) AC_PLUGIN([apcups], [yes], [Statistics of UPSes by APC]) AC_PLUGIN([apple_sensors], [$with_libiokit], [Apple's hardware sensors])