summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac42
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 @@
1dnl Process this file with autoconf to produce a configure script. 1dnl Process this file with autoconf to produce a configure script.
2AC_PREREQ(2.59) 2AC_PREREQ(2.59)
3AC_INIT(monitoring-plugins,2.0) 3AC_INIT(monitoring-plugins,2.1.1)
4AC_CONFIG_SRCDIR(NPTest.pm) 4AC_CONFIG_SRCDIR(NPTest.pm)
5AC_CONFIG_FILES([gl/Makefile 5AC_CONFIG_FILES([gl/Makefile])
6 monitoring-plugins.spec])
7AC_CONFIG_AUX_DIR(build-aux) 6AC_CONFIG_AUX_DIR(build-aux)
8AM_INIT_AUTOMAKE([1.8.3]) 7AM_INIT_AUTOMAKE([1.8.3])
9AM_MAINTAINER_MODE([enable]) 8AM_MAINTAINER_MODE([enable])
@@ -157,6 +156,12 @@ AC_CHECK_LIB(socket,socket,SOCKETLIBS="$SOCKETLIBS -lsocket")
157AC_CHECK_LIB(resolv,main,SOCKETLIBS="$SOCKETLIBS -lresolv") 156AC_CHECK_LIB(resolv,main,SOCKETLIBS="$SOCKETLIBS -lresolv")
158AC_SUBST(SOCKETLIBS) 157AC_SUBST(SOCKETLIBS)
159 158
159dnl Check for POSIX thread libraries
160AC_CHECK_HEADERS(pthread.h)
161AC_CHECK_LIB(pthread,pthread_create,THREADLIBS="-lpthread",
162 AC_CHECK_LIB(pthread,pthread_create,THREADLIBS="-lpthread -lrt",-lrt))
163AC_SUBST(THREADLIBS)
164
160dnl 165dnl
161dnl check for math-related functions needing -lm 166dnl check for math-related functions needing -lm
162AC_CHECK_HEADERS(math.h) 167AC_CHECK_HEADERS(math.h)
@@ -611,6 +616,7 @@ AC_DEFINE_UNQUOTED(SOCKET_SIZE_TYPE, $ac_cv_socket_size_type ,
611dnl #### Process table test 616dnl #### Process table test
612 617
613AC_PATH_PROG(PATH_TO_PS,ps) 618AC_PATH_PROG(PATH_TO_PS,ps)
619AC_PATH_PROG(PATH_TO_ENV,env)
614 620
615AC_MSG_CHECKING(for ps syntax) 621AC_MSG_CHECKING(for ps syntax)
616AC_ARG_WITH(ps_command, 622AC_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
941dnl HP-UX:
942dnl S UID RUID USER RUSER PID PPID VSZ %CPU COMMAND COMMAND
943dnl S 0 400 root oracle 2805 1 12904 0.00 ora_dism_SEA1X ora_dism_SEA1X
944dnl S 400 400 oracle oracle 19261 1 126488 0.00 tnslsnr /u01/app/oracle/product/db/11.2.0.3/bin/tnslsnr LISTENER -inherit
945elif 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
947then
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
935dnl AIX 4.1: 954dnl AIX 4.1:
936dnl F S UID PID PPID C PRI NI ADDR SZ RSS WCHAN TTY TIME CMD 955dnl F S UID PID PPID C PRI NI ADDR SZ RSS WCHAN TTY TIME CMD
937dnl 303 A 0 0 0 120 16 -- 1c07 20 24 - 0:45 swapper 956dnl 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])
1466fi 1485fi
1467 1486
1487AC_PATH_PROG(PATH_TO_SUDO,sudo)
1488AC_ARG_WITH(sudo_command,
1489 ACX_HELP_STRING([--with-sudo-command=PATH],
1490 [sets path to sudo]), PATH_TO_SUDO=$withval)
1491if test -n "$PATH_TO_SUDO"
1492then
1493 AC_DEFINE_UNQUOTED(PATH_TO_SUDO,"$PATH_TO_SUDO",[path to sudo])
1494else
1495 AC_MSG_WARN([Could not find sudo or eqivalent])
1496fi
1468 1497
1469AC_PATH_PROG(PATH_TO_MAILQ,mailq) 1498AC_PATH_PROG(PATH_TO_MAILQ,mailq)
1470AC_ARG_WITH(mailq_command, 1499AC_ARG_WITH(mailq_command,
@@ -1478,9 +1507,12 @@ else
1478fi 1507fi
1479 1508
1480AC_PATH_PROG(PATH_TO_QMAIL_QSTAT,qmail-qstat) 1509AC_PATH_PROG(PATH_TO_QMAIL_QSTAT,qmail-qstat)
1481if test -x "$PATH_TO_QMAIL_QSTAT" 1510AC_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)
1513if test -n "$PATH_TO_QMAIL_QSTAT"
1482then 1514then
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])
1484else 1516else
1485 AC_MSG_WARN([Could not find qmail-qstat or eqivalent]) 1517 AC_MSG_WARN([Could not find qmail-qstat or eqivalent])
1486fi 1518fi