~ubuntu-branches/ubuntu/oneiric/collectd/oneiric

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Harl
  • Date: 2008-06-17 10:35:51 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080617103551-9d0ym3zejc7agtt3
Tags: 4.4.1-1
* New upstream release.
  - Fixed another issue of the sensors plugin affecting some chip types
    (Closes: #468143).
  - Fixed creation of "vserver" graphs in collection.cgi (Closes: #475120).
  - Fixed a segfault when using libperl 5.10.
  - collectd now ships libiptc itself.
  New plugins:
  - Ascent server statistics: ascent
  - IPMI sensors information: ipmi
  - PowerDNS name server statistics: powerdns
  - incremental parsing of logfiles: tail
  - TeamSpeak2 server statistics: teamspeak2
  - detailed virtual memory statistics: vmem
* Disable "tcpconns" plugin by default (Closes: #478759).
* Reenabled iptables plugin on all architectures (Closes: #473435).
  - Added the plugin to collectd.conf.
  - Added /usr/share/doc/collectd/examples/iptables/.
  - Added build dependency on linux-libc-dev (>= 2.6.25-4) - that version is
    required because of #479899.
* New debconf template translations:
  - gl.po, thanks to Jacobo Tarrio (Closes: #482667).
* Added a work around for #474087 (broken openipmi .pc files) by forcing the
  inclusion of the ipmi plugin and manually specifying the dependencies.
* Updated standards-version to 3.8.0 (no changes).

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
AC_PROG_LIBTOOL
30
30
AC_PROG_LEX
31
31
AC_PROG_YACC
 
32
PKG_PROG_PKG_CONFIG
32
33
AC_CONFIG_SUBDIRS(libltdl)
33
34
 
34
35
AC_MSG_CHECKING([for kernel type ($host_os)])
56
57
AC_HEADER_SYS_WAIT
57
58
AC_HEADER_DIRENT
58
59
 
59
 
AC_CHECK_HEADERS(stdint.h stdio.h errno.h math.h stdarg.h syslog.h fcntl.h signal.h assert.h sys/types.h sys/socket.h sys/select.h poll.h netdb.h arpa/inet.h sys/resource.h sys/param.h kstat.h regex.h sys/ioctl.h)
 
60
AC_CHECK_HEADERS(stdint.h stdio.h errno.h math.h stdarg.h syslog.h fcntl.h signal.h assert.h sys/types.h sys/socket.h sys/select.h poll.h netdb.h arpa/inet.h sys/resource.h sys/param.h kstat.h regex.h sys/ioctl.h endian.h)
60
61
 
61
62
# For ping library
62
63
AC_CHECK_HEADERS(netinet/in_systm.h, [], [],
372
373
 
373
374
AC_FUNC_STRERROR_R
374
375
 
 
376
AC_CACHE_CHECK([for strtok_r],
 
377
  [have_strtok_r_default],
 
378
  AC_LINK_IFELSE(
 
379
    AC_LANG_PROGRAM(
 
380
    [[[[
 
381
#include <stdlib.h>
 
382
#include <stdio.h>
 
383
#include <string.h>
 
384
    ]]]],
 
385
    [[[[
 
386
      char buffer[] = "foo,bar,baz";
 
387
      char *token;
 
388
      char *dummy;
 
389
      char *saveptr;
 
390
 
 
391
      dummy = buffer;
 
392
      saveptr = NULL;
 
393
      while ((token = strtok_r (dummy, ",", &saveptr)) != NULL)
 
394
      {
 
395
        dummy = NULL;
 
396
        printf ("token = %s;\n", token);
 
397
      }
 
398
    ]]]]),
 
399
    [have_strtok_r_default="yes"],
 
400
    [have_strtok_r_default="no"]
 
401
  )
 
402
)
 
403
 
 
404
if test "x$have_strtok_r_default" = "xno"
 
405
then
 
406
  SAVE_CFLAGS="$CFLAGS"
 
407
  CFLAGS="$CFLAGS -D_REENTRANT=1"
 
408
 
 
409
  AC_CACHE_CHECK([if strtok_r needs _REENTRANT],
 
410
    [have_strtok_r_reentrant],
 
411
    AC_LINK_IFELSE(
 
412
      AC_LANG_PROGRAM(
 
413
      [[[[
 
414
#include <stdlib.h>
 
415
#include <stdio.h>
 
416
#include <string.h>
 
417
      ]]]],
 
418
      [[[[
 
419
        char buffer[] = "foo,bar,baz";
 
420
        char *token;
 
421
        char *dummy;
 
422
        char *saveptr;
 
423
 
 
424
        dummy = buffer;
 
425
        saveptr = NULL;
 
426
        while ((token = strtok_r (dummy, ",", &saveptr)) != NULL)
 
427
        {
 
428
          dummy = NULL;
 
429
          printf ("token = %s;\n", token);
 
430
        }
 
431
      ]]]]),
 
432
      [have_strtok_r_reentrant="yes"],
 
433
      [AC_MSG_FAILURE([strtok_r isn't available. Please file a bugreport!])]
 
434
    )
 
435
  )
 
436
fi
 
437
 
375
438
AC_CHECK_FUNCS(getpwnam_r getgrnam_r setgroups regcomp regerror regexec regfree)
376
439
 
377
440
socket_needs_socket="no"
811
874
#endif
812
875
        ])
813
876
 
 
877
#
 
878
# Checks for libraries begin here
 
879
#
814
880
with_libresolv="yes"
815
881
AC_CHECK_LIB(resolv, res_search,
816
882
[
902
968
fi
903
969
 
904
970
AC_ARG_WITH(libpthread, [AS_HELP_STRING([--with-libpthread=@<:@=PREFIX@:>@], [Path to libpthread.])],
905
 
[       if test "x$withval" != "xno" -a "x$withval" != "xyes"
 
971
[       if test "x$withval" != "xno" \
 
972
                && test "x$withval" != "xyes"
906
973
        then
907
974
                LDFLAGS="$LDFLAGS -L$withval/lib"
908
975
                CPPFLAGS="$CPPFLAGS -I$withval/include"
995
1062
        then
996
1063
                with_libcurl="no ($with_curl_config failed)"
997
1064
        else
998
 
                SAVE_CFLAGS=$CFLAGS
999
 
                CFLAGS="$CFLAGS $with_curl_cflags"
 
1065
                SAVE_CPPFLAGS="$CPPFLAGS"
 
1066
                CPPFLAGS="$CPPFLAGS $with_curl_cflags"
1000
1067
 
1001
1068
                AC_CHECK_HEADERS(curl/curl.h, [], [with_libcurl="no (curl/curl.h not found)"], [])
1002
1069
 
1003
 
                CFLAGS="$SAVE_CFLAGS"
 
1070
                CPPFLAGS="$SAVE_CPPFLAGS"
1004
1071
        fi
1005
1072
fi
1006
1073
if test "x$with_libcurl" = "xyes"
1029
1096
### END of check for libcurl ###
1030
1097
 
1031
1098
with_libiokit="no"
1032
 
collectd_libiokit=0
1033
1099
AC_CHECK_LIB(IOKit, IOServiceGetMatchingServices,
1034
1100
[
1035
1101
        with_libiokit="yes"
1036
 
        collectd_libiokit=1
1037
 
],
 
1102
], 
1038
1103
[
1039
1104
        with_libiokit="no"
1040
 
        collectd_libiokit=0
1041
1105
])
1042
 
AC_DEFINE_UNQUOTED(COLLECT_LIBIOKIT, [$collect_libiokit], [Wether or not to use the IOKit library])
1043
1106
AM_CONDITIONAL(BUILD_WITH_LIBIOKIT, test "x$with_libiokit" = "xyes")
1044
1107
 
 
1108
with_libstatgrab_cflags=""
 
1109
with_libstatgrab_ldflags=""
1045
1110
AC_ARG_WITH(libstatgrab, [AS_HELP_STRING([--with-libstatgrab@<:@=PREFIX@:>@], [Path to libstatgrab.])],
1046
1111
[
1047
 
        if test "x$withval" != "xno" -a "x$withval" != "xyes"
 
1112
        if test "x$withval" != "xno" \
 
1113
                && test "x$withval" != "xyes"
1048
1114
        then
1049
 
                LDFLAGS="$LDFLAGS -L$withval/lib"
1050
 
                CPPFLAGS="$CPPFLAGS -I$withval/include"
 
1115
                with_libstatgrab_cflags="-I$withval/include"
 
1116
                with_libstatgrab_ldflags="-L$withval/lib"
1051
1117
                with_libstatgrab="yes"
1052
1118
        else
1053
1119
                with_libstatgrab="$withval"
1054
1120
        fi
1055
1121
],
1056
1122
[
1057
 
        if test "x$ac_system" == "xunknown"
 
1123
        if test "x$ac_system" = "xunknown"
1058
1124
        then
1059
1125
                with_libstatgrab="yes"
1060
1126
        else
1061
1127
                with_libstatgrab="no"
1062
1128
        fi
1063
1129
])
1064
 
if test "x$with_libstatgrab" = "xyes"
1065
 
then
1066
 
        AC_CHECK_LIB(statgrab, sg_init, [with_libstatgrab="yes"], [with_libstatgrab="no (libstatgrab not found)"])
1067
 
fi
1068
 
if test "x$with_libstatgrab" = "xyes"
1069
 
then
1070
 
        AC_CHECK_HEADERS(statgrab.h,,    [with_libstatgrab="no (statgrab.h not found)"])
1071
 
fi
1072
 
if test "x$with_libstatgrab" = "xyes"
1073
 
then
1074
 
        AC_CHECK_LIB(devstat, getdevs, [with_libdevstat="yes"], [with_libdevstat="no"])
1075
 
fi
1076
 
if test "x$with_libstatgrab" = "xyes"
1077
 
then
1078
 
        collect_libstatgrab=1
 
1130
with_libstatgrab_pkg_config="yes"
 
1131
if test "x$with_libstatgrab" = "xyes" \
 
1132
  && test "x$PKG_CONFIG" != "x"
 
1133
then
 
1134
  AC_MSG_CHECKING([pkg-config for libstatgrab])
 
1135
  temp_result="found"
 
1136
  $PKG_CONFIG --exists libstatgrab 2>/dev/null
 
1137
  if test "$?" != "0"
 
1138
  then
 
1139
    with_libstatgrab_pkg_config="no"
 
1140
    temp_result="not found"
 
1141
  fi
 
1142
  AC_MSG_RESULT([$temp_result])
1079
1143
else
1080
 
        collect_libstatgrab=0
1081
 
fi
1082
 
AC_DEFINE_UNQUOTED(COLLECT_LIBSTATGRAB, [$collect_libstatgrab],
1083
 
        [Wether or not to use statgrab library])
 
1144
  AC_MSG_NOTICE([pkg-config not available, trying to guess flags for the statgrab library.])
 
1145
  with_libstatgrab_pkg_config="no"
 
1146
  with_libstatgrab_ldflags="$with_libstatgrab_ldflags -lstatgrab"
 
1147
fi
 
1148
 
 
1149
if test "x$with_libstatgrab" = "xyes" \
 
1150
  && test "x$with_libstatgrab_pkg_config" = "xyes" \
 
1151
  && test "x$with_libstatgrab_cflags" = "x"
 
1152
then
 
1153
  AC_MSG_CHECKING([for libstatgrab CFLAGS])
 
1154
  temp_result="`$PKG_CONFIG --cflags libstatgrab`"
 
1155
  if test "$?" = "0"
 
1156
  then
 
1157
    with_libstatgrab_cflags="$temp_result"
 
1158
  else
 
1159
    with_libstatgrab="no ($PKG_CONFIG --cflags libstatgrab failed)"
 
1160
    temp_result="$PKG_CONFIG --cflags libstatgrab failed"
 
1161
  fi
 
1162
  AC_MSG_RESULT([$temp_result])
 
1163
fi
 
1164
 
 
1165
if test "x$with_libstatgrab" = "xyes" \
 
1166
  && test "x$with_libstatgrab_pkg_config" = "xyes" \
 
1167
  && test "x$with_libstatgrab_ldflags" = "x"
 
1168
then
 
1169
  AC_MSG_CHECKING([for libstatgrab LDFLAGS])
 
1170
  temp_result="`$PKG_CONFIG --libs libstatgrab`"
 
1171
  if test "$?" = "0"
 
1172
  then
 
1173
    with_libstatgrab_ldflags="$temp_result"
 
1174
  else
 
1175
    with_libstatgrab="no ($PKG_CONFIG --libs libstatgrab failed)"
 
1176
    temp_result="$PKG_CONFIG --libs libstatgrab failed"
 
1177
  fi
 
1178
  AC_MSG_RESULT([$temp_result])
 
1179
fi
 
1180
 
 
1181
if test "x$with_libstatgrab" = "xyes"
 
1182
then
 
1183
  SAVE_CPPFLAGS="$CPPFLAGS"
 
1184
  CPPFLAGS="$CPPFLAGS $with_libstatgrab_cflags"
 
1185
 
 
1186
  AC_CHECK_HEADERS(statgrab.h,
 
1187
                   [with_libstatgrab="yes"],
 
1188
                   [with_libstatgrab="no (statgrab.h not found)"])
 
1189
 
 
1190
  CPPFLAGS="$SAVE_CPPFLAGS"
 
1191
fi
 
1192
 
 
1193
if test "x$with_libstatgrab" = "xyes"
 
1194
then
 
1195
  SAVE_CFLAGS="$CFLAGS"
 
1196
  SAVE_LDFLAGS="$LDFLAGS"
 
1197
 
 
1198
  CFLAGS="$CFLAGS $with_libstatgrab_cflags"
 
1199
  LDFLAGS="$LDFLAGS $with_libstatgrab_ldflags"
 
1200
 
 
1201
  AC_CHECK_LIB(statgrab, sg_init,
 
1202
               [with_libstatgrab="yes"],
 
1203
               [with_libstatgrab="no (symbol sg_init not found)"])
 
1204
 
 
1205
  CFLAGS="$SAVE_CFLAGS"
 
1206
  LDFLAGS="$SAVE_LDFLAGS"
 
1207
fi
 
1208
 
1084
1209
AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes")
1085
 
AM_CONDITIONAL(BUILD_WITH_LIBDEVSTAT,  test "x$with_libdevstat"  = "xyes")
 
1210
if test "x$with_libstatgrab" = "xyes"
 
1211
then
 
1212
  AC_DEFINE(HAVE_LIBSTATGRAB, 1, [Define to 1 if you have the 'statgrab' library (-lstatgrab)])
 
1213
  BUILD_WITH_LIBSTATGRAB_CFLAGS="$with_libstatgrab_cflags"
 
1214
  BUILD_WITH_LIBSTATGRAB_LDFLAGS="$with_libstatgrab_ldflags"
 
1215
  AC_SUBST(BUILD_WITH_LIBSTATGRAB_CFLAGS)
 
1216
  AC_SUBST(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
 
1217
fi
1086
1218
 
1087
1219
AC_CHECK_LIB(kvm, kvm_getswapinfo, [with_libkvm="yes"], [with_libkvm="no"])
1088
1220
if test "x$with_libkvm" = "xyes"
1189
1321
        then
1190
1322
                with_libmysql="no"
1191
1323
        else
1192
 
                SAVE_CFLAGS=$CFLAGS
1193
 
                CFLAGS="$CFLAGS $with_mysql_cflags"
 
1324
                SAVE_CPPFLAGS="$CPPFLAGS"
 
1325
                CPPFLAGS="$CPPFLAGS $with_mysql_cflags"
1194
1326
 
1195
1327
                AC_CHECK_HEADERS(mysql/mysql.h, [], [with_libmysql="no (mysql/mysql.h not found)"], [])
1196
1328
 
1197
 
                CFLAGS="$SAVE_CFLAGS"
 
1329
                CPPFLAGS="$SAVE_CPPFLAGS"
1198
1330
        fi
1199
1331
fi
1200
1332
if test "x$with_libmysql" = "xyes"
1374
1506
        with_libperl="yes"
1375
1507
])
1376
1508
 
 
1509
AC_MSG_CHECKING([for perl])
 
1510
perl_interpreter=`which "$perl_interpreter" 2> /dev/null`
 
1511
if test -x "$perl_interpreter"
 
1512
then
 
1513
        AC_MSG_RESULT([yes])
 
1514
else
 
1515
        perl_interpreter=""
 
1516
        AC_MSG_RESULT([no])
 
1517
fi
 
1518
 
1377
1519
AC_SUBST(PERL, "$perl_interpreter")
1378
1520
 
1379
 
if test "x$with_libperl" = "xyes"
 
1521
if test "x$with_libperl" = "xyes" \
 
1522
        && test -n "$perl_interpreter"
1380
1523
then
1381
1524
  SAVE_CFLAGS=$CFLAGS
1382
1525
  SAVE_LDFLAGS=$LDFLAGS
1416
1559
 
1417
1560
  CFLAGS=$SAVE_CFLAGS
1418
1561
  LDFLAGS=$SAVE_LDFLAGS
1419
 
fi
 
1562
else if test -z "$perl_interpreter"; then
 
1563
  with_libperl="no (no perl interpreter found)"
 
1564
  have_libperl="no"
 
1565
fi; fi
1420
1566
AM_CONDITIONAL(BUILD_WITH_LIBPERL, test "x$with_libperl" = "xyes")
1421
1567
 
1422
1568
if test "x$with_libperl" = "xyes"
1454
1600
        LDFLAGS=$SAVE_LDFLAGS
1455
1601
fi
1456
1602
 
 
1603
if test "x$ac_system" = "xLinux"
 
1604
then
 
1605
        AC_ARG_VAR([KERNEL_DIR], [path to Linux kernel sources])
 
1606
        if test -z "$KERNEL_DIR"
 
1607
        then
 
1608
                KERNEL_DIR="/lib/modules/`uname -r`/source"
 
1609
        fi
 
1610
fi
 
1611
 
 
1612
with_own_libiptc="no"
1457
1613
AC_ARG_WITH(libiptc, [AS_HELP_STRING([--with-libiptc@<:@=PREFIX@:>@], [Path to libiptc.])],
1458
1614
[
1459
1615
        if test "x$withval" != "xno" && test "x$withval" != "xyes"
1478
1634
        AC_CHECK_LIB(iptc, iptc_init,
1479
1635
        [
1480
1636
                AC_DEFINE(HAVE_LIBIPTC, 1, [Define to 1 if you have the iptc library (-liptc).])
1481
 
        ], [with_libiptc="no (libiptc not found)"])
 
1637
        ],
 
1638
        [
 
1639
                with_libiptc="yes"
 
1640
                with_own_libiptc="yes"
 
1641
        ])
1482
1642
fi
1483
 
if test "x$with_libiptc" = "xyes"
 
1643
if test "x$with_libiptc" = "xyes" -a "x$with_own_libiptc" != "xyes"
1484
1644
then
1485
1645
        AC_CHECK_HEADERS(libiptc/libiptc.h,
1486
1646
        [
1487
1647
                AC_DEFINE(HAVE_LIBIPTC_LIBIPTC_H, 1, [Define to 1 if you have the <libiptc/libiptc.h> header file.])
1488
 
        ], [with_libiptc="no (libiptc/libiptc.h not found)"])
 
1648
        ],
 
1649
        [
 
1650
                with_libiptc="yes"
 
1651
                with_own_libiptc="yes"
 
1652
        ])
1489
1653
fi
1490
1654
if test "x$with_libiptc" = "xyes"
1491
1655
then
1492
 
        collect_libiptc=1
1493
 
else
1494
 
        collect_libiptc=0
 
1656
        SAVE_CFLAGS=$CFLAGS
 
1657
        CFLAGS="$CFLAGS -I$KERNEL_DIR/include"
 
1658
 
 
1659
        AC_CHECK_HEADERS(linux/netfilter_ipv4/ip_tables.h linux/netfilter_ipv6/ip6_tables.h, [],
 
1660
        [
 
1661
                with_libiptc="no (Linux iptables headers not found - check KERNEL_DIR)"
 
1662
                with_own_libiptc="no"
 
1663
        ],
 
1664
        [
 
1665
#include "$srcdir/src/libiptc/ipt_kernel_headers.h"
 
1666
        ])
 
1667
 
 
1668
        CFLAGS=$SAVE_CFLAGS
1495
1669
fi
1496
1670
AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes")
 
1671
AM_CONDITIONAL(BUILD_WITH_OWN_LIBIPTC, test "x$with_own_libiptc" = "xyes")
 
1672
if test "x$with_own_libiptc" = "xyes"
 
1673
then
 
1674
        AC_DEFINE(OWN_LIBIPTC, 1, [Define to 1 if we use the shipped iptc library.])
 
1675
fi
1497
1676
 
1498
1677
with_snmp_config="net-snmp-config"
1499
1678
with_snmp_cflags=""
1527
1706
        then
1528
1707
                with_libnetsnmp="no ($with_snmp_config failed)"
1529
1708
        else
1530
 
                SAVE_CFLAGS=$CFLAGS
1531
 
                CFLAGS="$CFLAGS $with_snmp_cflags"
 
1709
                SAVE_CPPFLAGS="$CPPFLAGS"
 
1710
                CPPFLAGS="$CPPFLAGS $with_snmp_cflags"
1532
1711
                
1533
1712
                AC_CHECK_HEADERS(net-snmp/net-snmp-config.h, [], [with_libnetsnmp="no (net-snmp/net-snmp-config.h not found)"])
1534
1713
 
1535
 
                CFLAGS="$SAVE_CFLAGS"
 
1714
                CPPFLAGS="$SAVE_CPPFLAGS"
1536
1715
        fi
1537
1716
fi
1538
1717
if test "x$with_libnetsnmp" = "xyes"
1595
1774
fi
1596
1775
if test "x$with_libupsclient" = "xyes"
1597
1776
then
1598
 
        SAVE_CFLAGS="$CFLAGS"
1599
 
        CFLAGS="$CFLAGS $with_upsclient_cflags"
 
1777
        SAVE_CPPFLAGS="$CPPFLAGS"
 
1778
        CPPFLAGS="$CPPFLAGS $with_upsclient_cflags"
1600
1779
 
1601
1780
        AC_CHECK_HEADERS(upsclient.h, [], [with_libupsclient="no (upsclient.h not found)"])
1602
1781
 
1603
 
        CFLAGS="$SAVE_CFLAGS"
 
1782
        CPPFLAGS="$SAVE_CPPFLAGS"
1604
1783
fi
1605
1784
if test "x$with_libupsclient" = "xyes"
1606
1785
then
1627
1806
fi
1628
1807
if test "x$with_libupsclient" = "xyes"
1629
1808
then
 
1809
        SAVE_CPPFLAGS="$CPPFLAGS"
 
1810
        CPPFLAGS="$CPPFLAGS $with_upsclient_cflags"
 
1811
 
1630
1812
        AC_CHECK_TYPES([UPSCONN_t, UPSCONN], [], [],
1631
1813
[#include <stdlib.h>
1632
1814
#include <stdio.h>
1633
1815
#include <upsclient.h>])
 
1816
 
 
1817
        CPPFLAGS="$SAVE_CPPFLAGS"
1634
1818
fi
1635
1819
AM_CONDITIONAL(BUILD_WITH_LIBUPSCLIENT, test "x$with_libupsclient" = "xyes")
1636
1820
 
1640
1824
with_xmms_libs=""
1641
1825
AC_ARG_WITH(libxmms, [AS_HELP_STRING([--with-libxmms@<:@=PREFIX@:>@], [Path to libxmms.])],
1642
1826
[
1643
 
        if test "x$withval" != "xno" -a "x$withval" != "xyes"
 
1827
        if test "x$withval" != "xno" \
 
1828
                && test "x$withval" != "xyes"
1644
1829
        then
1645
1830
                if test -f "$withval" && test -x "$withval";
1646
1831
                then
1807
1992
fi
1808
1993
AM_CONDITIONAL(BUILD_WITH_LIBNETLINK, test "x$with_libnetlink" = "xyes")
1809
1994
 
 
1995
with_libopenipmipthread="yes"
 
1996
with_libopenipmipthread_cflags=""
 
1997
with_libopenipmipthread_libs=""
 
1998
 
 
1999
AC_MSG_CHECKING([for pkg-config])
 
2000
temp_result="no"
 
2001
if test "x$PKG_CONFIG" = "x"
 
2002
then
 
2003
        with_libopenipmipthread="no"
 
2004
        temp_result="no"
 
2005
else
 
2006
        temp_result="$PKG_CONFIG"
 
2007
fi
 
2008
AC_MSG_RESULT([$temp_result])
 
2009
 
 
2010
if test "x$with_libopenipmipthread" = "xyes"
 
2011
then
 
2012
        AC_MSG_CHECKING([for libOpenIPMIpthread])
 
2013
        $PKG_CONFIG --exists OpenIPMIpthread 2>/dev/null
 
2014
        if test "$?" != "0"
 
2015
        then
 
2016
                with_libopenipmipthread="no ($PKG_CONFIG doesn't know OpenIPMIpthread)"
 
2017
        fi
 
2018
        AC_MSG_RESULT([$with_libopenipmipthread])
 
2019
fi
 
2020
 
 
2021
if test "x$with_libopenipmipthread" = "xyes"
 
2022
then
 
2023
        AC_MSG_CHECKING([for libOpenIPMIpthread CFLAGS])
 
2024
        temp_result="`$PKG_CONFIG --cflags OpenIPMIpthread`"
 
2025
        if test "$?" = "0"
 
2026
        then
 
2027
                with_libopenipmipthread_cflags="$temp_result"
 
2028
        else
 
2029
                with_libopenipmipthread="no ($PKG_CONFIG --cflags OpenIPMIpthread failed)"
 
2030
                temp_result="$PKG_CONFIG --cflags OpenIPMIpthread failed"
 
2031
        fi
 
2032
        AC_MSG_RESULT([$temp_result])
 
2033
fi
 
2034
 
 
2035
if test "x$with_libopenipmipthread" = "xyes"
 
2036
then
 
2037
        AC_MSG_CHECKING([for libOpenIPMIpthread LDFLAGS])
 
2038
        temp_result="`$PKG_CONFIG --libs OpenIPMIpthread`"
 
2039
        if test "$?" = "0"
 
2040
        then
 
2041
                with_libopenipmipthread_ldflags="$temp_result"
 
2042
        else
 
2043
                with_libopenipmipthread="no ($PKG_CONFIG --libs OpenIPMIpthread failed)"
 
2044
                temp_result="$PKG_CONFIG --libs OpenIPMIpthread failed"
 
2045
        fi
 
2046
        AC_MSG_RESULT([$temp_result])
 
2047
fi
 
2048
 
 
2049
if test "x$with_libopenipmipthread" = "xyes"
 
2050
then
 
2051
        SAVE_CPPFLAGS="$CPPFLAGS"
 
2052
        CPPFLAGS="$CPPFLAGS $with_libopenipmipthread_cflags"
 
2053
 
 
2054
        AC_CHECK_HEADERS(OpenIPMI/ipmi_smi.h,
 
2055
                         [with_libopenipmipthread="yes"],
 
2056
                         [with_libopenipmipthread="no (OpenIPMI/ipmi_smi.h not found)"],
 
2057
[#include <OpenIPMI/ipmiif.h>
 
2058
#include <OpenIPMI/ipmi_err.h>
 
2059
#include <OpenIPMI/ipmi_posix.h>
 
2060
#include <OpenIPMI/ipmi_conn.h>
 
2061
])
 
2062
 
 
2063
        CPPFLAGS="$SAVE_CPPFLAGS"
 
2064
fi
 
2065
 
 
2066
if test "x$with_libopenipmipthread" = "xyes"
 
2067
then
 
2068
        BUILD_WITH_OPENIPMI_CFLAGS="$with_libopenipmipthread_cflags"
 
2069
        BUILD_WITH_OPENIPMI_LIBS="$with_libopenipmipthread_ldflags"
 
2070
        AC_SUBST(BUILD_WITH_OPENIPMI_CFLAGS)
 
2071
        AC_SUBST(BUILD_WITH_OPENIPMI_LIBS)
 
2072
fi
 
2073
 
1810
2074
dnl Check for libvirt and libxml2 libraries.
1811
2075
with_libxml2="no (pkg-config isn't available)"
1812
2076
with_libxml2_cflags=""
1814
2078
with_libvirt="no (pkg-config isn't available)"
1815
2079
with_libvirt_cflags=""
1816
2080
with_libvirt_ldflags=""
1817
 
PKG_PROG_PKG_CONFIG
1818
2081
if test "x$PKG_CONFIG" != "x"
1819
2082
then
1820
2083
        pkg-config --exists 'libxml-2.0' 2>/dev/null
1859
2122
if test "x$with_libxml2" = "xyes"
1860
2123
then
1861
2124
        SAVE_CFLAGS="$CFLAGS"
1862
 
        SAVE_LD_FLAGS="$LDFLAGS"
 
2125
        SAVE_LDFLAGS="$LDFLAGS"
1863
2126
 
1864
2127
        CFLAGS="$CFLAGS $with_libxml2_cflags"
1865
2128
        LDFLAGS="$LDFLAGS $with_libxml2_ldflags"
1904
2167
if test "x$with_libvirt" = "xyes"
1905
2168
then
1906
2169
        SAVE_CFLAGS="$CFLAGS"
1907
 
        SAVE_LD_FLAGS="$LDFLAGS"
 
2170
        SAVE_LDFLAGS="$LDFLAGS"
1908
2171
 
1909
2172
        CFLAGS="$CFLAGS $with_libvirt_cflags"
1910
2173
        LDFLAGS="$LDFLAGS $with_libvirt_ldflags"
2029
2292
AC_COLLECTD([daemon],    [disable], [feature], [daemon mode])
2030
2293
AC_COLLECTD([getifaddrs],[enable],  [feature], [getifaddrs under Linux])
2031
2294
 
 
2295
plugin_ascent="no"
2032
2296
plugin_battery="no"
2033
2297
plugin_cpu="no"
2034
2298
plugin_cpufreq="no"
2036
2300
plugin_disk="no"
2037
2301
plugin_entropy="no"
2038
2302
plugin_interface="no"
 
2303
plugin_ipmi="no"
2039
2304
plugin_ipvs="no"
2040
2305
plugin_irq="no"
2041
2306
plugin_libvirt="no"
2050
2315
plugin_tape="no"
2051
2316
plugin_tcpconns="no"
2052
2317
plugin_users="no"
 
2318
plugin_vmem="no"
2053
2319
plugin_vserver="no"
2054
2320
plugin_wireless="no"
2055
2321
 
2070
2336
        plugin_serial="yes"
2071
2337
        plugin_swap="yes"
2072
2338
        plugin_tcpconns="yes"
 
2339
        plugin_vmem="yes"
2073
2340
        plugin_vserver="yes"
2074
2341
        plugin_wireless="yes"
2075
2342
 
2100
2367
# libstatgrab
2101
2368
if test "x$with_libstatgrab" = "xyes"
2102
2369
then
 
2370
        plugin_cpu="yes"
 
2371
        plugin_disk="yes"
2103
2372
        plugin_interface="yes"
2104
2373
        plugin_load="yes"
2105
2374
        plugin_memory="yes"
2106
2375
        plugin_swap="yes"
 
2376
        plugin_users="yes"
 
2377
fi
 
2378
 
 
2379
if test "x$with_libcurl" = "xyes" && test "x$with_libxml2" = "xyes"
 
2380
then
 
2381
        plugin_ascent="yes"
 
2382
fi
 
2383
 
 
2384
if test "x$with_libopenipmipthread" = "xyes"
 
2385
then
 
2386
        plugin_ipmi="yes"
2107
2387
fi
2108
2388
 
2109
2389
if test "x$have_processor_info" = "xyes"
2184
2464
AC_PLUGIN([apache],      [$with_libcurl],      [Apache httpd statistics])
2185
2465
AC_PLUGIN([apcups],      [yes],                [Statistics of UPSes by APC])
2186
2466
AC_PLUGIN([apple_sensors], [$with_libiokit],   [Apple's hardware sensors])
 
2467
AC_PLUGIN([ascent],      [$plugin_ascent],     [AscentEmu player statistics])
2187
2468
AC_PLUGIN([battery],     [$plugin_battery],    [Battery statistics])
2188
2469
AC_PLUGIN([cpu],         [$plugin_cpu],        [CPU usage statistics])
2189
2470
AC_PLUGIN([cpufreq],     [$plugin_cpufreq],    [CPU frequency statistics])
2197
2478
AC_PLUGIN([hddtemp],     [yes],                [Query hddtempd])
2198
2479
AC_PLUGIN([interface],   [$plugin_interface],  [Interface traffic statistics])
2199
2480
AC_PLUGIN([iptables],    [$with_libiptc],      [IPTables rule counters])
 
2481
AC_PLUGIN([ipmi],        [$plugin_ipmi],       [IPMI sensor statistics])
2200
2482
AC_PLUGIN([ipvs],        [$plugin_ipvs],       [IPVS connection statistics])
2201
2483
AC_PLUGIN([irq],         [$plugin_irq],        [IRQ statistics])
2202
2484
AC_PLUGIN([libvirt],     [$plugin_libvirt],    [Virtual machine statistics])
2215
2497
AC_PLUGIN([nut],         [$with_libupsclient], [Network UPS tools statistics])
2216
2498
AC_PLUGIN([perl],        [$plugin_perl],       [Embed a Perl interpreter])
2217
2499
AC_PLUGIN([ping],        [$with_liboping],     [Network latency statistics])
 
2500
AC_PLUGIN([powerdns],    [yes],                [PowerDNS statistics])
2218
2501
AC_PLUGIN([processes],   [$plugin_processes],  [Process statistics])
2219
2502
AC_PLUGIN([rrdtool],     [$with_rrdtool],      [RRDTool output plugin])
2220
2503
AC_PLUGIN([sensors],     [$with_lm_sensors],   [lm_sensors statistics])
2222
2505
AC_PLUGIN([snmp],        [$with_libnetsnmp],   [SNMP querying plugin])
2223
2506
AC_PLUGIN([swap],        [$plugin_swap],       [Swap usage statistics])
2224
2507
AC_PLUGIN([syslog],      [$have_syslog],       [Syslog logging plugin])
 
2508
AC_PLUGIN([tail],        [yes],                [Parsing of logfiles])
2225
2509
AC_PLUGIN([tape],        [$plugin_tape],       [Tape drive statistics])
2226
2510
AC_PLUGIN([tcpconns],    [$plugin_tcpconns],   [TCP connection statistics])
 
2511
AC_PLUGIN([teamspeak2],  [yes],                [TeamSpeak2 server statistics])
2227
2512
AC_PLUGIN([unixsock],    [yes],                [Unixsock communication plugin])
2228
2513
AC_PLUGIN([users],       [$plugin_users],      [User statistics])
2229
2514
AC_PLUGIN([uuid],        [yes],                [UUID as hostname plugin])
 
2515
AC_PLUGIN([vmem],        [$plugin_vmem],       [Virtual memory statistics])
2230
2516
AC_PLUGIN([vserver],     [$plugin_vserver],    [Linux VServer statistics])
2231
2517
AC_PLUGIN([wireless],    [$plugin_wireless],   [Wireless statistics])
2232
2518
AC_PLUGIN([xmms],        [$with_libxmms],      [XMMS statistics])
2233
2519
 
2234
2520
dnl ip_vs.h
2235
 
if test "x$ac_system" = "xLinux" -a "x$have_net_ip_vs_h$have_ip_vs_h" = "xnono"
 
2521
if test "x$ac_system" = "xLinux" \
 
2522
        && test "x$have_net_ip_vs_h$have_ip_vs_h" = "xnono"
2236
2523
then
2237
2524
        enable_ipvs="$enable_ipvs (ip_vs.h not found)"
2238
2525
fi
2251
2538
],
2252
2539
[
2253
2540
        PERL_BINDINGS_OPTIONS=""
2254
 
        with_perl_bindings="yes"
 
2541
        if test -n "$perl_interpreter"
 
2542
        then
 
2543
                with_perl_bindings="yes"
 
2544
        else
 
2545
                with_perl_bindings="no (no perl interpreter found)"
 
2546
        fi
2255
2547
])
2256
2548
if test "x$with_perl_bindings" = "xyes"
2257
2549
then
2262
2554
AC_SUBST(PERL_BINDINGS)
2263
2555
AC_SUBST(PERL_BINDINGS_OPTIONS)
2264
2556
 
2265
 
AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/liboconfig/Makefile src/liboping/Makefile bindings/Makefile)
 
2557
AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/libiptc/Makefile src/liboconfig/Makefile src/liboping/Makefile bindings/Makefile)
2266
2558
 
2267
 
if test "x$with_rrdtool" = "xyes" -a "x$librrd_threadsafe" != "xyes"
 
2559
if test "x$with_rrdtool" = "xyes" \
 
2560
        && test "x$librrd_threadsafe" != "xyes"
2268
2561
then
2269
2562
        with_rrdtool="yes (warning: librrd is not thread-safe)"
2270
2563
fi
2271
2564
 
2272
 
if test "x$with_liboping" = "xyes" -a "x$with_own_liboping" = "xyes"
 
2565
if test "x$with_liboping" = "xyes" \
 
2566
        && test "x$with_own_liboping" = "xyes"
2273
2567
then
2274
2568
        with_liboping="yes (shipped version)"
2275
2569
fi
2276
2570
 
 
2571
if test "x$with_libiptc" = "xyes" -a "x$with_own_libiptc" = "xyes"
 
2572
then
 
2573
        with_libiptc="yes (shipped version)"
 
2574
fi
 
2575
 
2277
2576
if test "x$with_libperl" = "xyes"
2278
2577
then
2279
2578
        with_libperl="yes (version `$perl_interpreter -MConfig -e 'print $Config{version};'`)"
2281
2580
        enable_perl="no (needs libperl)"
2282
2581
fi
2283
2582
 
2284
 
if test "x$with_perl_bindings" = "xyes" -a "x$PERL_BINDINGS_OPTIONS" != "x"
 
2583
if test "x$with_perl_bindings" = "xyes" \
 
2584
        && test "x$PERL_BINDINGS_OPTIONS" != "x"
2285
2585
then
2286
2586
        with_perl_bindings="yes ($PERL_BINDINGS_OPTIONS)"
2287
2587
fi
2299
2599
    libnetlink  . . . . $with_libnetlink
2300
2600
    libnetsnmp  . . . . $with_libnetsnmp
2301
2601
    liboconfig  . . . . $with_liboconfig
 
2602
    libopenipmi . . . . $with_libopenipmipthread
2302
2603
    liboping  . . . . . $with_liboping
2303
2604
    libpcap . . . . . . $with_libpcap
2304
2605
    libperl . . . . . . $with_libperl
2322
2623
    apache  . . . . . . $enable_apache
2323
2624
    apcups  . . . . . . $enable_apcups
2324
2625
    apple_sensors . . . $enable_apple_sensors
 
2626
    ascent  . . . . . . $enable_ascent
2325
2627
    battery . . . . . . $enable_battery
2326
2628
    cpu . . . . . . . . $enable_cpu
2327
2629
    cpufreq . . . . . . $enable_cpufreq
2335
2637
    hddtemp . . . . . . $enable_hddtemp
2336
2638
    interface . . . . . $enable_interface
2337
2639
    iptables  . . . . . $enable_iptables
 
2640
    ipmi  . . . . . . . $enable_ipmi
2338
2641
    ipvs  . . . . . . . $enable_ipvs
2339
2642
    irq . . . . . . . . $enable_irq
2340
2643
    libvirt . . . . . . $enable_libvirt
2353
2656
    nut . . . . . . . . $enable_nut
2354
2657
    perl  . . . . . . . $enable_perl
2355
2658
    ping  . . . . . . . $enable_ping
 
2659
    powerdns  . . . . . $enable_powerdns
2356
2660
    processes . . . . . $enable_processes
2357
2661
    rrdtool . . . . . . $enable_rrdtool
2358
2662
    sensors . . . . . . $enable_sensors
2360
2664
    snmp  . . . . . . . $enable_snmp
2361
2665
    swap  . . . . . . . $enable_swap
2362
2666
    syslog  . . . . . . $enable_syslog
 
2667
    tail  . . . . . . . $enable_tail
2363
2668
    tape  . . . . . . . $enable_tape
2364
2669
    tcpconns  . . . . . $enable_tcpconns
 
2670
    teamspeak2  . . . . $enable_teamspeak2
2365
2671
    unixsock  . . . . . $enable_unixsock
2366
2672
    users . . . . . . . $enable_users
2367
2673
    uuid  . . . . . . . $enable_uuid
 
2674
    vmem  . . . . . . . $enable_vmem
2368
2675
    vserver . . . . . . $enable_vserver
2369
2676
    wireless  . . . . . $enable_wireless
2370
2677
    xmms  . . . . . . . $enable_xmms