summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac176
1 files changed, 103 insertions, 73 deletions
diff --git a/configure.ac b/configure.ac
index 7c17dcd..a294b00 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,10 +1,11 @@
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.64)
3AC_INIT(monitoring-plugins,2.3git) 3AC_INIT(monitoring-plugins,2.3git)
4AC_CONFIG_SRCDIR(NPTest.pm) 4AC_CONFIG_SRCDIR(NPTest.pm)
5AC_CONFIG_FILES([gl/Makefile]) 5AC_CONFIG_FILES([gl/Makefile])
6AC_CONFIG_AUX_DIR(build-aux) 6AC_CONFIG_AUX_DIR(build-aux)
7AM_INIT_AUTOMAKE([1.8.3]) 7AM_INIT_AUTOMAKE([1.8.3])
8AM_SILENT_RULES([yes])
8AM_MAINTAINER_MODE([enable]) 9AM_MAINTAINER_MODE([enable])
9AC_CONFIG_HEADERS([config.h]) 10AC_CONFIG_HEADERS([config.h])
10AC_CANONICAL_HOST 11AC_CANONICAL_HOST
@@ -327,6 +328,25 @@ AS_IF([test "x$with_ldap" != "xno"], [
327 LIBS="$_SAVEDLIBS" 328 LIBS="$_SAVEDLIBS"
328]) 329])
329 330
331
332AC_ARG_WITH([systemd], [AS_HELP_STRING([--without-systemd], [Skips systemd support])])
333
334dnl Check for libsystemd
335AS_IF([test "x$with_systemd" != "xno"], [
336 _SAVEDLIBS="$LIBS"
337 AC_CHECK_LIB(systemd,sd_get_sessions,,,-lsystemd)
338 if test "$ac_cv_lib_systemd_sd_get_sessions" = "yes"; then
339 SYSTEMDLIBS="-lsystemd"
340 SYSTEMDINCLUDE=""
341 AC_SUBST(SYSTEMDLIBS)
342 AC_SUBST(SYSTEMDINCLUDE)
343 else
344 AC_MSG_WARN([Skipping systemd support])
345 fi
346 LIBS="$_SAVEDLIBS"
347])
348
349
330dnl Check for headers used by check_ide_smart 350dnl Check for headers used by check_ide_smart
331case $host in 351case $host in
332 *linux*) 352 *linux*)
@@ -426,7 +446,7 @@ if test "$ac_cv_header_utmpx_h" = "no" -a "$ac_cv_header_wtsapi32_h" = "no"
426then 446then
427 AC_PATH_PROG(PATH_TO_WHO,who) 447 AC_PATH_PROG(PATH_TO_WHO,who)
428 448
429 if [$PATH_TO_WHO -q 2>/dev/null | egrep -i "^# users=[0-9]+$" >/dev/null] 449 if [$PATH_TO_WHO -q 2>/dev/null | grep -E -i "^# users=[0-9]+$" >/dev/null]
430 then 450 then
431 ac_cv_path_to_who="$PATH_TO_WHO -q" 451 ac_cv_path_to_who="$PATH_TO_WHO -q"
432 else 452 else
@@ -775,7 +795,7 @@ dnl Removing this for the moment - Ton
775dnl Using /usr/ucb/ps on Solaris systems, to avoid truncation 795dnl Using /usr/ucb/ps on Solaris systems, to avoid truncation
776dnl Limitation that command name is not available 796dnl Limitation that command name is not available
777dnl elif test "$ac_cv_uname_s" = "SunOS" && /usr/ucb/ps -alxwwn 2>/dev/null | \ 797dnl elif test "$ac_cv_uname_s" = "SunOS" && /usr/ucb/ps -alxwwn 2>/dev/null | \
778dnl egrep -i ["^ *F +UID +PID +PPID +%C +PRI +NI +SZ +RSS +WCHAN +S +TT +TIME +COMMAND"] > /dev/null 798dnl grep -E -i ["^ *F +UID +PID +PPID +%C +PRI +NI +SZ +RSS +WCHAN +S +TT +TIME +COMMAND"] > /dev/null
779dnl then 799dnl then
780dnl ac_cv_ps_varlist="[&procuid,&procpid,&procppid,&procpcpu,&procvsz,&procrss,procstat,&pos]" 800dnl ac_cv_ps_varlist="[&procuid,&procpid,&procppid,&procpcpu,&procvsz,&procrss,procstat,&pos]"
781dnl ac_cv_ps_command="/usr/ucb/ps -alxwwn" 801dnl ac_cv_ps_command="/usr/ucb/ps -alxwwn"
@@ -783,10 +803,20 @@ dnl ac_cv_ps_format=["%*s %d %d %d %d %*d %*d %d %d%*[ 0123456789abcdef]%[OSRZT
783dnl ac_cv_ps_cols=8 803dnl ac_cv_ps_cols=8
784dnl AC_MSG_RESULT([$ac_cv_ps_command]) 804dnl AC_MSG_RESULT([$ac_cv_ps_command])
785 805
806dnl This one is the exact same test as the next one but includes etime
807elif ps axwo 'stat comm vsz rss user uid pid ppid etime args' 2>/dev/null | \
808 grep -E -i ["^ *STAT +[UCOMAND]+ +VSZ +RSS +USER +UID +PID +PPID +ELAPSED +COMMAND"] > /dev/null
809then
810 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos]"
811 ac_cv_ps_command="$PATH_TO_PS axwo 'stat uid pid ppid vsz rss pcpu etime comm args'"
812 ac_cv_ps_format="%s %d %d %d %d %d %f %s %s %n"
813 ac_cv_ps_cols=10
814 AC_MSG_RESULT([$ac_cv_ps_command])
815
786dnl Some gnu/linux systems (debian for one) don't like -axwo and need axwo. 816dnl Some gnu/linux systems (debian for one) don't like -axwo and need axwo.
787dnl so test for this first... 817dnl so test for this first...
788elif ps axwo 'stat comm vsz rss user uid pid ppid args' 2>/dev/null | \ 818elif ps axwo 'stat comm vsz rss user uid pid ppid args' 2>/dev/null | \
789 egrep -i ["^ *STAT +[UCOMAND]+ +VSZ +RSS +USER +UID +PID +PPID +COMMAND"] > /dev/null 819 grep -E -i ["^ *STAT +[UCOMAND]+ +VSZ +RSS +USER +UID +PID +PPID +COMMAND"] > /dev/null
790then 820then
791 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" 821 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
792 ac_cv_ps_command="$PATH_TO_PS axwo 'stat uid pid ppid vsz rss pcpu comm args'" 822 ac_cv_ps_command="$PATH_TO_PS axwo 'stat uid pid ppid vsz rss pcpu comm args'"
@@ -798,7 +828,7 @@ dnl For OpenBSD 3.2 & 3.3. Must come before ps -weo
798dnl Should also work for FreeBSD 5.2.1 and 5.3 828dnl Should also work for FreeBSD 5.2.1 and 5.3
799dnl STAT UCOMM VSZ RSS USER PPID COMMAND 829dnl STAT UCOMM VSZ RSS USER PPID COMMAND
800elif ps -axwo 'stat comm vsz rss user uid pid ppid args' 2>/dev/null | \ 830elif ps -axwo 'stat comm vsz rss user uid pid ppid args' 2>/dev/null | \
801 egrep -i ["^ *STAT +[UCOMAND]+ +VSZ +RSS +USER +UID +PID +PPID +COMMAND"] > /dev/null 831 grep -E -i ["^ *STAT +[UCOMAND]+ +VSZ +RSS +USER +UID +PID +PPID +COMMAND"] > /dev/null
802then 832then
803 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" 833 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
804 ac_cv_ps_command="$PATH_TO_PS -axwo 'stat uid pid ppid vsz rss pcpu comm args'" 834 ac_cv_ps_command="$PATH_TO_PS -axwo 'stat uid pid ppid vsz rss pcpu comm args'"
@@ -810,7 +840,7 @@ dnl Some *BSDs have different format for ps. This is mainly to catch FreeBSD 4.
810dnl Limitation: Only first 16 chars returned for ucomm field 840dnl Limitation: Only first 16 chars returned for ucomm field
811dnl Must come before ps -weo 841dnl Must come before ps -weo
812elif ps -axwo 'stat uid pid ppid vsz rss pcpu ucomm command' 2>/dev/null | \ 842elif ps -axwo 'stat uid pid ppid vsz rss pcpu ucomm command' 2>/dev/null | \
813 egrep -i ["^ *STAT +UID +PID +PPID +VSZ +RSS +%CPU +UCOMM +COMMAND"] > /dev/null 843 grep -E -i ["^ *STAT +UID +PID +PPID +VSZ +RSS +%CPU +UCOMM +COMMAND"] > /dev/null
814then 844then
815 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" 845 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
816 ac_cv_ps_command="$PATH_TO_PS -axwo 'stat uid pid ppid vsz rss pcpu ucomm command'" 846 ac_cv_ps_command="$PATH_TO_PS -axwo 'stat uid pid ppid vsz rss pcpu ucomm command'"
@@ -820,7 +850,7 @@ then
820 850
821dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND 851dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND
822elif ps -weo 'stat comm vsz rss user uid pid ppid etime args' 2>/dev/null | \ 852elif ps -weo 'stat comm vsz rss user uid pid ppid etime args' 2>/dev/null | \
823 egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[ID]+ +P[PID]+ +[ELAPSD]+ +[RGSCOMDNA]+"] >/dev/null 853 grep -E -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[ID]+ +P[PID]+ +[ELAPSD]+ +[RGSCOMDNA]+"] >/dev/null
824then 854then
825 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos]" 855 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos]"
826 ac_cv_ps_command="$PATH_TO_PS -weo 'stat uid pid ppid vsz rss pcpu etime comm args'" 856 ac_cv_ps_command="$PATH_TO_PS -weo 'stat uid pid ppid vsz rss pcpu etime comm args'"
@@ -830,7 +860,7 @@ then
830 860
831dnl FreeBSD 861dnl FreeBSD
832elif ps waxco 'state command vsz rss uid user pid ppid' 2>/dev/null | \ 862elif ps waxco 'state command vsz rss uid user pid ppid' 2>/dev/null | \
833 egrep -i ["^STAT +COMMAND +VSZ +RSS +UID +USER +PID +PPID"] >/dev/null 863 grep -E -i ["^STAT +COMMAND +VSZ +RSS +UID +USER +PID +PPID"] >/dev/null
834then 864then
835 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" 865 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
836 ac_cv_ps_command="$PATH_TO_PS waxco 'state uid pid ppid vsz rss pcpu command command'" 866 ac_cv_ps_command="$PATH_TO_PS waxco 'state uid pid ppid vsz rss pcpu command command'"
@@ -840,7 +870,7 @@ then
840 870
841dnl BSD-like mode in RH 6.1 871dnl BSD-like mode in RH 6.1
842elif ps waxno 'state comm vsz rss uid user pid ppid args' 2>/dev/null | \ 872elif ps waxno 'state comm vsz rss uid user pid ppid args' 2>/dev/null | \
843 egrep -i ["^S +COMMAND +VSZ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null 873 grep -E -i ["^S +COMMAND +VSZ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null
844then 874then
845 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" 875 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
846 ac_cv_ps_command="$PATH_TO_PS waxno 'state uid pid ppid vsz rss pcpu comm args'" 876 ac_cv_ps_command="$PATH_TO_PS waxno 'state uid pid ppid vsz rss pcpu comm args'"
@@ -852,7 +882,7 @@ dnl SunOS 4.1.3:
852dnl F UID PID PPID CP PRI NI SZ RSS WCHAN STAT TT TIME COMMAND 882dnl F UID PID PPID CP PRI NI SZ RSS WCHAN STAT TT TIME COMMAND
853dnl Need the head -1 otherwise test will work because arguments are found 883dnl Need the head -1 otherwise test will work because arguments are found
854elif ps -laxnwww 2>/dev/null | head -1 | \ 884elif ps -laxnwww 2>/dev/null | head -1 | \
855 egrep -i ["^ *F(LAGS)? +UID +PID +PPID +CP +PRI +NI +(SZ)|(VSZ)|(SIZE) +RSS +WCHAN +STAT? +TTY? +TIME +COMMAND"] >/dev/null 885 grep -E -i ["^ *F(LAGS)? +UID +PID +PPID +CP +PRI +NI +(SZ)|(VSZ)|(SIZE) +RSS +WCHAN +STAT? +TTY? +TIME +COMMAND"] >/dev/null
856then 886then
857 ac_cv_ps_varlist="[&procuid,&procpid,&procppid,&procvsz,&procrss,procstat,&pos,procprog]" 887 ac_cv_ps_varlist="[&procuid,&procpid,&procppid,&procvsz,&procrss,procstat,&pos,procprog]"
858 ac_cv_ps_command="$PATH_TO_PS -laxnwww" 888 ac_cv_ps_command="$PATH_TO_PS -laxnwww"
@@ -865,7 +895,7 @@ dnl FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMA
865dnl 100 0 1 0 0 0 776 76 c0131c8c S ffff 0:11 init [2] 895dnl 100 0 1 0 0 0 776 76 c0131c8c S ffff 0:11 init [2]
866dnl 896dnl
867elif ps laxnwww 2>/dev/null | \ 897elif ps laxnwww 2>/dev/null | \
868 egrep -i ["^ *F(LAGS)? +UID +PID +PPID +PRI +NI +(VSZ)|(SIZE) +RSS +WCHAN +STAT? TTY +TIME +COMMAND"] >/dev/null 898 grep -E -i ["^ *F(LAGS)? +UID +PID +PPID +PRI +NI +(VSZ)|(SIZE) +RSS +WCHAN +STAT? TTY +TIME +COMMAND"] >/dev/null
869then 899then
870 ac_cv_ps_varlist="[&procuid,&procpid,&procppid,procstat,&procvsz,&procrss,&pos,procprog]" 900 ac_cv_ps_varlist="[&procuid,&procpid,&procppid,procstat,&procvsz,&procrss,&pos,procprog]"
871 ac_cv_ps_command="$PATH_TO_PS laxnwww" 901 ac_cv_ps_command="$PATH_TO_PS laxnwww"
@@ -875,7 +905,7 @@ then
875 905
876dnl OpenBSD (needs to come early because -exo appears to work, but does not give all procs) 906dnl OpenBSD (needs to come early because -exo appears to work, but does not give all procs)
877elif ps -axo 'stat comm vsz rss user uid pid ppid args' 2>/dev/null | \ 907elif ps -axo 'stat comm vsz rss user uid pid ppid args' 2>/dev/null | \
878 egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null 908 grep -E -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null
879then 909then
880 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" 910 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
881 ac_cv_ps_command="$PATH_TO_PS -axo 'stat uid pid ppid vsz rss pcpu comm args'" 911 ac_cv_ps_command="$PATH_TO_PS -axo 'stat uid pid ppid vsz rss pcpu comm args'"
@@ -888,7 +918,7 @@ dnl Has /usr/bin/ps and /sbin/ps - force sbin version
888dnl Can't use vsize and rssize because comes back with text (eg, 1.5M instead 918dnl Can't use vsize and rssize because comes back with text (eg, 1.5M instead
889dnl of 1500). Will need big changes to check_procs to support 919dnl of 1500). Will need big changes to check_procs to support
890elif /sbin/ps -eo 'stat uid pid ppid pcpu etime comm args' 2>/dev/null | \ 920elif /sbin/ps -eo 'stat uid pid ppid pcpu etime comm args' 2>/dev/null | \
891 egrep -i ["^ *S +[UID]+ +[PID]+ +[PID]+ +[%CPU]+ +[ELAPSD]+ +[COMMAND]+ +[COMMAND]+"] > /dev/null 921 grep -E -i ["^ *S +[UID]+ +[PID]+ +[PID]+ +[%CPU]+ +[ELAPSD]+ +[COMMAND]+ +[COMMAND]+"] > /dev/null
892then 922then
893 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procpcpu,procetime,procprog,&pos]" 923 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procpcpu,procetime,procprog,&pos]"
894 ac_cv_ps_command="/sbin/ps -eo 'stat uid pid ppid pcpu etime comm args'" 924 ac_cv_ps_command="/sbin/ps -eo 'stat uid pid ppid pcpu etime comm args'"
@@ -897,7 +927,7 @@ then
897 AC_MSG_RESULT([$ac_cv_ps_command]) 927 AC_MSG_RESULT([$ac_cv_ps_command])
898 928
899elif ps -eo 's comm vsz rss user uid pid ppid args' 2>/dev/null | \ 929elif ps -eo 's comm vsz rss user uid pid ppid args' 2>/dev/null | \
900 egrep -i ["^S[TAUES]* +C[OMDNA]+ +[VSIZE]+ +U[SER]+ +U[ID]+ +P[PID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null 930 grep -E -i ["^S[TAUES]* +C[OMDNA]+ +[VSIZE]+ +U[SER]+ +U[ID]+ +P[PID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null
901then 931then
902 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" 932 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
903 ac_cv_ps_command="$PATH_TO_PS -eo 's uid pid ppid vsz rss pcpu comm args'" 933 ac_cv_ps_command="$PATH_TO_PS -eo 's uid pid ppid vsz rss pcpu comm args'"
@@ -907,7 +937,7 @@ then
907 937
908dnl AIX 4.3.3 and 5.1 do not have an rss field 938dnl AIX 4.3.3 and 5.1 do not have an rss field
909elif ps -eo 'stat uid pid ppid vsz pcpu comm args' 2>/dev/null | \ 939elif ps -eo 'stat uid pid ppid vsz pcpu comm args' 2>/dev/null | \
910 egrep -i ["^ *S[TAUES]* +UID +PID +PPID +VSZ +%CPU +COMMAND +COMMAND"] >/dev/null 940 grep -E -i ["^ *S[TAUES]* +UID +PID +PPID +VSZ +%CPU +COMMAND +COMMAND"] >/dev/null
911then 941then
912 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procpcpu,procprog,&pos]" 942 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procpcpu,procprog,&pos]"
913 ac_cv_ps_command="$PATH_TO_PS -eo 'stat uid pid ppid vsz pcpu comm args'" 943 ac_cv_ps_command="$PATH_TO_PS -eo 'stat uid pid ppid vsz pcpu comm args'"
@@ -917,18 +947,18 @@ then
917 947
918dnl Solaris 2.6 948dnl Solaris 2.6
919elif ps -Ao 's comm vsz rss uid user pid ppid args' 2>/dev/null | \ 949elif ps -Ao 's comm vsz rss uid user pid ppid args' 2>/dev/null | \
920 egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null 950 grep -E -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null
921then 951then
922 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" 952 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
923 ac_cv_ps_command="$PATH_TO_PS -Ao 's uid pid ppid vsz rss pcpu comm args'" 953 ac_cv_ps_command="$PATH_TO_PS -Ao 's uid pid ppid vsz rss pcpu comm args'"
924 # There must be no space between the %s and %n due to a wierd problem in sscanf where 954 # There must be no space between the %s and %n due to a weird problem in sscanf where
925 # it will return %n as longer than the line length 955 # it will return %n as longer than the line length
926 ac_cv_ps_format="%s %d %d %d %d %d %f %s%n" 956 ac_cv_ps_format="%s %d %d %d %d %d %f %s%n"
927 ac_cv_ps_cols=9 957 ac_cv_ps_cols=9
928 AC_MSG_RESULT([$ac_cv_ps_command]) 958 AC_MSG_RESULT([$ac_cv_ps_command])
929 959
930elif ps -Ao 'status comm vsz rss uid user pid ppid args' 2>/dev/null | \ 960elif ps -Ao 'status comm vsz rss uid user pid ppid args' 2>/dev/null | \
931 egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null 961 grep -E -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null
932then 962then
933 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" 963 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
934 ac_cv_ps_command="$PATH_TO_PS -Ao 'status uid pid ppid vsz rss pcpu comm args'" 964 ac_cv_ps_command="$PATH_TO_PS -Ao 'status uid pid ppid vsz rss pcpu comm args'"
@@ -937,7 +967,7 @@ then
937 AC_MSG_RESULT([$ac_cv_ps_command]) 967 AC_MSG_RESULT([$ac_cv_ps_command])
938 968
939elif ps -Ao 'state comm vsz rss uid user pid ppid args' 2>/dev/null | \ 969elif ps -Ao 'state comm vsz rss uid user pid ppid args' 2>/dev/null | \
940 egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null 970 grep -E -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null
941then 971then
942 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" 972 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
943 ac_cv_ps_command="$PATH_TO_PS -Ao 'state uid pid ppid vsz rss pcpu comm args'" 973 ac_cv_ps_command="$PATH_TO_PS -Ao 'state uid pid ppid vsz rss pcpu comm args'"
@@ -947,7 +977,7 @@ then
947 977
948dnl wonder who takes state instead of stat 978dnl wonder who takes state instead of stat
949elif ps -ao 'state command vsz rss user pid ppid args' 2>/dev/null | \ 979elif ps -ao 'state command vsz rss user pid ppid args' 2>/dev/null | \
950 egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null 980 grep -E -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null
951then 981then
952 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" 982 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
953 ac_cv_ps_command="$PATH_TO_PS -ao 'state uid pid ppid vsz rss pcpu command args'" 983 ac_cv_ps_command="$PATH_TO_PS -ao 'state uid pid ppid vsz rss pcpu command args'"
@@ -957,7 +987,7 @@ then
957 987
958dnl IRIX 53 988dnl IRIX 53
959elif ps -el 2>/dev/null | \ 989elif ps -el 2>/dev/null | \
960 egrep -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +P +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null 990 grep -E -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +P +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null
961then 991then
962 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&pos,procprog]" 992 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&pos,procprog]"
963 ac_cv_ps_command="$PATH_TO_PS -el (IRIX 53)" 993 ac_cv_ps_command="$PATH_TO_PS -el (IRIX 53)"
@@ -967,7 +997,7 @@ then
967 997
968dnl IRIX 63 998dnl IRIX 63
969elif ps -el 2>/dev/null | \ 999elif ps -el 2>/dev/null | \
970 egrep -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +P +ADDR +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null 1000 grep -E -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +P +ADDR +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null
971then 1001then
972 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&pos,procprog]" 1002 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&pos,procprog]"
973 ac_cv_ps_command="$PATH_TO_PS -el (IRIX 63)" 1003 ac_cv_ps_command="$PATH_TO_PS -el (IRIX 63)"
@@ -980,7 +1010,7 @@ dnl S UID RUID USER RUSER PID PPID VSZ %CPU COMMAND
980dnl S 0 400 root oracle 2805 1 12904 0.00 ora_dism_SEA1X ora_dism_SEA1X 1010dnl S 0 400 root oracle 2805 1 12904 0.00 ora_dism_SEA1X ora_dism_SEA1X
981dnl S 400 400 oracle oracle 19261 1 126488 0.00 tnslsnr /u01/app/oracle/product/db/11.2.0.3/bin/tnslsnr LISTENER -inherit 1011dnl S 400 400 oracle oracle 19261 1 126488 0.00 tnslsnr /u01/app/oracle/product/db/11.2.0.3/bin/tnslsnr LISTENER -inherit
982elif env UNIX95=1 ps -eo 'state uid ruid user ruser pid ppid vsz pcpu comm args' 2>/dev/null | head -n 1 | \ 1012elif env UNIX95=1 ps -eo 'state uid ruid user ruser pid ppid vsz pcpu comm args' 2>/dev/null | head -n 1 | \
983 egrep -i ["^ *S +UID +RUID +USER +RUSER +PID +PPID +VSZ +%CPU +COMMAND +COMMAND"] >/dev/null 1013 grep -E -i ["^ *S +UID +RUID +USER +RUSER +PID +PPID +VSZ +%CPU +COMMAND +COMMAND"] >/dev/null
984then 1014then
985 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procpcpu,procprog,&pos]" 1015 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procpcpu,procprog,&pos]"
986 ac_cv_ps_command="$PATH_TO_ENV UNIX95=1 $PATH_TO_PS -eo 'state uid pid ppid vsz pcpu comm args'" 1016 ac_cv_ps_command="$PATH_TO_ENV UNIX95=1 $PATH_TO_PS -eo 'state uid pid ppid vsz pcpu comm args'"
@@ -992,7 +1022,7 @@ dnl AIX 4.1:
992dnl F S UID PID PPID C PRI NI ADDR SZ RSS WCHAN TTY TIME CMD 1022dnl F S UID PID PPID C PRI NI ADDR SZ RSS WCHAN TTY TIME CMD
993dnl 303 A 0 0 0 120 16 -- 1c07 20 24 - 0:45 swapper 1023dnl 303 A 0 0 0 120 16 -- 1c07 20 24 - 0:45 swapper
994elif ps -el 2>/dev/null | \ 1024elif ps -el 2>/dev/null | \
995 egrep -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +ADDR +SZ +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null 1025 grep -E -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +ADDR +SZ +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null
996then 1026then
997 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&pos,procprog]" 1027 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&pos,procprog]"
998 ac_cv_ps_command="$PATH_TO_PS -el (AIX 4.1 and HP-UX)" 1028 ac_cv_ps_command="$PATH_TO_PS -el (AIX 4.1 and HP-UX)"
@@ -1002,7 +1032,7 @@ then
1002 1032
1003dnl AIX? 1033dnl AIX?
1004elif ps glaxen 2>/dev/null | \ 1034elif ps glaxen 2>/dev/null | \
1005 egrep -i ["^ *F +UID +PID +PPID +PRI +NI +VSZ +RSS +WCHAN +STAT +TTY +TIME +COMMAND"] >/dev/null 1035 grep -E -i ["^ *F +UID +PID +PPID +PRI +NI +VSZ +RSS +WCHAN +STAT +TTY +TIME +COMMAND"] >/dev/null
1006then 1036then
1007 ac_cv_ps_varlist="[&procuid,&procpid,&procppid,&procvsz,&procrss,procstat,&pos,procprog]" 1037 ac_cv_ps_varlist="[&procuid,&procpid,&procppid,&procvsz,&procrss,procstat,&pos,procprog]"
1008 ac_cv_ps_command="$PATH_TO_PS glaxen" 1038 ac_cv_ps_command="$PATH_TO_PS glaxen"
@@ -1016,7 +1046,7 @@ dnl Some truncation will happen in UCOMM column
1016dnl STAT VSZ RSS UID PPID %CPU UCOMM COMMAND 1046dnl STAT VSZ RSS UID PPID %CPU UCOMM COMMAND
1017dnl Ss 52756 22496 501 1 6.9 Window Manager /System/Library/CoreServices/WindowServer -daemon 1047dnl Ss 52756 22496 501 1 6.9 Window Manager /System/Library/CoreServices/WindowServer -daemon
1018elif ps wwaxo 'state vsz rss uid pid ppid pcpu ucomm command' 2>/dev/null | \ 1048elif ps wwaxo 'state vsz rss uid pid ppid pcpu ucomm command' 2>/dev/null | \
1019 egrep -i ["^STAT +VSZ +RSS +UID +PPID +%CPU +UCOMM +COMMAND"] >/dev/null 1049 grep -E -i ["^STAT +VSZ +RSS +UID +PPID +%CPU +UCOMM +COMMAND"] >/dev/null
1020then 1050then
1021 ac_cv_ps_command="$PATH_TO_PS wwaxo 'state vsz rss uid pid ppid pcpu ucomm command'" 1051 ac_cv_ps_command="$PATH_TO_PS wwaxo 'state vsz rss uid pid ppid pcpu ucomm command'"
1022 ac_cv_ps_varlist="[procstat,&procvsz,&procrss,&procuid,&procpid,&procppid,&procpcpu,procprog,&pos]" 1052 ac_cv_ps_varlist="[procstat,&procvsz,&procrss,&procuid,&procpid,&procppid,&procpcpu,procprog,&pos]"
@@ -1026,7 +1056,7 @@ then
1026 1056
1027dnl UnixWare 1057dnl UnixWare
1028elif ps -Al 2>/dev/null | \ 1058elif ps -Al 2>/dev/null | \
1029 egrep -i ["^ *F +S +UID +PID +PPID +CLS +PRI +NI +C +ADDR +SZ +WCHAN +TTY +TIME +COMD"] >/dev/null 1059 grep -E -i ["^ *F +S +UID +PID +PPID +CLS +PRI +NI +C +ADDR +SZ +WCHAN +TTY +TIME +COMD"] >/dev/null
1030then 1060then
1031 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&pos,procprog]" 1061 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&pos,procprog]"
1032 ac_cv_ps_command="$PATH_TO_PS -Al" 1062 ac_cv_ps_command="$PATH_TO_PS -Al"
@@ -1094,14 +1124,14 @@ then
1094 1124
1095elif [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \ 1125elif [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \
1096 $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \ 1126 $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \
1097 egrep -i "^round-trip|^rtt" >/dev/null 1127 grep -E -i "^round-trip|^rtt" >/dev/null
1098then 1128then
1099 with_ping_command="$PATH_TO_PING -n -U -c %d %s" 1129 with_ping_command="$PATH_TO_PING -n -U -c %d %s"
1100 ac_cv_ping_packets_first=yes 1130 ac_cv_ping_packets_first=yes
1101 AC_MSG_RESULT([$with_ping_command]) 1131 AC_MSG_RESULT([$with_ping_command])
1102 1132
1103elif $PATH_TO_PING -4 -n -U -w 10 -c 1 127.0.0.1 2>/dev/null | \ 1133elif $PATH_TO_PING -4 -n -U -w 10 -c 1 127.0.0.1 2>/dev/null | \
1104 egrep -i "^round-trip|^rtt" >/dev/null 1134 grep -E -i "^round-trip|^rtt" >/dev/null
1105then 1135then
1106 # check if -4 is supported - issue #1550 1136 # check if -4 is supported - issue #1550
1107 with_ping_command="$PATH_TO_PING -4 -n -U -w %d -c %d %s" 1137 with_ping_command="$PATH_TO_PING -4 -n -U -w %d -c %d %s"
@@ -1109,7 +1139,7 @@ then
1109 ac_cv_ping_has_timeout=yes 1139 ac_cv_ping_has_timeout=yes
1110 AC_MSG_RESULT([$with_ping_command]) 1140 AC_MSG_RESULT([$with_ping_command])
1111elif $PATH_TO_PING -n -U -w 10 -c 1 127.0.0.1 2>/dev/null | \ 1141elif $PATH_TO_PING -n -U -w 10 -c 1 127.0.0.1 2>/dev/null | \
1112 egrep -i "^round-trip|^rtt" >/dev/null 1142 grep -E -i "^round-trip|^rtt" >/dev/null
1113then 1143then
1114 with_ping_command="$PATH_TO_PING -n -U -w %d -c %d %s" 1144 with_ping_command="$PATH_TO_PING -n -U -w %d -c %d %s"
1115 ac_cv_ping_packets_first=yes 1145 ac_cv_ping_packets_first=yes
@@ -1117,52 +1147,52 @@ then
1117 AC_MSG_RESULT([$with_ping_command]) 1147 AC_MSG_RESULT([$with_ping_command])
1118 1148
1119elif $PATH_TO_PING -n -U -c 1 127.0.0.1 2>/dev/null | \ 1149elif $PATH_TO_PING -n -U -c 1 127.0.0.1 2>/dev/null | \
1120 egrep -i "^round-trip|^rtt" >/dev/null 1150 grep -E -i "^round-trip|^rtt" >/dev/null
1121then 1151then
1122 with_ping_command="$PATH_TO_PING -n -U -c %d %s" 1152 with_ping_command="$PATH_TO_PING -n -U -c %d %s"
1123 ac_cv_ping_packets_first=yes 1153 ac_cv_ping_packets_first=yes
1124 AC_MSG_RESULT([$with_ping_command]) 1154 AC_MSG_RESULT([$with_ping_command])
1125 1155
1126elif $PATH_TO_PING -n -c 1 127.0.0.1 2>/dev/null | \ 1156elif $PATH_TO_PING -n -c 1 127.0.0.1 2>/dev/null | \
1127 egrep -i "^round-trip|^rtt" >/dev/null 1157 grep -E -i "^round-trip|^rtt" >/dev/null
1128then 1158then
1129 with_ping_command="$PATH_TO_PING -n -c %d %s" 1159 with_ping_command="$PATH_TO_PING -n -c %d %s"
1130 ac_cv_ping_packets_first=yes 1160 ac_cv_ping_packets_first=yes
1131 AC_MSG_RESULT([$with_ping_command]) 1161 AC_MSG_RESULT([$with_ping_command])
1132 1162
1133elif $PATH_TO_PING -n 127.0.0.1 -c 1 2>/dev/null | \ 1163elif $PATH_TO_PING -n 127.0.0.1 -c 1 2>/dev/null | \
1134 egrep -i "^round-trip|^rtt" >/dev/null 1164 grep -E -i "^round-trip|^rtt" >/dev/null
1135then 1165then
1136 with_ping_command="$PATH_TO_PING -n %s -c %d" 1166 with_ping_command="$PATH_TO_PING -n %s -c %d"
1137 AC_MSG_RESULT([$with_ping_command]) 1167 AC_MSG_RESULT([$with_ping_command])
1138 1168
1139elif $PATH_TO_PING 127.0.0.1 -n 1 2>/dev/null | \ 1169elif $PATH_TO_PING 127.0.0.1 -n 1 2>/dev/null | \
1140 egrep -i "^round-trip|^rtt" >/dev/null 1170 grep -E -i "^round-trip|^rtt" >/dev/null
1141then 1171then
1142 with_ping_command="$PATH_TO_PING %s -n %d" 1172 with_ping_command="$PATH_TO_PING %s -n %d"
1143 AC_MSG_RESULT([$with_ping_command]) 1173 AC_MSG_RESULT([$with_ping_command])
1144 1174
1145elif $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \ 1175elif $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \
1146 egrep -i "^round-trip|^rtt" >/dev/null 1176 grep -E -i "^round-trip|^rtt" >/dev/null
1147then 1177then
1148 with_ping_command="$PATH_TO_PING -n -s %s 56 %d" 1178 with_ping_command="$PATH_TO_PING -n -s %s 56 %d"
1149 AC_MSG_RESULT([$with_ping_command]) 1179 AC_MSG_RESULT([$with_ping_command])
1150 1180
1151elif $PATH_TO_PING -n -h 127.0.0.1 -s 56 -c 1 2>/dev/null | \ 1181elif $PATH_TO_PING -n -h 127.0.0.1 -s 56 -c 1 2>/dev/null | \
1152 egrep -i "^round-trip|^rtt" >/dev/null 1182 grep -E -i "^round-trip|^rtt" >/dev/null
1153then 1183then
1154 with_ping_command="$PATH_TO_PING -n -h %s -s 56 -c %d" 1184 with_ping_command="$PATH_TO_PING -n -h %s -s 56 -c %d"
1155 AC_MSG_RESULT([$with_ping_command]) 1185 AC_MSG_RESULT([$with_ping_command])
1156 1186
1157elif $PATH_TO_PING -n -s 56 -c 1 127.0.0.1 2>/dev/null | \ 1187elif $PATH_TO_PING -n -s 56 -c 1 127.0.0.1 2>/dev/null | \
1158 egrep -i "^round-trip|^rtt" >/dev/null 1188 grep -E -i "^round-trip|^rtt" >/dev/null
1159then 1189then
1160 with_ping_command="$PATH_TO_PING -n -s 56 -c %d %s" 1190 with_ping_command="$PATH_TO_PING -n -s 56 -c %d %s"
1161 ac_cv_ping_packets_first=yes 1191 ac_cv_ping_packets_first=yes
1162 AC_MSG_RESULT([$with_ping_command]) 1192 AC_MSG_RESULT([$with_ping_command])
1163 1193
1164elif $PATH_TO_PING -n -c 1 127.0.0.1 2>/dev/null | \ 1194elif $PATH_TO_PING -n -c 1 127.0.0.1 2>/dev/null | \
1165 egrep -i "^round-trip|^rtt" >/dev/null 1195 grep -E -i "^round-trip|^rtt" >/dev/null
1166then 1196then
1167 with_ping_command="$PATH_TO_PING -n -c %d %s" 1197 with_ping_command="$PATH_TO_PING -n -c %d %s"
1168 ac_cv_ping_packets_first=yes 1198 ac_cv_ping_packets_first=yes
@@ -1218,14 +1248,14 @@ elif [[ "z$ac_cv_uname_o" = "zCygwin" -a "x$PATH_TO_PING" != "x" ]]; then
1218elif test "x$PATH_TO_PING6" != "x"; then 1248elif test "x$PATH_TO_PING6" != "x"; then
1219 if [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \ 1249 if [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \
1220 $PATH_TO_PING6 -n -s ::1 56 1 2>/dev/null | \ 1250 $PATH_TO_PING6 -n -s ::1 56 1 2>/dev/null | \
1221 egrep -i "^round-trip|^rtt" >/dev/null 1251 grep -E -i "^round-trip|^rtt" >/dev/null
1222 then 1252 then
1223 with_ping6_command="$PATH_TO_PING6 -n -U -c %d %s" 1253 with_ping6_command="$PATH_TO_PING6 -n -U -c %d %s"
1224 ac_cv_ping6_packets_first=yes 1254 ac_cv_ping6_packets_first=yes
1225 AC_MSG_RESULT([$with_ping6_command]) 1255 AC_MSG_RESULT([$with_ping6_command])
1226 1256
1227 elif $PATH_TO_PING6 -n -U -w 10 -c 1 ::1 2>/dev/null | \ 1257 elif $PATH_TO_PING6 -n -U -w 10 -c 1 ::1 2>/dev/null | \
1228 egrep -i "^round-trip|^rtt" >/dev/null 1258 grep -E -i "^round-trip|^rtt" >/dev/null
1229 then 1259 then
1230 with_ping6_command="$PATH_TO_PING6 -n -U -w %d -c %d %s" 1260 with_ping6_command="$PATH_TO_PING6 -n -U -w %d -c %d %s"
1231 ac_cv_ping6_packets_first=yes 1261 ac_cv_ping6_packets_first=yes
@@ -1233,52 +1263,52 @@ elif test "x$PATH_TO_PING6" != "x"; then
1233 AC_MSG_RESULT([$with_ping6_command]) 1263 AC_MSG_RESULT([$with_ping6_command])
1234 1264
1235 elif $PATH_TO_PING6 -n -U -c 1 ::1 2>/dev/null | \ 1265 elif $PATH_TO_PING6 -n -U -c 1 ::1 2>/dev/null | \
1236 egrep -i "^round-trip|^rtt" >/dev/null 1266 grep -E -i "^round-trip|^rtt" >/dev/null
1237 then 1267 then
1238 with_ping6_command="$PATH_TO_PING6 -n -U -c %d %s" 1268 with_ping6_command="$PATH_TO_PING6 -n -U -c %d %s"
1239 ac_cv_ping6_packets_first=yes 1269 ac_cv_ping6_packets_first=yes
1240 AC_MSG_RESULT([$with_ping6_command]) 1270 AC_MSG_RESULT([$with_ping6_command])
1241 1271
1242 elif $PATH_TO_PING6 -n -c 1 ::1 2>/dev/null | \ 1272 elif $PATH_TO_PING6 -n -c 1 ::1 2>/dev/null | \
1243 egrep -i "^round-trip|^rtt" >/dev/null 1273 grep -E -i "^round-trip|^rtt" >/dev/null
1244 then 1274 then
1245 with_ping6_command="$PATH_TO_PING6 -n -c %d %s" 1275 with_ping6_command="$PATH_TO_PING6 -n -c %d %s"
1246 ac_cv_ping6_packets_first=yes 1276 ac_cv_ping6_packets_first=yes
1247 AC_MSG_RESULT([$with_ping6_command]) 1277 AC_MSG_RESULT([$with_ping6_command])
1248 1278
1249 elif $PATH_TO_PING6 -n ::1 -c 1 2>/dev/null | \ 1279 elif $PATH_TO_PING6 -n ::1 -c 1 2>/dev/null | \
1250 egrep -i "^round-trip|^rtt" >/dev/null 1280 grep -E -i "^round-trip|^rtt" >/dev/null
1251 then 1281 then
1252 with_ping6_command="$PATH_TO_PING6 -n %s -c %d" 1282 with_ping6_command="$PATH_TO_PING6 -n %s -c %d"
1253 AC_MSG_RESULT([$with_ping6_command]) 1283 AC_MSG_RESULT([$with_ping6_command])
1254 1284
1255 elif $PATH_TO_PING6 ::1 -n 1 2>/dev/null | \ 1285 elif $PATH_TO_PING6 ::1 -n 1 2>/dev/null | \
1256 egrep -i "^round-trip|^rtt" >/dev/null 1286 grep -E -i "^round-trip|^rtt" >/dev/null
1257 then 1287 then
1258 with_ping6_command="$PATH_TO_PING6 %s -n %d" 1288 with_ping6_command="$PATH_TO_PING6 %s -n %d"
1259 AC_MSG_RESULT([$with_ping6_command]) 1289 AC_MSG_RESULT([$with_ping6_command])
1260 1290
1261 elif $PATH_TO_PING6 -n -s ::1 56 1 2>/dev/null | \ 1291 elif $PATH_TO_PING6 -n -s ::1 56 1 2>/dev/null | \
1262 egrep -i "^round-trip|^rtt" >/dev/null 1292 grep -E -i "^round-trip|^rtt" >/dev/null
1263 then 1293 then
1264 with_ping6_command="$PATH_TO_PING6 -n -s %s 56 %d" 1294 with_ping6_command="$PATH_TO_PING6 -n -s %s 56 %d"
1265 AC_MSG_RESULT([$with_ping6_command]) 1295 AC_MSG_RESULT([$with_ping6_command])
1266 1296
1267 elif $PATH_TO_PING6 -n -h ::1 -s 56 -c 1 2>/dev/null | \ 1297 elif $PATH_TO_PING6 -n -h ::1 -s 56 -c 1 2>/dev/null | \
1268 egrep -i "^round-trip|^rtt" >/dev/null 1298 grep -E -i "^round-trip|^rtt" >/dev/null
1269 then 1299 then
1270 with_ping6_command="$PATH_TO_PING6 -n -h %s -s 56 -c %d" 1300 with_ping6_command="$PATH_TO_PING6 -n -h %s -s 56 -c %d"
1271 AC_MSG_RESULT([$with_ping6_command]) 1301 AC_MSG_RESULT([$with_ping6_command])
1272 1302
1273 elif $PATH_TO_PING6 -n -s 56 -c 1 ::1 2>/dev/null | \ 1303 elif $PATH_TO_PING6 -n -s 56 -c 1 ::1 2>/dev/null | \
1274 egrep -i "^round-trip|^rtt" >/dev/null 1304 grep -E -i "^round-trip|^rtt" >/dev/null
1275 then 1305 then
1276 with_ping6_command="$PATH_TO_PING6 -n -s 56 -c %d %s" 1306 with_ping6_command="$PATH_TO_PING6 -n -s 56 -c %d %s"
1277 ac_cv_ping6_packets_first=yes 1307 ac_cv_ping6_packets_first=yes
1278 AC_MSG_RESULT([$with_ping_command]) 1308 AC_MSG_RESULT([$with_ping_command])
1279 1309
1280 elif $PATH_TO_PING6 -n -c 1 ::1 2>/dev/null | \ 1310 elif $PATH_TO_PING6 -n -c 1 ::1 2>/dev/null | \
1281 egrep -i "^round-trip|^rtt" >/dev/null 1311 grep -E -i "^round-trip|^rtt" >/dev/null
1282 then 1312 then
1283 with_ping6_command="$PATH_TO_PING6 -n -c %d %s" 1313 with_ping6_command="$PATH_TO_PING6 -n -c %d %s"
1284 ac_cv_ping6_packets_first=yes 1314 ac_cv_ping6_packets_first=yes
@@ -1289,59 +1319,59 @@ elif test "x$PATH_TO_PING6" != "x"; then
1289elif test "x$PATH_TO_PING" != "x"; then 1319elif test "x$PATH_TO_PING" != "x"; then
1290 if [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \ 1320 if [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \
1291 $PATH_TO_PING -A inet6 -n -s ::1 56 1 2>/dev/null | \ 1321 $PATH_TO_PING -A inet6 -n -s ::1 56 1 2>/dev/null | \
1292 egrep -i "^round-trip|^rtt" >/dev/null 1322 grep -E -i "^round-trip|^rtt" >/dev/null
1293 then 1323 then
1294 with_ping6_command="$PATH_TO_PING -A inet6 -n -U -c %d %s" 1324 with_ping6_command="$PATH_TO_PING -A inet6 -n -U -c %d %s"
1295 ac_cv_ping6_packets_first=yes 1325 ac_cv_ping6_packets_first=yes
1296 AC_MSG_RESULT([$with_ping6_command]) 1326 AC_MSG_RESULT([$with_ping6_command])
1297 1327
1298 elif $PATH_TO_PING -A inet6 -n -U -c 1 ::1 2>/dev/null | \ 1328 elif $PATH_TO_PING -A inet6 -n -U -c 1 ::1 2>/dev/null | \
1299 egrep -i "^round-trip|^rtt" >/dev/null 1329 grep -E -i "^round-trip|^rtt" >/dev/null
1300 then 1330 then
1301 with_ping6_command="$PATH_TO_PING -A inet6 -n -U -c %d %s" 1331 with_ping6_command="$PATH_TO_PING -A inet6 -n -U -c %d %s"
1302 ac_cv_ping6_packets_first=yes 1332 ac_cv_ping6_packets_first=yes
1303 AC_MSG_RESULT([$with_ping6_command]) 1333 AC_MSG_RESULT([$with_ping6_command])
1304 1334
1305 elif $PATH_TO_PING -A inet6 -n -c 1 ::1 2>/dev/null | \ 1335 elif $PATH_TO_PING -A inet6 -n -c 1 ::1 2>/dev/null | \
1306 egrep -i "^round-trip|^rtt" >/dev/null 1336 grep -E -i "^round-trip|^rtt" >/dev/null
1307 then 1337 then
1308 with_ping6_command="$PATH_TO_PING -A inet6 -n -c %d %s" 1338 with_ping6_command="$PATH_TO_PING -A inet6 -n -c %d %s"
1309 ac_cv_ping6_packets_first=yes 1339 ac_cv_ping6_packets_first=yes
1310 AC_MSG_RESULT([$with_ping6_command]) 1340 AC_MSG_RESULT([$with_ping6_command])
1311 1341
1312 elif $PATH_TO_PING -A inet6 -n ::1 -c 1 2>/dev/null | \ 1342 elif $PATH_TO_PING -A inet6 -n ::1 -c 1 2>/dev/null | \
1313 egrep -i "^round-trip|^rtt" >/dev/null 1343 grep -E -i "^round-trip|^rtt" >/dev/null
1314 then 1344 then
1315 with_ping6_command="$PATH_TO_PING -A inet6 -n %s -c %d" 1345 with_ping6_command="$PATH_TO_PING -A inet6 -n %s -c %d"
1316 AC_MSG_RESULT([$with_ping6_command]) 1346 AC_MSG_RESULT([$with_ping6_command])
1317 1347
1318 elif $PATH_TO_PING -A inet6 ::1 -n 1 2>/dev/null | \ 1348 elif $PATH_TO_PING -A inet6 ::1 -n 1 2>/dev/null | \
1319 egrep -i "^round-trip|^rtt" >/dev/null 1349 grep -E -i "^round-trip|^rtt" >/dev/null
1320 then 1350 then
1321 with_ping6_command="$PATH_TO_PING -A inet6 %s -n %d" 1351 with_ping6_command="$PATH_TO_PING -A inet6 %s -n %d"
1322 AC_MSG_RESULT([$with_ping6_command]) 1352 AC_MSG_RESULT([$with_ping6_command])
1323 1353
1324 elif $PATH_TO_PING -A inet6 -n -s ::1 56 1 2>/dev/null | \ 1354 elif $PATH_TO_PING -A inet6 -n -s ::1 56 1 2>/dev/null | \
1325 egrep -i "^round-trip|^rtt" >/dev/null 1355 grep -E -i "^round-trip|^rtt" >/dev/null
1326 then 1356 then
1327 with_ping6_command="$PATH_TO_PING -A inet6 -n -s %s 56 %d" 1357 with_ping6_command="$PATH_TO_PING -A inet6 -n -s %s 56 %d"
1328 AC_MSG_RESULT([$with_ping6_command]) 1358 AC_MSG_RESULT([$with_ping6_command])
1329 1359
1330 elif $PATH_TO_PING -A inet6 -n -h ::1 -s 56 -c 1 2>/dev/null | \ 1360 elif $PATH_TO_PING -A inet6 -n -h ::1 -s 56 -c 1 2>/dev/null | \
1331 egrep -i "^round-trip|^rtt" >/dev/null 1361 grep -E -i "^round-trip|^rtt" >/dev/null
1332 then 1362 then
1333 with_ping6_command="$PATH_TO_PING -A inet6 -n -h %s -s 56 -c %d" 1363 with_ping6_command="$PATH_TO_PING -A inet6 -n -h %s -s 56 -c %d"
1334 AC_MSG_RESULT([$with_ping6_command]) 1364 AC_MSG_RESULT([$with_ping6_command])
1335 1365
1336 elif $PATH_TO_PING -A inet6 -n -s 56 -c 1 ::1 2>/dev/null | \ 1366 elif $PATH_TO_PING -A inet6 -n -s 56 -c 1 ::1 2>/dev/null | \
1337 egrep -i "^round-trip|^rtt" >/dev/null 1367 grep -E -i "^round-trip|^rtt" >/dev/null
1338 then 1368 then
1339 with_ping6_command="$PATH_TO_PING -A inet6 -n -s 56 -c %d %s" 1369 with_ping6_command="$PATH_TO_PING -A inet6 -n -s 56 -c %d %s"
1340 ac_cv_ping6_packets_first=yes 1370 ac_cv_ping6_packets_first=yes
1341 AC_MSG_RESULT([$with_ping_command]) 1371 AC_MSG_RESULT([$with_ping_command])
1342 1372
1343 elif $PATH_TO_PING -A inet6 -n -c 1 ::1 2>/dev/null | \ 1373 elif $PATH_TO_PING -A inet6 -n -c 1 ::1 2>/dev/null | \
1344 egrep -i "^round-trip|^rtt" >/dev/null 1374 grep -E -i "^round-trip|^rtt" >/dev/null
1345 then 1375 then
1346 with_ping6_command="$PATH_TO_PING -A inet6 -n -c %d %s" 1376 with_ping6_command="$PATH_TO_PING -A inet6 -n -c %d %s"
1347 ac_cv_ping6_packets_first=yes 1377 ac_cv_ping6_packets_first=yes
@@ -1541,7 +1571,7 @@ if test -n "$PATH_TO_SUDO"
1541then 1571then
1542 AC_DEFINE_UNQUOTED(PATH_TO_SUDO,"$PATH_TO_SUDO",[path to sudo]) 1572 AC_DEFINE_UNQUOTED(PATH_TO_SUDO,"$PATH_TO_SUDO",[path to sudo])
1543else 1573else
1544 AC_MSG_WARN([Could not find sudo or eqivalent]) 1574 AC_MSG_WARN([Could not find sudo or equivalent])
1545fi 1575fi
1546 1576
1547AC_PATH_PROG(PATH_TO_MAILQ,mailq) 1577AC_PATH_PROG(PATH_TO_MAILQ,mailq)
@@ -1552,7 +1582,7 @@ if test -n "$PATH_TO_MAILQ"
1552then 1582then
1553 AC_DEFINE_UNQUOTED(PATH_TO_MAILQ,"$PATH_TO_MAILQ",[path to mailq]) 1583 AC_DEFINE_UNQUOTED(PATH_TO_MAILQ,"$PATH_TO_MAILQ",[path to mailq])
1554else 1584else
1555 AC_MSG_WARN([Could not find mailq or eqivalent]) 1585 AC_MSG_WARN([Could not find mailq or equivalent])
1556fi 1586fi
1557 1587
1558AC_PATH_PROG(PATH_TO_QMAIL_QSTAT,qmail-qstat) 1588AC_PATH_PROG(PATH_TO_QMAIL_QSTAT,qmail-qstat)
@@ -1563,7 +1593,7 @@ if test -n "$PATH_TO_QMAIL_QSTAT"
1563then 1593then
1564 AC_DEFINE_UNQUOTED(PATH_TO_QMAIL_QSTAT,"$PATH_TO_QMAIL_QSTAT",[path to qmail-qstat]) 1594 AC_DEFINE_UNQUOTED(PATH_TO_QMAIL_QSTAT,"$PATH_TO_QMAIL_QSTAT",[path to qmail-qstat])
1565else 1595else
1566 AC_MSG_WARN([Could not find qmail-qstat or eqivalent]) 1596 AC_MSG_WARN([Could not find qmail-qstat or equivalent])
1567fi 1597fi
1568 1598
1569dnl SWAP info required is amount allocated/available and amount free 1599dnl SWAP info required is amount allocated/available and amount free
@@ -1578,16 +1608,16 @@ then
1578 ac_cv_have_swap=yes 1608 ac_cv_have_swap=yes
1579 ac_cv_swap_command="$PATH_TO_SWAP -l" 1609 ac_cv_swap_command="$PATH_TO_SWAP -l"
1580 if [$PATH_TO_SWAP -l 2>/dev/null | \ 1610 if [$PATH_TO_SWAP -l 2>/dev/null | \
1581 egrep -i "^lswap +path +pri +swaplo +blocks +free +maxswap" \ 1611 grep -E -i "^lswap +path +pri +swaplo +blocks +free +maxswap" \
1582 >/dev/null] 1612 >/dev/null]
1583 then 1613 then
1584 ac_cv_swap_format=[" %*d %*s %*d,%*d %*d %*d %f %f"] 1614 ac_cv_swap_format=[" %*d %*s %*d,%*d %*d %*d %lu %lu"]
1585 ac_cv_swap_conv=2048 1615 ac_cv_swap_conv=2048
1586 AC_MSG_RESULT([using IRIX format swap]) 1616 AC_MSG_RESULT([using IRIX format swap])
1587 1617
1588 elif [$PATH_TO_SWAP -l 2>/dev/null | egrep -i "^path +dev +swaplo +blocks +free" >/dev/null] 1618 elif [$PATH_TO_SWAP -l 2>/dev/null | grep -E -i "^path +dev +swaplo +blocks +free" >/dev/null]
1589 then 1619 then
1590 ac_cv_swap_format=["%*s %*[0-9,-] %*d %f %f"] 1620 ac_cv_swap_format=["%*s %*[0-9,-] %*d %lu %lu"]
1591 ac_cv_swap_conv=2048 1621 ac_cv_swap_conv=2048
1592 AC_MSG_RESULT([using Unixware format swap]) 1622 AC_MSG_RESULT([using Unixware format swap])
1593 else 1623 else
@@ -1604,23 +1634,23 @@ AC_PATH_PROG(PATH_TO_SWAPINFO,swapinfo)
1604if (test -n "$PATH_TO_SWAPINFO") 1634if (test -n "$PATH_TO_SWAPINFO")
1605then 1635then
1606AC_MSG_CHECKING([for $PATH_TO_SWAPINFO format]) 1636AC_MSG_CHECKING([for $PATH_TO_SWAPINFO format])
1607if [$PATH_TO_SWAPINFO -k 2>&1 | egrep -i "^Device" >/dev/null] 1637if [$PATH_TO_SWAPINFO -k 2>&1 | grep -E -i "^Device" >/dev/null]
1608then 1638then
1609 ac_cv_have_swap=yes 1639 ac_cv_have_swap=yes
1610 ac_cv_swap_command="$PATH_TO_SWAPINFO -k" 1640 ac_cv_swap_command="$PATH_TO_SWAPINFO -k"
1611 1641
1612 if [$PATH_TO_SWAPINFO -k 2>/dev/null | egrep -i "^Device +1K-blocks +Used +Avail" >/dev/null] 1642 if [$PATH_TO_SWAPINFO -k 2>/dev/null | grep -E -i "^Device +1K-blocks +Used +Avail" >/dev/null]
1613 then 1643 then
1614 ac_cv_swap_format=["%*s %f %*d %f"] 1644 ac_cv_swap_format=["%*s %lu %*d %lu"]
1615 ac_cv_swap_conv=1024 1645 ac_cv_swap_conv=1024
1616 AC_MSG_RESULT([using FreeBSD format swapinfo]) 1646 AC_MSG_RESULT([using FreeBSD format swapinfo])
1617 fi 1647 fi
1618 1648
1619elif [$PATH_TO_SWAPINFO -dfM 2>/dev/null | egrep -i "^TYPE +AVAIL +USED +FREE" >/dev/null] 1649elif [$PATH_TO_SWAPINFO -dfM 2>/dev/null | grep -E -i "^TYPE +AVAIL +USED +FREE" >/dev/null]
1620then 1650then
1621 ac_cv_have_swap=yes 1651 ac_cv_have_swap=yes
1622 ac_cv_swap_command="$PATH_TO_SWAPINFO -dfM" 1652 ac_cv_swap_command="$PATH_TO_SWAPINFO -dfM"
1623 ac_cv_swap_format=["%*s %f %*d %f"] 1653 ac_cv_swap_format=["%*s %lu %*d %lu"]
1624 ac_cv_swap_conv=1024 1654 ac_cv_swap_conv=1024
1625 AC_MSG_RESULT([using HP-UX format swapinfo]) 1655 AC_MSG_RESULT([using HP-UX format swapinfo])
1626fi 1656fi
@@ -1631,11 +1661,11 @@ AC_PATH_PROG(PATH_TO_LSPS,lsps)
1631if (test -n "$PATH_TO_LSPS") 1661if (test -n "$PATH_TO_LSPS")
1632then 1662then
1633AC_MSG_CHECKING([for $PATH_TO_LSPS format]) 1663AC_MSG_CHECKING([for $PATH_TO_LSPS format])
1634if [$PATH_TO_LSPS -a 2>/dev/null | egrep -i "^Page Space" > /dev/null] 1664if [$PATH_TO_LSPS -a 2>/dev/null | grep -E -i "^Page Space" > /dev/null]
1635then 1665then
1636 ac_cv_have_swap=yes 1666 ac_cv_have_swap=yes
1637 ac_cv_swap_command="$PATH_TO_LSPS -a" 1667 ac_cv_swap_command="$PATH_TO_LSPS -a"
1638 ac_cv_swap_format=["%*s %*s %*s %f%*s %f %*s"] 1668 ac_cv_swap_format=["%*s %*s %*s %lu%*s %lu %*s"]
1639 ac_cv_swap_conv=1 1669 ac_cv_swap_conv=1
1640 AC_MSG_RESULT([using AIX lsps]) 1670 AC_MSG_RESULT([using AIX lsps])
1641fi 1671fi
@@ -1821,7 +1851,7 @@ AM_GNU_GETTEXT([external], [need-ngettext])
1821AM_GNU_GETTEXT_VERSION(0.15) 1851AM_GNU_GETTEXT_VERSION(0.15)
1822 1852
1823dnl Check for Redhat spopen problem 1853dnl Check for Redhat spopen problem
1824dnl Wierd problem where ECHILD is returned from a wait call in error 1854dnl Weird problem where ECHILD is returned from a wait call in error
1825dnl Only appears to affect nslookup and dig calls. Only affects redhat around 1855dnl Only appears to affect nslookup and dig calls. Only affects redhat around
1826dnl 2.6.9-11 (okay in 2.6.9-5). Redhat investigating root cause 1856dnl 2.6.9-11 (okay in 2.6.9-5). Redhat investigating root cause
1827dnl We patch plugins/popen.c 1857dnl We patch plugins/popen.c
@@ -1833,7 +1863,7 @@ AC_ARG_ENABLE(redhat-pthread-workaround,
1833 [ac_cv_enable_redhat_pthread_workaround=$enableval], 1863 [ac_cv_enable_redhat_pthread_workaround=$enableval],
1834 [ac_cv_enable_redhat_pthread_workaround=test]) 1864 [ac_cv_enable_redhat_pthread_workaround=test])
1835if test "$ac_cv_enable_redhat_pthread_workaround" = "test" ; then 1865if test "$ac_cv_enable_redhat_pthread_workaround" = "test" ; then
1836 if echo $ac_cv_uname_r | egrep "\.EL(smp)?$" >/dev/null 2>&1 ; then 1866 if echo $ac_cv_uname_r | grep -E "\.EL(smp)?$" >/dev/null 2>&1 ; then
1837 AC_MSG_NOTICE([See https://www.monitoring-plugins.org/doc/faq/configure-hangs.html if this next part takes a long time]) 1867 AC_MSG_NOTICE([See https://www.monitoring-plugins.org/doc/faq/configure-hangs.html if this next part takes a long time])
1838 AC_MSG_CHECKING(for redhat spopen problem) 1868 AC_MSG_CHECKING(for redhat spopen problem)
1839 ( cd config_test && make && make test ) > /dev/null 2>&1 1869 ( cd config_test && make && make test ) > /dev/null 2>&1