Merge branch 'collectd-4.1'
[collectd.git] / configure.in
index 6c0f3b4..46b9f8f 100644 (file)
@@ -271,6 +271,15 @@ AC_CHECK_HEADERS(linux/netdevice.h, [], [],
 #endif
 ])
 
+# For ipvs module
+have_net_ip_vs_h="no"
+have_ip_vs_h="no"
+if test "x$ac_system" = "xLinux"
+then
+       AC_CHECK_HEADERS(net/ip_vs.h, [have_net_ip_vs_h="yes"])
+       AC_CHECK_HEADERS(ip_vs.h, [have_ip_vs_h="yes"])
+fi
+
 # For quota module
 AC_CHECK_HEADERS(sys/ucred.h, [], [],
 [
@@ -1167,6 +1176,9 @@ AC_ARG_WITH(libperl, [AS_HELP_STRING([--with-libperl@<:@=PREFIX@:>@], [Path to l
 [
        with_libperl="yes"
 ])
+
+AC_SUBST(PERL, "$perl_interpreter")
+
 if test "x$with_libperl" = "xyes"
 then
   SAVE_CFLAGS=$CFLAGS
@@ -1671,6 +1683,7 @@ plugin_df="no"
 plugin_disk="no"
 plugin_entropy="no"
 plugin_interface="no"
+plugin_ipvs="no"
 plugin_irq="no"
 plugin_load="no"
 plugin_memory="no"
@@ -1680,6 +1693,7 @@ plugin_processes="no"
 plugin_serial="no"
 plugin_swap="no"
 plugin_tape="no"
+plugin_tcpconns="no"
 plugin_users="no"
 plugin_vserver="no"
 plugin_wireless="no"
@@ -1700,8 +1714,14 @@ then
        plugin_processes="yes"
        plugin_serial="yes"
        plugin_swap="yes"
+       plugin_tcpconns="yes"
        plugin_vserver="yes"
        plugin_wireless="yes"
+
+       if test "x$have_net_ip_vs_h" = "xyes" -o "x$have_ip_vs_h" = "xyes"
+       then
+               plugin_ipvs="yes"
+       fi
 fi
 
 # Mac OS X devices
@@ -1739,6 +1759,7 @@ if test "x$have_sysctlbyname" = "xyes"
 then
        plugin_cpu="yes"
        plugin_memory="yes"
+       plugin_tcpconns="yes"
 fi
 
 if test "x$have_statfs" = "xyes"
@@ -1811,16 +1832,19 @@ AC_PLUGIN([exec],        [yes],                [Execution of external programs])
 AC_PLUGIN([hddtemp],     [yes],                [Query hddtempd])
 AC_PLUGIN([interface],   [$plugin_interface],  [Interface traffic statistics])
 AC_PLUGIN([iptables],    [$with_libiptc],      [IPTables rule counters])
+AC_PLUGIN([ipvs],        [$plugin_ipvs],       [IPVS connection statistics])
 AC_PLUGIN([irq],         [$plugin_irq],        [IRQ statistics])
 AC_PLUGIN([load],        [$plugin_load],       [System load])
 AC_PLUGIN([logfile],     [yes],                [File logging plugin])
 AC_PLUGIN([mbmon],       [yes],                [Query mbmond])
+AC_PLUGIN([memcached],   [yes],                [memcached statistics])
 AC_PLUGIN([memory],      [$plugin_memory],     [Memory usage])
 AC_PLUGIN([multimeter],  [$plugin_multimeter], [Read multimeter values])
 AC_PLUGIN([mysql],       [$with_libmysql],     [MySQL statistics])
 AC_PLUGIN([netlink],     [$with_libnetlink],   [Enhanced Linux network statistics])
 AC_PLUGIN([network],     [yes],                [Network communication plugin])
 AC_PLUGIN([nfs],         [$plugin_nfs],        [NFS statistics])
+AC_PLUGIN([nginx],       [$with_libcurl],      [nginx statistics])
 AC_PLUGIN([ntpd],        [yes],                [NTPd statistics])
 AC_PLUGIN([nut],         [$with_libupsclient], [Network UPS tools statistics])
 AC_PLUGIN([perl],        [$with_libperl],      [Embed a Perl interpreter])
@@ -1833,13 +1857,42 @@ AC_PLUGIN([snmp],        [$with_libnetsnmp],   [SNMP querying plugin])
 AC_PLUGIN([swap],        [$plugin_swap],       [Swap usage statistics])
 AC_PLUGIN([syslog],      [$have_syslog],       [Syslog logging plugin])
 AC_PLUGIN([tape],        [$plugin_tape],       [Tape drive statistics])
+AC_PLUGIN([tcpconns],    [$plugin_tcpconns],   [TCP connection statistics])
 AC_PLUGIN([unixsock],    [yes],                [Unixsock communication plugin])
 AC_PLUGIN([users],       [$plugin_users],      [User statistics])
 AC_PLUGIN([vserver],     [$plugin_vserver],    [Linux VServer statistics])
 AC_PLUGIN([wireless],    [$plugin_wireless],   [Wireless statistics])
 AC_PLUGIN([xmms],        [$with_libxmms],      [XMMS statistics])
 
-AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/liboconfig/Makefile src/liboping/Makefile)
+dnl ip_vs.h
+if test "x$ac_system" = "xLinux" -a "x$have_net_ip_vs_h$have_ip_vs_h" = "xnono"
+then
+       enable_ipvs="$enable_ipvs (ip_vs.h not found)"
+fi
+
+dnl Perl bindings
+AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@], [Options passed to "perl Makefile.PL".])],
+[
+       if test "x$withval" != "xno" && test "x$withval" != "xyes"
+       then
+               PERL_BINDINGS_OPTIONS="$withval"
+               with_perl_bindings="yes"
+       fi
+],
+[
+       PERL_BINDINGS_OPTIONS=""
+       with_perl_bindings="yes"
+])
+if test "x$with_perl_bindings" = "xyes"
+then
+       PERL_BINDINGS="perl"
+else
+       PERL_BINDINGS=""
+fi
+AC_SUBST(PERL_BINDINGS)
+AC_SUBST(PERL_BINDINGS_OPTIONS)
+
+AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/liboconfig/Makefile src/liboping/Makefile bindings/Makefile)
 
 if test "x$with_liboping" = "xyes" -a "x$with_own_liboping" = "xyes"
 then
@@ -1848,11 +1901,16 @@ fi
 
 if test "x$with_libperl" = "xyes"
 then
-       with_libperl="yes (version `perl -MConfig -e 'print $Config{version};'`)"
+       with_libperl="yes (version `$perl_interpreter -MConfig -e 'print $Config{version};'`)"
 else
        enable_perl="no (needs libperl)"
 fi
 
+if test "x$with_perl_bindings" = "xyes" -a "x$PERL_BINDINGS_OPTIONS" != "x"
+then
+       with_perl_bindings="yes ($PERL_BINDINGS_OPTIONS)"
+fi
+
 cat <<EOF;
 
 Configuration:
@@ -1880,6 +1938,9 @@ Configuration:
     daemon mode . . . . $enable_daemon
     debug . . . . . . . $enable_debug
 
+  Bindings:
+    perl  . . . . . . . $with_perl_bindings
+
   Modules:
     apache  . . . . . . $enable_apache
     apcups  . . . . . . $enable_apcups
@@ -1897,16 +1958,19 @@ Configuration:
     hddtemp . . . . . . $enable_hddtemp
     interface . . . . . $enable_interface
     iptables  . . . . . $enable_iptables
+    ipvs  . . . . . . . $enable_ipvs
     irq . . . . . . . . $enable_irq
     load  . . . . . . . $enable_load
     logfile . . . . . . $enable_logfile
     mbmon . . . . . . . $enable_mbmon
+    memcached . . . . . $enable_memcached
     memory  . . . . . . $enable_memory
     multimeter  . . . . $enable_multimeter
     mysql . . . . . . . $enable_mysql
     netlink . . . . . . $enable_netlink
     network . . . . . . $enable_network
     nfs . . . . . . . . $enable_nfs
+    nginx . . . . . . . $enable_nginx
     ntpd  . . . . . . . $enable_ntpd
     nut . . . . . . . . $enable_nut
     perl  . . . . . . . $enable_perl
@@ -1919,6 +1983,7 @@ Configuration:
     swap  . . . . . . . $enable_swap
     syslog  . . . . . . $enable_syslog
     tape  . . . . . . . $enable_tape
+    tcpconns  . . . . . $enable_tcpconns
     unixsock  . . . . . $enable_unixsock
     users . . . . . . . $enable_users
     vserver . . . . . . $enable_vserver