Merge pull request #56 from octo/ci/nfs
authorFlorian Forster <github@nospam.verplant.org>
Fri, 23 Mar 2012 13:17:00 +0000 (06:17 -0700)
committerFlorian Forster <github@nospam.verplant.org>
Fri, 23 Mar 2012 13:17:00 +0000 (06:17 -0700)
NFS plugin: Add Solaris support.

1  2 
configure.in

diff --combined configure.in
@@@ -1,5 -1,5 +1,5 @@@
  dnl Process this file with autoconf to produce a configure script.
- AC_INIT(collectd, m4_esyscmd(./version-gen.sh))
+ AC_INIT(collectd, [m4_esyscmd(./version-gen.sh)])
  AC_CONFIG_SRCDIR(src/collectd.c)
  AC_CONFIG_HEADERS(src/config.h)
  AC_CONFIG_AUX_DIR([libltdl/config])
@@@ -403,33 -403,6 +403,33 @@@ AC_CHECK_HEADERS(linux/netdevice.h, []
  #endif
  ])
  
 +# For ethstat module
 +AC_CHECK_HEADERS(linux/sockios.h,
 +    [have_linux_sockios_h="yes"],
 +    [have_linux_sockios_h="no"],
 +    [
 +#if HAVE_SYS_IOCTL_H
 +# include <sys/ioctl.h>
 +#endif
 +#if HAVE_NET_IF_H
 +# include <net/if.h>
 +#endif
 +    ])
 +AC_CHECK_HEADERS(linux/ethtool.h,
 +    [have_linux_ethtool_h="yes"],
 +    [have_linux_ethtool_h="no"],
 +    [
 +#if HAVE_SYS_IOCTL_H
 +# include <sys/ioctl.h>
 +#endif
 +#if HAVE_NET_IF_H
 +# include <net/if.h>
 +#endif
 +#if HAVE_LINUX_SOCKIOS_H
 +# include <linux/sockios.h>
 +#endif
 +    ])
 +
  # For ipvs module
  have_linux_ip_vs_h="no"
  have_net_ip_vs_h="no"
@@@ -4099,9 -4072,10 +4099,9 @@@ the
        CPPFLAGS="$CPPFLAGS $with_libvarnish_cflags"
        #LDFLAGS="$LDFLAGS $with_libvarnish_libs"
  
 -      AC_CHECK_LIB(varnishapi, VSL_OpenStats,
 -                   [with_libvarnish="yes"],
 -                   [with_libvarnish="no (symbol VSL_OpenStats not found)"],
 -                   [$with_libvarnish_libs])
 +    AC_CHECK_HEADERS(varnish/vsc.h,
 +        [AC_DEFINE([HAVE_VARNISH_V3], [1], [Varnish 3 API support])],
 +        [AC_DEFINE([HAVE_VARNISH_V2], [1], [Varnish 2 API support])])
  
        CPPFLAGS="$SAVE_CPPFLAGS"
        #LDFLAGS="$SAVE_LDFLAGS"
@@@ -4459,7 -4433,6 +4459,7 @@@ plugin_curl_xml="no
  plugin_df="no"
  plugin_disk="no"
  plugin_entropy="no"
 +plugin_ethstat="no"
  plugin_fscache="no"
  plugin_interface="no"
  plugin_ipmi="no"
  # Solaris
  if test "x$with_kstat" = "xyes"
  then
+       plugin_nfs="yes"
        plugin_uptime="yes"
        plugin_zfs_arc="yes"
  fi
        fi
  fi
  
 +if test "x$have_linux_sockios_h$have_linux_ethtool_h" = "xyesyes"
 +then
 +      plugin_ethstat="yes"
 +fi
 +
  if test "x$have_getifaddrs" = "xyes"
  then
        plugin_interface="yes"
@@@ -4777,7 -4746,6 +4778,7 @@@ AC_PLUGIN([disk],        [$plugin_disk]
  AC_PLUGIN([dns],         [$with_libpcap],      [DNS traffic analysis])
  AC_PLUGIN([email],       [yes],                [EMail statistics])
  AC_PLUGIN([entropy],     [$plugin_entropy],    [Entropy statistics])
 +AC_PLUGIN([ethstat],     [$plugin_ethstat],    [Stats from NIC driver])
  AC_PLUGIN([exec],        [yes],                [Execution of external programs])
  AC_PLUGIN([filecount],   [yes],                [Count files in directories])
  AC_PLUGIN([fscache],     [$plugin_fscache],    [fscache statistics])
@@@ -5109,7 -5077,6 +5110,7 @@@ Configuration
      dns . . . . . . . . . $enable_dns
      email . . . . . . . . $enable_email
      entropy . . . . . . . $enable_entropy
 +    ethstat . . . . . . . $enable_ethstat
      exec  . . . . . . . . $enable_exec
      filecount . . . . . . $enable_filecount
      fscache . . . . . . . $enable_fscache