X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.in;h=c71cfa4ef20bbef51b794077047b60256f8c63b3;hb=1d3be23f9d6474a6f8e530904df4f27569b6ddc5;hp=dc3e4edec108b82740358d3b08e7c365199c1635;hpb=5db1547c947a42577709f74fe3324bf2d00ea87c;p=collectd.git diff --git a/configure.in b/configure.in index dc3e4ede..c71cfa4e 100644 --- a/configure.in +++ b/configure.in @@ -1235,11 +1235,13 @@ then AC_SUBST(BUILD_WITH_LIBSTATGRAB_LDFLAGS) fi +with_libkvm="no" AC_CHECK_LIB(kvm, kvm_getprocs, [with_kvm_getprocs="yes"], [with_kvm_getprocs="no"]) if test "x$with_kvm_getprocs" = "xyes" then AC_DEFINE(HAVE_LIBKVM_GETPROCS, 1, [Define to 1 if you have the 'kvm' library with the 'kvm_getprocs' symbol (-lkvm)]) + with_libkvm="yes" fi AM_CONDITIONAL(BUILD_WITH_LIBKVM_GETPROCS, test "x$with_kvm_getprocs" = "xyes") @@ -1248,9 +1250,19 @@ if test "x$with_kvm_getswapinfo" = "xyes" then AC_DEFINE(HAVE_LIBKVM_GETSWAPINFO, 1, [Define to 1 if you have the 'kvm' library with the 'kvm_getswapinfo' symbol (-lkvm)]) + with_libkvm="yes" fi AM_CONDITIONAL(BUILD_WITH_LIBKVM_GETSWAPINFO, test "x$with_kvm_getswapinfo" = "xyes") +AC_CHECK_LIB(kvm, kvm_nlist, [with_kvm_nlist="yes"], [with_kvm_nlist="no"]) +if test "x$with_kvm_nlist" = "xyes" +then + AC_DEFINE(HAVE_LIBKVM_NLIST, 1, + [Define to 1 if you have the 'kvm' library with the 'kvm_nlist' symbol (-lkvm)]) + with_libkvm="yes" +fi +AM_CONDITIONAL(BUILD_WITH_LIBKVM_NLIST, test "x$with_kvm_nlist" = "xyes") + with_sensors_cflags="" with_sensors_ldflags="" AC_ARG_WITH(lm-sensors, [AS_HELP_STRING([--with-lm-sensors@<:@=PREFIX@:>@], [Path to lm_sensors.])], @@ -1604,7 +1616,11 @@ AM_CONDITIONAL(BUILD_WITH_LIBESMTP, test "x$with_libesmtp" = "xyes") perl_interpreter="perl" AC_ARG_WITH(libperl, [AS_HELP_STRING([--with-libperl@<:@=PREFIX@:>@], [Path to libperl.])], [ - if test "x$withval" != "xno" && test "x$withval" != "xyes" + if test -x "$withval" + then + perl_interpreter="$withval" + with_libperl="yes" + else if test "x$withval" != "xno" && test "x$withval" != "xyes" then LDFLAGS="$LDFLAGS -L$withval/lib" CPPFLAGS="$CPPFLAGS -I$withval/include" @@ -1612,7 +1628,7 @@ AC_ARG_WITH(libperl, [AS_HELP_STRING([--with-libperl@<:@=PREFIX@:>@], [Path to l with_libperl="yes" else with_libperl="$withval" - fi + fi; fi ], [ with_libperl="yes" @@ -1622,7 +1638,7 @@ AC_MSG_CHECKING([for perl]) perl_interpreter=`which "$perl_interpreter" 2> /dev/null` if test -x "$perl_interpreter" then - AC_MSG_RESULT([yes]) + AC_MSG_RESULT([yes ($perl_interpreter)]) else perl_interpreter="" AC_MSG_RESULT([no]) @@ -1645,13 +1661,14 @@ then AC_LINK_IFELSE( AC_LANG_PROGRAM( [[ +#define PERL_NO_GET_CONTEXT #include #include #include ]], [[ - PerlInterpreter *perl = NULL; - Perl_load_module (perl, PERL_LOADMOD_NOIMPORT, + dTHX; + load_module (PERL_LOADMOD_NOIMPORT, newSVpv ("Collectd::Plugin::FooBar", 24), Nullsv); ]]), @@ -2462,7 +2479,13 @@ AC_DEFUN( ]) if test "x$enable_plugin" = "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 + 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" @@ -2476,6 +2499,7 @@ AC_COLLECTD([debug], [enable], [feature], [debugging]) AC_COLLECTD([daemon], [disable], [feature], [daemon mode]) AC_COLLECTD([getifaddrs],[enable], [feature], [getifaddrs under Linux]) +dependency_error="no" plugin_ascent="no" plugin_battery="no" plugin_cpu="no" @@ -2633,12 +2657,21 @@ then plugin_processes="yes" fi -if test "x$with_libkvm" = "xyes" +if test "x$with_kvm_getprocs" = "xyes" then plugin_processes="yes" +fi + +if test "x$with_kvm_getswapinfo" = "xyes" +then plugin_swap="yes" fi +if test "x$with_kvm_nlist" = "xyes" +then + plugin_tcpconns="yes" +fi + if test "x$have_getutent" = "xyes" then plugin_users="yes" @@ -2668,6 +2701,7 @@ AC_PLUGIN([dns], [$with_libpcap], [DNS traffic analysis]) AC_PLUGIN([email], [yes], [EMail statistics]) AC_PLUGIN([entropy], [$plugin_entropy], [Entropy statistics]) AC_PLUGIN([exec], [yes], [Execution of external programs]) +AC_PLUGIN([filecount], [yes], [Count files in directories]) AC_PLUGIN([hddtemp], [yes], [Query hddtempd]) AC_PLUGIN([interface], [$plugin_interface], [Interface traffic statistics]) AC_PLUGIN([iptables], [$with_libiptc], [IPTables rule counters]) @@ -2695,7 +2729,6 @@ AC_PLUGIN([ping], [$with_liboping], [Network latency statistics]) AC_PLUGIN([postgresql], [$with_libpq], [PostgreSQL database statistics]) AC_PLUGIN([powerdns], [yes], [PowerDNS statistics]) AC_PLUGIN([processes], [$plugin_processes], [Process statistics]) -AC_PLUGIN([qmail], [yes], [QMail queue statistics]) AC_PLUGIN([rrdtool], [$with_rrdtool], [RRDTool output plugin]) AC_PLUGIN([sensors], [$with_lm_sensors], [lm_sensors statistics]) AC_PLUGIN([serial], [$plugin_serial], [serial port traffic]) @@ -2835,6 +2868,7 @@ Configuration: email . . . . . . . . $enable_email entropy . . . . . . . $enable_entropy exec . . . . . . . . $enable_exec + filecount . . . . . . $enable_filecount hddtemp . . . . . . . $enable_hddtemp interface . . . . . . $enable_interface iptables . . . . . . $enable_iptables @@ -2863,7 +2897,6 @@ Configuration: postgresql . . . . . $enable_postgresql powerdns . . . . . . $enable_powerdns processes . . . . . . $enable_processes - qmail . . . . . . . . $enable_qmail rrdtool . . . . . . . $enable_rrdtool sensors . . . . . . . $enable_sensors serial . . . . . . . $enable_serial @@ -2884,3 +2917,7 @@ Configuration: xmms . . . . . . . . $enable_xmms EOF + +if test "x$dependency_error" = "xyes"; then + AC_MSG_ERROR("Some plugins are missing dependencies - see above summary for details") +fi