summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac30
1 files changed, 30 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 2429e990..ce1728e3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -156,6 +156,12 @@ AC_CHECK_LIB(socket,socket,SOCKETLIBS="$SOCKETLIBS -lsocket")
156AC_CHECK_LIB(resolv,main,SOCKETLIBS="$SOCKETLIBS -lresolv") 156AC_CHECK_LIB(resolv,main,SOCKETLIBS="$SOCKETLIBS -lresolv")
157AC_SUBST(SOCKETLIBS) 157AC_SUBST(SOCKETLIBS)
158 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
159dnl 165dnl
160dnl check for math-related functions needing -lm 166dnl check for math-related functions needing -lm
161AC_CHECK_HEADERS(math.h) 167AC_CHECK_HEADERS(math.h)
@@ -610,6 +616,7 @@ AC_DEFINE_UNQUOTED(SOCKET_SIZE_TYPE, $ac_cv_socket_size_type ,
610dnl #### Process table test 616dnl #### Process table test
611 617
612AC_PATH_PROG(PATH_TO_PS,ps) 618AC_PATH_PROG(PATH_TO_PS,ps)
619AC_PATH_PROG(PATH_TO_ENV,env)
613 620
614AC_MSG_CHECKING(for ps syntax) 621AC_MSG_CHECKING(for ps syntax)
615AC_ARG_WITH(ps_command, 622AC_ARG_WITH(ps_command,
@@ -931,6 +938,19 @@ then
931 ac_cv_ps_cols=6 938 ac_cv_ps_cols=6
932 AC_MSG_RESULT([$ac_cv_ps_command]) 939 AC_MSG_RESULT([$ac_cv_ps_command])
933 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
934dnl AIX 4.1: 954dnl AIX 4.1:
935dnl 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
936dnl 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
@@ -1464,6 +1484,16 @@ else
1464 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])
1465fi 1485fi
1466 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
1467 1497
1468AC_PATH_PROG(PATH_TO_MAILQ,mailq) 1498AC_PATH_PROG(PATH_TO_MAILQ,mailq)
1469AC_ARG_WITH(mailq_command, 1499AC_ARG_WITH(mailq_command,