X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.in;h=0ef4652c0447a7e2c5970e9cea98d54672f656c3;hb=14ffdba9f0a80c1a23235cc1f30e5d0708f82306;hp=78a807a5a0582c700d898b6aff5c9467f39f6399;hpb=ac9cdb55cacd2b9ab0cc6e803a334e6b1673d2de;p=collectd.git diff --git a/configure.in b/configure.in index 78a807a5..0ef4652c 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, [], [], [ @@ -683,19 +692,25 @@ AC_ARG_WITH(rrdtool, [AS_HELP_STRING([--with-rrdtool@<:@=PREFIX@:>@], [Path to r ], [with_rrdtool="yes"]) if test "x$with_rrdtool" = "xyes" then - SAVE_CFLAGS="$CFLAGS" + SAVE_CPPFLAGS="$CPPFLAGS" SAVE_LDFLAGS="$LDFLAGS" - CFLAGS="$CFLAGS $librrd_cflags" + CPPFLAGS="$CPPFLAGS $librrd_cflags" LDFLAGS="$LDFLAGS $librrd_ldflags" AC_CHECK_HEADERS(rrd.h,, [with_rrdtool="no (rrd.h not found)"]) - CFLAGS="$SAVE_CFLAGS" + CPPFLAGS="$SAVE_CPPFLAGS" LDFLAGS="$SAVE_LDFLAGS" fi if test "x$with_rrdtool" = "xyes" then + SAVE_CPPFLAGS="$CPPFLAGS" + SAVE_LDFLAGS="$LDFLAGS" + + CPPFLAGS="$CPPFLAGS $librrd_cflags" + LDFLAGS="$LDFLAGS $librrd_ldflags" + AC_CHECK_LIB(rrd_th, rrd_update_r, [with_rrdtool="yes" librrd_ldflags="$librrd_ldflags -lrrd_th -lm" @@ -709,6 +724,9 @@ then [-lm]) ] [-lm]) + + CPPFLAGS="$SAVE_CPPFLAGS" + LDFLAGS="$SAVE_LDFLAGS" fi if test "x$with_rrdtool" = "xyes" then @@ -912,13 +930,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 ], [ @@ -931,28 +957,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" @@ -1167,6 +1206,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 +1713,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 +1723,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 +1744,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 +1789,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 +1862,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 +1887,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 +1931,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 <