X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.in;h=75bc00f4271dca477cf1e83b25e2c027e2b47ecd;hb=917abf10c462903cd3bb37faadba68f91f5ca8b1;hp=eb96d4e1b11787a116dec2c3ca3177b8f00dd782;hpb=4c67453e4739117ddc8dab0e907953f0fb7a0170;p=collectd.git diff --git a/configure.in b/configure.in index eb96d4e1..75bc00f4 100644 --- a/configure.in +++ b/configure.in @@ -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, [], [], [ @@ -346,11 +355,6 @@ have_termios_h="no" AC_CHECK_HEADERS(termios.h, [have_termios_h="yes"]) # -# Checking for libraries -# -AC_CHECK_LIB(m, ext) - -# # Checks for typedefs, structures, and compiler characteristics. # AC_C_CONST @@ -921,13 +925,21 @@ then fi AM_CONDITIONAL(BUILD_WITH_LIBKVM, test "x$with_libkvm" = "xyes") +with_sensors_cflags="" +with_sensors_ldflags="" AC_ARG_WITH(lm-sensors, [AS_HELP_STRING([--with-lm-sensors@<:@=PREFIX@:>@], [Path to lm_sensors.])], [ - if test "x$withval" != "xno" && test "x$withval" != "xyes" + if test "x$withval" = "xno" then - LDFLAGS="$LDFLAGS -L$withval/lib" - CPPFLAGS="$CPPFLAGS -I$withval/include" + with_lm_sensors="no" + else with_lm_sensors="yes" + if test "x$withval" != "xyes" + then + with_sensors_cflags="-I$withval/include" + with_sensors_ldflags="-L$withval/lib" + with_lm_sensors="yes" + fi fi ], [ @@ -940,28 +952,41 @@ AC_ARG_WITH(lm-sensors, [AS_HELP_STRING([--with-lm-sensors@<:@=PREFIX@:>@], [Pat ]) if test "x$with_lm_sensors" = "xyes" then - AC_CHECK_LIB(sensors, sensors_init, - [ - AC_DEFINE(HAVE_LIBSENSORS, 1, [Define to 1 if you have the sensors library (-lsensors).]) - ], - [with_lm_sensors="no (libsensors not found)"]) + SAVE_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $with_sensors_cflags" + +# AC_CHECK_HEADERS(sensors/sensors.h, +# [ +# AC_DEFINE(HAVE_SENSORS_SENSORS_H, 1, [Define to 1 if you have the header file.]) +# ], +# [with_lm_sensors="no (sensors/sensors.h not found)"]) + AC_CHECK_HEADERS(sensors/sensors.h, [], [with_lm_sensors="no (sensors/sensors.h not found)"]) + + CPPFLAGS="$SAVE_CPPFLAGS" fi if test "x$with_lm_sensors" = "xyes" then - AC_CHECK_HEADERS(sensors/sensors.h, + SAVE_CPPFLAGS="$CPPFLAGS" + SAVE_LDFLAGS="$LDFLAGS" + CPPFLAGS="$CPPFLAGS $with_sensors_cflags" + LDFLAGS="$LDFLAGS $with_sensors_ldflags" + + AC_CHECK_LIB(sensors, sensors_init, [ - AC_DEFINE(HAVE_SENSORS_SENSORS_H, 1, [Define to 1 if you have the header file.]) + AC_DEFINE(HAVE_LIBSENSORS, 1, [Define to 1 if you have the sensors library (-lsensors).]) ], - [with_lm_sensors="no (sensors/sensors.h not found)"]) + [with_lm_sensors="no (libsensors not found)"]) + + CPPFLAGS="$SAVE_CPPFLAGS" + LDFLAGS="$SAVE_LDFLAGS" fi if test "x$with_lm_sensors" = "xyes" then - collect_lm_sensors=1 -else - collect_lm_sensors=0 + BUILD_WITH_LIBSENSORS_CFLAGS="$with_sensors_cflags" + BUILD_WITH_LIBSENSORS_LDFLAGS="$with_sensors_ldflags" + AC_SUBST(BUILD_WITH_LIBSENSORS_CFLAGS) + AC_SUBST(BUILD_WITH_LIBSENSORS_LDFLAGS) fi -AC_DEFINE_UNQUOTED(COLLECT_LM_SENSORS, [$collect_lm_sensors], - [Wether or not to use sensors library]) AM_CONDITIONAL(BUILD_WITH_LM_SENSORS, test "x$with_lm_sensors" = "xyes") with_mysql_config="mysql_config" @@ -1176,6 +1201,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 @@ -1266,7 +1294,7 @@ AC_ARG_WITH(libnetsnmp, [AS_HELP_STRING([--with-libnetsnmp@<:@=PREFIX@:>@], [Pat if test "x$withval" = "xno" then with_libnetsnmp="no" - else if "x$withval" = "xyes" + else if test "x$withval" = "xyes" then with_libnetsnmp="yes" else @@ -1680,6 +1708,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" @@ -1689,6 +1718,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" @@ -1709,8 +1739,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 @@ -1748,6 +1784,7 @@ if test "x$have_sysctlbyname" = "xyes" then plugin_cpu="yes" plugin_memory="yes" + plugin_tcpconns="yes" fi if test "x$have_statfs" = "xyes" @@ -1820,16 +1857,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]) @@ -1842,13 +1882,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 @@ -1857,11 +1926,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 <