Merge branch 'collectd-4.0'
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Sun, 24 Jun 2007 20:42:09 +0000 (22:42 +0200)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Sun, 24 Jun 2007 20:42:09 +0000 (22:42 +0200)
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, 4.0.3)
+ AC_INIT(collectd, 4.0.4)
  AC_CONFIG_SRCDIR(src/collectd.c)
  AC_CONFIG_HEADERS(src/config.h)
  AM_INIT_AUTOMAKE(dist-bzip2)
@@@ -332,7 -332,12 +332,12 @@@ AC_CHECK_HEADERS(net/if_arp.h, [], []
  # include <sys/socket.h>
  #endif
  ])
- AC_CHECK_HEADERS(net/if_ppp.h)
+ AC_CHECK_HEADERS(net/ppp_defs.h)
+ AC_CHECK_HEADERS(net/if_ppp.h, [], [],
+ [#if HAVE_NET_PPP_DEFS_H
+ # include <net/ppp_defs.h>
+ #endif
+ ])
  AC_CHECK_HEADERS(netinet/if_ether.h, [], [],
  [#if HAVE_STDINT_H
  # include <stdint.h>
  fi
  AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes")
  
 +AC_ARG_WITH(libnetsnmp, [AS_HELP_STRING([--with-libnetsnmp@<:@=PREFIX@:>@], [Path to the Net-SNMPD library.])],
 +[
 +      if test "x$withval" != "xno" && test "x$withval" != "xyes"
 +      then
 +              LDFLAGS="$LDFLAGS -L$withval/lib"
 +              CPPFLAGS="$CPPFLAGS -I$withval/include"
 +              with_libnetsnmp="yes"
 +      fi
 +],
 +[with_libnetsnmp="yes"])
 +if test "x$with_libnetsnmp" = "xyes"
 +then
 +      AC_CHECK_LIB(netsnmp, init_snmp,
 +      [
 +              AC_DEFINE(HAVE_LIBSNMP, 1, [Define to 1 if you have the Net-SNMP library (-lnetsnmp).])
 +      ], [with_libnetsnmp="no (libnetsnmp not found)"])
 +fi
 +if test "x$with_libnetsnmp" = "xyes"
 +then
 +      AC_CHECK_HEADERS(net-snmp/net-snmp-config.h,
 +      [
 +              AC_DEFINE(HAVE_NET_SNMP_NET_SNMP_CONFIG_H, 1, [Define to 1 if you have the <net-snmp/net-snmp-config.h> header file.])
 +      ], [with_libnetsnmp="no (net-snmp/net-snmp-config.h not found)"])
 +fi
 +AM_CONDITIONAL(BUILD_WITH_LIBNETSNMP, test "x$with_libnetsnmp" = "xyes")
 +
  AC_ARG_WITH(libupsclient, [AS_HELP_STRING([--with-libupsclient@<:@=PREFIX@:>@], [Path to libupsclient.])],
  [
        if test "x$withval" != "xno" && test "x$withval" != "xyes"
  fi
  AM_CONDITIONAL(BUILD_WITH_LIBUPSCLIENT, test "x$with_libupsclient" = "xyes")
  
 +### BEGIN of check for libxmms ###
 +with_xmms_config="xmms-config"
 +with_xmms_prefix=0
 +with_xmms_cflags=""
 +with_xmms_libs=""
 +AC_ARG_WITH(libxmms, [AS_HELP_STRING([--with-libxmms@<:@=PREFIX@:>@], [Path to libxmms.])],
 +[
 +      if test "x$withval" != "xno" -a "x$withval" != "xyes"
 +      then
 +              if test -x "$withval/bin/xmms-config"
 +              then
 +                      with_xmms_config="$withval/bin/xmms-config"
 +                      with_xmms_prefix=1
 +              fi
 +      fi
 +      if test "x$withval" = "xno"
 +      then
 +              with_libxmms="no"
 +      else
 +              with_libxmms="yes"
 +      fi
 +],
 +[
 +      with_libxmms="yes"
 +])
 +if test "x$with_libxmms" = "xyes"
 +then
 +      with_xmms_cflags=`$with_xmms_config --cflags 2>/dev/null`
 +      xmms_config_status=$?
 +
 +      if test $xmms_config_status -ne 0
 +      then
 +              with_libxmms="no"
 +      fi
 +fi
 +if test "x$with_libxmms" = "xyes"
 +then
 +      with_xmms_libs=`$with_xmms_config --libs 2>/dev/null`
 +      xmms_config_status=$?
 +
 +      if test $xmms_config_status -ne 0
 +      then
 +              with_libxmms="no"
 +      fi
 +fi
 +if test "x$with_libxmms" = "xyes"
 +then
 +      AC_CHECK_LIB(xmms, xmms_remote_get_info,
 +      [
 +              BUILD_WITH_LIBXMMS_CFLAGS="$with_xmms_cflags"
 +              BUILD_WITH_LIBXMMS_LIBS="$with_xmms_libs"
 +              AC_SUBST(BUILD_WITH_LIBXMMS_CFLAGS)
 +              AC_SUBST(BUILD_WITH_LIBXMMS_LIBS)
 +      ],
 +      [
 +              with_libxmms="no"
 +      ],
 +      [$with_xmms_libs])
 +fi
 +with_libxmms_numeric=0
 +if test "x$with_libxmms" = "xyes"
 +then
 +      with_libxmms_numeric=1
 +fi
 +AC_DEFINE_UNQUOTED(HAVE_LIBXMMS, [$with_libxmms_numeric], [Define to 1 if you have the 'xmms' library (-lxmms).])
 +AM_CONDITIONAL(BUILD_WITH_LIBXMMS, test "x$with_libxmms" = "xyes")
 +### END of check for libxmms ###
 +
  # Check for enabled/disabled features
  #
  
@@@ -1457,7 -1368,6 +1462,7 @@@ AC_COLLECTD([ping],      [disable], [mo
  AC_COLLECTD([processes], [disable], [module], [processes statistics])
  AC_COLLECTD([sensors],   [disable], [module], [lm_sensors statistics])
  AC_COLLECTD([serial],    [disable], [module], [serial statistics])
 +AC_COLLECTD([snmp],      [disable], [module], [serial statistics])
  AC_COLLECTD([logfile],   [disable], [module], [logfile log facility])
  AC_COLLECTD([swap],      [disable], [module], [swap statistics])
  AC_COLLECTD([syslog],    [disable], [module], [syslog log facility])
@@@ -1466,7 -1376,6 +1471,7 @@@ AC_COLLECTD([unixsock],  [disable], [mo
  AC_COLLECTD([users],     [disable], [module], [user count statistics])
  AC_COLLECTD([vserver],   [disable], [module], [vserver statistics])
  AC_COLLECTD([wireless],  [disable], [module], [wireless link statistics])
 +AC_COLLECTD([xmms],      [disable], [module], [wireless link statistics])
  
  AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/liboconfig/Makefile src/liboping/Makefile)
  
@@@ -1486,7 -1395,6 +1491,7 @@@ Configuration
      libiptc . . . . . . $with_libiptc
      libkstat  . . . . . $with_kstat
      libmysql  . . . . . $with_libmysql
 +    libnetsnmp  . . . . $with_libnetsnmp
      liboconfig  . . . . $with_liboconfig
      liboping  . . . . . $with_liboping
      libpcap . . . . . . $with_libpcap
      libsensors  . . . . $with_lm_sensors
      libstatgrab . . . . $with_libstatgrab
      libupsclient  . . . $with_libupsclient
 +    libxmms . . . . . . $with_libxmms
  
    Features:
      daemon mode . . . . $enable_daemon
      processes . . . . . $enable_processes
      sensors . . . . . . $enable_sensors
      serial  . . . . . . $enable_serial
 +    snmp  . . . . . . . $enable_snmp
      swap  . . . . . . . $enable_swap
      syslog  . . . . . . $enable_syslog
      tape  . . . . . . . $enable_tape
      users . . . . . . . $enable_users
      vserver . . . . . . $enable_vserver
      wireless  . . . . . $enable_wireless
 +    xmms  . . . . . . . $enable_xmms
  
  EOF