X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.in;h=3e85bffec13843e651536f77aae0744d420344a5;hb=dc80c73c20ef0e69c3850fd9679a827ad79e61a1;hp=4f8bb09893d02dc2b2cdcd7a9bcb54541fde781d;hpb=1e7a1563af4e3a82e2f2e017dcabe9616624175d;p=collectd.git diff --git a/configure.in b/configure.in index 4f8bb098..3e85bffe 100644 --- a/configure.in +++ b/configure.in @@ -24,7 +24,8 @@ AC_SUBST(LTDLINCL) AC_SUBST(LIBLTDL) AC_LIBTOOL_DLOPEN AC_PROG_LIBTOOL -#AC_PROG_RANLIB +AC_PROG_LEX +AC_PROG_YACC AC_CONFIG_SUBDIRS(libltdl) # @@ -44,7 +45,7 @@ AC_CHECK_HEADERS(assert.h) AC_CHECK_HEADERS(sys/types.h) AC_CHECK_HEADERS(sys/socket.h) AC_CHECK_HEADERS(sys/select.h) -AC_CHECK_HEADERS(sys/poll.h) +AC_CHECK_HEADERS(poll.h) AC_CHECK_HEADERS(netdb.h) AC_CHECK_HEADERS(arpa/inet.h) AC_CHECK_HEADERS(sys/resource.h) @@ -149,6 +150,23 @@ AC_CHECK_HEADERS(netinet/icmp6.h, [], [], # include #endif ]) +AC_CHECK_HEADERS(netinet/tcp.h, [], [], +[#if HAVE_STDINT_H +# include +#endif +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_NETINET_IN_SYSTM_H +# include +#endif +#if HAVE_NETINET_IN_H +# include +#endif +#if HAVE_NETINET_IP_H +# include +#endif +]) AC_CHECK_HEADERS(netinet/udp.h, [], [], [#if HAVE_STDINT_H # include @@ -224,7 +242,7 @@ AC_CHECK_HEADERS(sys/swap.h) AC_CHECK_HEADERS(utmp.h) AC_CHECK_HEADERS(utmpx.h) -# For traffic plugin +# For interface plugin AC_CHECK_HEADERS(ifaddrs.h) AC_CHECK_HEADERS(net/if.h, [], [], [ @@ -309,6 +327,10 @@ AC_CHECK_HEADERS(net/if_arp.h) AC_CHECK_HEADERS(net/if_ppp.h) AC_CHECK_HEADERS(netinet/if_ether.h) +# For the multimeter plugin +AC_CHECK_HEADERS(termios.h) +AC_CHECK_HEADERS(sys/ioctl.h) + # # Checking for libraries # @@ -363,9 +385,101 @@ AC_CHECK_FUNCS(getutent getutxent) AC_CHECK_FUNCS(quotactl) AC_CHECK_FUNCS(getgrgid getpwuid) -# For traffic module +# For interface module AC_CHECK_FUNCS(getifaddrs) +# Check for NAN +nan_type="none" +if test "x$nan_type" = "xnone"; then + AC_CACHE_CHECK([whether NAN is defined by default], + [have_nan_default], + AC_COMPILE_IFELSE( + AC_LANG_PROGRAM( + [[ +#include +#include +static float foo = NAN; + ]], + [[ + if (isnan (foo)) + return 0; + else + return 1; + ]]), + [have_nan_default="yes"], + [have_nan_default="no"] + ) + ) + if test "x$have_nan_default" = "xyes" + then + nan_type="default" + AC_DEFINE(NAN_STATIC_DEFAULT, 1, + [Define if NAN is defined by default and can initialize static variables.]) + fi +fi +if test "x$nan_type" = "xnone"; then + AC_CACHE_CHECK([whether NAN is defined by __USE_ISOC99], + [have_nan_isoc], + AC_COMPILE_IFELSE( + AC_LANG_PROGRAM( + [[ +#include +#define __USE_ISOC99 1 +#include +static float foo = NAN; + ]], + [[ + if (isnan (foo)) + return 0; + else + return 1; + ]]), + [have_nan_isoc="yes"], + [have_nan_isoc="no"] + ) + ) + if test "x$have_nan_isoc" = "xyes" + then + nan_type="isoc99" + AC_DEFINE(NAN_STATIC_ISOC, 1, + [Define if NAN is defined by __USE_ISOC99 and can initialize static variables.]) + fi +fi +if test "x$nan_type" = "xnone"; then + AC_CACHE_CHECK([whether NAN can be defined by 0/0], + [have_nan_zero], + AC_RUN_IFELSE( + AC_LANG_PROGRAM( + [[ +#include +#include +#define NAN (0.0 / 0.0) +#ifndef isnan +# define isnan(f) ((f) != (f)) +#endif +static float foo = NAN; + ]], + [[ + if (isnan (foo)) + return 0; + else + return 1; + ]]), + [have_nan_zero="yes"], + [have_nan_zero="no"] + ) + ) + if test "x$have_nan_zero" = "xyes" + then + nan_type="zero" + AC_DEFINE(NAN_ZERO_ZERO, 1, + [Define if NAN can be defined as (0.0 / 0.0)]) + fi +fi +if test "x$nan_type" = "xnone"; then + AC_MSG_ERROR([Didn't find out how to statically initialize variables to NAN. Sorry.]) +fi + # For mount interface #AC_CHECK_FUNCS(getfsent getvfsent) @@ -965,41 +1079,33 @@ else fi AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes") -# Define `step' and `hearbeat' values.. -declare -i collectd_step=10 -declare -i collectd_heartbeat=25 -AC_ARG_WITH(step, [AS_HELP_STRING([--with-step=SECONDS], [Interval in which plugins are queried.])], +AC_ARG_WITH(libupsclient, [AS_HELP_STRING([--with-libupsclient@<:@=PREFIX@:>@], [Path to libupsclient.])], [ - if test "x$withval" != "xno" -a "x$withval" != "xyes" + if test "x$withval" != "xno" && test "x$withval" != "xyes" then - declare -i tmp_collectd_step="$withval" - if test $tmp_collectd_step -gt 0 - then - collectd_step=$tmp_collectd_step - let "collectd_heartbeat=$collectd_step*2" - fi + LDFLAGS="$LDFLAGS -L$withval/lib" + CPPFLAGS="$CPPFLAGS -I$withval/include" + with_libupsclient="yes" fi -], []) -AC_ARG_WITH(heartbeat, [AS_HELP_STRING([--with-heartbeat=SECONDS], [Heartbeat of the DS in generated RRD files.])], +], [ - if test "x$withval" != "xno" -a "x$withval" != "xyes" - then - declare -i tmp_collectd_heartbeat="$withval" - if test $tmp_collectd_heartbeat -gt 0 - then - collectd_heartbeat=$tmp_collectd_heartbeat - fi - fi -], []) - -if test $collectd_step -ne 10 + with_libupsclient="yes" +]) +if test "x$with_libupsclient" = "xyes" then - AC_DEFINE_UNQUOTED(COLLECTD_STEP, "$collectd_step", [Interval in which plugins are queried.]) + AC_CHECK_LIB(upsclient, upscli_connect, + [ + AC_DEFINE(HAVE_LIBUPSCLIENT, 1, [Define to 1 if you have the upsclient library (-lupsclient).]) + ], [with_libupsclient="no (libupsclient not found)"]) fi -if test $collectd_heartbeat -ne 25 +if test "x$with_libupsclient" = "xyes" then - AC_DEFINE_UNQUOTED(COLLECTD_HEARTBEAT, "$collectd_heartbeat", [Interval in which plugins are queried.]) + AC_CHECK_HEADERS(upsclient.h, + [ + AC_DEFINE(HAVE_UPSCLIENT_H, 1, [Define to 1 if you have the header file.]) + ], [with_libupsclient="no (upsclient.h not found)"]) fi +AM_CONDITIONAL(BUILD_WITH_LIBUPSCLIENT, test "x$with_libupsclient" = "xyes") # Check for enabled/disabled features # @@ -1079,11 +1185,14 @@ AC_COLLECTD([battery], [disable], [module], [battery statistics]) AC_COLLECTD([cpu], [disable], [module], [cpu usage statistics]) AC_COLLECTD([cpufreq], [disable], [module], [system cpu frequency statistics]) AC_COLLECTD([disk], [disable], [module], [disk/partition statistics]) +AC_COLLECTD([csv], [disable], [module], [csv output plugin]) AC_COLLECTD([df], [disable], [module], [df statistics]) AC_COLLECTD([dns], [disable], [module], [dns statistics]) AC_COLLECTD([email], [disable], [module], [email statistics]) -AC_COLLECTD([quota], [enable], [module], [quota statistics (experimental)]) +AC_COLLECTD([entropy], [disable], [module], [entropy statistics]) +AC_COLLECTD([exec], [disable], [module], [exec of external programs]) AC_COLLECTD([hddtemp], [disable], [module], [hdd temperature statistics]) +AC_COLLECTD([interface], [disable], [module], [interface statistics]) AC_COLLECTD([iptables], [disable], [module], [IPtables statistics]) AC_COLLECTD([irq], [disable], [module], [irq statistics]) AC_COLLECTD([load], [disable], [module], [system load statistics]) @@ -1091,20 +1200,24 @@ AC_COLLECTD([mbmon], [disable], [module], [motherboard monitor statistics]) AC_COLLECTD([memory], [disable], [module], [memory statistics]) AC_COLLECTD([multimeter],[disable], [module], [multimeter statistics]) AC_COLLECTD([mysql], [disable], [module], [mysql statistics]) +AC_COLLECTD([network], [disable], [module], [network functionality]) AC_COLLECTD([nfs], [disable], [module], [nfs statistics]) AC_COLLECTD([ntpd], [disable], [module], [ntpd statistics]) +AC_COLLECTD([nut], [disable], [module], [network UPS tools statistics]) AC_COLLECTD([ping], [disable], [module], [ping statistics]) AC_COLLECTD([processes], [disable], [module], [processes statistics]) AC_COLLECTD([sensors], [disable], [module], [lm_sensors statistics]) AC_COLLECTD([serial], [disable], [module], [serial statistics]) +AC_COLLECTD([logfile], [disable], [module], [logfile log facility]) AC_COLLECTD([swap], [disable], [module], [swap statistics]) +AC_COLLECTD([syslog], [disable], [module], [syslog log facility]) AC_COLLECTD([tape], [disable], [module], [tape statistics]) -AC_COLLECTD([traffic], [disable], [module], [system traffic statistics]) +AC_COLLECTD([unixsock], [disable], [module], [UNIX socket plugin]) AC_COLLECTD([users], [disable], [module], [user count statistics]) AC_COLLECTD([vserver], [disable], [module], [vserver statistics]) AC_COLLECTD([wireless], [disable], [module], [wireless link statistics]) -AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/libconfig/Makefile src/liboping/Makefile) +AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/liboconfig/Makefile src/liboping/Makefile) cat <