diff options
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 175 |
1 files changed, 90 insertions, 85 deletions
diff --git a/configure.ac b/configure.ac index 0432336b..705183a2 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | dnl Process this file with autoconf to produce a configure script. | 1 | dnl Process this file with autoconf to produce a configure script. |
| 2 | AC_PREREQ(2.64) | 2 | AC_PREREQ([2.64]) |
| 3 | AC_INIT(monitoring-plugins,2.4git) | 3 | AC_INIT([monitoring-plugins],[2.4git]) |
| 4 | AC_CONFIG_SRCDIR(NPTest.pm) | 4 | AC_CONFIG_SRCDIR(NPTest.pm) |
| 5 | AC_CONFIG_FILES([gl/Makefile]) | 5 | AC_CONFIG_FILES([gl/Makefile]) |
| 6 | AC_CONFIG_AUX_DIR(build-aux) | 6 | AC_CONFIG_AUX_DIR(build-aux) |
| @@ -43,14 +43,14 @@ AC_SUBST(INSTALL) | |||
| 43 | AC_PROG_CC | 43 | AC_PROG_CC |
| 44 | gl_EARLY | 44 | gl_EARLY |
| 45 | AC_PROG_GCC_TRADITIONAL | 45 | AC_PROG_GCC_TRADITIONAL |
| 46 | AC_PROG_LIBTOOL | 46 | LT_INIT |
| 47 | 47 | ||
| 48 | AM_PROG_CC_C_O | 48 | AM_PROG_CC_C_O |
| 49 | 49 | ||
| 50 | AC_FUNC_ERROR_AT_LINE | 50 | AC_FUNC_ERROR_AT_LINE |
| 51 | AC_SYS_LARGEFILE | 51 | AC_SYS_LARGEFILE |
| 52 | 52 | ||
| 53 | ifdef([AC_FUNC_STRTOD],[AC_FUNC_STRTOD],[AM_FUNC_STRTOD]) | 53 | ifdef([AC_FUNC_STRTOD],[AC_FUNC_STRTOD],[AC_FUNC_STRTOD]) |
| 54 | 54 | ||
| 55 | PLUGIN_TEST=`echo $srcdir/plugins/t/*.t|sed -e 's,\.*/plugins/,,g'` | 55 | PLUGIN_TEST=`echo $srcdir/plugins/t/*.t|sed -e 's,\.*/plugins/,,g'` |
| 56 | AC_SUBST(PLUGIN_TEST)dnl | 56 | AC_SUBST(PLUGIN_TEST)dnl |
| @@ -125,8 +125,7 @@ AC_SUBST(PERL, $with_perl) | |||
| 125 | 125 | ||
| 126 | dnl openssl/gnutls | 126 | dnl openssl/gnutls |
| 127 | AC_ARG_WITH(openssl, | 127 | AC_ARG_WITH(openssl, |
| 128 | AC_HELP_STRING([--with-openssl=DIR], | 128 | AS_HELP_STRING([--with-openssl=DIR],[path to openssl installation]),) |
| 129 | [path to openssl installation]),) | ||
| 130 | 129 | ||
| 131 | AC_ARG_WITH(gnutls, | 130 | AC_ARG_WITH(gnutls, |
| 132 | ACX_HELP_STRING([--with-gnutls=PATH], | 131 | ACX_HELP_STRING([--with-gnutls=PATH], |
| @@ -167,8 +166,7 @@ AC_SUBST(MATHLIBS) | |||
| 167 | 166 | ||
| 168 | dnl Check if we buils local libtap | 167 | dnl Check if we buils local libtap |
| 169 | AC_ARG_ENABLE(libtap, | 168 | AC_ARG_ENABLE(libtap, |
| 170 | AC_HELP_STRING([--enable-libtap], | 169 | AS_HELP_STRING([--enable-libtap],[Enable built-in libtap for unit-testing (default: autodetect system library).]), |
| 171 | [Enable built-in libtap for unit-testing (default: autodetect system library).]), | ||
| 172 | [enable_libtap=$enableval], | 170 | [enable_libtap=$enableval], |
| 173 | [enable_libtap=no]) | 171 | [enable_libtap=no]) |
| 174 | AM_CONDITIONAL([USE_LIBTAP_LOCAL],[test "$enable_libtap" = "yes"]) | 172 | AM_CONDITIONAL([USE_LIBTAP_LOCAL],[test "$enable_libtap" = "yes"]) |
| @@ -183,17 +181,16 @@ fi | |||
| 183 | 181 | ||
| 184 | # Finally, define tests if we use libtap | 182 | # Finally, define tests if we use libtap |
| 185 | if test "$enable_libtap" = "yes" ; then | 183 | if test "$enable_libtap" = "yes" ; then |
| 186 | EXTRA_TEST="test_utils test_disk test_tcp test_cmd test_base64" | 184 | EXTRA_TEST="test_utils test_tcp test_cmd test_base64" |
| 187 | AC_SUBST(EXTRA_TEST) | 185 | AC_SUBST(EXTRA_TEST) |
| 188 | 186 | ||
| 189 | EXTRA_PLUGIN_TESTS="tests/test_check_swap" | 187 | EXTRA_PLUGIN_TESTS="tests/test_check_swap tests/test_check_disk" |
| 190 | AC_SUBST(EXTRA_PLUGIN_TESTS) | 188 | AC_SUBST(EXTRA_PLUGIN_TESTS) |
| 191 | fi | 189 | fi |
| 192 | 190 | ||
| 193 | dnl INI Parsing | 191 | dnl INI Parsing |
| 194 | AC_ARG_ENABLE(extra-opts, | 192 | AC_ARG_ENABLE(extra-opts, |
| 195 | AC_HELP_STRING([--enable-extra-opts], | 193 | AS_HELP_STRING([--enable-extra-opts],[Enables parsing of plugins ini config files for extra options (default: no)]), |
| 196 | [Enables parsing of plugins ini config files for extra options (default: no)]), | ||
| 197 | [enable_extra_opts=$enableval], | 194 | [enable_extra_opts=$enableval], |
| 198 | [enable_extra_opts=yes]) | 195 | [enable_extra_opts=yes]) |
| 199 | AM_CONDITIONAL([USE_PARSE_INI],[test "$enable_extra_opts" = "yes"]) | 196 | AM_CONDITIONAL([USE_PARSE_INI],[test "$enable_extra_opts" = "yes"]) |
| @@ -467,20 +464,16 @@ AC_ARG_WITH([ipv6], | |||
| 467 | dnl Check for AF_INET6 support - unistd.h required for Darwin | 464 | dnl Check for AF_INET6 support - unistd.h required for Darwin |
| 468 | if test "$with_ipv6" != "no"; then | 465 | if test "$with_ipv6" != "no"; then |
| 469 | AC_CACHE_CHECK([for IPv6 support], np_cv_sys_ipv6, [ | 466 | AC_CACHE_CHECK([for IPv6 support], np_cv_sys_ipv6, [ |
| 470 | AC_TRY_COMPILE( | 467 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef HAVE_UNISTD_H |
| 471 | [#ifdef HAVE_UNISTD_H | ||
| 472 | #include <unistd.h> | 468 | #include <unistd.h> |
| 473 | #endif | 469 | #endif |
| 474 | #include <netinet/in.h> | 470 | #include <netinet/in.h> |
| 475 | #include <sys/socket.h>], | 471 | #include <sys/socket.h>]], [[struct sockaddr_in6 sin6; |
| 476 | [struct sockaddr_in6 sin6; | ||
| 477 | void *p; | 472 | void *p; |
| 478 | 473 | ||
| 479 | sin6.sin6_family = AF_INET6; | 474 | sin6.sin6_family = AF_INET6; |
| 480 | sin6.sin6_port = 587; | 475 | sin6.sin6_port = 587; |
| 481 | p = &sin6.sin6_addr;], | 476 | p = &sin6.sin6_addr;]])],[np_cv_sys_ipv6=yes],[np_cv_sys_ipv6=no]) |
| 482 | [np_cv_sys_ipv6=yes], | ||
| 483 | [np_cv_sys_ipv6=no]) | ||
| 484 | ]) | 477 | ]) |
| 485 | if test "$np_cv_sys_ipv6" = "no" -a "$with_ipv6" != "check"; then | 478 | if test "$np_cv_sys_ipv6" = "no" -a "$with_ipv6" != "check"; then |
| 486 | AC_MSG_FAILURE([--with-ipv6 was given, but test for IPv6 support failed]) | 479 | AC_MSG_FAILURE([--with-ipv6 was given, but test for IPv6 support failed]) |
| @@ -614,10 +607,10 @@ dnl | |||
| 614 | dnl Checks for header files. | 607 | dnl Checks for header files. |
| 615 | dnl | 608 | dnl |
| 616 | 609 | ||
| 617 | AC_HEADER_TIME | ||
| 618 | AC_HEADER_SYS_WAIT | 610 | AC_HEADER_SYS_WAIT |
| 619 | AC_CHECK_HEADERS(signal.h syslog.h uio.h errno.h sys/time.h sys/socket.h sys/un.h sys/poll.h) | 611 | AC_CHECK_HEADERS(signal.h syslog.h uio.h errno.h sys/time.h sys/socket.h sys/un.h sys/poll.h) |
| 620 | AC_CHECK_HEADERS(features.h stdarg.h sys/unistd.h ctype.h) | 612 | AC_CHECK_HEADERS(features.h stdarg.h sys/unistd.h ctype.h) |
| 613 | AC_CHECK_HEADERS_ONCE([sys/time.h]) | ||
| 621 | 614 | ||
| 622 | dnl Checks for typedefs, structures, and compiler characteristics. | 615 | dnl Checks for typedefs, structures, and compiler characteristics. |
| 623 | AC_C_CONST | 616 | AC_C_CONST |
| @@ -626,36 +619,27 @@ AC_TYPE_PID_T | |||
| 626 | AC_TYPE_SIZE_T | 619 | AC_TYPE_SIZE_T |
| 627 | 620 | ||
| 628 | AC_CACHE_CHECK([for va_copy],ac_cv_HAVE_VA_COPY,[ | 621 | AC_CACHE_CHECK([for va_copy],ac_cv_HAVE_VA_COPY,[ |
| 629 | AC_TRY_LINK([#include <stdarg.h> | 622 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h> |
| 630 | va_list ap1,ap2;], [va_copy(ap1,ap2);], | 623 | va_list ap1,ap2;]], [[va_copy(ap1,ap2);]])],[ac_cv_HAVE_VA_COPY=yes],[ac_cv_HAVE_VA_COPY=no])]) |
| 631 | ac_cv_HAVE_VA_COPY=yes, | ||
| 632 | ac_cv_HAVE_VA_COPY=no)]) | ||
| 633 | if test x"$ac_cv_HAVE_VA_COPY" = x"yes"; then | 624 | if test x"$ac_cv_HAVE_VA_COPY" = x"yes"; then |
| 634 | AC_DEFINE(HAVE_VA_COPY,1,[Whether va_copy() is available]) | 625 | AC_DEFINE(HAVE_VA_COPY,1,[Whether va_copy() is available]) |
| 635 | else | 626 | else |
| 636 | AC_CACHE_CHECK([for __va_copy],ac_cv_HAVE___VA_COPY,[ | 627 | AC_CACHE_CHECK([for __va_copy],ac_cv_HAVE___VA_COPY,[ |
| 637 | AC_TRY_LINK([#include <stdarg.h> | 628 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h> |
| 638 | va_list ap1,ap2;], [__va_copy(ap1,ap2);], | 629 | va_list ap1,ap2;]], [[__va_copy(ap1,ap2);]])],[ac_cv_HAVE___VA_COPY=yes],[ac_cv_HAVE___VA_COPY=no])]) |
| 639 | ac_cv_HAVE___VA_COPY=yes, | ||
| 640 | ac_cv_HAVE___VA_COPY=no)]) | ||
| 641 | if test x"$ac_cv_HAVE___VA_COPY" = x"yes"; then | 630 | if test x"$ac_cv_HAVE___VA_COPY" = x"yes"; then |
| 642 | AC_DEFINE(HAVE___VA_COPY,1,[Whether __va_copy() is available]) | 631 | AC_DEFINE(HAVE___VA_COPY,1,[Whether __va_copy() is available]) |
| 643 | fi | 632 | fi |
| 644 | fi | 633 | fi |
| 645 | 634 | ||
| 646 | AC_TRY_COMPILE([#include <sys/time.h>], | 635 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/time.h>]], [[struct timeval *tv; |
| 647 | [struct timeval *tv; | 636 | struct timezone *tz;]])],[AC_DEFINE(HAVE_STRUCT_TIMEVAL,1,Define if we have a timeval structure) |
| 648 | struct timezone *tz;], | 637 | FOUND_STRUCT_TIMEVAL="yes"],[]) |
| 649 | AC_DEFINE(HAVE_STRUCT_TIMEVAL,1,[Define if we have a timeval structure]) | ||
| 650 | FOUND_STRUCT_TIMEVAL="yes") | ||
| 651 | 638 | ||
| 652 | if test x"$FOUND_STRUCT_TIMEVAL" = x"yes"; then | 639 | if test x"$FOUND_STRUCT_TIMEVAL" = x"yes"; then |
| 653 | AC_TRY_COMPILE([#include <sys/time.h>], | 640 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/time.h>]], [[struct timeval *tv; |
| 654 | [struct timeval *tv; | ||
| 655 | struct timezone *tz; | 641 | struct timezone *tz; |
| 656 | gettimeofday(tv, tz);], | 642 | gettimeofday(tv, tz);]])],[AC_DEFINE(HAVE_GETTIMEOFDAY,1,Define if gettimeofday is found)],[AC_DEFINE(NEED_GETTIMEOFDAY,1,Define if gettimeofday is needed)]) |
| 657 | AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define if gettimeofday is found]), | ||
| 658 | AC_DEFINE(NEED_GETTIMEOFDAY,1,[Define if gettimeofday is needed])) | ||
| 659 | fi | 643 | fi |
| 660 | 644 | ||
| 661 | dnl Checks for library functions. | 645 | dnl Checks for library functions. |
| @@ -663,14 +647,11 @@ AC_CHECK_FUNCS(memmove select socket strdup strstr strtol strtoul floor) | |||
| 663 | AC_CHECK_FUNCS(poll) | 647 | AC_CHECK_FUNCS(poll) |
| 664 | 648 | ||
| 665 | AC_MSG_CHECKING(return type of socket size) | 649 | AC_MSG_CHECKING(return type of socket size) |
| 666 | AC_TRY_COMPILE([#include <stdlib.h> | 650 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h> |
| 667 | #include <sys/types.h> | 651 | #include <sys/types.h> |
| 668 | #include <sys/socket.h>], | 652 | #include <sys/socket.h>]], [[int a = send(1, (const void *) buffer, (size_t *) 0, (int *) 0);]])],[ac_cv_socket_size_type="size_t" |
| 669 | [int a = send(1, (const void *) buffer, (size_t *) 0, (int *) 0);], | 653 | AC_MSG_RESULT(size_t)],[ac_cv_socket_size_type="int" |
| 670 | ac_cv_socket_size_type=["size_t"] | 654 | AC_MSG_RESULT(int)]) |
| 671 | AC_MSG_RESULT(size_t), | ||
| 672 | ac_cv_socket_size_type=["int"] | ||
| 673 | AC_MSG_RESULT(int)) | ||
| 674 | 655 | ||
| 675 | AC_DEFINE_UNQUOTED(SOCKET_SIZE_TYPE, $ac_cv_socket_size_type , | 656 | AC_DEFINE_UNQUOTED(SOCKET_SIZE_TYPE, $ac_cv_socket_size_type , |
| 676 | [Define type of socket size]) | 657 | [Define type of socket size]) |
| @@ -815,7 +796,7 @@ elif ps axwo 'stat comm vsz rss user uid pid ppid etime args' 2>/dev/null | \ | |||
| 815 | then | 796 | then |
| 816 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos]" | 797 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos]" |
| 817 | ac_cv_ps_command="$PATH_TO_PS axwo 'stat uid pid ppid vsz rss pcpu etime comm args'" | 798 | ac_cv_ps_command="$PATH_TO_PS axwo 'stat uid pid ppid vsz rss pcpu etime comm args'" |
| 818 | ac_cv_ps_format="%s %d %d %d %d %d %f %s %s %n" | 799 | ac_cv_ps_format="%s %u %d %d %d %d %f %s %s %n" |
| 819 | ac_cv_ps_cols=10 | 800 | ac_cv_ps_cols=10 |
| 820 | AC_MSG_RESULT([$ac_cv_ps_command]) | 801 | AC_MSG_RESULT([$ac_cv_ps_command]) |
| 821 | 802 | ||
| @@ -1433,20 +1414,14 @@ if test -n "$ac_cv_nslookup_command"; then | |||
| 1433 | fi | 1414 | fi |
| 1434 | 1415 | ||
| 1435 | AC_MSG_CHECKING([for number of online cpus]) | 1416 | AC_MSG_CHECKING([for number of online cpus]) |
| 1436 | AC_TRY_COMPILE([#include <unistd.h>], | 1417 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[sysconf(_SC_NPROCESSORS_ONLN) > 0;]])],[AC_DEFINE(HAVE_SYSCONF__SC_NPROCESSORS_ONLN,1,Define if sysconf returns number of online cpus) |
| 1437 | [sysconf(_SC_NPROCESSORS_ONLN) > 0;], | 1418 | AC_MSG_RESULT(sysconf(_SC_NPROCESSORS_ONLN))],[AC_MSG_RESULT(cannot calculate) |
| 1438 | AC_DEFINE(HAVE_SYSCONF__SC_NPROCESSORS_ONLN,1,[Define if sysconf returns number of online cpus]) | 1419 | ]) |
| 1439 | AC_MSG_RESULT([sysconf(_SC_NPROCESSORS_ONLN)]), | ||
| 1440 | AC_MSG_RESULT([cannot calculate]) | ||
| 1441 | ) | ||
| 1442 | 1420 | ||
| 1443 | AC_MSG_CHECKING([for number of available cpus]) | 1421 | AC_MSG_CHECKING([for number of available cpus]) |
| 1444 | AC_TRY_COMPILE([#include <unistd.h>], | 1422 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[sysconf(_SC_NPROCESSORS_CONF) > 0;]])],[AC_DEFINE(HAVE_SYSCONF__SC_NPROCESSORS_CONF,1,Define if sysconf returns number of available cpus) |
| 1445 | [sysconf(_SC_NPROCESSORS_CONF) > 0;], | 1423 | AC_MSG_RESULT(sysconf(_SC_NPROCESSORS_CONF))],[AC_MSG_RESULT(cannot calculate) |
| 1446 | AC_DEFINE(HAVE_SYSCONF__SC_NPROCESSORS_CONF,1,[Define if sysconf returns number of available cpus]) | 1424 | ]) |
| 1447 | AC_MSG_RESULT([sysconf(_SC_NPROCESSORS_CONF)]), | ||
| 1448 | AC_MSG_RESULT([cannot calculate]) | ||
| 1449 | ) | ||
| 1450 | 1425 | ||
| 1451 | AC_PATH_PROG(PATH_TO_UPTIME,uptime) | 1426 | AC_PATH_PROG(PATH_TO_UPTIME,uptime) |
| 1452 | AC_ARG_WITH(uptime_command, | 1427 | AC_ARG_WITH(uptime_command, |
| @@ -1485,23 +1460,19 @@ AC_ARG_WITH(snmpget_command, | |||
| 1485 | ACX_HELP_STRING([--with-snmpget-command=PATH], | 1460 | ACX_HELP_STRING([--with-snmpget-command=PATH], |
| 1486 | [Path to snmpget command]), | 1461 | [Path to snmpget command]), |
| 1487 | PATH_TO_SNMPGET=$withval) | 1462 | PATH_TO_SNMPGET=$withval) |
| 1488 | if test -n "$PATH_TO_SNMPGET" | ||
| 1489 | then | ||
| 1490 | AC_DEFINE_UNQUOTED(PATH_TO_SNMPGET,"$PATH_TO_SNMPGET",[path to snmpget binary]) | ||
| 1491 | EXTRAS="$EXTRAS check_hpjd check_snmp\$(EXEEXT)" | ||
| 1492 | else | ||
| 1493 | AC_MSG_WARN([Get snmpget from http://net-snmp.sourceforge.net to make check_hpjd and check_snmp plugins]) | ||
| 1494 | fi | ||
| 1495 | 1463 | ||
| 1496 | AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext) | 1464 | AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext) |
| 1497 | AC_ARG_WITH(snmpgetnext_command, | 1465 | AC_ARG_WITH(snmpgetnext_command, |
| 1498 | ACX_HELP_STRING([--with-snmpgetnext-command=PATH], | 1466 | ACX_HELP_STRING([--with-snmpgetnext-command=PATH], |
| 1499 | [Path to snmpgetnext command]), | 1467 | [Path to snmpgetnext command]), |
| 1500 | PATH_TO_SNMPGETNEXT=$withval) | 1468 | PATH_TO_SNMPGETNEXT=$withval) |
| 1501 | if test -n "$PATH_TO_SNMPGETNEXT" | 1469 | |
| 1502 | then | 1470 | AS_IF([test -n "$PATH_TO_SNMPGET"], [ |
| 1503 | AC_DEFINE_UNQUOTED(PATH_TO_SNMPGETNEXT,"$PATH_TO_SNMPGETNEXT",[path to snmpgetnext binary]) | 1471 | AC_DEFINE_UNQUOTED(PATH_TO_SNMPGET,"$PATH_TO_SNMPGET",[path to snmpget binary]) |
| 1504 | fi | 1472 | EXTRAS="$EXTRAS check_hpjd" |
| 1473 | ], [ | ||
| 1474 | AC_MSG_WARN([Get snmpget from https://net-snmp.sourceforge.io/ to build the check_hpjd and check_snmp plugins]) | ||
| 1475 | ]) | ||
| 1505 | 1476 | ||
| 1506 | if ( $PERL -M"Net::SNMP 3.6" -e 'exit' 2>/dev/null ) | 1477 | if ( $PERL -M"Net::SNMP 3.6" -e 'exit' 2>/dev/null ) |
| 1507 | then | 1478 | then |
| @@ -1511,6 +1482,16 @@ else | |||
| 1511 | AC_MSG_WARN([Tried $PERL - install Net::SNMP perl module if you want to use the perl snmp plugins]) | 1482 | AC_MSG_WARN([Tried $PERL - install Net::SNMP perl module if you want to use the perl snmp plugins]) |
| 1512 | fi | 1483 | fi |
| 1513 | 1484 | ||
| 1485 | dnl Check whether DES encryption is available (might not on RHEL) | ||
| 1486 | AC_COMPILE_IFELSE( | ||
| 1487 | [AC_LANG_PROGRAM( | ||
| 1488 | [[#include <net-snmp/net-snmp-config.h> | ||
| 1489 | #include <net-snmp/net-snmp-includes.h>]], [[oid *foo = usmDESPrivProtocol;]] | ||
| 1490 | )], | ||
| 1491 | [AC_DEFINE(HAVE_USM_DES_PRIV_PROTOCOL,1,Define whether we have DES Privacy Protocol)], | ||
| 1492 | [] | ||
| 1493 | ) | ||
| 1494 | |||
| 1514 | AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat) | 1495 | AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat) |
| 1515 | AC_PATH_PROG(PATH_TO_QSTAT,qstat) | 1496 | AC_PATH_PROG(PATH_TO_QSTAT,qstat) |
| 1516 | AC_ARG_WITH(qstat_command, | 1497 | AC_ARG_WITH(qstat_command, |
| @@ -1537,21 +1518,47 @@ then | |||
| 1537 | fi | 1518 | fi |
| 1538 | 1519 | ||
| 1539 | AC_PATH_PROG(PATH_TO_FPING,fping) | 1520 | AC_PATH_PROG(PATH_TO_FPING,fping) |
| 1540 | AC_PATH_PROG(PATH_TO_FPING6,fping6) | ||
| 1541 | 1521 | ||
| 1542 | AC_ARG_WITH(fping_command, | 1522 | AC_ARG_WITH(fping_command, |
| 1543 | ACX_HELP_STRING([--with-fping-command=PATH], | 1523 | ACX_HELP_STRING([--with-fping-command=PATH], |
| 1544 | [Path to fping command]), PATH_TO_FPING=$withval) | 1524 | [Path to fping command]), PATH_TO_FPING=$withval) |
| 1545 | AC_ARG_WITH(fping6_command, | 1525 | if test -n "$PATH_TO_FPING"; then |
| 1546 | ACX_HELP_STRING([--with-fping6-command=PATH], | ||
| 1547 | [Path to fping6 command]), PATH_TO_FPING6=$withval) | ||
| 1548 | |||
| 1549 | if test -n "$PATH_TO_FPING" | ||
| 1550 | then | ||
| 1551 | AC_DEFINE_UNQUOTED(PATH_TO_FPING,"$PATH_TO_FPING",[path to fping]) | 1526 | AC_DEFINE_UNQUOTED(PATH_TO_FPING,"$PATH_TO_FPING",[path to fping]) |
| 1552 | EXTRAS="$EXTRAS check_fping\$(EXEEXT)" | 1527 | EXTRAS="$EXTRAS check_fping\$(EXEEXT)" |
| 1553 | if test x"$with_ipv6" != xno && test -n "$PATH_TO_FPING6"; then | 1528 | |
| 1554 | AC_DEFINE_UNQUOTED(PATH_TO_FPING6,"$PATH_TO_FPING6",[path to fping6]) | 1529 | if test -z "$($PATH_TO_FPING --version)" ; then |
| 1530 | AC_MSG_NOTICE([failed to get version of fping]) | ||
| 1531 | else | ||
| 1532 | FPING_MAJOR_VERSION="$($PATH_TO_FPING --version | sed 's/.*fping: Version //' | sed 's/\..*//')" | ||
| 1533 | FPING_MINOR_VERSION="$($PATH_TO_FPING --version | sed 's/.*fping: Version //' | sed 's/.*\.//')" | ||
| 1534 | |||
| 1535 | if test $FPING_MAJOR_VERSION -eq 5 ; then | ||
| 1536 | if test $FPING_MINOR_VERSION -ge 3 ; then | ||
| 1537 | AC_DEFINE(FPING_VERSION_5_3_OR_HIGHER, "true", [fping is of version 5.3 or higher]) | ||
| 1538 | AC_MSG_NOTICE([fping is of version 5.3 or higher]) | ||
| 1539 | AC_DEFINE(FPING_VERSION_5_2_OR_HIGHER, "true", [fping is of version 5.2 or higher]) | ||
| 1540 | AC_MSG_NOTICE([fping is of version 5.2 or higher]) | ||
| 1541 | elif test $FPING_MINOR_VERSION -ge 2 ; then | ||
| 1542 | AC_DEFINE(FPING_VERSION_5_2_OR_HIGHER, "true", [fping is of version 5.2 or higher]) | ||
| 1543 | AC_MSG_NOTICE([fping is of version 5.2 or higher]) | ||
| 1544 | else | ||
| 1545 | AC_MSG_NOTICE([fping is of a version lower then 5.2]) | ||
| 1546 | fi | ||
| 1547 | |||
| 1548 | elif $FPING_MAJOR_VERSION > 5 ; then | ||
| 1549 | AC_DEFINE(FPING_VERSION_5_2_OR_HIGHER, "true", [fping is of version 5.2 or higher]) | ||
| 1550 | AC_MSG_NOTICE([fping is of version 5.2 or higher]) | ||
| 1551 | AC_DEFINE(FPING_VERSION_5_3_OR_HIGHER, "true", [fping is of version 5.2 or higher]) | ||
| 1552 | AC_MSG_NOTICE([fping is of version 5.3 or higher]) | ||
| 1553 | fi | ||
| 1554 | |||
| 1555 | if test "`fping --version | sed 's/.*fping: Version //'`" = "5.2" ; then | ||
| 1556 | AC_DEFINE(FPING_VERSION, "5.2", [the version of fping available]) | ||
| 1557 | AC_MSG_NOTICE([fping version: 5.2]) | ||
| 1558 | elif test "`fping --version | sed 's/.*fping: Version //'`" = "5.3"; then | ||
| 1559 | AC_DEFINE(FPING_VERSION, "5.3", [the version of fping available]) | ||
| 1560 | AC_MSG_NOTICE([fping version: 5.3]) | ||
| 1561 | fi | ||
| 1555 | fi | 1562 | fi |
| 1556 | else | 1563 | else |
| 1557 | AC_MSG_WARN([Get fping from http://www.fping.com in order to make check_fping plugin]) | 1564 | AC_MSG_WARN([Get fping from http://www.fping.com in order to make check_fping plugin]) |
| @@ -1864,8 +1871,7 @@ dnl We patch plugins/popen.c | |||
| 1864 | dnl Need to add smp because uname different on those | 1871 | dnl Need to add smp because uname different on those |
| 1865 | dnl Can force patch to be applied with --enable-redhat-pthread-workaround | 1872 | dnl Can force patch to be applied with --enable-redhat-pthread-workaround |
| 1866 | AC_ARG_ENABLE(redhat-pthread-workaround, | 1873 | AC_ARG_ENABLE(redhat-pthread-workaround, |
| 1867 | AC_HELP_STRING([--enable-redhat-pthread-workaround], | 1874 | AS_HELP_STRING([--enable-redhat-pthread-workaround],[force Redhat patch to be applied (default: test system)]), |
| 1868 | [force Redhat patch to be applied (default: test system)]), | ||
| 1869 | [ac_cv_enable_redhat_pthread_workaround=$enableval], | 1875 | [ac_cv_enable_redhat_pthread_workaround=$enableval], |
| 1870 | [ac_cv_enable_redhat_pthread_workaround=test]) | 1876 | [ac_cv_enable_redhat_pthread_workaround=test]) |
| 1871 | if test "$ac_cv_enable_redhat_pthread_workaround" = "test" ; then | 1877 | if test "$ac_cv_enable_redhat_pthread_workaround" = "test" ; then |
| @@ -1886,8 +1892,7 @@ fi | |||
| 1886 | 1892 | ||
| 1887 | dnl Perl modules | 1893 | dnl Perl modules |
| 1888 | AC_ARG_ENABLE(perl-modules, | 1894 | AC_ARG_ENABLE(perl-modules, |
| 1889 | AC_HELP_STRING([--enable-perl-modules], | 1895 | AS_HELP_STRING([--enable-perl-modules],[Enables installation of Monitoring::Plugin and its dependencies (default: no)]), |
| 1890 | [Enables installation of Monitoring::Plugin and its dependencies (default: no)]), | ||
| 1891 | [enable_perl_modules=$enableval], | 1896 | [enable_perl_modules=$enableval], |
| 1892 | [enable_perl_modules=no]) | 1897 | [enable_perl_modules=no]) |
| 1893 | if test "$enable_perl_modules" = "yes" ; then | 1898 | if test "$enable_perl_modules" = "yes" ; then |
| @@ -1914,8 +1919,7 @@ if test "$ac_cv_uname_s" = 'SunOS' -a \( "x$ac_cv_prog_ac_ct_AR" = "x" -o "$ac_c | |||
| 1914 | AC_MSG_ERROR(No ar found for Solaris - is /usr/ccs/bin in PATH?) | 1919 | AC_MSG_ERROR(No ar found for Solaris - is /usr/ccs/bin in PATH?) |
| 1915 | fi | 1920 | fi |
| 1916 | 1921 | ||
| 1917 | AC_OUTPUT( | 1922 | AC_CONFIG_FILES([Makefile |
| 1918 | Makefile | ||
| 1919 | tap/Makefile | 1923 | tap/Makefile |
| 1920 | lib/Makefile | 1924 | lib/Makefile |
| 1921 | plugins/Makefile | 1925 | plugins/Makefile |
| @@ -1927,7 +1931,8 @@ AC_OUTPUT( | |||
| 1927 | perlmods/Makefile | 1931 | perlmods/Makefile |
| 1928 | test.pl | 1932 | test.pl |
| 1929 | pkg/solaris/pkginfo | 1933 | pkg/solaris/pkginfo |
| 1930 | ) | 1934 | ]) |
| 1935 | AC_OUTPUT | ||
| 1931 | 1936 | ||
| 1932 | 1937 | ||
| 1933 | dnl the ones below that are commented out need to be cleaned up | 1938 | dnl the ones below that are commented out need to be cleaned up |
