X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.in;h=fa463dd8fff37ae2b0cff38ca6334f7f1e57f52a;hb=43ea89b8f320b54cc6d1bb05c5cc13488bb438c9;hp=08de43b17aeaa08c84e1ec2da411fdc5f0fe0dd1;hpb=bde5a2c4851541917ab0f46c51243738ecc617e4;p=collectd.git diff --git a/configure.in b/configure.in index 08de43b1..fa463dd8 100644 --- a/configure.in +++ b/configure.in @@ -1245,6 +1245,74 @@ fi AM_CONDITIONAL(BUILD_WITH_LIBDBI, test "x$with_libdbi" = "xyes") # }}} +# --with-erlang {{{ +ERLANG_CPPFLAGS="$ERLANG_CPPFLAGS" +ERLANG_LDFLAGS="$ERLANG_LDFLAGS" +ERLANG_LIBS="$ERLANG_LIBS" +AC_ARG_WITH(erlang, [AS_HELP_STRING([--with-erlang@<:@=PREFIX@:>@], [Path to Erlang / erl_interface.])], +[ + if test "x$withval" != "xno" && test "x$withval" != "xyes" + then + LDFLAGS="$LDFLAGS -L$withval/lib" + CPPFLAGS="$CPPFLAGS -I$withval/include -D_THREAD_SAFE" + with_erlang="yes" + else + with_erlang="$withval" + fi +], +[ + with_erlang="yes" +]) +if test "x$ERLANG_CPPFLAGS" = "x" +then + ERLANG_CPPFLAGS="-D_REENTRANT" +fi +if test "x$ERLANG_LIBS" = "x" +then + ERLANG_LIBS="-lei -lpthread" +fi + +SAVE_CPPFLAGS="$CPPFLAGS" +SAVE_LDFLAGS="$LDFLAGS" +CPPFLAGS="$CPPFLAGS $ERLANG_CPPFLAGS" +LDFLAGS="$LDFLAGS $ERLANG_LDFLAGS" + +if test "x$with_erlang" = "xyes" +then + if test "x$ERLANG_CPPFLAGS" != "x" + then + AC_MSG_NOTICE([Erlang CPPFLAGS: $ERLANG_CPPFLAGS]) + fi + AC_CHECK_HEADERS(erl_interface.h ei.h, + [with_erlang="yes"], + [with_erlang="no (Headers not found)"]) +fi +if test "x$with_erlang" = "xyes" +then + if test "x$ERLANG_LDFLAGS" != "x" + then + AC_MSG_NOTICE([Erlang LDFLAGS: $ERLANG_LDFLAGS]) + fi + AC_CHECK_LIB(erl_interface, erl_connect_xinit, + [with_erlang="yes"], + [with_erlang="no (Symbol erl_connect_xinit not found)"], + [$ERLANG_LIBS]) +fi +if test "x$with_erlang" = "xyes" +then + BUILD_WITH_ERLANG_CPPFLAGS="$ERLANG_CPPFLAGS" + BUILD_WITH_ERLANG_LDFLAGS="$ERLANG_LDFLAGS" + BUILD_WITH_ERLANG_LIBS="-lerl_interface $ERLANG_LIBS" + AC_SUBST(BUILD_WITH_ERLANG_CPPFLAGS) + AC_SUBST(BUILD_WITH_ERLANG_LDFLAGS) + AC_SUBST(BUILD_WITH_ERLANG_LIBS) +fi +AM_CONDITIONAL(BUILD_WITH_ERLANG, test "x$with_erlang" = "xyes") + +CPPFLAGS="$SAVE_CPPFLAGS" +LDFLAGS="$SAVE_LDFLAGS" +# }}} + # --with-libesmtp {{{ AC_ARG_WITH(libesmtp, [AS_HELP_STRING([--with-libesmtp@<:@=PREFIX@:>@], [Path to libesmtp.])], [ @@ -3567,6 +3635,7 @@ plugin_ascent="no" plugin_battery="no" plugin_bind="no" plugin_conntrack="no" +plugin_contextswitch="no" plugin_cpu="no" plugin_cpufreq="no" plugin_curl_json="no" @@ -3604,6 +3673,7 @@ if test "x$ac_system" = "xLinux" then plugin_battery="yes" plugin_conntrack="yes" + plugin_contextswitch="yes" plugin_cpu="yes" plugin_cpufreq="yes" plugin_disk="yes" @@ -3839,6 +3909,7 @@ AC_PLUGIN([ascent], [$plugin_ascent], [AscentEmu player statistics]) AC_PLUGIN([battery], [$plugin_battery], [Battery statistics]) AC_PLUGIN([bind], [$plugin_bind], [ISC Bind nameserver statistics]) AC_PLUGIN([conntrack], [$plugin_conntrack], [nf_conntrack statistics]) +AC_PLUGIN([contextswitch], [$plugin_contextswitch], [context switch statistics]) AC_PLUGIN([cpufreq], [$plugin_cpufreq], [CPU frequency statistics]) AC_PLUGIN([cpu], [$plugin_cpu], [CPU usage statistics]) AC_PLUGIN([csv], [yes], [CSV output plugin]) @@ -3850,6 +3921,7 @@ AC_PLUGIN([disk], [$plugin_disk], [Disk usage statistics]) AC_PLUGIN([dns], [$with_libpcap], [DNS traffic analysis]) AC_PLUGIN([email], [yes], [EMail statistics]) AC_PLUGIN([entropy], [$plugin_entropy], [Entropy statistics]) +AC_PLUGIN([erlang], [$with_erlang], [Erlang interoperability]) AC_PLUGIN([exec], [yes], [Execution of external programs]) AC_PLUGIN([filecount], [yes], [Count files in directories]) AC_PLUGIN([fscache], [$plugin_fscache], [fscache statistics]) @@ -3866,6 +3938,7 @@ AC_PLUGIN([load], [$plugin_load], [System load]) AC_PLUGIN([logfile], [yes], [File logging plugin]) AC_PLUGIN([madwifi], [$have_linux_wireless_h], [Madwifi wireless statistics]) AC_PLUGIN([match_empty_counter], [yes], [The empty counter match]) +AC_PLUGIN([match_hashed], [yes], [The hashed match]) AC_PLUGIN([match_regex], [yes], [The regex match]) AC_PLUGIN([match_timediff], [yes], [The timediff match]) AC_PLUGIN([match_value], [yes], [The value match]) @@ -4095,6 +4168,7 @@ Configuration: Libraries: libcurl . . . . . . . $with_libcurl libdbi . . . . . . . $with_libdbi + liberl_interface . . $with_erlang libesmtp . . . . . . $with_libesmtp libganglia . . . . . $with_libganglia libgcrypt . . . . . . $with_libgcrypt @@ -4142,6 +4216,7 @@ Configuration: battery . . . . . . . $enable_battery bind . . . . . . . . $enable_bind conntrack . . . . . . $enable_conntrack + contextswitch . . . . $enable_contextswitch cpu . . . . . . . . . $enable_cpu cpufreq . . . . . . . $enable_cpufreq csv . . . . . . . . . $enable_csv @@ -4153,6 +4228,7 @@ Configuration: dns . . . . . . . . . $enable_dns email . . . . . . . . $enable_email entropy . . . . . . . $enable_entropy + erlang . . . . . . . $enable_erlang exec . . . . . . . . $enable_exec filecount . . . . . . $enable_filecount fscache . . . . . . . $enable_fscache @@ -4169,6 +4245,7 @@ Configuration: logfile . . . . . . . $enable_logfile madwifi . . . . . . . $enable_madwifi match_empty_counter . $enable_match_empty_counter + match_hashed . . . . $enable_match_hashed match_regex . . . . . $enable_match_regex match_timediff . . . $enable_match_timediff match_value . . . . . $enable_match_value