From: Sebastian Harl Date: Sun, 10 May 2009 17:15:37 +0000 (+0200) Subject: configure: Added support for --enable-=force. X-Git-Tag: collectd-4.7.0~1^2~2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=cb62220826eb2900d4217c5c163c2c1034df2ff2;p=collectd.git configure: Added support for --enable-=force. This may be used to force a plugin to be built, no matter what the dependency check yielded. I.e. this is basically the same --enable- before commit 9276a81328091fdebc833eb10580d53bc51659db (configure.in: Let configure bail out on missing dependencies). --- diff --git a/README b/README index 8deaf0eb..ee7163c8 100644 --- a/README +++ b/README @@ -553,7 +553,10 @@ Configuring / Compiling / Installing will be enabled). To enable a plugin, install missing dependencies (see 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 + dencies for the specified plugin are not met. In that case you can force the + plugin to be built using the `--enable-=force' configure option. + This will most likely fail though unless you're working in a very unusual + setup and you really know what you're doing. If you specify the `--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. diff --git a/configure.in b/configure.in index a62914d3..7b82b8bd 100644 --- a/configure.in +++ b/configure.in @@ -3223,14 +3223,19 @@ AC_DEFUN( [AC_PLUGIN], [ enable_plugin="no" + force="no" AC_ARG_ENABLE([$1], AC_HELP_STRING([--enable-$1], [$3]), [ if test "x$enableval" = "xyes" then enable_plugin="yes" + else if test "x$enableval" = "xforce" + then + enable_plugin="yes" + force="yes" else enable_plugin="no" - fi + fi; fi ], [ if test "x$enable_all_plugins" = "xauto" @@ -3247,9 +3252,13 @@ AC_DEFUN( ]) if test "x$enable_plugin" = "xyes" then - if test "x$2" = "xyes" + if test "x$2" = "xyes" || test "x$force" = "xyes" then AC_DEFINE([HAVE_PLUGIN_]my_toupper([$1]), 1, [Define to 1 if the $1 plugin is enabled.]) + if test "x$2" != "xyes" + then + dependency_warning="yes" + fi else # User passed "yes" but dependency checking yielded "no" => Dependency problem. dependency_error="yes" enable_plugin="no (dependency error)" @@ -3267,7 +3276,9 @@ AC_COLLECTD([debug], [enable], [feature], [debugging]) AC_COLLECTD([daemon], [disable], [feature], [daemon mode]) AC_COLLECTD([getifaddrs],[enable], [feature], [getifaddrs under Linux]) +dependency_warning="no" dependency_error="no" + plugin_ascent="no" plugin_battery="no" plugin_bind="no" @@ -3899,7 +3910,11 @@ Configuration: EOF if test "x$dependency_error" = "xyes"; then - AC_MSG_ERROR("Some plugins are missing dependencies - see above summary for details") + AC_MSG_ERROR("Some plugins are missing dependencies - see the summary above for details") +fi + +if test "x$dependency_warning" = "xyes"; then + AC_MSG_WARN("Some plugins seem to have missing dependencies but have been enabled forcibly - see the summary above for details") fi # vim: set fdm=marker :