diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 263 |
1 files changed, 174 insertions, 89 deletions
diff --git a/configure.ac b/configure.ac index 0a554af..e6a40d3 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,10 +1,11 @@ | |||
1 | dnl Process this file with autoconf to produce a configure script. | 1 | dnl Process this file with autoconf to produce a configure script. |
2 | AC_PREREQ(2.59) | 2 | AC_PREREQ(2.64) |
3 | AC_INIT(monitoring-plugins,2.1.2) | 3 | AC_INIT(monitoring-plugins,2.3git) |
4 | AC_CONFIG_SRCDIR(NPTest.pm) | 4 | AC_CONFIG_SRCDIR(NPTest.pm) |
5 | AC_CONFIG_FILES([gl/Makefile]) | 5 | AC_CONFIG_FILES([gl/Makefile]) |
6 | AC_CONFIG_AUX_DIR(build-aux) | 6 | AC_CONFIG_AUX_DIR(build-aux) |
7 | AM_INIT_AUTOMAKE([1.8.3]) | 7 | AM_INIT_AUTOMAKE([1.8.3]) |
8 | AM_SILENT_RULES([yes]) | ||
8 | AM_MAINTAINER_MODE([enable]) | 9 | AM_MAINTAINER_MODE([enable]) |
9 | AC_CONFIG_HEADERS([config.h]) | 10 | AC_CONFIG_HEADERS([config.h]) |
10 | AC_CANONICAL_HOST | 11 | AC_CANONICAL_HOST |
@@ -273,26 +274,33 @@ AC_ARG_WITH([radius], [AS_HELP_STRING([--without-radius], [Skips the radius plug | |||
273 | dnl Check for radius libraries | 274 | dnl Check for radius libraries |
274 | AS_IF([test "x$with_radius" != "xno"], [ | 275 | AS_IF([test "x$with_radius" != "xno"], [ |
275 | _SAVEDLIBS="$LIBS" | 276 | _SAVEDLIBS="$LIBS" |
276 | AC_CHECK_LIB(freeradius-client,rc_read_config) | 277 | AC_CHECK_LIB(radcli,rc_read_config) |
277 | if test "$ac_cv_lib_freeradius_client_rc_read_config" = "yes"; then | 278 | if test "$ac_cv_lib_radcli_rc_read_config" = "yes"; then |
278 | EXTRAS="$EXTRAS check_radius\$(EXEEXT)" | 279 | EXTRAS="$EXTRAS check_radius\$(EXEEXT)" |
279 | RADIUSLIBS="-lfreeradius-client" | 280 | RADIUSLIBS="-lradcli" |
280 | AC_SUBST(RADIUSLIBS) | 281 | AC_SUBST(RADIUSLIBS) |
281 | else | 282 | else |
282 | AC_CHECK_LIB(radiusclient-ng,rc_read_config) | 283 | AC_CHECK_LIB(freeradius-client,rc_read_config) |
283 | if test "$ac_cv_lib_radiusclient_ng_rc_read_config" = "yes"; then | 284 | if test "$ac_cv_lib_freeradius_client_rc_read_config" = "yes"; then |
284 | EXTRAS="$EXTRAS check_radius\$(EXEEXT)" | 285 | EXTRAS="$EXTRAS check_radius\$(EXEEXT)" |
285 | RADIUSLIBS="-lradiusclient-ng" | 286 | RADIUSLIBS="-lfreeradius-client" |
286 | AC_SUBST(RADIUSLIBS) | 287 | AC_SUBST(RADIUSLIBS) |
287 | else | 288 | else |
288 | AC_CHECK_LIB(radiusclient,rc_read_config) | 289 | AC_CHECK_LIB(radiusclient-ng,rc_read_config) |
289 | if test "$ac_cv_lib_radiusclient_rc_read_config" = "yes"; then | 290 | if test "$ac_cv_lib_radiusclient_ng_rc_read_config" = "yes"; then |
290 | EXTRAS="$EXTRAS check_radius\$(EXEEXT)" | 291 | EXTRAS="$EXTRAS check_radius\$(EXEEXT)" |
291 | RADIUSLIBS="-lradiusclient" | 292 | RADIUSLIBS="-lradiusclient-ng" |
292 | AC_SUBST(RADIUSLIBS) | 293 | AC_SUBST(RADIUSLIBS) |
293 | else | 294 | else |
294 | AC_MSG_WARN([Skipping radius plugin]) | 295 | AC_CHECK_LIB(radiusclient,rc_read_config) |
295 | AC_MSG_WARN([install radius libs to compile this plugin (see REQUIREMENTS).]) | 296 | if test "$ac_cv_lib_radiusclient_rc_read_config" = "yes"; then |
297 | EXTRAS="$EXTRAS check_radius\$(EXEEXT)" | ||
298 | RADIUSLIBS="-lradiusclient" | ||
299 | AC_SUBST(RADIUSLIBS) | ||
300 | else | ||
301 | AC_MSG_WARN([Skipping radius plugin]) | ||
302 | AC_MSG_WARN([install radius libs to compile this plugin (see REQUIREMENTS).]) | ||
303 | fi | ||
296 | fi | 304 | fi |
297 | fi | 305 | fi |
298 | fi | 306 | fi |
@@ -320,6 +328,25 @@ AS_IF([test "x$with_ldap" != "xno"], [ | |||
320 | LIBS="$_SAVEDLIBS" | 328 | LIBS="$_SAVEDLIBS" |
321 | ]) | 329 | ]) |
322 | 330 | ||
331 | |||
332 | AC_ARG_WITH([systemd], [AS_HELP_STRING([--without-systemd], [Skips systemd support])]) | ||
333 | |||
334 | dnl Check for libsystemd | ||
335 | AS_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 | |||
323 | dnl Check for headers used by check_ide_smart | 350 | dnl Check for headers used by check_ide_smart |
324 | case $host in | 351 | case $host in |
325 | *linux*) | 352 | *linux*) |
@@ -378,12 +405,48 @@ if test "$ac_cv_header_wtsapi32_h" = "yes"; then | |||
378 | AC_SUBST(WTSAPI32LIBS) | 405 | AC_SUBST(WTSAPI32LIBS) |
379 | fi | 406 | fi |
380 | 407 | ||
408 | _can_enable_check_curl=no | ||
409 | dnl Check for cURL library | ||
410 | LIBCURL_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 | |||
424 | dnl Check for uriparser library | ||
425 | URIPARSER_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 | |||
438 | dnl prerequisites met, enable the plugin | ||
439 | if test x$_can_enable_check_curl = xyes; then | ||
440 | EXTRAS="$EXTRAS check_curl\$(EXEEXT)" | ||
441 | fi | ||
442 | AC_CONFIG_FILES([plugins/picohttpparser/Makefile]) | ||
443 | |||
381 | dnl Fallback to who(1) if the system doesn't provide an utmpx(5) interface | 444 | dnl Fallback to who(1) if the system doesn't provide an utmpx(5) interface |
382 | if test "$ac_cv_header_utmpx_h" = "no" -a "$ac_cv_header_wtsapi32_h" = "no" | 445 | if test "$ac_cv_header_utmpx_h" = "no" -a "$ac_cv_header_wtsapi32_h" = "no" |
383 | then | 446 | then |
384 | AC_PATH_PROG(PATH_TO_WHO,who) | 447 | AC_PATH_PROG(PATH_TO_WHO,who) |
385 | 448 | ||
386 | 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] |
387 | then | 450 | then |
388 | ac_cv_path_to_who="$PATH_TO_WHO -q" | 451 | ac_cv_path_to_who="$PATH_TO_WHO -q" |
389 | else | 452 | else |
@@ -493,15 +556,15 @@ if ! test x"$with_openssl" = x"no"; then | |||
493 | dnl Check for crypto lib | 556 | dnl Check for crypto lib |
494 | _SAVEDLIBS="$LIBS" | 557 | _SAVEDLIBS="$LIBS" |
495 | LIBS="-L${with_openssl}/lib" | 558 | LIBS="-L${with_openssl}/lib" |
496 | AC_CHECK_LIB(crypto,CRYPTO_lock) | 559 | AC_CHECK_LIB(crypto,CRYPTO_new_ex_data) |
497 | if test "$ac_cv_lib_crypto_CRYPTO_lock" = "yes"; then | 560 | if test "$ac_cv_lib_crypto_CRYPTO_new_ex_data" = "yes"; then |
498 | dnl Check for SSL lib | 561 | dnl Check for SSL lib |
499 | AC_CHECK_LIB(ssl,main, SSLLIBS="-lssl -lcrypto",,-lcrypto) | 562 | AC_CHECK_LIB(ssl,main, SSLLIBS="-lssl -lcrypto",,-lcrypto) |
500 | fi | 563 | fi |
501 | LIBS="$_SAVEDLIBS" | 564 | LIBS="$_SAVEDLIBS" |
502 | 565 | ||
503 | dnl test headers and libs to decide whether check_http should use SSL | 566 | dnl test headers and libs to decide whether check_http should use SSL |
504 | if test "$ac_cv_lib_crypto_CRYPTO_lock" = "yes"; then | 567 | if test "$ac_cv_lib_crypto_CRYPTO_new_ex_data" = "yes"; then |
505 | if test "$ac_cv_lib_ssl_main" = "yes"; then | 568 | if test "$ac_cv_lib_ssl_main" = "yes"; then |
506 | if test "$FOUNDINCLUDE" = "yes"; then | 569 | if test "$FOUNDINCLUDE" = "yes"; then |
507 | FOUNDOPENSSL="yes" | 570 | FOUNDOPENSSL="yes" |
@@ -558,7 +621,6 @@ AC_C_CONST | |||
558 | AC_STRUCT_TM | 621 | AC_STRUCT_TM |
559 | AC_TYPE_PID_T | 622 | AC_TYPE_PID_T |
560 | AC_TYPE_SIZE_T | 623 | AC_TYPE_SIZE_T |
561 | AC_TYPE_SIGNAL | ||
562 | 624 | ||
563 | AC_CACHE_CHECK([for va_copy],ac_cv_HAVE_VA_COPY,[ | 625 | AC_CACHE_CHECK([for va_copy],ac_cv_HAVE_VA_COPY,[ |
564 | AC_TRY_LINK([#include <stdarg.h> | 626 | AC_TRY_LINK([#include <stdarg.h> |
@@ -732,7 +794,7 @@ dnl Removing this for the moment - Ton | |||
732 | dnl Using /usr/ucb/ps on Solaris systems, to avoid truncation | 794 | dnl Using /usr/ucb/ps on Solaris systems, to avoid truncation |
733 | dnl Limitation that command name is not available | 795 | dnl Limitation that command name is not available |
734 | dnl elif test "$ac_cv_uname_s" = "SunOS" && /usr/ucb/ps -alxwwn 2>/dev/null | \ | 796 | dnl elif test "$ac_cv_uname_s" = "SunOS" && /usr/ucb/ps -alxwwn 2>/dev/null | \ |
735 | dnl egrep -i ["^ *F +UID +PID +PPID +%C +PRI +NI +SZ +RSS +WCHAN +S +TT +TIME +COMMAND"] > /dev/null | 797 | dnl grep -E -i ["^ *F +UID +PID +PPID +%C +PRI +NI +SZ +RSS +WCHAN +S +TT +TIME +COMMAND"] > /dev/null |
736 | dnl then | 798 | dnl then |
737 | dnl ac_cv_ps_varlist="[&procuid,&procpid,&procppid,&procpcpu,&procvsz,&procrss,procstat,&pos]" | 799 | dnl ac_cv_ps_varlist="[&procuid,&procpid,&procppid,&procpcpu,&procvsz,&procrss,procstat,&pos]" |
738 | dnl ac_cv_ps_command="/usr/ucb/ps -alxwwn" | 800 | dnl ac_cv_ps_command="/usr/ucb/ps -alxwwn" |
@@ -740,10 +802,20 @@ dnl ac_cv_ps_format=["%*s %d %d %d %d %*d %*d %d %d%*[ 0123456789abcdef]%[OSRZT | |||
740 | dnl ac_cv_ps_cols=8 | 802 | dnl ac_cv_ps_cols=8 |
741 | dnl AC_MSG_RESULT([$ac_cv_ps_command]) | 803 | dnl AC_MSG_RESULT([$ac_cv_ps_command]) |
742 | 804 | ||
805 | dnl This one is the exact same test as the next one but includes etime | ||
806 | elif ps axwo 'stat comm vsz rss user uid pid ppid etime args' 2>/dev/null | \ | ||
807 | grep -E -i ["^ *STAT +[UCOMAND]+ +VSZ +RSS +USER +UID +PID +PPID +ELAPSED +COMMAND"] > /dev/null | ||
808 | then | ||
809 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos]" | ||
810 | ac_cv_ps_command="$PATH_TO_PS axwo 'stat uid pid ppid vsz rss pcpu etime comm args'" | ||
811 | ac_cv_ps_format="%s %d %d %d %d %d %f %s %s %n" | ||
812 | ac_cv_ps_cols=10 | ||
813 | AC_MSG_RESULT([$ac_cv_ps_command]) | ||
814 | |||
743 | dnl Some gnu/linux systems (debian for one) don't like -axwo and need axwo. | 815 | dnl Some gnu/linux systems (debian for one) don't like -axwo and need axwo. |
744 | dnl so test for this first... | 816 | dnl so test for this first... |
745 | elif ps axwo 'stat comm vsz rss user uid pid ppid args' 2>/dev/null | \ | 817 | elif ps axwo 'stat comm vsz rss user uid pid ppid args' 2>/dev/null | \ |
746 | egrep -i ["^ *STAT +[UCOMAND]+ +VSZ +RSS +USER +UID +PID +PPID +COMMAND"] > /dev/null | 818 | grep -E -i ["^ *STAT +[UCOMAND]+ +VSZ +RSS +USER +UID +PID +PPID +COMMAND"] > /dev/null |
747 | then | 819 | then |
748 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" | 820 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" |
749 | ac_cv_ps_command="$PATH_TO_PS axwo 'stat uid pid ppid vsz rss pcpu comm args'" | 821 | ac_cv_ps_command="$PATH_TO_PS axwo 'stat uid pid ppid vsz rss pcpu comm args'" |
@@ -755,7 +827,7 @@ dnl For OpenBSD 3.2 & 3.3. Must come before ps -weo | |||
755 | dnl Should also work for FreeBSD 5.2.1 and 5.3 | 827 | dnl Should also work for FreeBSD 5.2.1 and 5.3 |
756 | dnl STAT UCOMM VSZ RSS USER PPID COMMAND | 828 | dnl STAT UCOMM VSZ RSS USER PPID COMMAND |
757 | elif ps -axwo 'stat comm vsz rss user uid pid ppid args' 2>/dev/null | \ | 829 | elif ps -axwo 'stat comm vsz rss user uid pid ppid args' 2>/dev/null | \ |
758 | egrep -i ["^ *STAT +[UCOMAND]+ +VSZ +RSS +USER +UID +PID +PPID +COMMAND"] > /dev/null | 830 | grep -E -i ["^ *STAT +[UCOMAND]+ +VSZ +RSS +USER +UID +PID +PPID +COMMAND"] > /dev/null |
759 | then | 831 | then |
760 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" | 832 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" |
761 | ac_cv_ps_command="$PATH_TO_PS -axwo 'stat uid pid ppid vsz rss pcpu comm args'" | 833 | ac_cv_ps_command="$PATH_TO_PS -axwo 'stat uid pid ppid vsz rss pcpu comm args'" |
@@ -767,7 +839,7 @@ dnl Some *BSDs have different format for ps. This is mainly to catch FreeBSD 4. | |||
767 | dnl Limitation: Only first 16 chars returned for ucomm field | 839 | dnl Limitation: Only first 16 chars returned for ucomm field |
768 | dnl Must come before ps -weo | 840 | dnl Must come before ps -weo |
769 | elif ps -axwo 'stat uid pid ppid vsz rss pcpu ucomm command' 2>/dev/null | \ | 841 | elif ps -axwo 'stat uid pid ppid vsz rss pcpu ucomm command' 2>/dev/null | \ |
770 | egrep -i ["^ *STAT +UID +PID +PPID +VSZ +RSS +%CPU +UCOMM +COMMAND"] > /dev/null | 842 | grep -E -i ["^ *STAT +UID +PID +PPID +VSZ +RSS +%CPU +UCOMM +COMMAND"] > /dev/null |
771 | then | 843 | then |
772 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" | 844 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" |
773 | ac_cv_ps_command="$PATH_TO_PS -axwo 'stat uid pid ppid vsz rss pcpu ucomm command'" | 845 | ac_cv_ps_command="$PATH_TO_PS -axwo 'stat uid pid ppid vsz rss pcpu ucomm command'" |
@@ -777,7 +849,7 @@ then | |||
777 | 849 | ||
778 | dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND | 850 | dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND |
779 | elif ps -weo 'stat comm vsz rss user uid pid ppid etime args' 2>/dev/null | \ | 851 | elif ps -weo 'stat comm vsz rss user uid pid ppid etime args' 2>/dev/null | \ |
780 | egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[ID]+ +P[PID]+ +[ELAPSD]+ +[RGSCOMDNA]+"] >/dev/null | 852 | grep -E -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[ID]+ +P[PID]+ +[ELAPSD]+ +[RGSCOMDNA]+"] >/dev/null |
781 | then | 853 | then |
782 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos]" | 854 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos]" |
783 | ac_cv_ps_command="$PATH_TO_PS -weo 'stat uid pid ppid vsz rss pcpu etime comm args'" | 855 | ac_cv_ps_command="$PATH_TO_PS -weo 'stat uid pid ppid vsz rss pcpu etime comm args'" |
@@ -787,7 +859,7 @@ then | |||
787 | 859 | ||
788 | dnl FreeBSD | 860 | dnl FreeBSD |
789 | elif ps waxco 'state command vsz rss uid user pid ppid' 2>/dev/null | \ | 861 | elif ps waxco 'state command vsz rss uid user pid ppid' 2>/dev/null | \ |
790 | egrep -i ["^STAT +COMMAND +VSZ +RSS +UID +USER +PID +PPID"] >/dev/null | 862 | grep -E -i ["^STAT +COMMAND +VSZ +RSS +UID +USER +PID +PPID"] >/dev/null |
791 | then | 863 | then |
792 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" | 864 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" |
793 | ac_cv_ps_command="$PATH_TO_PS waxco 'state uid pid ppid vsz rss pcpu command command'" | 865 | ac_cv_ps_command="$PATH_TO_PS waxco 'state uid pid ppid vsz rss pcpu command command'" |
@@ -797,7 +869,7 @@ then | |||
797 | 869 | ||
798 | dnl BSD-like mode in RH 6.1 | 870 | dnl BSD-like mode in RH 6.1 |
799 | elif ps waxno 'state comm vsz rss uid user pid ppid args' 2>/dev/null | \ | 871 | elif ps waxno 'state comm vsz rss uid user pid ppid args' 2>/dev/null | \ |
800 | egrep -i ["^S +COMMAND +VSZ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null | 872 | grep -E -i ["^S +COMMAND +VSZ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null |
801 | then | 873 | then |
802 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" | 874 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" |
803 | ac_cv_ps_command="$PATH_TO_PS waxno 'state uid pid ppid vsz rss pcpu comm args'" | 875 | ac_cv_ps_command="$PATH_TO_PS waxno 'state uid pid ppid vsz rss pcpu comm args'" |
@@ -809,7 +881,7 @@ dnl SunOS 4.1.3: | |||
809 | dnl F UID PID PPID CP PRI NI SZ RSS WCHAN STAT TT TIME COMMAND | 881 | dnl F UID PID PPID CP PRI NI SZ RSS WCHAN STAT TT TIME COMMAND |
810 | dnl Need the head -1 otherwise test will work because arguments are found | 882 | dnl Need the head -1 otherwise test will work because arguments are found |
811 | elif ps -laxnwww 2>/dev/null | head -1 | \ | 883 | elif ps -laxnwww 2>/dev/null | head -1 | \ |
812 | egrep -i ["^ *F(LAGS)? +UID +PID +PPID +CP +PRI +NI +(SZ)|(VSZ)|(SIZE) +RSS +WCHAN +STAT? +TTY? +TIME +COMMAND"] >/dev/null | 884 | grep -E -i ["^ *F(LAGS)? +UID +PID +PPID +CP +PRI +NI +(SZ)|(VSZ)|(SIZE) +RSS +WCHAN +STAT? +TTY? +TIME +COMMAND"] >/dev/null |
813 | then | 885 | then |
814 | ac_cv_ps_varlist="[&procuid,&procpid,&procppid,&procvsz,&procrss,procstat,&pos,procprog]" | 886 | ac_cv_ps_varlist="[&procuid,&procpid,&procppid,&procvsz,&procrss,procstat,&pos,procprog]" |
815 | ac_cv_ps_command="$PATH_TO_PS -laxnwww" | 887 | ac_cv_ps_command="$PATH_TO_PS -laxnwww" |
@@ -822,7 +894,7 @@ dnl FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMA | |||
822 | dnl 100 0 1 0 0 0 776 76 c0131c8c S ffff 0:11 init [2] | 894 | dnl 100 0 1 0 0 0 776 76 c0131c8c S ffff 0:11 init [2] |
823 | dnl | 895 | dnl |
824 | elif ps laxnwww 2>/dev/null | \ | 896 | elif ps laxnwww 2>/dev/null | \ |
825 | egrep -i ["^ *F(LAGS)? +UID +PID +PPID +PRI +NI +(VSZ)|(SIZE) +RSS +WCHAN +STAT? TTY +TIME +COMMAND"] >/dev/null | 897 | grep -E -i ["^ *F(LAGS)? +UID +PID +PPID +PRI +NI +(VSZ)|(SIZE) +RSS +WCHAN +STAT? TTY +TIME +COMMAND"] >/dev/null |
826 | then | 898 | then |
827 | ac_cv_ps_varlist="[&procuid,&procpid,&procppid,procstat,&procvsz,&procrss,&pos,procprog]" | 899 | ac_cv_ps_varlist="[&procuid,&procpid,&procppid,procstat,&procvsz,&procrss,&pos,procprog]" |
828 | ac_cv_ps_command="$PATH_TO_PS laxnwww" | 900 | ac_cv_ps_command="$PATH_TO_PS laxnwww" |
@@ -832,7 +904,7 @@ then | |||
832 | 904 | ||
833 | dnl OpenBSD (needs to come early because -exo appears to work, but does not give all procs) | 905 | dnl OpenBSD (needs to come early because -exo appears to work, but does not give all procs) |
834 | elif ps -axo 'stat comm vsz rss user uid pid ppid args' 2>/dev/null | \ | 906 | elif ps -axo 'stat comm vsz rss user uid pid ppid args' 2>/dev/null | \ |
835 | egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null | 907 | grep -E -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null |
836 | then | 908 | then |
837 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" | 909 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" |
838 | ac_cv_ps_command="$PATH_TO_PS -axo 'stat uid pid ppid vsz rss pcpu comm args'" | 910 | ac_cv_ps_command="$PATH_TO_PS -axo 'stat uid pid ppid vsz rss pcpu comm args'" |
@@ -845,7 +917,7 @@ dnl Has /usr/bin/ps and /sbin/ps - force sbin version | |||
845 | dnl Can't use vsize and rssize because comes back with text (eg, 1.5M instead | 917 | dnl Can't use vsize and rssize because comes back with text (eg, 1.5M instead |
846 | dnl of 1500). Will need big changes to check_procs to support | 918 | dnl of 1500). Will need big changes to check_procs to support |
847 | elif /sbin/ps -eo 'stat uid pid ppid pcpu etime comm args' 2>/dev/null | \ | 919 | elif /sbin/ps -eo 'stat uid pid ppid pcpu etime comm args' 2>/dev/null | \ |
848 | egrep -i ["^ *S +[UID]+ +[PID]+ +[PID]+ +[%CPU]+ +[ELAPSD]+ +[COMMAND]+ +[COMMAND]+"] > /dev/null | 920 | grep -E -i ["^ *S +[UID]+ +[PID]+ +[PID]+ +[%CPU]+ +[ELAPSD]+ +[COMMAND]+ +[COMMAND]+"] > /dev/null |
849 | then | 921 | then |
850 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procpcpu,procetime,procprog,&pos]" | 922 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procpcpu,procetime,procprog,&pos]" |
851 | ac_cv_ps_command="/sbin/ps -eo 'stat uid pid ppid pcpu etime comm args'" | 923 | ac_cv_ps_command="/sbin/ps -eo 'stat uid pid ppid pcpu etime comm args'" |
@@ -854,7 +926,7 @@ then | |||
854 | AC_MSG_RESULT([$ac_cv_ps_command]) | 926 | AC_MSG_RESULT([$ac_cv_ps_command]) |
855 | 927 | ||
856 | elif ps -eo 's comm vsz rss user uid pid ppid args' 2>/dev/null | \ | 928 | elif ps -eo 's comm vsz rss user uid pid ppid args' 2>/dev/null | \ |
857 | egrep -i ["^S[TAUES]* +C[OMDNA]+ +[VSIZE]+ +U[SER]+ +U[ID]+ +P[PID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null | 929 | grep -E -i ["^S[TAUES]* +C[OMDNA]+ +[VSIZE]+ +U[SER]+ +U[ID]+ +P[PID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null |
858 | then | 930 | then |
859 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" | 931 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" |
860 | ac_cv_ps_command="$PATH_TO_PS -eo 's uid pid ppid vsz rss pcpu comm args'" | 932 | ac_cv_ps_command="$PATH_TO_PS -eo 's uid pid ppid vsz rss pcpu comm args'" |
@@ -864,7 +936,7 @@ then | |||
864 | 936 | ||
865 | dnl AIX 4.3.3 and 5.1 do not have an rss field | 937 | dnl AIX 4.3.3 and 5.1 do not have an rss field |
866 | elif ps -eo 'stat uid pid ppid vsz pcpu comm args' 2>/dev/null | \ | 938 | elif ps -eo 'stat uid pid ppid vsz pcpu comm args' 2>/dev/null | \ |
867 | egrep -i ["^ *S[TAUES]* +UID +PID +PPID +VSZ +%CPU +COMMAND +COMMAND"] >/dev/null | 939 | grep -E -i ["^ *S[TAUES]* +UID +PID +PPID +VSZ +%CPU +COMMAND +COMMAND"] >/dev/null |
868 | then | 940 | then |
869 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procpcpu,procprog,&pos]" | 941 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procpcpu,procprog,&pos]" |
870 | ac_cv_ps_command="$PATH_TO_PS -eo 'stat uid pid ppid vsz pcpu comm args'" | 942 | ac_cv_ps_command="$PATH_TO_PS -eo 'stat uid pid ppid vsz pcpu comm args'" |
@@ -874,18 +946,18 @@ then | |||
874 | 946 | ||
875 | dnl Solaris 2.6 | 947 | dnl Solaris 2.6 |
876 | elif ps -Ao 's comm vsz rss uid user pid ppid args' 2>/dev/null | \ | 948 | elif ps -Ao 's comm vsz rss uid user pid ppid args' 2>/dev/null | \ |
877 | egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null | 949 | grep -E -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null |
878 | then | 950 | then |
879 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" | 951 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" |
880 | ac_cv_ps_command="$PATH_TO_PS -Ao 's uid pid ppid vsz rss pcpu comm args'" | 952 | ac_cv_ps_command="$PATH_TO_PS -Ao 's uid pid ppid vsz rss pcpu comm args'" |
881 | # There must be no space between the %s and %n due to a wierd problem in sscanf where | 953 | # There must be no space between the %s and %n due to a weird problem in sscanf where |
882 | # it will return %n as longer than the line length | 954 | # it will return %n as longer than the line length |
883 | ac_cv_ps_format="%s %d %d %d %d %d %f %s%n" | 955 | ac_cv_ps_format="%s %d %d %d %d %d %f %s%n" |
884 | ac_cv_ps_cols=9 | 956 | ac_cv_ps_cols=9 |
885 | AC_MSG_RESULT([$ac_cv_ps_command]) | 957 | AC_MSG_RESULT([$ac_cv_ps_command]) |
886 | 958 | ||
887 | elif ps -Ao 'status comm vsz rss uid user pid ppid args' 2>/dev/null | \ | 959 | elif ps -Ao 'status comm vsz rss uid user pid ppid args' 2>/dev/null | \ |
888 | egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null | 960 | grep -E -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null |
889 | then | 961 | then |
890 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" | 962 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" |
891 | ac_cv_ps_command="$PATH_TO_PS -Ao 'status uid pid ppid vsz rss pcpu comm args'" | 963 | ac_cv_ps_command="$PATH_TO_PS -Ao 'status uid pid ppid vsz rss pcpu comm args'" |
@@ -894,7 +966,7 @@ then | |||
894 | AC_MSG_RESULT([$ac_cv_ps_command]) | 966 | AC_MSG_RESULT([$ac_cv_ps_command]) |
895 | 967 | ||
896 | elif ps -Ao 'state comm vsz rss uid user pid ppid args' 2>/dev/null | \ | 968 | elif ps -Ao 'state comm vsz rss uid user pid ppid args' 2>/dev/null | \ |
897 | egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null | 969 | grep -E -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null |
898 | then | 970 | then |
899 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" | 971 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" |
900 | ac_cv_ps_command="$PATH_TO_PS -Ao 'state uid pid ppid vsz rss pcpu comm args'" | 972 | ac_cv_ps_command="$PATH_TO_PS -Ao 'state uid pid ppid vsz rss pcpu comm args'" |
@@ -904,7 +976,7 @@ then | |||
904 | 976 | ||
905 | dnl wonder who takes state instead of stat | 977 | dnl wonder who takes state instead of stat |
906 | elif ps -ao 'state command vsz rss user pid ppid args' 2>/dev/null | \ | 978 | elif ps -ao 'state command vsz rss user pid ppid args' 2>/dev/null | \ |
907 | egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null | 979 | grep -E -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null |
908 | then | 980 | then |
909 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" | 981 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" |
910 | ac_cv_ps_command="$PATH_TO_PS -ao 'state uid pid ppid vsz rss pcpu command args'" | 982 | ac_cv_ps_command="$PATH_TO_PS -ao 'state uid pid ppid vsz rss pcpu command args'" |
@@ -914,7 +986,7 @@ then | |||
914 | 986 | ||
915 | dnl IRIX 53 | 987 | dnl IRIX 53 |
916 | elif ps -el 2>/dev/null | \ | 988 | elif ps -el 2>/dev/null | \ |
917 | egrep -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +P +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null | 989 | grep -E -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +P +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null |
918 | then | 990 | then |
919 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&pos,procprog]" | 991 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&pos,procprog]" |
920 | ac_cv_ps_command="$PATH_TO_PS -el (IRIX 53)" | 992 | ac_cv_ps_command="$PATH_TO_PS -el (IRIX 53)" |
@@ -924,7 +996,7 @@ then | |||
924 | 996 | ||
925 | dnl IRIX 63 | 997 | dnl IRIX 63 |
926 | elif ps -el 2>/dev/null | \ | 998 | elif ps -el 2>/dev/null | \ |
927 | egrep -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +P +ADDR +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null | 999 | grep -E -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +P +ADDR +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null |
928 | then | 1000 | then |
929 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&pos,procprog]" | 1001 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&pos,procprog]" |
930 | ac_cv_ps_command="$PATH_TO_PS -el (IRIX 63)" | 1002 | ac_cv_ps_command="$PATH_TO_PS -el (IRIX 63)" |
@@ -937,7 +1009,7 @@ dnl S UID RUID USER RUSER PID PPID VSZ %CPU COMMAND | |||
937 | dnl S 0 400 root oracle 2805 1 12904 0.00 ora_dism_SEA1X ora_dism_SEA1X | 1009 | dnl S 0 400 root oracle 2805 1 12904 0.00 ora_dism_SEA1X ora_dism_SEA1X |
938 | dnl S 400 400 oracle oracle 19261 1 126488 0.00 tnslsnr /u01/app/oracle/product/db/11.2.0.3/bin/tnslsnr LISTENER -inherit | 1010 | dnl S 400 400 oracle oracle 19261 1 126488 0.00 tnslsnr /u01/app/oracle/product/db/11.2.0.3/bin/tnslsnr LISTENER -inherit |
939 | elif env UNIX95=1 ps -eo 'state uid ruid user ruser pid ppid vsz pcpu comm args' 2>/dev/null | head -n 1 | \ | 1011 | elif env UNIX95=1 ps -eo 'state uid ruid user ruser pid ppid vsz pcpu comm args' 2>/dev/null | head -n 1 | \ |
940 | egrep -i ["^ *S +UID +RUID +USER +RUSER +PID +PPID +VSZ +%CPU +COMMAND +COMMAND"] >/dev/null | 1012 | grep -E -i ["^ *S +UID +RUID +USER +RUSER +PID +PPID +VSZ +%CPU +COMMAND +COMMAND"] >/dev/null |
941 | then | 1013 | then |
942 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procpcpu,procprog,&pos]" | 1014 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procpcpu,procprog,&pos]" |
943 | ac_cv_ps_command="$PATH_TO_ENV UNIX95=1 $PATH_TO_PS -eo 'state uid pid ppid vsz pcpu comm args'" | 1015 | ac_cv_ps_command="$PATH_TO_ENV UNIX95=1 $PATH_TO_PS -eo 'state uid pid ppid vsz pcpu comm args'" |
@@ -949,7 +1021,7 @@ dnl AIX 4.1: | |||
949 | dnl F S UID PID PPID C PRI NI ADDR SZ RSS WCHAN TTY TIME CMD | 1021 | dnl F S UID PID PPID C PRI NI ADDR SZ RSS WCHAN TTY TIME CMD |
950 | dnl 303 A 0 0 0 120 16 -- 1c07 20 24 - 0:45 swapper | 1022 | dnl 303 A 0 0 0 120 16 -- 1c07 20 24 - 0:45 swapper |
951 | elif ps -el 2>/dev/null | \ | 1023 | elif ps -el 2>/dev/null | \ |
952 | egrep -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +ADDR +SZ +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null | 1024 | grep -E -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +ADDR +SZ +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null |
953 | then | 1025 | then |
954 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&pos,procprog]" | 1026 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&pos,procprog]" |
955 | ac_cv_ps_command="$PATH_TO_PS -el (AIX 4.1 and HP-UX)" | 1027 | ac_cv_ps_command="$PATH_TO_PS -el (AIX 4.1 and HP-UX)" |
@@ -959,7 +1031,7 @@ then | |||
959 | 1031 | ||
960 | dnl AIX? | 1032 | dnl AIX? |
961 | elif ps glaxen 2>/dev/null | \ | 1033 | elif ps glaxen 2>/dev/null | \ |
962 | egrep -i ["^ *F +UID +PID +PPID +PRI +NI +VSZ +RSS +WCHAN +STAT +TTY +TIME +COMMAND"] >/dev/null | 1034 | grep -E -i ["^ *F +UID +PID +PPID +PRI +NI +VSZ +RSS +WCHAN +STAT +TTY +TIME +COMMAND"] >/dev/null |
963 | then | 1035 | then |
964 | ac_cv_ps_varlist="[&procuid,&procpid,&procppid,&procvsz,&procrss,procstat,&pos,procprog]" | 1036 | ac_cv_ps_varlist="[&procuid,&procpid,&procppid,&procvsz,&procrss,procstat,&pos,procprog]" |
965 | ac_cv_ps_command="$PATH_TO_PS glaxen" | 1037 | ac_cv_ps_command="$PATH_TO_PS glaxen" |
@@ -973,7 +1045,7 @@ dnl Some truncation will happen in UCOMM column | |||
973 | dnl STAT VSZ RSS UID PPID %CPU UCOMM COMMAND | 1045 | dnl STAT VSZ RSS UID PPID %CPU UCOMM COMMAND |
974 | dnl Ss 52756 22496 501 1 6.9 Window Manager /System/Library/CoreServices/WindowServer -daemon | 1046 | dnl Ss 52756 22496 501 1 6.9 Window Manager /System/Library/CoreServices/WindowServer -daemon |
975 | elif ps wwaxo 'state vsz rss uid pid ppid pcpu ucomm command' 2>/dev/null | \ | 1047 | elif ps wwaxo 'state vsz rss uid pid ppid pcpu ucomm command' 2>/dev/null | \ |
976 | egrep -i ["^STAT +VSZ +RSS +UID +PPID +%CPU +UCOMM +COMMAND"] >/dev/null | 1048 | grep -E -i ["^STAT +VSZ +RSS +UID +PPID +%CPU +UCOMM +COMMAND"] >/dev/null |
977 | then | 1049 | then |
978 | ac_cv_ps_command="$PATH_TO_PS wwaxo 'state vsz rss uid pid ppid pcpu ucomm command'" | 1050 | ac_cv_ps_command="$PATH_TO_PS wwaxo 'state vsz rss uid pid ppid pcpu ucomm command'" |
979 | ac_cv_ps_varlist="[procstat,&procvsz,&procrss,&procuid,&procpid,&procppid,&procpcpu,procprog,&pos]" | 1051 | ac_cv_ps_varlist="[procstat,&procvsz,&procrss,&procuid,&procpid,&procppid,&procpcpu,procprog,&pos]" |
@@ -983,7 +1055,7 @@ then | |||
983 | 1055 | ||
984 | dnl UnixWare | 1056 | dnl UnixWare |
985 | elif ps -Al 2>/dev/null | \ | 1057 | elif ps -Al 2>/dev/null | \ |
986 | egrep -i ["^ *F +S +UID +PID +PPID +CLS +PRI +NI +C +ADDR +SZ +WCHAN +TTY +TIME +COMD"] >/dev/null | 1058 | grep -E -i ["^ *F +S +UID +PID +PPID +CLS +PRI +NI +C +ADDR +SZ +WCHAN +TTY +TIME +COMD"] >/dev/null |
987 | then | 1059 | then |
988 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&pos,procprog]" | 1060 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&pos,procprog]" |
989 | ac_cv_ps_command="$PATH_TO_PS -Al" | 1061 | ac_cv_ps_command="$PATH_TO_PS -Al" |
@@ -1009,6 +1081,10 @@ if test -n "$ac_cv_ps_varlist" ; then | |||
1009 | AC_DEFINE(PS_USES_PROCETIME,"yes", | 1081 | AC_DEFINE(PS_USES_PROCETIME,"yes", |
1010 | [Whether the ps utility uses the "procetime" field]) | 1082 | [Whether the ps utility uses the "procetime" field]) |
1011 | fi | 1083 | fi |
1084 | if echo "$ac_cv_ps_varlist" | grep "procpcpu" >/dev/null; then | ||
1085 | AC_DEFINE(PS_USES_PROCPCPU,"yes", | ||
1086 | [Whether the ps utility uses the "procpcpu" field]) | ||
1087 | fi | ||
1012 | fi | 1088 | fi |
1013 | 1089 | ||
1014 | AC_PATH_PROG(PATH_TO_PING,ping) | 1090 | AC_PATH_PROG(PATH_TO_PING,ping) |
@@ -1047,14 +1123,22 @@ then | |||
1047 | 1123 | ||
1048 | elif [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \ | 1124 | elif [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \ |
1049 | $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \ | 1125 | $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \ |
1050 | egrep -i "^round-trip|^rtt" >/dev/null | 1126 | grep -E -i "^round-trip|^rtt" >/dev/null |
1051 | then | 1127 | then |
1052 | with_ping_command="$PATH_TO_PING -n -U -c %d %s" | 1128 | with_ping_command="$PATH_TO_PING -n -U -c %d %s" |
1053 | ac_cv_ping_packets_first=yes | 1129 | ac_cv_ping_packets_first=yes |
1054 | AC_MSG_RESULT([$with_ping_command]) | 1130 | AC_MSG_RESULT([$with_ping_command]) |
1055 | 1131 | ||
1132 | elif $PATH_TO_PING -4 -n -U -w 10 -c 1 127.0.0.1 2>/dev/null | \ | ||
1133 | grep -E -i "^round-trip|^rtt" >/dev/null | ||
1134 | then | ||
1135 | # check if -4 is supported - issue #1550 | ||
1136 | with_ping_command="$PATH_TO_PING -4 -n -U -w %d -c %d %s" | ||
1137 | ac_cv_ping_packets_first=yes | ||
1138 | ac_cv_ping_has_timeout=yes | ||
1139 | AC_MSG_RESULT([$with_ping_command]) | ||
1056 | elif $PATH_TO_PING -n -U -w 10 -c 1 127.0.0.1 2>/dev/null | \ | 1140 | elif $PATH_TO_PING -n -U -w 10 -c 1 127.0.0.1 2>/dev/null | \ |
1057 | egrep -i "^round-trip|^rtt" >/dev/null | 1141 | grep -E -i "^round-trip|^rtt" >/dev/null |
1058 | then | 1142 | then |
1059 | with_ping_command="$PATH_TO_PING -n -U -w %d -c %d %s" | 1143 | with_ping_command="$PATH_TO_PING -n -U -w %d -c %d %s" |
1060 | ac_cv_ping_packets_first=yes | 1144 | ac_cv_ping_packets_first=yes |
@@ -1062,52 +1146,52 @@ then | |||
1062 | AC_MSG_RESULT([$with_ping_command]) | 1146 | AC_MSG_RESULT([$with_ping_command]) |
1063 | 1147 | ||
1064 | elif $PATH_TO_PING -n -U -c 1 127.0.0.1 2>/dev/null | \ | 1148 | elif $PATH_TO_PING -n -U -c 1 127.0.0.1 2>/dev/null | \ |
1065 | egrep -i "^round-trip|^rtt" >/dev/null | 1149 | grep -E -i "^round-trip|^rtt" >/dev/null |
1066 | then | 1150 | then |
1067 | with_ping_command="$PATH_TO_PING -n -U -c %d %s" | 1151 | with_ping_command="$PATH_TO_PING -n -U -c %d %s" |
1068 | ac_cv_ping_packets_first=yes | 1152 | ac_cv_ping_packets_first=yes |
1069 | AC_MSG_RESULT([$with_ping_command]) | 1153 | AC_MSG_RESULT([$with_ping_command]) |
1070 | 1154 | ||
1071 | elif $PATH_TO_PING -n -c 1 127.0.0.1 2>/dev/null | \ | 1155 | elif $PATH_TO_PING -n -c 1 127.0.0.1 2>/dev/null | \ |
1072 | egrep -i "^round-trip|^rtt" >/dev/null | 1156 | grep -E -i "^round-trip|^rtt" >/dev/null |
1073 | then | 1157 | then |
1074 | with_ping_command="$PATH_TO_PING -n -c %d %s" | 1158 | with_ping_command="$PATH_TO_PING -n -c %d %s" |
1075 | ac_cv_ping_packets_first=yes | 1159 | ac_cv_ping_packets_first=yes |
1076 | AC_MSG_RESULT([$with_ping_command]) | 1160 | AC_MSG_RESULT([$with_ping_command]) |
1077 | 1161 | ||
1078 | elif $PATH_TO_PING -n 127.0.0.1 -c 1 2>/dev/null | \ | 1162 | elif $PATH_TO_PING -n 127.0.0.1 -c 1 2>/dev/null | \ |
1079 | egrep -i "^round-trip|^rtt" >/dev/null | 1163 | grep -E -i "^round-trip|^rtt" >/dev/null |
1080 | then | 1164 | then |
1081 | with_ping_command="$PATH_TO_PING -n %s -c %d" | 1165 | with_ping_command="$PATH_TO_PING -n %s -c %d" |
1082 | AC_MSG_RESULT([$with_ping_command]) | 1166 | AC_MSG_RESULT([$with_ping_command]) |
1083 | 1167 | ||
1084 | elif $PATH_TO_PING 127.0.0.1 -n 1 2>/dev/null | \ | 1168 | elif $PATH_TO_PING 127.0.0.1 -n 1 2>/dev/null | \ |
1085 | egrep -i "^round-trip|^rtt" >/dev/null | 1169 | grep -E -i "^round-trip|^rtt" >/dev/null |
1086 | then | 1170 | then |
1087 | with_ping_command="$PATH_TO_PING %s -n %d" | 1171 | with_ping_command="$PATH_TO_PING %s -n %d" |
1088 | AC_MSG_RESULT([$with_ping_command]) | 1172 | AC_MSG_RESULT([$with_ping_command]) |
1089 | 1173 | ||
1090 | elif $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \ | 1174 | elif $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \ |
1091 | egrep -i "^round-trip|^rtt" >/dev/null | 1175 | grep -E -i "^round-trip|^rtt" >/dev/null |
1092 | then | 1176 | then |
1093 | with_ping_command="$PATH_TO_PING -n -s %s 56 %d" | 1177 | with_ping_command="$PATH_TO_PING -n -s %s 56 %d" |
1094 | AC_MSG_RESULT([$with_ping_command]) | 1178 | AC_MSG_RESULT([$with_ping_command]) |
1095 | 1179 | ||
1096 | elif $PATH_TO_PING -n -h 127.0.0.1 -s 56 -c 1 2>/dev/null | \ | 1180 | elif $PATH_TO_PING -n -h 127.0.0.1 -s 56 -c 1 2>/dev/null | \ |
1097 | egrep -i "^round-trip|^rtt" >/dev/null | 1181 | grep -E -i "^round-trip|^rtt" >/dev/null |
1098 | then | 1182 | then |
1099 | with_ping_command="$PATH_TO_PING -n -h %s -s 56 -c %d" | 1183 | with_ping_command="$PATH_TO_PING -n -h %s -s 56 -c %d" |
1100 | AC_MSG_RESULT([$with_ping_command]) | 1184 | AC_MSG_RESULT([$with_ping_command]) |
1101 | 1185 | ||
1102 | elif $PATH_TO_PING -n -s 56 -c 1 127.0.0.1 2>/dev/null | \ | 1186 | elif $PATH_TO_PING -n -s 56 -c 1 127.0.0.1 2>/dev/null | \ |
1103 | egrep -i "^round-trip|^rtt" >/dev/null | 1187 | grep -E -i "^round-trip|^rtt" >/dev/null |
1104 | then | 1188 | then |
1105 | with_ping_command="$PATH_TO_PING -n -s 56 -c %d %s" | 1189 | with_ping_command="$PATH_TO_PING -n -s 56 -c %d %s" |
1106 | ac_cv_ping_packets_first=yes | 1190 | ac_cv_ping_packets_first=yes |
1107 | AC_MSG_RESULT([$with_ping_command]) | 1191 | AC_MSG_RESULT([$with_ping_command]) |
1108 | 1192 | ||
1109 | elif $PATH_TO_PING -n -c 1 127.0.0.1 2>/dev/null | \ | 1193 | elif $PATH_TO_PING -n -c 1 127.0.0.1 2>/dev/null | \ |
1110 | egrep -i "^round-trip|^rtt" >/dev/null | 1194 | grep -E -i "^round-trip|^rtt" >/dev/null |
1111 | then | 1195 | then |
1112 | with_ping_command="$PATH_TO_PING -n -c %d %s" | 1196 | with_ping_command="$PATH_TO_PING -n -c %d %s" |
1113 | ac_cv_ping_packets_first=yes | 1197 | ac_cv_ping_packets_first=yes |
@@ -1163,14 +1247,14 @@ elif [[ "z$ac_cv_uname_o" = "zCygwin" -a "x$PATH_TO_PING" != "x" ]]; then | |||
1163 | elif test "x$PATH_TO_PING6" != "x"; then | 1247 | elif test "x$PATH_TO_PING6" != "x"; then |
1164 | if [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \ | 1248 | if [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \ |
1165 | $PATH_TO_PING6 -n -s ::1 56 1 2>/dev/null | \ | 1249 | $PATH_TO_PING6 -n -s ::1 56 1 2>/dev/null | \ |
1166 | egrep -i "^round-trip|^rtt" >/dev/null | 1250 | grep -E -i "^round-trip|^rtt" >/dev/null |
1167 | then | 1251 | then |
1168 | with_ping6_command="$PATH_TO_PING6 -n -U -c %d %s" | 1252 | with_ping6_command="$PATH_TO_PING6 -n -U -c %d %s" |
1169 | ac_cv_ping6_packets_first=yes | 1253 | ac_cv_ping6_packets_first=yes |
1170 | AC_MSG_RESULT([$with_ping6_command]) | 1254 | AC_MSG_RESULT([$with_ping6_command]) |
1171 | 1255 | ||
1172 | elif $PATH_TO_PING6 -n -U -w 10 -c 1 ::1 2>/dev/null | \ | 1256 | elif $PATH_TO_PING6 -n -U -w 10 -c 1 ::1 2>/dev/null | \ |
1173 | egrep -i "^round-trip|^rtt" >/dev/null | 1257 | grep -E -i "^round-trip|^rtt" >/dev/null |
1174 | then | 1258 | then |
1175 | with_ping6_command="$PATH_TO_PING6 -n -U -w %d -c %d %s" | 1259 | with_ping6_command="$PATH_TO_PING6 -n -U -w %d -c %d %s" |
1176 | ac_cv_ping6_packets_first=yes | 1260 | ac_cv_ping6_packets_first=yes |
@@ -1178,52 +1262,52 @@ elif test "x$PATH_TO_PING6" != "x"; then | |||
1178 | AC_MSG_RESULT([$with_ping6_command]) | 1262 | AC_MSG_RESULT([$with_ping6_command]) |
1179 | 1263 | ||
1180 | elif $PATH_TO_PING6 -n -U -c 1 ::1 2>/dev/null | \ | 1264 | elif $PATH_TO_PING6 -n -U -c 1 ::1 2>/dev/null | \ |
1181 | egrep -i "^round-trip|^rtt" >/dev/null | 1265 | grep -E -i "^round-trip|^rtt" >/dev/null |
1182 | then | 1266 | then |
1183 | with_ping6_command="$PATH_TO_PING6 -n -U -c %d %s" | 1267 | with_ping6_command="$PATH_TO_PING6 -n -U -c %d %s" |
1184 | ac_cv_ping6_packets_first=yes | 1268 | ac_cv_ping6_packets_first=yes |
1185 | AC_MSG_RESULT([$with_ping6_command]) | 1269 | AC_MSG_RESULT([$with_ping6_command]) |
1186 | 1270 | ||
1187 | elif $PATH_TO_PING6 -n -c 1 ::1 2>/dev/null | \ | 1271 | elif $PATH_TO_PING6 -n -c 1 ::1 2>/dev/null | \ |
1188 | egrep -i "^round-trip|^rtt" >/dev/null | 1272 | grep -E -i "^round-trip|^rtt" >/dev/null |
1189 | then | 1273 | then |
1190 | with_ping6_command="$PATH_TO_PING6 -n -c %d %s" | 1274 | with_ping6_command="$PATH_TO_PING6 -n -c %d %s" |
1191 | ac_cv_ping6_packets_first=yes | 1275 | ac_cv_ping6_packets_first=yes |
1192 | AC_MSG_RESULT([$with_ping6_command]) | 1276 | AC_MSG_RESULT([$with_ping6_command]) |
1193 | 1277 | ||
1194 | elif $PATH_TO_PING6 -n ::1 -c 1 2>/dev/null | \ | 1278 | elif $PATH_TO_PING6 -n ::1 -c 1 2>/dev/null | \ |
1195 | egrep -i "^round-trip|^rtt" >/dev/null | 1279 | grep -E -i "^round-trip|^rtt" >/dev/null |
1196 | then | 1280 | then |
1197 | with_ping6_command="$PATH_TO_PING6 -n %s -c %d" | 1281 | with_ping6_command="$PATH_TO_PING6 -n %s -c %d" |
1198 | AC_MSG_RESULT([$with_ping6_command]) | 1282 | AC_MSG_RESULT([$with_ping6_command]) |
1199 | 1283 | ||
1200 | elif $PATH_TO_PING6 ::1 -n 1 2>/dev/null | \ | 1284 | elif $PATH_TO_PING6 ::1 -n 1 2>/dev/null | \ |
1201 | egrep -i "^round-trip|^rtt" >/dev/null | 1285 | grep -E -i "^round-trip|^rtt" >/dev/null |
1202 | then | 1286 | then |
1203 | with_ping6_command="$PATH_TO_PING6 %s -n %d" | 1287 | with_ping6_command="$PATH_TO_PING6 %s -n %d" |
1204 | AC_MSG_RESULT([$with_ping6_command]) | 1288 | AC_MSG_RESULT([$with_ping6_command]) |
1205 | 1289 | ||
1206 | elif $PATH_TO_PING6 -n -s ::1 56 1 2>/dev/null | \ | 1290 | elif $PATH_TO_PING6 -n -s ::1 56 1 2>/dev/null | \ |
1207 | egrep -i "^round-trip|^rtt" >/dev/null | 1291 | grep -E -i "^round-trip|^rtt" >/dev/null |
1208 | then | 1292 | then |
1209 | with_ping6_command="$PATH_TO_PING6 -n -s %s 56 %d" | 1293 | with_ping6_command="$PATH_TO_PING6 -n -s %s 56 %d" |
1210 | AC_MSG_RESULT([$with_ping6_command]) | 1294 | AC_MSG_RESULT([$with_ping6_command]) |
1211 | 1295 | ||
1212 | elif $PATH_TO_PING6 -n -h ::1 -s 56 -c 1 2>/dev/null | \ | 1296 | elif $PATH_TO_PING6 -n -h ::1 -s 56 -c 1 2>/dev/null | \ |
1213 | egrep -i "^round-trip|^rtt" >/dev/null | 1297 | grep -E -i "^round-trip|^rtt" >/dev/null |
1214 | then | 1298 | then |
1215 | with_ping6_command="$PATH_TO_PING6 -n -h %s -s 56 -c %d" | 1299 | with_ping6_command="$PATH_TO_PING6 -n -h %s -s 56 -c %d" |
1216 | AC_MSG_RESULT([$with_ping6_command]) | 1300 | AC_MSG_RESULT([$with_ping6_command]) |
1217 | 1301 | ||
1218 | elif $PATH_TO_PING6 -n -s 56 -c 1 ::1 2>/dev/null | \ | 1302 | elif $PATH_TO_PING6 -n -s 56 -c 1 ::1 2>/dev/null | \ |
1219 | egrep -i "^round-trip|^rtt" >/dev/null | 1303 | grep -E -i "^round-trip|^rtt" >/dev/null |
1220 | then | 1304 | then |
1221 | with_ping6_command="$PATH_TO_PING6 -n -s 56 -c %d %s" | 1305 | with_ping6_command="$PATH_TO_PING6 -n -s 56 -c %d %s" |
1222 | ac_cv_ping6_packets_first=yes | 1306 | ac_cv_ping6_packets_first=yes |
1223 | AC_MSG_RESULT([$with_ping_command]) | 1307 | AC_MSG_RESULT([$with_ping_command]) |
1224 | 1308 | ||
1225 | elif $PATH_TO_PING6 -n -c 1 ::1 2>/dev/null | \ | 1309 | elif $PATH_TO_PING6 -n -c 1 ::1 2>/dev/null | \ |
1226 | egrep -i "^round-trip|^rtt" >/dev/null | 1310 | grep -E -i "^round-trip|^rtt" >/dev/null |
1227 | then | 1311 | then |
1228 | with_ping6_command="$PATH_TO_PING6 -n -c %d %s" | 1312 | with_ping6_command="$PATH_TO_PING6 -n -c %d %s" |
1229 | ac_cv_ping6_packets_first=yes | 1313 | ac_cv_ping6_packets_first=yes |
@@ -1234,59 +1318,59 @@ elif test "x$PATH_TO_PING6" != "x"; then | |||
1234 | elif test "x$PATH_TO_PING" != "x"; then | 1318 | elif test "x$PATH_TO_PING" != "x"; then |
1235 | if [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \ | 1319 | if [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \ |
1236 | $PATH_TO_PING -A inet6 -n -s ::1 56 1 2>/dev/null | \ | 1320 | $PATH_TO_PING -A inet6 -n -s ::1 56 1 2>/dev/null | \ |
1237 | egrep -i "^round-trip|^rtt" >/dev/null | 1321 | grep -E -i "^round-trip|^rtt" >/dev/null |
1238 | then | 1322 | then |
1239 | with_ping6_command="$PATH_TO_PING -A inet6 -n -U -c %d %s" | 1323 | with_ping6_command="$PATH_TO_PING -A inet6 -n -U -c %d %s" |
1240 | ac_cv_ping6_packets_first=yes | 1324 | ac_cv_ping6_packets_first=yes |
1241 | AC_MSG_RESULT([$with_ping6_command]) | 1325 | AC_MSG_RESULT([$with_ping6_command]) |
1242 | 1326 | ||
1243 | elif $PATH_TO_PING -A inet6 -n -U -c 1 ::1 2>/dev/null | \ | 1327 | elif $PATH_TO_PING -A inet6 -n -U -c 1 ::1 2>/dev/null | \ |
1244 | egrep -i "^round-trip|^rtt" >/dev/null | 1328 | grep -E -i "^round-trip|^rtt" >/dev/null |
1245 | then | 1329 | then |
1246 | with_ping6_command="$PATH_TO_PING -A inet6 -n -U -c %d %s" | 1330 | with_ping6_command="$PATH_TO_PING -A inet6 -n -U -c %d %s" |
1247 | ac_cv_ping6_packets_first=yes | 1331 | ac_cv_ping6_packets_first=yes |
1248 | AC_MSG_RESULT([$with_ping6_command]) | 1332 | AC_MSG_RESULT([$with_ping6_command]) |
1249 | 1333 | ||
1250 | elif $PATH_TO_PING -A inet6 -n -c 1 ::1 2>/dev/null | \ | 1334 | elif $PATH_TO_PING -A inet6 -n -c 1 ::1 2>/dev/null | \ |
1251 | egrep -i "^round-trip|^rtt" >/dev/null | 1335 | grep -E -i "^round-trip|^rtt" >/dev/null |
1252 | then | 1336 | then |
1253 | with_ping6_command="$PATH_TO_PING -A inet6 -n -c %d %s" | 1337 | with_ping6_command="$PATH_TO_PING -A inet6 -n -c %d %s" |
1254 | ac_cv_ping6_packets_first=yes | 1338 | ac_cv_ping6_packets_first=yes |
1255 | AC_MSG_RESULT([$with_ping6_command]) | 1339 | AC_MSG_RESULT([$with_ping6_command]) |
1256 | 1340 | ||
1257 | elif $PATH_TO_PING -A inet6 -n ::1 -c 1 2>/dev/null | \ | 1341 | elif $PATH_TO_PING -A inet6 -n ::1 -c 1 2>/dev/null | \ |
1258 | egrep -i "^round-trip|^rtt" >/dev/null | 1342 | grep -E -i "^round-trip|^rtt" >/dev/null |
1259 | then | 1343 | then |
1260 | with_ping6_command="$PATH_TO_PING -A inet6 -n %s -c %d" | 1344 | with_ping6_command="$PATH_TO_PING -A inet6 -n %s -c %d" |
1261 | AC_MSG_RESULT([$with_ping6_command]) | 1345 | AC_MSG_RESULT([$with_ping6_command]) |
1262 | 1346 | ||
1263 | elif $PATH_TO_PING -A inet6 ::1 -n 1 2>/dev/null | \ | 1347 | elif $PATH_TO_PING -A inet6 ::1 -n 1 2>/dev/null | \ |
1264 | egrep -i "^round-trip|^rtt" >/dev/null | 1348 | grep -E -i "^round-trip|^rtt" >/dev/null |
1265 | then | 1349 | then |
1266 | with_ping6_command="$PATH_TO_PING -A inet6 %s -n %d" | 1350 | with_ping6_command="$PATH_TO_PING -A inet6 %s -n %d" |
1267 | AC_MSG_RESULT([$with_ping6_command]) | 1351 | AC_MSG_RESULT([$with_ping6_command]) |
1268 | 1352 | ||
1269 | elif $PATH_TO_PING -A inet6 -n -s ::1 56 1 2>/dev/null | \ | 1353 | elif $PATH_TO_PING -A inet6 -n -s ::1 56 1 2>/dev/null | \ |
1270 | egrep -i "^round-trip|^rtt" >/dev/null | 1354 | grep -E -i "^round-trip|^rtt" >/dev/null |
1271 | then | 1355 | then |
1272 | with_ping6_command="$PATH_TO_PING -A inet6 -n -s %s 56 %d" | 1356 | with_ping6_command="$PATH_TO_PING -A inet6 -n -s %s 56 %d" |
1273 | AC_MSG_RESULT([$with_ping6_command]) | 1357 | AC_MSG_RESULT([$with_ping6_command]) |
1274 | 1358 | ||
1275 | elif $PATH_TO_PING -A inet6 -n -h ::1 -s 56 -c 1 2>/dev/null | \ | 1359 | elif $PATH_TO_PING -A inet6 -n -h ::1 -s 56 -c 1 2>/dev/null | \ |
1276 | egrep -i "^round-trip|^rtt" >/dev/null | 1360 | grep -E -i "^round-trip|^rtt" >/dev/null |
1277 | then | 1361 | then |
1278 | with_ping6_command="$PATH_TO_PING -A inet6 -n -h %s -s 56 -c %d" | 1362 | with_ping6_command="$PATH_TO_PING -A inet6 -n -h %s -s 56 -c %d" |
1279 | AC_MSG_RESULT([$with_ping6_command]) | 1363 | AC_MSG_RESULT([$with_ping6_command]) |
1280 | 1364 | ||
1281 | elif $PATH_TO_PING -A inet6 -n -s 56 -c 1 ::1 2>/dev/null | \ | 1365 | elif $PATH_TO_PING -A inet6 -n -s 56 -c 1 ::1 2>/dev/null | \ |
1282 | egrep -i "^round-trip|^rtt" >/dev/null | 1366 | grep -E -i "^round-trip|^rtt" >/dev/null |
1283 | then | 1367 | then |
1284 | with_ping6_command="$PATH_TO_PING -A inet6 -n -s 56 -c %d %s" | 1368 | with_ping6_command="$PATH_TO_PING -A inet6 -n -s 56 -c %d %s" |
1285 | ac_cv_ping6_packets_first=yes | 1369 | ac_cv_ping6_packets_first=yes |
1286 | AC_MSG_RESULT([$with_ping_command]) | 1370 | AC_MSG_RESULT([$with_ping_command]) |
1287 | 1371 | ||
1288 | elif $PATH_TO_PING -A inet6 -n -c 1 ::1 2>/dev/null | \ | 1372 | elif $PATH_TO_PING -A inet6 -n -c 1 ::1 2>/dev/null | \ |
1289 | egrep -i "^round-trip|^rtt" >/dev/null | 1373 | grep -E -i "^round-trip|^rtt" >/dev/null |
1290 | then | 1374 | then |
1291 | with_ping6_command="$PATH_TO_PING -A inet6 -n -c %d %s" | 1375 | with_ping6_command="$PATH_TO_PING -A inet6 -n -c %d %s" |
1292 | ac_cv_ping6_packets_first=yes | 1376 | ac_cv_ping6_packets_first=yes |
@@ -1486,7 +1570,7 @@ if test -n "$PATH_TO_SUDO" | |||
1486 | then | 1570 | then |
1487 | AC_DEFINE_UNQUOTED(PATH_TO_SUDO,"$PATH_TO_SUDO",[path to sudo]) | 1571 | AC_DEFINE_UNQUOTED(PATH_TO_SUDO,"$PATH_TO_SUDO",[path to sudo]) |
1488 | else | 1572 | else |
1489 | AC_MSG_WARN([Could not find sudo or eqivalent]) | 1573 | AC_MSG_WARN([Could not find sudo or equivalent]) |
1490 | fi | 1574 | fi |
1491 | 1575 | ||
1492 | AC_PATH_PROG(PATH_TO_MAILQ,mailq) | 1576 | AC_PATH_PROG(PATH_TO_MAILQ,mailq) |
@@ -1497,7 +1581,7 @@ if test -n "$PATH_TO_MAILQ" | |||
1497 | then | 1581 | then |
1498 | AC_DEFINE_UNQUOTED(PATH_TO_MAILQ,"$PATH_TO_MAILQ",[path to mailq]) | 1582 | AC_DEFINE_UNQUOTED(PATH_TO_MAILQ,"$PATH_TO_MAILQ",[path to mailq]) |
1499 | else | 1583 | else |
1500 | AC_MSG_WARN([Could not find mailq or eqivalent]) | 1584 | AC_MSG_WARN([Could not find mailq or equivalent]) |
1501 | fi | 1585 | fi |
1502 | 1586 | ||
1503 | AC_PATH_PROG(PATH_TO_QMAIL_QSTAT,qmail-qstat) | 1587 | AC_PATH_PROG(PATH_TO_QMAIL_QSTAT,qmail-qstat) |
@@ -1508,7 +1592,7 @@ if test -n "$PATH_TO_QMAIL_QSTAT" | |||
1508 | then | 1592 | then |
1509 | AC_DEFINE_UNQUOTED(PATH_TO_QMAIL_QSTAT,"$PATH_TO_QMAIL_QSTAT",[path to qmail-qstat]) | 1593 | AC_DEFINE_UNQUOTED(PATH_TO_QMAIL_QSTAT,"$PATH_TO_QMAIL_QSTAT",[path to qmail-qstat]) |
1510 | else | 1594 | else |
1511 | AC_MSG_WARN([Could not find qmail-qstat or eqivalent]) | 1595 | AC_MSG_WARN([Could not find qmail-qstat or equivalent]) |
1512 | fi | 1596 | fi |
1513 | 1597 | ||
1514 | dnl SWAP info required is amount allocated/available and amount free | 1598 | dnl SWAP info required is amount allocated/available and amount free |
@@ -1523,16 +1607,16 @@ then | |||
1523 | ac_cv_have_swap=yes | 1607 | ac_cv_have_swap=yes |
1524 | ac_cv_swap_command="$PATH_TO_SWAP -l" | 1608 | ac_cv_swap_command="$PATH_TO_SWAP -l" |
1525 | if [$PATH_TO_SWAP -l 2>/dev/null | \ | 1609 | if [$PATH_TO_SWAP -l 2>/dev/null | \ |
1526 | egrep -i "^lswap +path +pri +swaplo +blocks +free +maxswap" \ | 1610 | grep -E -i "^lswap +path +pri +swaplo +blocks +free +maxswap" \ |
1527 | >/dev/null] | 1611 | >/dev/null] |
1528 | then | 1612 | then |
1529 | ac_cv_swap_format=[" %*d %*s %*d,%*d %*d %*d %f %f"] | 1613 | ac_cv_swap_format=[" %*d %*s %*d,%*d %*d %*d %lu %lu"] |
1530 | ac_cv_swap_conv=2048 | 1614 | ac_cv_swap_conv=2048 |
1531 | AC_MSG_RESULT([using IRIX format swap]) | 1615 | AC_MSG_RESULT([using IRIX format swap]) |
1532 | 1616 | ||
1533 | elif [$PATH_TO_SWAP -l 2>/dev/null | egrep -i "^path +dev +swaplo +blocks +free" >/dev/null] | 1617 | elif [$PATH_TO_SWAP -l 2>/dev/null | grep -E -i "^path +dev +swaplo +blocks +free" >/dev/null] |
1534 | then | 1618 | then |
1535 | ac_cv_swap_format=["%*s %*[0-9,-] %*d %f %f"] | 1619 | ac_cv_swap_format=["%*s %*[0-9,-] %*d %lu %lu"] |
1536 | ac_cv_swap_conv=2048 | 1620 | ac_cv_swap_conv=2048 |
1537 | AC_MSG_RESULT([using Unixware format swap]) | 1621 | AC_MSG_RESULT([using Unixware format swap]) |
1538 | else | 1622 | else |
@@ -1549,23 +1633,23 @@ AC_PATH_PROG(PATH_TO_SWAPINFO,swapinfo) | |||
1549 | if (test -n "$PATH_TO_SWAPINFO") | 1633 | if (test -n "$PATH_TO_SWAPINFO") |
1550 | then | 1634 | then |
1551 | AC_MSG_CHECKING([for $PATH_TO_SWAPINFO format]) | 1635 | AC_MSG_CHECKING([for $PATH_TO_SWAPINFO format]) |
1552 | if [$PATH_TO_SWAPINFO -k 2>&1 | egrep -i "^Device" >/dev/null] | 1636 | if [$PATH_TO_SWAPINFO -k 2>&1 | grep -E -i "^Device" >/dev/null] |
1553 | then | 1637 | then |
1554 | ac_cv_have_swap=yes | 1638 | ac_cv_have_swap=yes |
1555 | ac_cv_swap_command="$PATH_TO_SWAPINFO -k" | 1639 | ac_cv_swap_command="$PATH_TO_SWAPINFO -k" |
1556 | 1640 | ||
1557 | if [$PATH_TO_SWAPINFO -k 2>/dev/null | egrep -i "^Device +1K-blocks +Used +Avail" >/dev/null] | 1641 | if [$PATH_TO_SWAPINFO -k 2>/dev/null | grep -E -i "^Device +1K-blocks +Used +Avail" >/dev/null] |
1558 | then | 1642 | then |
1559 | ac_cv_swap_format=["%*s %f %*d %f"] | 1643 | ac_cv_swap_format=["%*s %lu %*d %lu"] |
1560 | ac_cv_swap_conv=1024 | 1644 | ac_cv_swap_conv=1024 |
1561 | AC_MSG_RESULT([using FreeBSD format swapinfo]) | 1645 | AC_MSG_RESULT([using FreeBSD format swapinfo]) |
1562 | fi | 1646 | fi |
1563 | 1647 | ||
1564 | elif [$PATH_TO_SWAPINFO -dfM 2>/dev/null | egrep -i "^TYPE +AVAIL +USED +FREE" >/dev/null] | 1648 | elif [$PATH_TO_SWAPINFO -dfM 2>/dev/null | grep -E -i "^TYPE +AVAIL +USED +FREE" >/dev/null] |
1565 | then | 1649 | then |
1566 | ac_cv_have_swap=yes | 1650 | ac_cv_have_swap=yes |
1567 | ac_cv_swap_command="$PATH_TO_SWAPINFO -dfM" | 1651 | ac_cv_swap_command="$PATH_TO_SWAPINFO -dfM" |
1568 | ac_cv_swap_format=["%*s %f %*d %f"] | 1652 | ac_cv_swap_format=["%*s %lu %*d %lu"] |
1569 | ac_cv_swap_conv=1024 | 1653 | ac_cv_swap_conv=1024 |
1570 | AC_MSG_RESULT([using HP-UX format swapinfo]) | 1654 | AC_MSG_RESULT([using HP-UX format swapinfo]) |
1571 | fi | 1655 | fi |
@@ -1576,11 +1660,11 @@ AC_PATH_PROG(PATH_TO_LSPS,lsps) | |||
1576 | if (test -n "$PATH_TO_LSPS") | 1660 | if (test -n "$PATH_TO_LSPS") |
1577 | then | 1661 | then |
1578 | AC_MSG_CHECKING([for $PATH_TO_LSPS format]) | 1662 | AC_MSG_CHECKING([for $PATH_TO_LSPS format]) |
1579 | if [$PATH_TO_LSPS -a 2>/dev/null | egrep -i "^Page Space" > /dev/null] | 1663 | if [$PATH_TO_LSPS -a 2>/dev/null | grep -E -i "^Page Space" > /dev/null] |
1580 | then | 1664 | then |
1581 | ac_cv_have_swap=yes | 1665 | ac_cv_have_swap=yes |
1582 | ac_cv_swap_command="$PATH_TO_LSPS -a" | 1666 | ac_cv_swap_command="$PATH_TO_LSPS -a" |
1583 | ac_cv_swap_format=["%*s %*s %*s %f%*s %f %*s"] | 1667 | ac_cv_swap_format=["%*s %*s %*s %lu%*s %lu %*s"] |
1584 | ac_cv_swap_conv=1 | 1668 | ac_cv_swap_conv=1 |
1585 | AC_MSG_RESULT([using AIX lsps]) | 1669 | AC_MSG_RESULT([using AIX lsps]) |
1586 | fi | 1670 | fi |
@@ -1766,7 +1850,7 @@ AM_GNU_GETTEXT([external], [need-ngettext]) | |||
1766 | AM_GNU_GETTEXT_VERSION(0.15) | 1850 | AM_GNU_GETTEXT_VERSION(0.15) |
1767 | 1851 | ||
1768 | dnl Check for Redhat spopen problem | 1852 | dnl Check for Redhat spopen problem |
1769 | dnl Wierd problem where ECHILD is returned from a wait call in error | 1853 | dnl Weird problem where ECHILD is returned from a wait call in error |
1770 | dnl Only appears to affect nslookup and dig calls. Only affects redhat around | 1854 | dnl Only appears to affect nslookup and dig calls. Only affects redhat around |
1771 | dnl 2.6.9-11 (okay in 2.6.9-5). Redhat investigating root cause | 1855 | dnl 2.6.9-11 (okay in 2.6.9-5). Redhat investigating root cause |
1772 | dnl We patch plugins/popen.c | 1856 | dnl We patch plugins/popen.c |
@@ -1778,7 +1862,7 @@ AC_ARG_ENABLE(redhat-pthread-workaround, | |||
1778 | [ac_cv_enable_redhat_pthread_workaround=$enableval], | 1862 | [ac_cv_enable_redhat_pthread_workaround=$enableval], |
1779 | [ac_cv_enable_redhat_pthread_workaround=test]) | 1863 | [ac_cv_enable_redhat_pthread_workaround=test]) |
1780 | if test "$ac_cv_enable_redhat_pthread_workaround" = "test" ; then | 1864 | if test "$ac_cv_enable_redhat_pthread_workaround" = "test" ; then |
1781 | if echo $ac_cv_uname_r | egrep "\.EL(smp)?$" >/dev/null 2>&1 ; then | 1865 | if echo $ac_cv_uname_r | grep -E "\.EL(smp)?$" >/dev/null 2>&1 ; then |
1782 | AC_MSG_NOTICE([See https://www.monitoring-plugins.org/doc/faq/configure-hangs.html if this next part takes a long time]) | 1866 | AC_MSG_NOTICE([See https://www.monitoring-plugins.org/doc/faq/configure-hangs.html if this next part takes a long time]) |
1783 | AC_MSG_CHECKING(for redhat spopen problem) | 1867 | AC_MSG_CHECKING(for redhat spopen problem) |
1784 | ( cd config_test && make && make test ) > /dev/null 2>&1 | 1868 | ( cd config_test && make && make test ) > /dev/null 2>&1 |
@@ -1875,4 +1959,5 @@ ACX_FEATURE([enable],[perl-modules]) | |||
1875 | ACX_FEATURE([with],[cgiurl]) | 1959 | ACX_FEATURE([with],[cgiurl]) |
1876 | ACX_FEATURE([with],[trusted-path]) | 1960 | ACX_FEATURE([with],[trusted-path]) |
1877 | ACX_FEATURE([enable],[libtap]) | 1961 | ACX_FEATURE([enable],[libtap]) |
1878 | 1962 | ACX_FEATURE([with],[libcurl]) | |
1963 | ACX_FEATURE([with],[uriparser]) | ||