Merge branch 'collectd-4.1' into collectd-4.2
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Sat, 23 Feb 2008 09:58:00 +0000 (10:58 +0100)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Sat, 23 Feb 2008 09:58:00 +0000 (10:58 +0100)
1  2 
configure.in

diff --combined configure.in
@@@ -271,15 -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, [], [],
  [
@@@ -355,6 -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
@@@ -371,8 -367,7 +371,7 @@@ AC_CHECK_FUNCS(gettimeofday select strd
  
  AC_FUNC_STRERROR_R
  
- AC_CHECK_FUNCS(getpwnam_r)
- AC_CHECK_FUNCS(getgrnam_r)
+ AC_CHECK_FUNCS(getpwnam_r getgrnam_r setgroups regcomp regerror regexec regfree)
  
  socket_needs_socket="no"
  AC_CHECK_FUNCS(socket, [], AC_CHECK_LIB(socket, socket, [socket_needs_socket="yes"], AC_MSG_ERROR(cannot find socket)))
@@@ -382,8 -377,6 +381,6 @@@ nanosleep_needs_rt="no
  AC_CHECK_FUNCS(nanosleep, [], AC_CHECK_LIB(rt, nanosleep, [nanosleep_needs_rt="yes"], AC_MSG_ERROR(cannot find nanosleep)))
  AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$nanosleep_needs_rt" = "xyes")
  
- AC_CHECK_FUNCS(regcomp regerror regexec regfree)
  AC_CHECK_FUNCS(sysctlbyname, [have_sysctlbyname="yes"], [have_sysctlbyname="no"])
  AC_CHECK_FUNCS(host_statistics, [have_host_statistics="yes"], [have_host_statistics="no"])
  AC_CHECK_FUNCS(processor_info, [have_processor_info="yes"], [have_processor_info="no"])
@@@ -925,21 -918,13 +922,21 @@@ the
  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
  ],
  [
  ])
  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 <sensors/sensors.h> 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 <sensors/sensors.h> 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"
@@@ -1201,9 -1173,6 +1198,9 @@@ AC_ARG_WITH(libperl, [AS_HELP_STRING([-
  [
        with_libperl="yes"
  ])
 +
 +AC_SUBST(PERL, "$perl_interpreter")
 +
  if test "x$with_libperl" = "xyes"
  then
    SAVE_CFLAGS=$CFLAGS
@@@ -1708,7 -1677,6 +1705,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"
@@@ -1718,7 -1686,6 +1715,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"
        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
@@@ -1784,7 -1745,6 +1781,7 @@@ if test "x$have_sysctlbyname" = "xyes
  then
        plugin_cpu="yes"
        plugin_memory="yes"
 +      plugin_tcpconns="yes"
  fi
  
  if test "x$have_statfs" = "xyes"
@@@ -1857,19 -1817,16 +1854,19 @@@ AC_PLUGIN([exec],        [yes]
  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])
@@@ -1882,45 -1839,13 +1879,45 @@@ AC_PLUGIN([snmp],        [$with_libnets
  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"
 +      else
 +              PERL_BINDINGS_OPTIONS=""
 +              with_perl_bindings="$withval"
 +      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
  
  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:
      daemon mode . . . . $enable_daemon
      debug . . . . . . . $enable_debug
  
 +  Bindings:
 +    perl  . . . . . . . $with_perl_bindings
 +
    Modules:
      apache  . . . . . . $enable_apache
      apcups  . . . . . . $enable_apcups
      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
      swap  . . . . . . . $enable_swap
      syslog  . . . . . . $enable_syslog
      tape  . . . . . . . $enable_tape
 +    tcpconns  . . . . . $enable_tcpconns
      unixsock  . . . . . $enable_unixsock
      users . . . . . . . $enable_users
      vserver . . . . . . $enable_vserver