diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 42 |
1 files changed, 37 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index f6ead580..ce1728e3 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,9 +1,8 @@ | |||
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.59) | 2 | AC_PREREQ(2.59) |
3 | AC_INIT(monitoring-plugins,2.0) | 3 | AC_INIT(monitoring-plugins,2.1.1) |
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 | monitoring-plugins.spec]) | ||
7 | AC_CONFIG_AUX_DIR(build-aux) | 6 | AC_CONFIG_AUX_DIR(build-aux) |
8 | AM_INIT_AUTOMAKE([1.8.3]) | 7 | AM_INIT_AUTOMAKE([1.8.3]) |
9 | AM_MAINTAINER_MODE([enable]) | 8 | AM_MAINTAINER_MODE([enable]) |
@@ -157,6 +156,12 @@ AC_CHECK_LIB(socket,socket,SOCKETLIBS="$SOCKETLIBS -lsocket") | |||
157 | AC_CHECK_LIB(resolv,main,SOCKETLIBS="$SOCKETLIBS -lresolv") | 156 | AC_CHECK_LIB(resolv,main,SOCKETLIBS="$SOCKETLIBS -lresolv") |
158 | AC_SUBST(SOCKETLIBS) | 157 | AC_SUBST(SOCKETLIBS) |
159 | 158 | ||
159 | dnl Check for POSIX thread libraries | ||
160 | AC_CHECK_HEADERS(pthread.h) | ||
161 | AC_CHECK_LIB(pthread,pthread_create,THREADLIBS="-lpthread", | ||
162 | AC_CHECK_LIB(pthread,pthread_create,THREADLIBS="-lpthread -lrt",-lrt)) | ||
163 | AC_SUBST(THREADLIBS) | ||
164 | |||
160 | dnl | 165 | dnl |
161 | dnl check for math-related functions needing -lm | 166 | dnl check for math-related functions needing -lm |
162 | AC_CHECK_HEADERS(math.h) | 167 | AC_CHECK_HEADERS(math.h) |
@@ -611,6 +616,7 @@ AC_DEFINE_UNQUOTED(SOCKET_SIZE_TYPE, $ac_cv_socket_size_type , | |||
611 | dnl #### Process table test | 616 | dnl #### Process table test |
612 | 617 | ||
613 | AC_PATH_PROG(PATH_TO_PS,ps) | 618 | AC_PATH_PROG(PATH_TO_PS,ps) |
619 | AC_PATH_PROG(PATH_TO_ENV,env) | ||
614 | 620 | ||
615 | AC_MSG_CHECKING(for ps syntax) | 621 | AC_MSG_CHECKING(for ps syntax) |
616 | AC_ARG_WITH(ps_command, | 622 | AC_ARG_WITH(ps_command, |
@@ -932,6 +938,19 @@ then | |||
932 | ac_cv_ps_cols=6 | 938 | ac_cv_ps_cols=6 |
933 | AC_MSG_RESULT([$ac_cv_ps_command]) | 939 | AC_MSG_RESULT([$ac_cv_ps_command]) |
934 | 940 | ||
941 | dnl HP-UX: | ||
942 | dnl S UID RUID USER RUSER PID PPID VSZ %CPU COMMAND COMMAND | ||
943 | dnl S 0 400 root oracle 2805 1 12904 0.00 ora_dism_SEA1X ora_dism_SEA1X | ||
944 | dnl S 400 400 oracle oracle 19261 1 126488 0.00 tnslsnr /u01/app/oracle/product/db/11.2.0.3/bin/tnslsnr LISTENER -inherit | ||
945 | elif env UNIX95=1 ps -eo 'state uid ruid user ruser pid ppid vsz pcpu comm args' 2>/dev/null | head -n 1 | \ | ||
946 | egrep -i ["^ *S +UID +RUID +USER +RUSER +PID +PPID +VSZ +%CPU +COMMAND +COMMAND"] >/dev/null | ||
947 | then | ||
948 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procpcpu,procprog,&pos]" | ||
949 | ac_cv_ps_command="$PATH_TO_ENV UNIX95=1 $PATH_TO_PS -eo 'state uid pid ppid vsz pcpu comm args'" | ||
950 | ac_cv_ps_format="%s %d %d %d %d %f %s %n" | ||
951 | ac_cv_ps_cols=8 | ||
952 | AC_MSG_RESULT([$ac_cv_ps_command]) | ||
953 | |||
935 | dnl AIX 4.1: | 954 | dnl AIX 4.1: |
936 | dnl F S UID PID PPID C PRI NI ADDR SZ RSS WCHAN TTY TIME CMD | 955 | dnl F S UID PID PPID C PRI NI ADDR SZ RSS WCHAN TTY TIME CMD |
937 | dnl 303 A 0 0 0 120 16 -- 1c07 20 24 - 0:45 swapper | 956 | dnl 303 A 0 0 0 120 16 -- 1c07 20 24 - 0:45 swapper |
@@ -1465,6 +1484,16 @@ else | |||
1465 | AC_MSG_WARN([Get ssh in order to make check_by_ssh plugin]) | 1484 | AC_MSG_WARN([Get ssh in order to make check_by_ssh plugin]) |
1466 | fi | 1485 | fi |
1467 | 1486 | ||
1487 | AC_PATH_PROG(PATH_TO_SUDO,sudo) | ||
1488 | AC_ARG_WITH(sudo_command, | ||
1489 | ACX_HELP_STRING([--with-sudo-command=PATH], | ||
1490 | [sets path to sudo]), PATH_TO_SUDO=$withval) | ||
1491 | if test -n "$PATH_TO_SUDO" | ||
1492 | then | ||
1493 | AC_DEFINE_UNQUOTED(PATH_TO_SUDO,"$PATH_TO_SUDO",[path to sudo]) | ||
1494 | else | ||
1495 | AC_MSG_WARN([Could not find sudo or eqivalent]) | ||
1496 | fi | ||
1468 | 1497 | ||
1469 | AC_PATH_PROG(PATH_TO_MAILQ,mailq) | 1498 | AC_PATH_PROG(PATH_TO_MAILQ,mailq) |
1470 | AC_ARG_WITH(mailq_command, | 1499 | AC_ARG_WITH(mailq_command, |
@@ -1478,9 +1507,12 @@ else | |||
1478 | fi | 1507 | fi |
1479 | 1508 | ||
1480 | AC_PATH_PROG(PATH_TO_QMAIL_QSTAT,qmail-qstat) | 1509 | AC_PATH_PROG(PATH_TO_QMAIL_QSTAT,qmail-qstat) |
1481 | if test -x "$PATH_TO_QMAIL_QSTAT" | 1510 | AC_ARG_WITH(qmail_qstat_command, |
1511 | ACX_HELP_STRING([--with-qmail-qstat-command=PATH], | ||
1512 | [sets path to qmail-qstat]), PATH_TO_QMAIL_QSTAT=$withval) | ||
1513 | if test -n "$PATH_TO_QMAIL_QSTAT" | ||
1482 | then | 1514 | then |
1483 | AC_DEFINE_UNQUOTED(PATH_TO_MAILQ,"$PATH_TO_QMAIL_QSTAT",[path to qmail-qstat]) | 1515 | AC_DEFINE_UNQUOTED(PATH_TO_QMAIL_QSTAT,"$PATH_TO_QMAIL_QSTAT",[path to qmail-qstat]) |
1484 | else | 1516 | else |
1485 | AC_MSG_WARN([Could not find qmail-qstat or eqivalent]) | 1517 | AC_MSG_WARN([Could not find qmail-qstat or eqivalent]) |
1486 | fi | 1518 | fi |