summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac227
1 files changed, 153 insertions, 74 deletions
diff --git a/configure.ac b/configure.ac
index bf129956..a294b00f 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.2) 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*)
@@ -385,12 +405,48 @@ if test "$ac_cv_header_wtsapi32_h" = "yes"; then
385 AC_SUBST(WTSAPI32LIBS) 405 AC_SUBST(WTSAPI32LIBS)
386fi 406fi
387 407
408_can_enable_check_curl=no
409dnl Check for cURL library
410LIBCURL_CHECK_CONFIG(yes, 7.15.2, [
411 _can_enable_check_curl=yes
412 LIBCURLINCLUDE="$LIBCURL_CPPFLAGS"
413 LIBCURLLIBS="$LIBCURL"
414 LIBCURLCFLAGS="$LIBCURL_CPPFLAGS"
415 AC_SUBST(LIBCURLINCLUDE)
416 AC_SUBST(LIBCURLLIBS)
417 AC_SUBST(LIBCURLCFLAGS)
418 ], [
419 _can_enable_check_curl=no
420 AC_MSG_WARN([Skipping curl plugin])
421 AC_MSG_WARN([install libcurl libs to compile this plugin (see REQUIREMENTS).])
422])
423
424dnl Check for uriparser library
425URIPARSER_CHECK(yes, 0.7.5, [
426 URIPARSERINCLUDE="$URIPARSER_CPPFLAGS"
427 URIPARSERLIBS="$URIPARSER"
428 URIPARSERCFLAGS="$URIPARSER_CPPFLAGS"
429 AC_SUBST(URIPARSERINCLUDE)
430 AC_SUBST(URIPARSERLIBS)
431 AC_SUBST(URIPARSERCFLAGS)
432 ], [
433 _can_enable_check_curl=no
434 AC_MSG_WARN([Skipping curl plugin])
435 AC_MSG_WARN([install the uriparser library to compile this plugin (see REQUIREMENTS).])
436])
437
438dnl prerequisites met, enable the plugin
439if test x$_can_enable_check_curl = xyes; then
440 EXTRAS="$EXTRAS check_curl\$(EXEEXT)"
441fi
442AC_CONFIG_FILES([plugins/picohttpparser/Makefile])
443
388dnl Fallback to who(1) if the system doesn't provide an utmpx(5) interface 444dnl Fallback to who(1) if the system doesn't provide an utmpx(5) interface
389if test "$ac_cv_header_utmpx_h" = "no" -a "$ac_cv_header_wtsapi32_h" = "no" 445if test "$ac_cv_header_utmpx_h" = "no" -a "$ac_cv_header_wtsapi32_h" = "no"
390then 446then
391 AC_PATH_PROG(PATH_TO_WHO,who) 447 AC_PATH_PROG(PATH_TO_WHO,who)
392 448
393 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]
394 then 450 then
395 ac_cv_path_to_who="$PATH_TO_WHO -q" 451 ac_cv_path_to_who="$PATH_TO_WHO -q"
396 else 452 else
@@ -739,7 +795,7 @@ dnl Removing this for the moment - Ton
739dnl Using /usr/ucb/ps on Solaris systems, to avoid truncation 795dnl Using /usr/ucb/ps on Solaris systems, to avoid truncation
740dnl Limitation that command name is not available 796dnl Limitation that command name is not available
741dnl 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 | \
742dnl 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
743dnl then 799dnl then
744dnl 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]"
745dnl ac_cv_ps_command="/usr/ucb/ps -alxwwn" 801dnl ac_cv_ps_command="/usr/ucb/ps -alxwwn"
@@ -747,10 +803,20 @@ dnl ac_cv_ps_format=["%*s %d %d %d %d %*d %*d %d %d%*[ 0123456789abcdef]%[OSRZT
747dnl ac_cv_ps_cols=8 803dnl ac_cv_ps_cols=8
748dnl AC_MSG_RESULT([$ac_cv_ps_command]) 804dnl AC_MSG_RESULT([$ac_cv_ps_command])
749 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
750dnl 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.
751dnl so test for this first... 817dnl so test for this first...
752elif 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 | \
753 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
754then 820then
755 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]"
756 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'"
@@ -762,7 +828,7 @@ dnl For OpenBSD 3.2 & 3.3. Must come before ps -weo
762dnl Should also work for FreeBSD 5.2.1 and 5.3 828dnl Should also work for FreeBSD 5.2.1 and 5.3
763dnl STAT UCOMM VSZ RSS USER PPID COMMAND 829dnl STAT UCOMM VSZ RSS USER PPID COMMAND
764elif 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 | \
765 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
766then 832then
767 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]"
768 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'"
@@ -774,7 +840,7 @@ dnl Some *BSDs have different format for ps. This is mainly to catch FreeBSD 4.
774dnl Limitation: Only first 16 chars returned for ucomm field 840dnl Limitation: Only first 16 chars returned for ucomm field
775dnl Must come before ps -weo 841dnl Must come before ps -weo
776elif 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 | \
777 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
778then 844then
779 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]"
780 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'"
@@ -784,7 +850,7 @@ then
784 850
785dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND 851dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND
786elif 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 | \
787 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
788then 854then
789 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]"
790 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'"
@@ -794,7 +860,7 @@ then
794 860
795dnl FreeBSD 861dnl FreeBSD
796elif 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 | \
797 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
798then 864then
799 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]"
800 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'"
@@ -804,7 +870,7 @@ then
804 870
805dnl BSD-like mode in RH 6.1 871dnl BSD-like mode in RH 6.1
806elif 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 | \
807 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
808then 874then
809 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]"
810 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'"
@@ -816,7 +882,7 @@ dnl SunOS 4.1.3:
816dnl 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
817dnl 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
818elif ps -laxnwww 2>/dev/null | head -1 | \ 884elif ps -laxnwww 2>/dev/null | head -1 | \
819 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
820then 886then
821 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]"
822 ac_cv_ps_command="$PATH_TO_PS -laxnwww" 888 ac_cv_ps_command="$PATH_TO_PS -laxnwww"
@@ -829,7 +895,7 @@ dnl FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMA
829dnl 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]
830dnl 896dnl
831elif ps laxnwww 2>/dev/null | \ 897elif ps laxnwww 2>/dev/null | \
832 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
833then 899then
834 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]"
835 ac_cv_ps_command="$PATH_TO_PS laxnwww" 901 ac_cv_ps_command="$PATH_TO_PS laxnwww"
@@ -839,7 +905,7 @@ then
839 905
840dnl 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)
841elif 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 | \
842 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
843then 909then
844 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]"
845 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'"
@@ -852,7 +918,7 @@ dnl Has /usr/bin/ps and /sbin/ps - force sbin version
852dnl 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
853dnl of 1500). Will need big changes to check_procs to support 919dnl of 1500). Will need big changes to check_procs to support
854elif /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 | \
855 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
856then 922then
857 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]"
858 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'"
@@ -861,7 +927,7 @@ then
861 AC_MSG_RESULT([$ac_cv_ps_command]) 927 AC_MSG_RESULT([$ac_cv_ps_command])
862 928
863elif 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 | \
864 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
865then 931then
866 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]"
867 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'"
@@ -871,7 +937,7 @@ then
871 937
872dnl 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
873elif 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 | \
874 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
875then 941then
876 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]"
877 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'"
@@ -881,18 +947,18 @@ then
881 947
882dnl Solaris 2.6 948dnl Solaris 2.6
883elif 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 | \
884 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
885then 951then
886 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]"
887 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'"
888 # 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
889 # it will return %n as longer than the line length 955 # it will return %n as longer than the line length
890 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"
891 ac_cv_ps_cols=9 957 ac_cv_ps_cols=9
892 AC_MSG_RESULT([$ac_cv_ps_command]) 958 AC_MSG_RESULT([$ac_cv_ps_command])
893 959
894elif 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 | \
895 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
896then 962then
897 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]"
898 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'"
@@ -901,7 +967,7 @@ then
901 AC_MSG_RESULT([$ac_cv_ps_command]) 967 AC_MSG_RESULT([$ac_cv_ps_command])
902 968
903elif 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 | \
904 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
905then 971then
906 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]"
907 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'"
@@ -911,7 +977,7 @@ then
911 977
912dnl wonder who takes state instead of stat 978dnl wonder who takes state instead of stat
913elif 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 | \
914 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
915then 981then
916 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]"
917 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'"
@@ -921,7 +987,7 @@ then
921 987
922dnl IRIX 53 988dnl IRIX 53
923elif ps -el 2>/dev/null | \ 989elif ps -el 2>/dev/null | \
924 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
925then 991then
926 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]"
927 ac_cv_ps_command="$PATH_TO_PS -el (IRIX 53)" 993 ac_cv_ps_command="$PATH_TO_PS -el (IRIX 53)"
@@ -931,7 +997,7 @@ then
931 997
932dnl IRIX 63 998dnl IRIX 63
933elif ps -el 2>/dev/null | \ 999elif ps -el 2>/dev/null | \
934 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
935then 1001then
936 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&pos,procprog]" 1002 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&pos,procprog]"
937 ac_cv_ps_command="$PATH_TO_PS -el (IRIX 63)" 1003 ac_cv_ps_command="$PATH_TO_PS -el (IRIX 63)"
@@ -944,7 +1010,7 @@ dnl S UID RUID USER RUSER PID PPID VSZ %CPU COMMAND
944dnl 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
945dnl 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
946elif 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 | \
947 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
948then 1014then
949 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]"
950 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'"
@@ -956,7 +1022,7 @@ dnl AIX 4.1:
956dnl 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
957dnl 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
958elif ps -el 2>/dev/null | \ 1024elif ps -el 2>/dev/null | \
959 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
960then 1026then
961 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&pos,procprog]" 1027 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&pos,procprog]"
962 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)"
@@ -966,7 +1032,7 @@ then
966 1032
967dnl AIX? 1033dnl AIX?
968elif ps glaxen 2>/dev/null | \ 1034elif ps glaxen 2>/dev/null | \
969 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
970then 1036then
971 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]"
972 ac_cv_ps_command="$PATH_TO_PS glaxen" 1038 ac_cv_ps_command="$PATH_TO_PS glaxen"
@@ -980,7 +1046,7 @@ dnl Some truncation will happen in UCOMM column
980dnl STAT VSZ RSS UID PPID %CPU UCOMM COMMAND 1046dnl STAT VSZ RSS UID PPID %CPU UCOMM COMMAND
981dnl 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
982elif 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 | \
983 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
984then 1050then
985 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'"
986 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]"
@@ -990,7 +1056,7 @@ then
990 1056
991dnl UnixWare 1057dnl UnixWare
992elif ps -Al 2>/dev/null | \ 1058elif ps -Al 2>/dev/null | \
993 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
994then 1060then
995 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&pos,procprog]" 1061 ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&pos,procprog]"
996 ac_cv_ps_command="$PATH_TO_PS -Al" 1062 ac_cv_ps_command="$PATH_TO_PS -Al"
@@ -1016,6 +1082,10 @@ if test -n "$ac_cv_ps_varlist" ; then
1016 AC_DEFINE(PS_USES_PROCETIME,"yes", 1082 AC_DEFINE(PS_USES_PROCETIME,"yes",
1017 [Whether the ps utility uses the "procetime" field]) 1083 [Whether the ps utility uses the "procetime" field])
1018 fi 1084 fi
1085 if echo "$ac_cv_ps_varlist" | grep "procpcpu" >/dev/null; then
1086 AC_DEFINE(PS_USES_PROCPCPU,"yes",
1087 [Whether the ps utility uses the "procpcpu" field])
1088 fi
1019fi 1089fi
1020 1090
1021AC_PATH_PROG(PATH_TO_PING,ping) 1091AC_PATH_PROG(PATH_TO_PING,ping)
@@ -1054,14 +1124,22 @@ then
1054 1124
1055elif [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \ 1125elif [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \
1056 $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 | \
1057 egrep -i "^round-trip|^rtt" >/dev/null 1127 grep -E -i "^round-trip|^rtt" >/dev/null
1058then 1128then
1059 with_ping_command="$PATH_TO_PING -n -U -c %d %s" 1129 with_ping_command="$PATH_TO_PING -n -U -c %d %s"
1060 ac_cv_ping_packets_first=yes 1130 ac_cv_ping_packets_first=yes
1061 AC_MSG_RESULT([$with_ping_command]) 1131 AC_MSG_RESULT([$with_ping_command])
1062 1132
1133elif $PATH_TO_PING -4 -n -U -w 10 -c 1 127.0.0.1 2>/dev/null | \
1134 grep -E -i "^round-trip|^rtt" >/dev/null
1135then
1136 # check if -4 is supported - issue #1550
1137 with_ping_command="$PATH_TO_PING -4 -n -U -w %d -c %d %s"
1138 ac_cv_ping_packets_first=yes
1139 ac_cv_ping_has_timeout=yes
1140 AC_MSG_RESULT([$with_ping_command])
1063elif $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 | \
1064 egrep -i "^round-trip|^rtt" >/dev/null 1142 grep -E -i "^round-trip|^rtt" >/dev/null
1065then 1143then
1066 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"
1067 ac_cv_ping_packets_first=yes 1145 ac_cv_ping_packets_first=yes
@@ -1069,52 +1147,52 @@ then
1069 AC_MSG_RESULT([$with_ping_command]) 1147 AC_MSG_RESULT([$with_ping_command])
1070 1148
1071elif $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 | \
1072 egrep -i "^round-trip|^rtt" >/dev/null 1150 grep -E -i "^round-trip|^rtt" >/dev/null
1073then 1151then
1074 with_ping_command="$PATH_TO_PING -n -U -c %d %s" 1152 with_ping_command="$PATH_TO_PING -n -U -c %d %s"
1075 ac_cv_ping_packets_first=yes 1153 ac_cv_ping_packets_first=yes
1076 AC_MSG_RESULT([$with_ping_command]) 1154 AC_MSG_RESULT([$with_ping_command])
1077 1155
1078elif $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 | \
1079 egrep -i "^round-trip|^rtt" >/dev/null 1157 grep -E -i "^round-trip|^rtt" >/dev/null
1080then 1158then
1081 with_ping_command="$PATH_TO_PING -n -c %d %s" 1159 with_ping_command="$PATH_TO_PING -n -c %d %s"
1082 ac_cv_ping_packets_first=yes 1160 ac_cv_ping_packets_first=yes
1083 AC_MSG_RESULT([$with_ping_command]) 1161 AC_MSG_RESULT([$with_ping_command])
1084 1162
1085elif $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 | \
1086 egrep -i "^round-trip|^rtt" >/dev/null 1164 grep -E -i "^round-trip|^rtt" >/dev/null
1087then 1165then
1088 with_ping_command="$PATH_TO_PING -n %s -c %d" 1166 with_ping_command="$PATH_TO_PING -n %s -c %d"
1089 AC_MSG_RESULT([$with_ping_command]) 1167 AC_MSG_RESULT([$with_ping_command])
1090 1168
1091elif $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 | \
1092 egrep -i "^round-trip|^rtt" >/dev/null 1170 grep -E -i "^round-trip|^rtt" >/dev/null
1093then 1171then
1094 with_ping_command="$PATH_TO_PING %s -n %d" 1172 with_ping_command="$PATH_TO_PING %s -n %d"
1095 AC_MSG_RESULT([$with_ping_command]) 1173 AC_MSG_RESULT([$with_ping_command])
1096 1174
1097elif $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 | \
1098 egrep -i "^round-trip|^rtt" >/dev/null 1176 grep -E -i "^round-trip|^rtt" >/dev/null
1099then 1177then
1100 with_ping_command="$PATH_TO_PING -n -s %s 56 %d" 1178 with_ping_command="$PATH_TO_PING -n -s %s 56 %d"
1101 AC_MSG_RESULT([$with_ping_command]) 1179 AC_MSG_RESULT([$with_ping_command])
1102 1180
1103elif $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 | \
1104 egrep -i "^round-trip|^rtt" >/dev/null 1182 grep -E -i "^round-trip|^rtt" >/dev/null
1105then 1183then
1106 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"
1107 AC_MSG_RESULT([$with_ping_command]) 1185 AC_MSG_RESULT([$with_ping_command])
1108 1186
1109elif $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 | \
1110 egrep -i "^round-trip|^rtt" >/dev/null 1188 grep -E -i "^round-trip|^rtt" >/dev/null
1111then 1189then
1112 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"
1113 ac_cv_ping_packets_first=yes 1191 ac_cv_ping_packets_first=yes
1114 AC_MSG_RESULT([$with_ping_command]) 1192 AC_MSG_RESULT([$with_ping_command])
1115 1193
1116elif $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 | \
1117 egrep -i "^round-trip|^rtt" >/dev/null 1195 grep -E -i "^round-trip|^rtt" >/dev/null
1118then 1196then
1119 with_ping_command="$PATH_TO_PING -n -c %d %s" 1197 with_ping_command="$PATH_TO_PING -n -c %d %s"
1120 ac_cv_ping_packets_first=yes 1198 ac_cv_ping_packets_first=yes
@@ -1170,14 +1248,14 @@ elif [[ "z$ac_cv_uname_o" = "zCygwin" -a "x$PATH_TO_PING" != "x" ]]; then
1170elif test "x$PATH_TO_PING6" != "x"; then 1248elif test "x$PATH_TO_PING6" != "x"; then
1171 if [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \ 1249 if [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \
1172 $PATH_TO_PING6 -n -s ::1 56 1 2>/dev/null | \ 1250 $PATH_TO_PING6 -n -s ::1 56 1 2>/dev/null | \
1173 egrep -i "^round-trip|^rtt" >/dev/null 1251 grep -E -i "^round-trip|^rtt" >/dev/null
1174 then 1252 then
1175 with_ping6_command="$PATH_TO_PING6 -n -U -c %d %s" 1253 with_ping6_command="$PATH_TO_PING6 -n -U -c %d %s"
1176 ac_cv_ping6_packets_first=yes 1254 ac_cv_ping6_packets_first=yes
1177 AC_MSG_RESULT([$with_ping6_command]) 1255 AC_MSG_RESULT([$with_ping6_command])
1178 1256
1179 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 | \
1180 egrep -i "^round-trip|^rtt" >/dev/null 1258 grep -E -i "^round-trip|^rtt" >/dev/null
1181 then 1259 then
1182 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"
1183 ac_cv_ping6_packets_first=yes 1261 ac_cv_ping6_packets_first=yes
@@ -1185,52 +1263,52 @@ elif test "x$PATH_TO_PING6" != "x"; then
1185 AC_MSG_RESULT([$with_ping6_command]) 1263 AC_MSG_RESULT([$with_ping6_command])
1186 1264
1187 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 | \
1188 egrep -i "^round-trip|^rtt" >/dev/null 1266 grep -E -i "^round-trip|^rtt" >/dev/null
1189 then 1267 then
1190 with_ping6_command="$PATH_TO_PING6 -n -U -c %d %s" 1268 with_ping6_command="$PATH_TO_PING6 -n -U -c %d %s"
1191 ac_cv_ping6_packets_first=yes 1269 ac_cv_ping6_packets_first=yes
1192 AC_MSG_RESULT([$with_ping6_command]) 1270 AC_MSG_RESULT([$with_ping6_command])
1193 1271
1194 elif $PATH_TO_PING6 -n -c 1 ::1 2>/dev/null | \ 1272 elif $PATH_TO_PING6 -n -c 1 ::1 2>/dev/null | \
1195 egrep -i "^round-trip|^rtt" >/dev/null 1273 grep -E -i "^round-trip|^rtt" >/dev/null
1196 then 1274 then
1197 with_ping6_command="$PATH_TO_PING6 -n -c %d %s" 1275 with_ping6_command="$PATH_TO_PING6 -n -c %d %s"
1198 ac_cv_ping6_packets_first=yes 1276 ac_cv_ping6_packets_first=yes
1199 AC_MSG_RESULT([$with_ping6_command]) 1277 AC_MSG_RESULT([$with_ping6_command])
1200 1278
1201 elif $PATH_TO_PING6 -n ::1 -c 1 2>/dev/null | \ 1279 elif $PATH_TO_PING6 -n ::1 -c 1 2>/dev/null | \
1202 egrep -i "^round-trip|^rtt" >/dev/null 1280 grep -E -i "^round-trip|^rtt" >/dev/null
1203 then 1281 then
1204 with_ping6_command="$PATH_TO_PING6 -n %s -c %d" 1282 with_ping6_command="$PATH_TO_PING6 -n %s -c %d"
1205 AC_MSG_RESULT([$with_ping6_command]) 1283 AC_MSG_RESULT([$with_ping6_command])
1206 1284
1207 elif $PATH_TO_PING6 ::1 -n 1 2>/dev/null | \ 1285 elif $PATH_TO_PING6 ::1 -n 1 2>/dev/null | \
1208 egrep -i "^round-trip|^rtt" >/dev/null 1286 grep -E -i "^round-trip|^rtt" >/dev/null
1209 then 1287 then
1210 with_ping6_command="$PATH_TO_PING6 %s -n %d" 1288 with_ping6_command="$PATH_TO_PING6 %s -n %d"
1211 AC_MSG_RESULT([$with_ping6_command]) 1289 AC_MSG_RESULT([$with_ping6_command])
1212 1290
1213 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 | \
1214 egrep -i "^round-trip|^rtt" >/dev/null 1292 grep -E -i "^round-trip|^rtt" >/dev/null
1215 then 1293 then
1216 with_ping6_command="$PATH_TO_PING6 -n -s %s 56 %d" 1294 with_ping6_command="$PATH_TO_PING6 -n -s %s 56 %d"
1217 AC_MSG_RESULT([$with_ping6_command]) 1295 AC_MSG_RESULT([$with_ping6_command])
1218 1296
1219 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 | \
1220 egrep -i "^round-trip|^rtt" >/dev/null 1298 grep -E -i "^round-trip|^rtt" >/dev/null
1221 then 1299 then
1222 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"
1223 AC_MSG_RESULT([$with_ping6_command]) 1301 AC_MSG_RESULT([$with_ping6_command])
1224 1302
1225 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 | \
1226 egrep -i "^round-trip|^rtt" >/dev/null 1304 grep -E -i "^round-trip|^rtt" >/dev/null
1227 then 1305 then
1228 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"
1229 ac_cv_ping6_packets_first=yes 1307 ac_cv_ping6_packets_first=yes
1230 AC_MSG_RESULT([$with_ping_command]) 1308 AC_MSG_RESULT([$with_ping_command])
1231 1309
1232 elif $PATH_TO_PING6 -n -c 1 ::1 2>/dev/null | \ 1310 elif $PATH_TO_PING6 -n -c 1 ::1 2>/dev/null | \
1233 egrep -i "^round-trip|^rtt" >/dev/null 1311 grep -E -i "^round-trip|^rtt" >/dev/null
1234 then 1312 then
1235 with_ping6_command="$PATH_TO_PING6 -n -c %d %s" 1313 with_ping6_command="$PATH_TO_PING6 -n -c %d %s"
1236 ac_cv_ping6_packets_first=yes 1314 ac_cv_ping6_packets_first=yes
@@ -1241,59 +1319,59 @@ elif test "x$PATH_TO_PING6" != "x"; then
1241elif test "x$PATH_TO_PING" != "x"; then 1319elif test "x$PATH_TO_PING" != "x"; then
1242 if [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \ 1320 if [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \
1243 $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 | \
1244 egrep -i "^round-trip|^rtt" >/dev/null 1322 grep -E -i "^round-trip|^rtt" >/dev/null
1245 then 1323 then
1246 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"
1247 ac_cv_ping6_packets_first=yes 1325 ac_cv_ping6_packets_first=yes
1248 AC_MSG_RESULT([$with_ping6_command]) 1326 AC_MSG_RESULT([$with_ping6_command])
1249 1327
1250 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 | \
1251 egrep -i "^round-trip|^rtt" >/dev/null 1329 grep -E -i "^round-trip|^rtt" >/dev/null
1252 then 1330 then
1253 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"
1254 ac_cv_ping6_packets_first=yes 1332 ac_cv_ping6_packets_first=yes
1255 AC_MSG_RESULT([$with_ping6_command]) 1333 AC_MSG_RESULT([$with_ping6_command])
1256 1334
1257 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 | \
1258 egrep -i "^round-trip|^rtt" >/dev/null 1336 grep -E -i "^round-trip|^rtt" >/dev/null
1259 then 1337 then
1260 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"
1261 ac_cv_ping6_packets_first=yes 1339 ac_cv_ping6_packets_first=yes
1262 AC_MSG_RESULT([$with_ping6_command]) 1340 AC_MSG_RESULT([$with_ping6_command])
1263 1341
1264 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 | \
1265 egrep -i "^round-trip|^rtt" >/dev/null 1343 grep -E -i "^round-trip|^rtt" >/dev/null
1266 then 1344 then
1267 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"
1268 AC_MSG_RESULT([$with_ping6_command]) 1346 AC_MSG_RESULT([$with_ping6_command])
1269 1347
1270 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 | \
1271 egrep -i "^round-trip|^rtt" >/dev/null 1349 grep -E -i "^round-trip|^rtt" >/dev/null
1272 then 1350 then
1273 with_ping6_command="$PATH_TO_PING -A inet6 %s -n %d" 1351 with_ping6_command="$PATH_TO_PING -A inet6 %s -n %d"
1274 AC_MSG_RESULT([$with_ping6_command]) 1352 AC_MSG_RESULT([$with_ping6_command])
1275 1353
1276 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 | \
1277 egrep -i "^round-trip|^rtt" >/dev/null 1355 grep -E -i "^round-trip|^rtt" >/dev/null
1278 then 1356 then
1279 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"
1280 AC_MSG_RESULT([$with_ping6_command]) 1358 AC_MSG_RESULT([$with_ping6_command])
1281 1359
1282 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 | \
1283 egrep -i "^round-trip|^rtt" >/dev/null 1361 grep -E -i "^round-trip|^rtt" >/dev/null
1284 then 1362 then
1285 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"
1286 AC_MSG_RESULT([$with_ping6_command]) 1364 AC_MSG_RESULT([$with_ping6_command])
1287 1365
1288 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 | \
1289 egrep -i "^round-trip|^rtt" >/dev/null 1367 grep -E -i "^round-trip|^rtt" >/dev/null
1290 then 1368 then
1291 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"
1292 ac_cv_ping6_packets_first=yes 1370 ac_cv_ping6_packets_first=yes
1293 AC_MSG_RESULT([$with_ping_command]) 1371 AC_MSG_RESULT([$with_ping_command])
1294 1372
1295 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 | \
1296 egrep -i "^round-trip|^rtt" >/dev/null 1374 grep -E -i "^round-trip|^rtt" >/dev/null
1297 then 1375 then
1298 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"
1299 ac_cv_ping6_packets_first=yes 1377 ac_cv_ping6_packets_first=yes
@@ -1493,7 +1571,7 @@ if test -n "$PATH_TO_SUDO"
1493then 1571then
1494 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])
1495else 1573else
1496 AC_MSG_WARN([Could not find sudo or eqivalent]) 1574 AC_MSG_WARN([Could not find sudo or equivalent])
1497fi 1575fi
1498 1576
1499AC_PATH_PROG(PATH_TO_MAILQ,mailq) 1577AC_PATH_PROG(PATH_TO_MAILQ,mailq)
@@ -1504,7 +1582,7 @@ if test -n "$PATH_TO_MAILQ"
1504then 1582then
1505 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])
1506else 1584else
1507 AC_MSG_WARN([Could not find mailq or eqivalent]) 1585 AC_MSG_WARN([Could not find mailq or equivalent])
1508fi 1586fi
1509 1587
1510AC_PATH_PROG(PATH_TO_QMAIL_QSTAT,qmail-qstat) 1588AC_PATH_PROG(PATH_TO_QMAIL_QSTAT,qmail-qstat)
@@ -1515,7 +1593,7 @@ if test -n "$PATH_TO_QMAIL_QSTAT"
1515then 1593then
1516 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])
1517else 1595else
1518 AC_MSG_WARN([Could not find qmail-qstat or eqivalent]) 1596 AC_MSG_WARN([Could not find qmail-qstat or equivalent])
1519fi 1597fi
1520 1598
1521dnl SWAP info required is amount allocated/available and amount free 1599dnl SWAP info required is amount allocated/available and amount free
@@ -1530,16 +1608,16 @@ then
1530 ac_cv_have_swap=yes 1608 ac_cv_have_swap=yes
1531 ac_cv_swap_command="$PATH_TO_SWAP -l" 1609 ac_cv_swap_command="$PATH_TO_SWAP -l"
1532 if [$PATH_TO_SWAP -l 2>/dev/null | \ 1610 if [$PATH_TO_SWAP -l 2>/dev/null | \
1533 egrep -i "^lswap +path +pri +swaplo +blocks +free +maxswap" \ 1611 grep -E -i "^lswap +path +pri +swaplo +blocks +free +maxswap" \
1534 >/dev/null] 1612 >/dev/null]
1535 then 1613 then
1536 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"]
1537 ac_cv_swap_conv=2048 1615 ac_cv_swap_conv=2048
1538 AC_MSG_RESULT([using IRIX format swap]) 1616 AC_MSG_RESULT([using IRIX format swap])
1539 1617
1540 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]
1541 then 1619 then
1542 ac_cv_swap_format=["%*s %*[0-9,-] %*d %f %f"] 1620 ac_cv_swap_format=["%*s %*[0-9,-] %*d %lu %lu"]
1543 ac_cv_swap_conv=2048 1621 ac_cv_swap_conv=2048
1544 AC_MSG_RESULT([using Unixware format swap]) 1622 AC_MSG_RESULT([using Unixware format swap])
1545 else 1623 else
@@ -1556,23 +1634,23 @@ AC_PATH_PROG(PATH_TO_SWAPINFO,swapinfo)
1556if (test -n "$PATH_TO_SWAPINFO") 1634if (test -n "$PATH_TO_SWAPINFO")
1557then 1635then
1558AC_MSG_CHECKING([for $PATH_TO_SWAPINFO format]) 1636AC_MSG_CHECKING([for $PATH_TO_SWAPINFO format])
1559if [$PATH_TO_SWAPINFO -k 2>&1 | egrep -i "^Device" >/dev/null] 1637if [$PATH_TO_SWAPINFO -k 2>&1 | grep -E -i "^Device" >/dev/null]
1560then 1638then
1561 ac_cv_have_swap=yes 1639 ac_cv_have_swap=yes
1562 ac_cv_swap_command="$PATH_TO_SWAPINFO -k" 1640 ac_cv_swap_command="$PATH_TO_SWAPINFO -k"
1563 1641
1564 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]
1565 then 1643 then
1566 ac_cv_swap_format=["%*s %f %*d %f"] 1644 ac_cv_swap_format=["%*s %lu %*d %lu"]
1567 ac_cv_swap_conv=1024 1645 ac_cv_swap_conv=1024
1568 AC_MSG_RESULT([using FreeBSD format swapinfo]) 1646 AC_MSG_RESULT([using FreeBSD format swapinfo])
1569 fi 1647 fi
1570 1648
1571elif [$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]
1572then 1650then
1573 ac_cv_have_swap=yes 1651 ac_cv_have_swap=yes
1574 ac_cv_swap_command="$PATH_TO_SWAPINFO -dfM" 1652 ac_cv_swap_command="$PATH_TO_SWAPINFO -dfM"
1575 ac_cv_swap_format=["%*s %f %*d %f"] 1653 ac_cv_swap_format=["%*s %lu %*d %lu"]
1576 ac_cv_swap_conv=1024 1654 ac_cv_swap_conv=1024
1577 AC_MSG_RESULT([using HP-UX format swapinfo]) 1655 AC_MSG_RESULT([using HP-UX format swapinfo])
1578fi 1656fi
@@ -1583,11 +1661,11 @@ AC_PATH_PROG(PATH_TO_LSPS,lsps)
1583if (test -n "$PATH_TO_LSPS") 1661if (test -n "$PATH_TO_LSPS")
1584then 1662then
1585AC_MSG_CHECKING([for $PATH_TO_LSPS format]) 1663AC_MSG_CHECKING([for $PATH_TO_LSPS format])
1586if [$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]
1587then 1665then
1588 ac_cv_have_swap=yes 1666 ac_cv_have_swap=yes
1589 ac_cv_swap_command="$PATH_TO_LSPS -a" 1667 ac_cv_swap_command="$PATH_TO_LSPS -a"
1590 ac_cv_swap_format=["%*s %*s %*s %f%*s %f %*s"] 1668 ac_cv_swap_format=["%*s %*s %*s %lu%*s %lu %*s"]
1591 ac_cv_swap_conv=1 1669 ac_cv_swap_conv=1
1592 AC_MSG_RESULT([using AIX lsps]) 1670 AC_MSG_RESULT([using AIX lsps])
1593fi 1671fi
@@ -1773,7 +1851,7 @@ AM_GNU_GETTEXT([external], [need-ngettext])
1773AM_GNU_GETTEXT_VERSION(0.15) 1851AM_GNU_GETTEXT_VERSION(0.15)
1774 1852
1775dnl Check for Redhat spopen problem 1853dnl Check for Redhat spopen problem
1776dnl 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
1777dnl 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
1778dnl 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
1779dnl We patch plugins/popen.c 1857dnl We patch plugins/popen.c
@@ -1785,7 +1863,7 @@ AC_ARG_ENABLE(redhat-pthread-workaround,
1785 [ac_cv_enable_redhat_pthread_workaround=$enableval], 1863 [ac_cv_enable_redhat_pthread_workaround=$enableval],
1786 [ac_cv_enable_redhat_pthread_workaround=test]) 1864 [ac_cv_enable_redhat_pthread_workaround=test])
1787if test "$ac_cv_enable_redhat_pthread_workaround" = "test" ; then 1865if test "$ac_cv_enable_redhat_pthread_workaround" = "test" ; then
1788 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
1789 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])
1790 AC_MSG_CHECKING(for redhat spopen problem) 1868 AC_MSG_CHECKING(for redhat spopen problem)
1791 ( cd config_test && make && make test ) > /dev/null 2>&1 1869 ( cd config_test && make && make test ) > /dev/null 2>&1
@@ -1882,4 +1960,5 @@ ACX_FEATURE([enable],[perl-modules])
1882ACX_FEATURE([with],[cgiurl]) 1960ACX_FEATURE([with],[cgiurl])
1883ACX_FEATURE([with],[trusted-path]) 1961ACX_FEATURE([with],[trusted-path])
1884ACX_FEATURE([enable],[libtap]) 1962ACX_FEATURE([enable],[libtap])
1885 1963ACX_FEATURE([with],[libcurl])
1964ACX_FEATURE([with],[uriparser])