diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 30 |
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") | |||
156 | AC_CHECK_LIB(resolv,main,SOCKETLIBS="$SOCKETLIBS -lresolv") | 156 | AC_CHECK_LIB(resolv,main,SOCKETLIBS="$SOCKETLIBS -lresolv") |
157 | AC_SUBST(SOCKETLIBS) | 157 | AC_SUBST(SOCKETLIBS) |
158 | 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 | |||
159 | dnl | 165 | dnl |
160 | dnl check for math-related functions needing -lm | 166 | dnl check for math-related functions needing -lm |
161 | AC_CHECK_HEADERS(math.h) | 167 | AC_CHECK_HEADERS(math.h) |
@@ -610,6 +616,7 @@ AC_DEFINE_UNQUOTED(SOCKET_SIZE_TYPE, $ac_cv_socket_size_type , | |||
610 | dnl #### Process table test | 616 | dnl #### Process table test |
611 | 617 | ||
612 | AC_PATH_PROG(PATH_TO_PS,ps) | 618 | AC_PATH_PROG(PATH_TO_PS,ps) |
619 | AC_PATH_PROG(PATH_TO_ENV,env) | ||
613 | 620 | ||
614 | AC_MSG_CHECKING(for ps syntax) | 621 | AC_MSG_CHECKING(for ps syntax) |
615 | AC_ARG_WITH(ps_command, | 622 | AC_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 | ||
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 | |||
934 | dnl AIX 4.1: | 954 | dnl AIX 4.1: |
935 | 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 |
936 | 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 |
@@ -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]) |
1465 | fi | 1485 | fi |
1466 | 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 | ||
1467 | 1497 | ||
1468 | AC_PATH_PROG(PATH_TO_MAILQ,mailq) | 1498 | AC_PATH_PROG(PATH_TO_MAILQ,mailq) |
1469 | AC_ARG_WITH(mailq_command, | 1499 | AC_ARG_WITH(mailq_command, |