diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 305 |
1 files changed, 175 insertions, 130 deletions
diff --git a/configure.in b/configure.in index 5596e2d..fcd5c56 100644 --- a/configure.in +++ b/configure.in | |||
@@ -446,7 +446,7 @@ AC_HEADER_STDC | |||
446 | AC_HEADER_TIME | 446 | AC_HEADER_TIME |
447 | AC_HEADER_SYS_WAIT | 447 | AC_HEADER_SYS_WAIT |
448 | AC_CHECK_HEADERS(signal.h strings.h string.h syslog.h unistd.h uio.h errno.h regex.h sys/types.h sys/time.h sys/socket.h sys/loadavg.h) | 448 | AC_CHECK_HEADERS(signal.h strings.h string.h syslog.h unistd.h uio.h errno.h regex.h sys/types.h sys/time.h sys/socket.h sys/loadavg.h) |
449 | AC_CHECK_HEADERS(stdarg.h sys/unistd.h unistd.h ctype.h sys/wait.h stdlib.h) | 449 | AC_CHECK_HEADERS(stdarg.h sys/unistd.h unistd.h ctype.h stdlib.h) |
450 | 450 | ||
451 | dnl Checks for typedefs, structures, and compiler characteristics. | 451 | dnl Checks for typedefs, structures, and compiler characteristics. |
452 | AC_C_CONST | 452 | AC_C_CONST |
@@ -531,15 +531,18 @@ AC_TRY_COMPILE([#include <sys/time.h>], | |||
531 | dnl Checks for library functions. | 531 | dnl Checks for library functions. |
532 | AC_CHECK_FUNCS(memmove select socket strdup strstr strtod strtol strtoul) | 532 | AC_CHECK_FUNCS(memmove select socket strdup strstr strtod strtol strtoul) |
533 | 533 | ||
534 | AC_MSG_CHECKING(for type of socket size) | 534 | AC_MSG_CHECKING(return type of socket size) |
535 | AC_TRY_COMPILE([#include <stdlib.h> | 535 | AC_TRY_COMPILE([#include <stdlib.h> |
536 | #include <sys/types.h> | 536 | #include <sys/types.h> |
537 | #include <sys/socket.h>], | 537 | #include <sys/socket.h>], |
538 | [int a = send(1, (const void *) buffer, (size_t *) 0, (int *) 0);], | 538 | [int a = send(1, (const void *) buffer, (size_t *) 0, (int *) 0);], |
539 | [AC_DEFINE(SOCKET_SIZE_TYPE, size_t, [Define type of socket size]) | 539 | ac_cv_socket_size_type=["size_t"] |
540 | AC_MSG_RESULT(size_t)], | 540 | AC_MSG_RESULT(size_t), |
541 | [AC_DEFINE(SOCKET_SIZE_TYPE, int, [Define type of socket size]) | 541 | ac_cv_socket_size_type=["int"] |
542 | AC_MSG_RESULT(int)]) | 542 | AC_MSG_RESULT(int)) |
543 | |||
544 | AC_DEFINE_UNQUOTED(SOCKET_SIZE_TYPE, $ac_cv_socket_size_type , | ||
545 | [Define type of socket size]) | ||
543 | 546 | ||
544 | if test -f "/proc/loadavg" | 547 | if test -f "/proc/loadavg" |
545 | then | 548 | then |
@@ -552,6 +555,7 @@ dnl #### Process table test | |||
552 | AC_PATH_PROG(PATH_TO_PS,ps) | 555 | AC_PATH_PROG(PATH_TO_PS,ps) |
553 | ac_cv_use_ps_vars=no | 556 | ac_cv_use_ps_vars=no |
554 | 557 | ||
558 | AC_MSG_CHECKING(for ps syntax) | ||
555 | dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND | 559 | dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND |
556 | if ps -weo 'stat comm vsz rss user uid ppid args' 2>/dev/null | \ | 560 | if ps -weo 'stat comm vsz rss user uid ppid args' 2>/dev/null | \ |
557 | egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ \ | 561 | egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ \ |
@@ -567,7 +571,7 @@ then | |||
567 | ac_cv_rss_command="$PATH_TO_PS -weo 'rss comm'" | 571 | ac_cv_rss_command="$PATH_TO_PS -weo 'rss comm'" |
568 | ac_cv_rss_format="%d %s" | 572 | ac_cv_rss_format="%d %s" |
569 | EXTRAS="$EXTRAS check_nagios" | 573 | EXTRAS="$EXTRAS check_nagios" |
570 | echo " ps syntax... $PATH_TO_PS -weo 'stat comm vsz rss user ppid args'" | 574 | AC_MSG_RESULT([$ac_cv_ps_command]) |
571 | 575 | ||
572 | dnl FreeBSD | 576 | dnl FreeBSD |
573 | elif ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | \ | 577 | elif ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | \ |
@@ -583,7 +587,7 @@ then | |||
583 | ac_cv_rss_command="$PATH_TO_PS waxco 'rss command'" | 587 | ac_cv_rss_command="$PATH_TO_PS waxco 'rss command'" |
584 | ac_cv_rss_format="%d %s" | 588 | ac_cv_rss_format="%d %s" |
585 | EXTRAS="$EXTRAS check_nagios" | 589 | EXTRAS="$EXTRAS check_nagios" |
586 | echo " ps syntax... $PATH_TO_PS -Ao 'state command vsz rss'" | 590 | AC_MSG_RESULT([$ac_cv_ps_command]) |
587 | 591 | ||
588 | dnl BSD-like mode in RH 6.1 | 592 | dnl BSD-like mode in RH 6.1 |
589 | elif ps waxno 'state comm vsz rss uid user ppid args' 2>/dev/null | \ | 593 | elif ps waxno 'state comm vsz rss uid user ppid args' 2>/dev/null | \ |
@@ -600,7 +604,7 @@ then | |||
600 | ac_cv_rss_command="$PATH_TO_PS waxno 'rss comm'" | 604 | ac_cv_rss_command="$PATH_TO_PS waxno 'rss comm'" |
601 | ac_cv_rss_format="%d %s" | 605 | ac_cv_rss_format="%d %s" |
602 | EXTRAS="$EXTRAS check_nagios" | 606 | EXTRAS="$EXTRAS check_nagios" |
603 | echo " ps syntax... $PATH_TO_PS -waxco 'state comm vsz rss'" | 607 | AC_MSG_RESULT([$ac_cv_ps_command]) |
604 | 608 | ||
605 | dnl SunOS 4.1.3: | 609 | dnl SunOS 4.1.3: |
606 | dnl F UID PID PPID CP PRI NI SZ RSS WCHAN STAT TT TIME COMMAND | 610 | dnl F UID PID PPID CP PRI NI SZ RSS WCHAN STAT TT TIME COMMAND |
@@ -618,7 +622,7 @@ then | |||
618 | ac_cv_rss_command="$PATH_TO_PS laxnwww" | 622 | ac_cv_rss_command="$PATH_TO_PS laxnwww" |
619 | ac_cv_rss_format="%*s %*s %*s %*s %*s %*s %*s %*s %d" | 623 | ac_cv_rss_format="%*s %*s %*s %*s %*s %*s %*s %*s %d" |
620 | EXTRAS="$EXTRAS check_nagios" | 624 | EXTRAS="$EXTRAS check_nagios" |
621 | echo " ps syntax... $PATH_TO_PS laxnwww" | 625 | AC_MSG_RESULT([$ac_cv_ps_command]) |
622 | 626 | ||
623 | dnl Debian Linux / procps v1.2.9: | 627 | dnl Debian Linux / procps v1.2.9: |
624 | dnl FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMAND | 628 | dnl FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMAND |
@@ -637,7 +641,7 @@ then | |||
637 | ac_cv_rss_command="$PATH_TO_PS laxnwww" | 641 | ac_cv_rss_command="$PATH_TO_PS laxnwww" |
638 | ac_cv_rss_format="%*s %*s %*s %*s %*s %*s %*s %d" | 642 | ac_cv_rss_format="%*s %*s %*s %*s %*s %*s %*s %d" |
639 | EXTRAS="$EXTRAS check_nagios" | 643 | EXTRAS="$EXTRAS check_nagios" |
640 | echo " ps syntax... $PATH_TO_PS laxnwww" | 644 | AC_MSG_RESULT([$ac_cv_ps_command]) |
641 | 645 | ||
642 | dnl OpenBSD (needs to come early because -exo appears to work, but does not give all procs) | 646 | dnl OpenBSD (needs to come early because -exo appears to work, but does not give all procs) |
643 | elif ps -axo 'stat comm vsz rss user uid ppid args' 2>/dev/null | \ | 647 | elif ps -axo 'stat comm vsz rss user uid ppid args' 2>/dev/null | \ |
@@ -654,7 +658,7 @@ then | |||
654 | ac_cv_rss_command="$PATH_TO_PS -axo 'rss comm'" | 658 | ac_cv_rss_command="$PATH_TO_PS -axo 'rss comm'" |
655 | ac_cv_rss_format="%d %s" | 659 | ac_cv_rss_format="%d %s" |
656 | EXTRAS="$EXTRAS check_nagios" | 660 | EXTRAS="$EXTRAS check_nagios" |
657 | echo " ps syntax... $PATH_TO_PS -axo 'stat comm vsz rss user ppid args'" | 661 | AC_MSG_RESULT([$ac_cv_ps_command]) |
658 | 662 | ||
659 | dnl AIX 4.3.3 - needs verification. This works for Tru64 - needs %*[ +] in PS_FORMAT | 663 | dnl AIX 4.3.3 - needs verification. This works for Tru64 - needs %*[ +] in PS_FORMAT |
660 | elif ps -ao 'stat comm vsz rss user uid ppid args' 2>/dev/null | \ | 664 | elif ps -ao 'stat comm vsz rss user uid ppid args' 2>/dev/null | \ |
@@ -671,7 +675,7 @@ then | |||
671 | ac_cv_rss_command="$PATH_TO_PS -ao 'rss comm'" | 675 | ac_cv_rss_command="$PATH_TO_PS -ao 'rss comm'" |
672 | ac_cv_rss_format="%d %s" | 676 | ac_cv_rss_format="%d %s" |
673 | EXTRAS="$EXTRAS check_nagios" | 677 | EXTRAS="$EXTRAS check_nagios" |
674 | echo " ps syntax... $PATH_TO_PS -ao 'stat comm vsz rss user ppid args'" | 678 | AC_MSG_RESULT([$ac_cv_ps_command]) |
675 | 679 | ||
676 | elif ps -eo 's comm vsz rss user uid ppid args' 2>/dev/null | \ | 680 | elif ps -eo 's comm vsz rss user uid ppid args' 2>/dev/null | \ |
677 | egrep -i ["^S[TAUES]* +C[OMDNA]+ +[VSIZE]+ +U[SER]+ +U[ID]+ \ | 681 | egrep -i ["^S[TAUES]* +C[OMDNA]+ +[VSIZE]+ +U[SER]+ +U[ID]+ \ |
@@ -687,7 +691,7 @@ then | |||
687 | ac_cv_rss_command="$PATH_TO_PS -eo 'rss comm'" | 691 | ac_cv_rss_command="$PATH_TO_PS -eo 'rss comm'" |
688 | ac_cv_rss_format="%d %s" | 692 | ac_cv_rss_format="%d %s" |
689 | EXTRAS="$EXTRAS check_nagios" | 693 | EXTRAS="$EXTRAS check_nagios" |
690 | echo " ps syntax... $PATH_TO_PS -eo 's comm vsz rss user ppid args'" | 694 | AC_MSG_RESULT([$ac_cv_ps_command]) |
691 | 695 | ||
692 | elif ps -Ao 's comm vsz rss uid user ppid args' 2>/dev/null | \ | 696 | elif ps -Ao 's comm vsz rss uid user ppid args' 2>/dev/null | \ |
693 | egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER \ | 697 | egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER \ |
@@ -703,7 +707,7 @@ then | |||
703 | ac_cv_rss_command="$PATH_TO_PS -Ao 'rss comm'" | 707 | ac_cv_rss_command="$PATH_TO_PS -Ao 'rss comm'" |
704 | ac_cv_rss_format="%d %s" | 708 | ac_cv_rss_format="%d %s" |
705 | EXTRAS="$EXTRAS check_nagios" | 709 | EXTRAS="$EXTRAS check_nagios" |
706 | echo " ps syntax... $PATH_TO_PS -Ao 's comm vsz rss'" | 710 | AC_MSG_RESULT([$ac_cv_ps_command]) |
707 | 711 | ||
708 | elif ps -Ao 'status comm vsz rss uid user ppid args' 2>/dev/null | \ | 712 | elif ps -Ao 'status comm vsz rss uid user ppid args' 2>/dev/null | \ |
709 | egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER \ | 713 | egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER \ |
@@ -719,7 +723,7 @@ then | |||
719 | ac_cv_rss_command="$PATH_TO_PS -Ao 'rss comm'" | 723 | ac_cv_rss_command="$PATH_TO_PS -Ao 'rss comm'" |
720 | ac_cv_rss_format="%d %s" | 724 | ac_cv_rss_format="%d %s" |
721 | EXTRAS="$EXTRAS check_nagios" | 725 | EXTRAS="$EXTRAS check_nagios" |
722 | echo " ps syntax... $PATH_TO_PS -Ao 'status comm vsz rss'" | 726 | AC_MSG_RESULT([$ac_cv_ps_command]) |
723 | 727 | ||
724 | elif ps -Ao 'state comm vsz rss uid user ppid args' 2>/dev/null | \ | 728 | elif ps -Ao 'state comm vsz rss uid user ppid args' 2>/dev/null | \ |
725 | egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER \ | 729 | egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER \ |
@@ -735,7 +739,7 @@ then | |||
735 | ac_cv_rss_command="$PATH_TO_PS -Ao 'rss comm'" | 739 | ac_cv_rss_command="$PATH_TO_PS -Ao 'rss comm'" |
736 | ac_cv_rss_format="%d %s" | 740 | ac_cv_rss_format="%d %s" |
737 | EXTRAS="$EXTRAS check_nagios" | 741 | EXTRAS="$EXTRAS check_nagios" |
738 | echo " ps syntax... $PATH_TO_PS -Ao 'state comm vsz rss'" | 742 | AC_MSG_RESULT([$ac_cv_ps_command]) |
739 | 743 | ||
740 | dnl wonder who takes state instead of stat | 744 | dnl wonder who takes state instead of stat |
741 | elif ps -ao 'state command vsz rss user ppid args' 2>/dev/null | \ | 745 | elif ps -ao 'state command vsz rss user ppid args' 2>/dev/null | \ |
@@ -752,7 +756,7 @@ then | |||
752 | ac_cv_rss_command="$PATH_TO_PS -ao 'rss command'" | 756 | ac_cv_rss_command="$PATH_TO_PS -ao 'rss command'" |
753 | ac_cv_rss_format="%d %s" | 757 | ac_cv_rss_format="%d %s" |
754 | EXTRAS="$EXTRAS check_nagios" | 758 | EXTRAS="$EXTRAS check_nagios" |
755 | echo " ps syntax... $PATH_TO_PS -ao 'state command vsz rss'" | 759 | AC_MSG_RESULT([$ac_cv_ps_command]) |
756 | 760 | ||
757 | dnl IRIX 53 | 761 | dnl IRIX 53 |
758 | elif ps -el 2>/dev/null | egrep -i ["^ *F +S +UID +PID +PPID +C +PRI \ | 762 | elif ps -el 2>/dev/null | egrep -i ["^ *F +S +UID +PID +PPID +C +PRI \ |
@@ -766,7 +770,7 @@ then | |||
766 | ac_cv_vsz_format="%*s %*s %*s %*s %d" | 770 | ac_cv_vsz_format="%*s %*s %*s %*s %d" |
767 | ac_cv_rss_command="$PATH_TO_PS -el" | 771 | ac_cv_rss_command="$PATH_TO_PS -el" |
768 | ac_cv_rss_format="%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %d" | 772 | ac_cv_rss_format="%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %d" |
769 | echo " ps syntax... $PATH_TO_PS -el" | 773 | AC_MSG_RESULT([$ac_cv_ps_command]) |
770 | 774 | ||
771 | dnl IRIX 63 | 775 | dnl IRIX 63 |
772 | elif ps -el 2>/dev/null | egrep -i ["^ *F +S +UID +PID +PPID +C +PRI \ | 776 | elif ps -el 2>/dev/null | egrep -i ["^ *F +S +UID +PID +PPID +C +PRI \ |
@@ -780,7 +784,7 @@ then | |||
780 | ac_cv_vsz_format="%*s %*s %*s %*s %d" | 784 | ac_cv_vsz_format="%*s %*s %*s %*s %d" |
781 | ac_cv_rss_command="$PATH_TO_PS -el" | 785 | ac_cv_rss_command="$PATH_TO_PS -el" |
782 | ac_cv_rss_format="%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %d" | 786 | ac_cv_rss_format="%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %d" |
783 | echo " ps syntax... $PATH_TO_PS -el" | 787 | AC_MSG_RESULT([$ac_cv_ps_command]) |
784 | 788 | ||
785 | dnl AIX 4.1: | 789 | dnl AIX 4.1: |
786 | dnl F S UID PID PPID C PRI NI ADDR SZ RSS WCHAN TTY TIME CMD | 790 | dnl F S UID PID PPID C PRI NI ADDR SZ RSS WCHAN TTY TIME CMD |
@@ -796,7 +800,7 @@ then | |||
796 | ac_cv_vsz_format="%*s %*s %*s %*s %*s %*s %*s %*s %*s %d" | 800 | ac_cv_vsz_format="%*s %*s %*s %*s %*s %*s %*s %*s %*s %d" |
797 | ac_cv_rss_command="$PATH_TO_PS -el" | 801 | ac_cv_rss_command="$PATH_TO_PS -el" |
798 | ac_cv_rss_format="%*s %*s %*s %*s %*s %*s %*s %*s %*s %d" | 802 | ac_cv_rss_format="%*s %*s %*s %*s %*s %*s %*s %*s %*s %d" |
799 | echo " ps syntax... $PATH_TO_PS -el" | 803 | AC_MSG_RESULT([$ac_cv_ps_command]) |
800 | 804 | ||
801 | dnl AIX? | 805 | dnl AIX? |
802 | elif ps glaxen 2>/dev/null | egrep -i ["^ *F +UID +PID +PPID +PRI +NI \ | 806 | elif ps glaxen 2>/dev/null | egrep -i ["^ *F +UID +PID +PPID +PRI +NI \ |
@@ -810,7 +814,7 @@ then | |||
810 | ac_cv_vsz_format="%*s %*s %*s %*s %*s %*s %d" | 814 | ac_cv_vsz_format="%*s %*s %*s %*s %*s %*s %d" |
811 | ac_cv_rss_command="$PATH_TO_PS glaxen" | 815 | ac_cv_rss_command="$PATH_TO_PS glaxen" |
812 | ac_cv_rss_format="%*s %*s %*s %*s %*s %*s %*s %d" | 816 | ac_cv_rss_format="%*s %*s %*s %*s %*s %*s %*s %d" |
813 | echo " ps syntax... $PATH_TO_PS glaxen" | 817 | AC_MSG_RESULT([$ac_cv_ps_command]) |
814 | 818 | ||
815 | dnl MacOSX / Darwin | 819 | dnl MacOSX / Darwin |
816 | dnl TODO: MacOSX has commands with spaces which will cause problems to PS_FORMAT | 820 | dnl TODO: MacOSX has commands with spaces which will cause problems to PS_FORMAT |
@@ -829,7 +833,7 @@ then | |||
829 | ac_cv_rss_command="$PATH_TO_PS waxco 'rss command'" | 833 | ac_cv_rss_command="$PATH_TO_PS waxco 'rss command'" |
830 | ac_cv_rss_format="%d %s" | 834 | ac_cv_rss_format="%d %s" |
831 | EXTRAS="$EXTRAS check_nagios" | 835 | EXTRAS="$EXTRAS check_nagios" |
832 | echo " ps syntax... $PATH_TO_PS waxo 'state vsz rss command'" | 836 | AC_MSG_RESULT([$ac_cv_ps_command]) |
833 | 837 | ||
834 | dnl UnixWare | 838 | dnl UnixWare |
835 | elif ps -Al 2>/dev/null | egrep -i ["^ *F +S +UID +PID +PPID +CLS +PRI \ | 839 | elif ps -Al 2>/dev/null | egrep -i ["^ *F +S +UID +PID +PPID +CLS +PRI \ |
@@ -845,7 +849,7 @@ then | |||
845 | ac_cv_vsz_command="$PATH_TO_PS -Ao 'vsz comm'" | 849 | ac_cv_vsz_command="$PATH_TO_PS -Ao 'vsz comm'" |
846 | ac_cv_vsz_format="%*s %d" | 850 | ac_cv_vsz_format="%*s %d" |
847 | fi | 851 | fi |
848 | echo " ps syntax... $PATH_TO_PS -Al" | 852 | AC_MSG_RESULT([$ac_cv_ps_command]) |
849 | 853 | ||
850 | else | 854 | else |
851 | AC_MSG_WARN([unable to find usable ps syntax]) | 855 | AC_MSG_WARN([unable to find usable ps syntax]) |
@@ -857,57 +861,60 @@ then | |||
857 | fi | 861 | fi |
858 | AC_DEFINE_UNQUOTED(PS_VARLIST,$ac_cv_ps_varlist, | 862 | AC_DEFINE_UNQUOTED(PS_VARLIST,$ac_cv_ps_varlist, |
859 | [Variable list for sscanf of 'ps' output]) | 863 | [Variable list for sscanf of 'ps' output]) |
860 | AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,$ac_cv_ps_raw_command, | 864 | AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$ac_cv_ps_raw_command", |
861 | [Verbatim command to execute for ps in check_netsaint]) | 865 | [Verbatim command to execute for ps in check_netsaint]) |
862 | AC_DEFINE_UNQUOTED(PS_COMMAND,$ac_cv_ps_command, | 866 | AC_DEFINE_UNQUOTED(PS_COMMAND,"$ac_cv_ps_command", |
863 | [Verbatim command to execute for ps in check_procs]) | 867 | [Verbatim command to execute for ps in check_procs]) |
864 | AC_DEFINE_UNQUOTED(PS_FORMAT,$ac_cv_ps_format, | 868 | AC_DEFINE_UNQUOTED(PS_FORMAT,"$ac_cv_ps_format", |
865 | [Format string for scanning ps output in check_procs]) | 869 | [Format string for scanning ps output in check_procs]) |
866 | AC_DEFINE_UNQUOTED(VSZ_COMMAND,$ac_cv_vsz_command, | 870 | AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$ac_cv_vsz_command", |
867 | [Verbatim command to execute for ps in check_vsz]) | 871 | [Verbatim command to execute for ps in check_vsz]) |
868 | AC_DEFINE_UNQUOTED(VSZ_FORMAT,$ac_cv_vsz_format, | 872 | AC_DEFINE_UNQUOTED(VSZ_FORMAT,"$ac_cv_vsz_format", |
869 | [Format string for scanning ps output in check_vsz]) | 873 | [Format string for scanning ps output in check_vsz]) |
870 | AC_DEFINE_UNQUOTED(RSS_COMMAND,$ac_cv_rss_command, | 874 | AC_DEFINE_UNQUOTED(RSS_COMMAND,"$ac_cv_rss_command", |
871 | [Verbatim command to execute for ps in check_rss]) | 875 | [Verbatim command to execute for ps in check_rss]) |
872 | AC_DEFINE_UNQUOTED(RSS_FORMAT,$ac_cv_rss_format, | 876 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"$ac_cv_rss_format", |
873 | [Format string for scanning ps output in check_rss]) | 877 | [Format string for scanning ps output in check_rss]) |
874 | 878 | ||
879 | AC_PATH_PROG(PATH_TO_DF,df) | ||
880 | AC_PATH_PROG(PATH_TO_BDF,bdf) | ||
881 | |||
875 | AC_ARG_WITH(df_command, | 882 | AC_ARG_WITH(df_command, |
876 | ACX_HELP_STRING([--with-df-command=SYNTAX], | 883 | ACX_HELP_STRING([--with-df-command=SYNTAX], |
877 | [sets syntax for df]), | 884 | [sets syntax for df]), |
878 | DF_COMMAND=$withval,) | 885 | ac_cv_df_command=$withval,) |
879 | if test -n "$DF_COMMAND" | 886 | |
887 | AC_MSG_CHECKING(for df syntax) | ||
888 | if test -n "$ac_cv_df_command" | ||
880 | then | 889 | then |
881 | AC_DEFINE_UNQUOTED(DF_COMMAND,"$DF_COMMAND",[path and args for df command]) | 890 | AC_MSG_RESULT([$ac_cv_df_command]) |
882 | 891 | ||
883 | elif df -Pk 2>/dev/null | egrep -i ["^(/dev/|[a-zA-Z]:)[a-z0-9/\\]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/\\]*"] >/dev/null | 892 | elif df -Pk 2>/dev/null | egrep -i ["^(/dev/|[a-zA-Z]:)[a-z0-9/\\]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/\\]*"] >/dev/null |
884 | then | 893 | then |
885 | AC_PATH_PROG(PATH_TO_DF,df) | 894 | ac_cv_df_command="$PATH_TO_DF -Pk" |
886 | AC_MSG_RESULT([ df syntax... $PATH_TO_DF -Pk]) | 895 | AC_MSG_RESULT([$ac_cv_df_command]) |
887 | AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF -Pk",[path and args for df command]) | ||
888 | 896 | ||
889 | elif df -k 2>/dev/null | egrep -i ["^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*"] >/dev/null | 897 | elif df -k 2>/dev/null | egrep -i ["^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*"] >/dev/null |
890 | then | 898 | then |
891 | AC_PATH_PROG(PATH_TO_DF,df) | 899 | ac_cv_df_command="$PATH_TO_DF -k" |
892 | AC_MSG_RESULT([ df syntax... $PATH_TO_DF -k]) | 900 | AC_MSG_RESULT([$ac_cv_df_command]) |
893 | AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF -k",[path and args for df command]) | ||
894 | 901 | ||
895 | elif df 2>/dev/null | egrep -i ["^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*"] >/dev/null | 902 | elif df 2>/dev/null | egrep -i ["^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*"] >/dev/null |
896 | then | 903 | then |
897 | AC_PATH_PROG(PATH_TO_DF,df) | 904 | ac_cv_df_command="$PATH_TO_DF" |
898 | AC_MSG_RESULT([ df syntax... $PATH_TO_DF]) | 905 | AC_MSG_RESULT([$ac_cv_df_command]) |
899 | AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF",[path and args for df command]) | ||
900 | 906 | ||
901 | elif bdf 2>/dev/null | egrep -i ["^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*"] >/dev/null | 907 | elif bdf 2>/dev/null | egrep -i ["^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*"] >/dev/null |
902 | then | 908 | then |
903 | AC_PATH_PROG(PATH_TO_DF,bdf) | 909 | ac_cv_df_command="$PATH_TO_BDF" |
904 | AC_MSG_RESULT([ df syntax... $PATH_TO_DF]) | 910 | AC_MSG_RESULT([$ac_cv_df_command]) |
905 | AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF",[path and args for df command]) | ||
906 | 911 | ||
907 | else | 912 | else |
908 | AC_MSG_WARN([unable to find usable df syntax]) | 913 | AC_MSG_WARN([unable to find usable df syntax]) |
909 | fi | 914 | fi |
910 | 915 | ||
916 | AC_DEFINE_UNQUOTED(DF_COMMAND,"$ac_cv_df_command",[path and args for df command]) | ||
917 | |||
911 | AC_PATH_PROG(PATH_TO_PING,ping) | 918 | AC_PATH_PROG(PATH_TO_PING,ping) |
912 | AC_PATH_PROG(PATH_TO_PING6,ping6) | 919 | AC_PATH_PROG(PATH_TO_PING6,ping6) |
913 | 920 | ||
@@ -916,13 +923,15 @@ AC_ARG_WITH(ping_command, | |||
916 | [sets syntax for ICMP ping]), | 923 | [sets syntax for ICMP ping]), |
917 | ac_cv_ping_command=$withval,) | 924 | ac_cv_ping_command=$withval,) |
918 | 925 | ||
926 | AC_MSG_CHECKING(for ping syntax) | ||
919 | if test -n "$ac_cv_ping_command" | 927 | if test -n "$ac_cv_ping_command" |
920 | then | 928 | then |
921 | echo " ping syntax... (command-line) $ac_cv_ping_command" | 929 | AC_MSG_RESULT([(command-line) $ac_cv_ping_command]) |
922 | if test -n "$PING_PACKETS_FIRST" | 930 | if test -n "$PING_PACKETS_FIRST" |
923 | then | 931 | then |
924 | AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$ac_cv_ping_command", | 932 | ac_cv_ping_packets_first=yes |
925 | [Define if packet count must precede host]) | 933 | dnl AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$ac_cv_ping_command", |
934 | dnl [Define if packet count must precede host]) | ||
926 | fi | 935 | fi |
927 | 936 | ||
928 | elif [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \ | 937 | elif [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \ |
@@ -930,65 +939,60 @@ elif [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \ | |||
930 | egrep -i "^round-trip|^rtt" >/dev/null | 939 | egrep -i "^round-trip|^rtt" >/dev/null |
931 | then | 940 | then |
932 | ac_cv_ping_command="$PATH_TO_PING -n -U -c %d %s" | 941 | ac_cv_ping_command="$PATH_TO_PING -n -U -c %d %s" |
933 | dnl AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$ac_cv_ping_command", | 942 | ac_cv_ping_packets_first=yes |
934 | dnl [Define if packet count must precede host]) | 943 | AC_MSG_RESULT([$ac_cv_ping_command]) |
935 | echo " ping syntax... ping -n -U -c <count> <host>" | ||
936 | 944 | ||
937 | elif $PATH_TO_PING -n -U -c 1 127.0.0.1 2>/dev/null | \ | 945 | elif $PATH_TO_PING -n -U -c 1 127.0.0.1 2>/dev/null | \ |
938 | egrep -i "^round-trip|^rtt" >/dev/null | 946 | egrep -i "^round-trip|^rtt" >/dev/null |
939 | then | 947 | then |
940 | ac_cv_ping_command="$PATH_TO_PING -n -U -c %d %s" | 948 | ac_cv_ping_command="$PATH_TO_PING -n -U -c %d %s" |
941 | dnl AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$ac_cv_ping_command", | 949 | ac_cv_ping_packets_first=yes |
942 | dnl [Define if packet count must precede host]) | 950 | AC_MSG_RESULT([$ac_cv_ping_command]) |
943 | echo " ping syntax... ping -n -U -c <count> <host>" | ||
944 | 951 | ||
945 | elif $PATH_TO_PING -n -c 1 127.0.0.1 2>/dev/null | \ | 952 | elif $PATH_TO_PING -n -c 1 127.0.0.1 2>/dev/null | \ |
946 | egrep -i "^round-trip|^rtt" >/dev/null | 953 | egrep -i "^round-trip|^rtt" >/dev/null |
947 | then | 954 | then |
948 | ac_cv_ping_command="$PATH_TO_PING -n -c %d %s" | 955 | ac_cv_ping_command="$PATH_TO_PING -n -c %d %s" |
949 | dnl AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$ac_cv_ping_command", | 956 | ac_cv_ping_packets_first=yes |
950 | dnl [Define if packet count must precede host]) | 957 | AC_MSG_RESULT([$ac_cv_ping_command]) |
951 | echo " ping syntax... $PATH_TO_PING -n -c <count> <host>" | ||
952 | 958 | ||
953 | elif $PATH_TO_PING -n 127.0.0.1 -c 1 2>/dev/null | \ | 959 | elif $PATH_TO_PING -n 127.0.0.1 -c 1 2>/dev/null | \ |
954 | egrep -i "^round-trip|^rtt" >/dev/null | 960 | egrep -i "^round-trip|^rtt" >/dev/null |
955 | then | 961 | then |
956 | ac_cv_ping_command="$PATH_TO_PING -n %s -c %d" | 962 | ac_cv_ping_command="$PATH_TO_PING -n %s -c %d" |
957 | echo " ping syntax... $PATH_TO_PING -n <host> -c <count>" | 963 | AC_MSG_RESULT([$ac_cv_ping_command]) |
958 | 964 | ||
959 | elif $PATH_TO_PING 127.0.0.1 -n 1 2>/dev/null | \ | 965 | elif $PATH_TO_PING 127.0.0.1 -n 1 2>/dev/null | \ |
960 | egrep -i "^round-trip|^rtt" >/dev/null | 966 | egrep -i "^round-trip|^rtt" >/dev/null |
961 | then | 967 | then |
962 | ac_cv_ping_command="$PATH_TO_PING %s -n %d" | 968 | ac_cv_ping_command="$PATH_TO_PING %s -n %d" |
963 | echo " ping syntax... $PATH_TO_PING <host> -n <count>" | 969 | AC_MSG_RESULT([$ac_cv_ping_command]) |
964 | 970 | ||
965 | elif $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \ | 971 | elif $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \ |
966 | egrep -i "^round-trip|^rtt" >/dev/null | 972 | egrep -i "^round-trip|^rtt" >/dev/null |
967 | then | 973 | then |
968 | ac_cv_ping_command="$PATH_TO_PING -n -s %s 56 %d" | 974 | ac_cv_ping_command="$PATH_TO_PING -n -s %s 56 %d" |
969 | echo " ping syntax... $PATH_TO_PING -n -s <host> 56 <count>" | 975 | AC_MSG_RESULT([$ac_cv_ping_command]) |
970 | 976 | ||
971 | elif $PATH_TO_PING -n -h 127.0.0.1 -s 56 -c 1 2>/dev/null | \ | 977 | elif $PATH_TO_PING -n -h 127.0.0.1 -s 56 -c 1 2>/dev/null | \ |
972 | egrep -i "^round-trip|^rtt" >/dev/null | 978 | egrep -i "^round-trip|^rtt" >/dev/null |
973 | then | 979 | then |
974 | ac_cv_ping_command="$PATH_TO_PING -n -h %s -s 56 -c %d" | 980 | ac_cv_ping_command="$PATH_TO_PING -n -h %s -s 56 -c %d" |
975 | echo " ping syntax... $PATH_TO_PING -n -h <host> -s 56 -c <count>" | 981 | AC_MSG_RESULT([$ac_cv_ping_command]) |
976 | 982 | ||
977 | elif $PATH_TO_PING -n -s 56 -c 1 127.0.0.1 2>/dev/null | \ | 983 | elif $PATH_TO_PING -n -s 56 -c 1 127.0.0.1 2>/dev/null | \ |
978 | egrep -i "^round-trip|^rtt" >/dev/null | 984 | egrep -i "^round-trip|^rtt" >/dev/null |
979 | then | 985 | then |
980 | ac_cv_ping_command="$PATH_TO_PING -n -s 56 -c %d %s" | 986 | ac_cv_ping_command="$PATH_TO_PING -n -s 56 -c %d %s" |
981 | dnl AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$ac_cv_ping_command", | 987 | ac_cv_ping_packets_first=yes |
982 | dnl [Define if packet count must precede host]) | 988 | AC_MSG_RESULT([$ac_cv_ping_command]) |
983 | echo " ping syntax... $PATH_TO_PING -n -s 56 -c <count> <host>" | ||
984 | 989 | ||
985 | elif $PATH_TO_PING -n -c 1 127.0.0.1 2>/dev/null | \ | 990 | elif $PATH_TO_PING -n -c 1 127.0.0.1 2>/dev/null | \ |
986 | egrep -i "^round-trip|^rtt" >/dev/null | 991 | egrep -i "^round-trip|^rtt" >/dev/null |
987 | then | 992 | then |
988 | ac_cv_ping_command="$PATH_TO_PING -n -c %d %s" | 993 | ac_cv_ping_command="$PATH_TO_PING -n -c %d %s" |
989 | dnl AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$ac_cv_ping_command", | 994 | ac_cv_ping_packets_first=yes |
990 | dnl [Define if packet count must precede host]) | 995 | AC_MSG_RESULT([$ac_cv_ping_command]) |
991 | echo " ping syntax... $PATH_TO_PING -n -c <count> <host>" | ||
992 | 996 | ||
993 | else | 997 | else |
994 | AC_MSG_WARN([unable to find usable ping syntax]) | 998 | AC_MSG_WARN([unable to find usable ping syntax]) |
@@ -997,27 +1001,41 @@ fi | |||
997 | AC_DEFINE_UNQUOTED(PING_COMMAND,"$ac_cv_ping_command", | 1001 | AC_DEFINE_UNQUOTED(PING_COMMAND,"$ac_cv_ping_command", |
998 | [path and args for ICMP ping command]) | 1002 | [path and args for ICMP ping command]) |
999 | 1003 | ||
1004 | if test x$ac_cv_ping_packets_first != xno | ||
1005 | then | ||
1006 | AC_DEFINE(PING_PACKETS_FIRST,1, | ||
1007 | [Define if packet count must precede host]) | ||
1008 | fi | ||
1009 | |||
1000 | AC_ARG_WITH(ping6_command, | 1010 | AC_ARG_WITH(ping6_command, |
1001 | ACX_HELP_STRING([--with-ping6-command=SYNTAX], | 1011 | ACX_HELP_STRING([--with-ping6-command=SYNTAX], |
1002 | [sets syntax for ICMPv6 ping]), | 1012 | [sets syntax for ICMPv6 ping]), |
1003 | PING6_COMMAND=$withval,) | 1013 | PING6_COMMAND=$withval,) |
1004 | 1014 | ||
1005 | AC_PATH_PROG(PATH_TO_NSLOOKUP,nslookup) | 1015 | AC_PATH_PROG(PATH_TO_NSLOOKUP,nslookup) |
1006 | if test -n "$ac_cv_path_PATH_TO_NSLOOKUP" | 1016 | |
1017 | AC_MSG_CHECKING(for nslookup syntax) | ||
1018 | if test -n "$PATH_TO_NSLOOKUP" | ||
1007 | then | 1019 | then |
1008 | if nslookup -sil 127.0.0.1 2>&1 | grep ["Invalid option: sil"] >/dev/null | 1020 | if $PATH_TO_NSLOOKUP -sil 127.0.0.1 2>&1 | grep ["Invalid option: sil"] >/dev/null |
1009 | then | 1021 | then |
1010 | AC_MSG_RESULT([ nslookup syntax... $PATH_TO_NSLOOKUP]) | 1022 | ac_cv_nslookup_command="$PATH_TO_NSLOOKUP" |
1011 | AC_DEFINE_UNQUOTED(NSLOOKUP_COMMAND,"$PATH_TO_NSLOOKUP",[path and args for nslookup]) | 1023 | AC_MSG_RESULT([$ac_cv_nslookup_command]) |
1024 | |||
1012 | else | 1025 | else |
1013 | AC_MSG_RESULT([ nslookup syntax... $PATH_TO_NSLOOKUP -sil]) | 1026 | ac_cv_nslookup_command="$PATH_TO_NSLOOKUP -sil" |
1014 | AC_DEFINE_UNQUOTED(NSLOOKUP_COMMAND,"$PATH_TO_NSLOOKUP -sil",[path and args for nslookup]) | 1027 | AC_MSG_RESULT([$ac_cv_nslookup_command]) |
1028 | |||
1015 | fi | 1029 | fi |
1016 | EXTRAS="$EXTRAS check_dns" | 1030 | EXTRAS="$EXTRAS check_dns" |
1031 | |||
1017 | else | 1032 | else |
1018 | AC_MSG_WARN([nslookup command not found]) | 1033 | AC_MSG_WARN([nslookup command not found]) |
1019 | fi | 1034 | fi |
1020 | 1035 | ||
1036 | AC_DEFINE_UNQUOTED(NSLOOKUP_COMMAND,"$ac_cv_nslookup_command", | ||
1037 | [path and args for nslookup]) | ||
1038 | |||
1021 | AC_PATH_PROG(PATH_TO_HOST,host) | 1039 | AC_PATH_PROG(PATH_TO_HOST,host) |
1022 | if test -n "$ac_cv_path_PATH_TO_HOST" | 1040 | if test -n "$ac_cv_path_PATH_TO_HOST" |
1023 | then | 1041 | then |
@@ -1030,7 +1048,6 @@ AC_DEFINE_UNQUOTED(PATH_TO_UPTIME,"$PATH_TO_UPTIME",[path to uptime binary]) | |||
1030 | AC_PATH_PROG(PATH_TO_RPCINFO,rpcinfo) | 1048 | AC_PATH_PROG(PATH_TO_RPCINFO,rpcinfo) |
1031 | AC_DEFINE_UNQUOTED(PATH_TO_RPCINFO,"$PATH_TO_RPCINFO",[path to rpcinfo binary]) | 1049 | AC_DEFINE_UNQUOTED(PATH_TO_RPCINFO,"$PATH_TO_RPCINFO",[path to rpcinfo binary]) |
1032 | 1050 | ||
1033 | M | ||
1034 | AC_PATH_PROG(PATH_TO_NTPDATE,ntpdate) | 1051 | AC_PATH_PROG(PATH_TO_NTPDATE,ntpdate) |
1035 | AC_PATH_PROGS(PATH_TO_NTPDC,ntpdc xntpdc) | 1052 | AC_PATH_PROGS(PATH_TO_NTPDC,ntpdc xntpdc) |
1036 | AC_PATH_PROGS(PATH_TO_NTPQ,ntpq) | 1053 | AC_PATH_PROGS(PATH_TO_NTPQ,ntpq) |
@@ -1039,7 +1056,6 @@ then | |||
1039 | AC_DEFINE_UNQUOTED(PATH_TO_NTPQ,"$PATH_TO_NTPQ",[path to ntpq binary]) | 1056 | AC_DEFINE_UNQUOTED(PATH_TO_NTPQ,"$PATH_TO_NTPQ",[path to ntpq binary]) |
1040 | AC_DEFINE_UNQUOTED(PATH_TO_NTPDATE,"$PATH_TO_NTPDATE",[path to ntpdate binary]) | 1057 | AC_DEFINE_UNQUOTED(PATH_TO_NTPDATE,"$PATH_TO_NTPDATE",[path to ntpdate binary]) |
1041 | else | 1058 | else |
1042 | dnl echo "** Install NTP programs (http://www.ntp.org) if you want to monitor time synchronization" | ||
1043 | AC_MSG_WARN([Install NTP programs (http://www.ntp.org) if you want to monitor time synchronization]) | 1059 | AC_MSG_WARN([Install NTP programs (http://www.ntp.org) if you want to monitor time synchronization]) |
1044 | fi | 1060 | fi |
1045 | 1061 | ||
@@ -1048,7 +1064,6 @@ if test -x "$PATH_TO_LMSTAT" | |||
1048 | then | 1064 | then |
1049 | AC_DEFINE_UNQUOTED(PATH_TO_LMSTAT,"$PATH_TO_LMSTAT",[path to lmstat]) | 1065 | AC_DEFINE_UNQUOTED(PATH_TO_LMSTAT,"$PATH_TO_LMSTAT",[path to lmstat]) |
1050 | else | 1066 | else |
1051 | dnl echo "** Get lmstat from Globetrotter Software to monitor flexlm licenses" | ||
1052 | AC_MSG_WARN([Get lmstat from Globetrotter Software to monitor flexlm licenses]) | 1067 | AC_MSG_WARN([Get lmstat from Globetrotter Software to monitor flexlm licenses]) |
1053 | fi | 1068 | fi |
1054 | 1069 | ||
@@ -1057,26 +1072,28 @@ if test -x "$PATH_TO_SMBCLIENT" | |||
1057 | then | 1072 | then |
1058 | AC_DEFINE_UNQUOTED(PATH_TO_SMBCLIENT,"$PATH_TO_SMBCLIENT",[path to smbclient binary]) | 1073 | AC_DEFINE_UNQUOTED(PATH_TO_SMBCLIENT,"$PATH_TO_SMBCLIENT",[path to smbclient binary]) |
1059 | else | 1074 | else |
1060 | dnl echo "** Get smbclient from Samba.org to monitor SMB shares" | ||
1061 | AC_MSG_WARN([Get smbclient from Samba.org to monitor SMB shares]) | 1075 | AC_MSG_WARN([Get smbclient from Samba.org to monitor SMB shares]) |
1062 | fi | 1076 | fi |
1063 | 1077 | ||
1064 | 1078 | ||
1065 | AC_PATH_PROG(PATH_TO_WHO,who) | 1079 | AC_PATH_PROG(PATH_TO_WHO,who) |
1066 | if [who -q 2>/dev/null | egrep -i "^# users=[0-9]+$" >/dev/null] | 1080 | |
1081 | if [$PATH_TO_WHO -q 2>/dev/null | egrep -i "^# users=[0-9]+$" >/dev/null] | ||
1067 | then | 1082 | then |
1068 | AC_DEFINE_UNQUOTED(WHO_COMMAND,"$PATH_TO_WHO -q",[path and arguments for invoking 'who']) | 1083 | ac_cv_path_to_who="$PATH_TO_WHO -q" |
1069 | else | 1084 | else |
1070 | AC_DEFINE_UNQUOTED(WHO_COMMAND,"$PATH_TO_WHO",[path and arguments for invoking 'who']) | 1085 | ac_cv_path_to_who="$PATH_TO_WHO" |
1071 | fi | 1086 | fi |
1072 | 1087 | ||
1088 | AC_DEFINE_UNQUOTED(WHO_COMMAND,"$ac_cv_path_to_who", | ||
1089 | [path and arguments for invoking 'who']) | ||
1090 | |||
1073 | AC_PATH_PROG(PATH_TO_SNMPGET,snmpget) | 1091 | AC_PATH_PROG(PATH_TO_SNMPGET,snmpget) |
1074 | if test -x "$PATH_TO_SNMPGET" | 1092 | if test -x "$PATH_TO_SNMPGET" |
1075 | then | 1093 | then |
1076 | AC_DEFINE_UNQUOTED(PATH_TO_SNMPGET,"$PATH_TO_SNMPGET",[path to snmpget binary]) | 1094 | AC_DEFINE_UNQUOTED(PATH_TO_SNMPGET,"$PATH_TO_SNMPGET",[path to snmpget binary]) |
1077 | EXTRAS="$EXTRAS check_hpjd check_snmp" | 1095 | EXTRAS="$EXTRAS check_hpjd check_snmp" |
1078 | else | 1096 | else |
1079 | dnl echo "** Get snmpget from http://net-snmp.sourceforge.net to make check_hpjd and check_snmp plugins" | ||
1080 | AC_MSG_WARN([Get snmpget from http://net-snmp.sourceforge.net to make check_hpjd and check_snmp plugins]) | 1097 | AC_MSG_WARN([Get snmpget from http://net-snmp.sourceforge.net to make check_hpjd and check_snmp plugins]) |
1081 | fi | 1098 | fi |
1082 | 1099 | ||
@@ -1088,45 +1105,50 @@ fi | |||
1088 | 1105 | ||
1089 | if ( $PERL -M"Net::SNMP 3.6" -e 'exit' 2>/dev/null ) | 1106 | if ( $PERL -M"Net::SNMP 3.6" -e 'exit' 2>/dev/null ) |
1090 | then | 1107 | then |
1091 | echo "Found Net::SNMP perl module" | 1108 | AC_MSG_CHECKING(for Net::SNMP perl module) |
1109 | AC_MSG_RESULT([found]) | ||
1092 | else | 1110 | else |
1093 | dnl echo "** Tried $PERL - install Net::SNMP perl module if you want to" | ||
1094 | dnl echo " use the perl snmp plugins" | ||
1095 | AC_MSG_WARN([Tried $PERL - install Net::SNMP perl module if you want to use the perl snmp plugins]) | 1111 | AC_MSG_WARN([Tried $PERL - install Net::SNMP perl module if you want to use the perl snmp plugins]) |
1096 | fi | 1112 | fi |
1097 | 1113 | ||
1098 | AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat) | 1114 | AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat) |
1099 | AC_PATH_PROG(PATH_TO_QSTAT,qstat) | 1115 | AC_PATH_PROG(PATH_TO_QSTAT,qstat) |
1116 | |||
1100 | if test -x "$PATH_TO_QUAKESTAT" | 1117 | if test -x "$PATH_TO_QUAKESTAT" |
1101 | then | 1118 | then |
1102 | AC_DEFINE_UNQUOTED(PATH_TO_QSTAT,"$PATH_TO_QUAKESTAT",[path to qstat/quakestat]) | 1119 | ac_cv_path_to_qstat="$PATH_TO_QUAKESTAT" |
1103 | EXTRAS="$EXTRAS check_game" | 1120 | EXTRAS="$EXTRAS check_game" |
1121 | |||
1104 | elif test -x "$PATH_TO_QSTAT" | 1122 | elif test -x "$PATH_TO_QSTAT" |
1105 | then | 1123 | then |
1106 | AC_DEFINE_UNQUOTED(PATH_TO_QSTAT,"$PATH_TO_QSTAT",[path to qstat/quakestat]) | 1124 | ac_cv_path_to_qstat="$PATH_TO_QSTAT" |
1107 | EXTRAS="$EXTRAS check_game" | 1125 | EXTRAS="$EXTRAS check_game" |
1108 | else | 1126 | else |
1109 | dnl echo "** Get qstat from http://www.activesw.com/people/steve/qstat.html in order to make check_game plugin" | ||
1110 | AC_MSG_WARN([Get qstat from http://www.activesw.com/people/steve/qstat.html in order to make check_game plugin]) | 1127 | AC_MSG_WARN([Get qstat from http://www.activesw.com/people/steve/qstat.html in order to make check_game plugin]) |
1111 | fi | 1128 | fi |
1112 | 1129 | ||
1130 | if test x$ac_cv_path_to_qstat != x | ||
1131 | then | ||
1132 | AC_DEFINE_UNQUOTED(PATH_TO_QSTAT,"$ac_cv_path_to_qstat", | ||
1133 | [path to qstat/quakestat]) | ||
1134 | fi | ||
1135 | |||
1113 | AC_PATH_PROG(PATH_TO_FPING,fping) | 1136 | AC_PATH_PROG(PATH_TO_FPING,fping) |
1114 | if test -x "$PATH_TO_FPING" | 1137 | if test -x "$PATH_TO_FPING" |
1115 | then | 1138 | then |
1116 | AC_DEFINE_UNQUOTED(PATH_TO_FPING,"$PATH_TO_FPING",[path to fping]) | 1139 | AC_DEFINE_UNQUOTED(PATH_TO_FPING,"$PATH_TO_FPING",[path to fping]) |
1117 | EXTRAS="$EXTRAS check_fping" | 1140 | EXTRAS="$EXTRAS check_fping" |
1118 | else | 1141 | else |
1119 | dnl echo "** Get fping from http://www.fping.com in order to make check_fping plugin" | ||
1120 | AC_MSG_WARN([Get fping from http://www.fping.com in order to make check_fping plugin]) | 1142 | AC_MSG_WARN([Get fping from http://www.fping.com in order to make check_fping plugin]) |
1121 | fi | 1143 | fi |
1122 | 1144 | ||
1123 | AC_PATH_PROG(PATH_TO_SSH,ssh) | 1145 | AC_PATH_PROG(PATH_TO_SSH,ssh) |
1146 | |||
1124 | if test -x "$PATH_TO_SSH" | 1147 | if test -x "$PATH_TO_SSH" |
1125 | then | 1148 | then |
1126 | AC_DEFINE_UNQUOTED(SSH_COMMAND,"$PATH_TO_SSH",[path to ssh binary]) | 1149 | AC_DEFINE_UNQUOTED(SSH_COMMAND,"$PATH_TO_SSH",[path to ssh binary]) |
1127 | EXTRAS="$EXTRAS check_by_ssh" | 1150 | EXTRAS="$EXTRAS check_by_ssh" |
1128 | else | 1151 | else |
1129 | dnl echo "** Get ssh in order to make check_by_ssh plugin" | ||
1130 | AC_MSG_WARN([Get ssh in order to make check_by_ssh plugin]) | 1152 | AC_MSG_WARN([Get ssh in order to make check_by_ssh plugin]) |
1131 | fi | 1153 | fi |
1132 | 1154 | ||
@@ -1136,7 +1158,6 @@ if test -x "$PATH_TO_MAILQ" | |||
1136 | then | 1158 | then |
1137 | AC_DEFINE_UNQUOTED(PATH_TO_MAILQ,"$PATH_TO_MAILQ",[path to mailq]) | 1159 | AC_DEFINE_UNQUOTED(PATH_TO_MAILQ,"$PATH_TO_MAILQ",[path to mailq]) |
1138 | else | 1160 | else |
1139 | dnl echo "** Could not find mailq or eqivalent" | ||
1140 | AC_MSG_WARN([Could not find mailq or eqivalent]) | 1161 | AC_MSG_WARN([Could not find mailq or eqivalent]) |
1141 | fi | 1162 | fi |
1142 | 1163 | ||
@@ -1148,51 +1169,74 @@ dnl dunno why this does not work below - use hack (kbd) | |||
1148 | dnl fine on linux, broken on solaris | 1169 | dnl fine on linux, broken on solaris |
1149 | dnl if /bin/test -e "/proc/meminfo" | 1170 | dnl if /bin/test -e "/proc/meminfo" |
1150 | 1171 | ||
1172 | AC_PATH_PROG(PATH_TO_SWAP,swap) | ||
1173 | AC_PATH_PROG(PATH_TO_SWAPINFO,swapinfo) | ||
1174 | |||
1175 | AC_MSG_CHECKING(for how to check memory) | ||
1151 | if [cat /proc/meminfo > /dev/null 2>&1] | 1176 | if [cat /proc/meminfo > /dev/null 2>&1] |
1152 | then | 1177 | then |
1153 | echo "found /proc/meminfo" | 1178 | AC_MSG_RESULT([found /proc/meminfo]) |
1154 | AC_DEFINE(HAVE_PROC_MEMINFO,1,[Define if we have /proc/meminfo]) | 1179 | AC_DEFINE(HAVE_PROC_MEMINFO,1,[Define if we have /proc/meminfo]) |
1155 | AC_DEFINE_UNQUOTED(PROC_MEMINFO,"/proc/meminfo",[path to /proc/meminfo if name changes]) | 1180 | AC_DEFINE_UNQUOTED(PROC_MEMINFO,"/proc/meminfo",[path to /proc/meminfo if name changes]) |
1156 | EXTRAS="$EXTRAS check_swap" | 1181 | EXTRAS="$EXTRAS check_swap" |
1157 | elif [swap -l 2>&1 >/dev/null] | 1182 | |
1183 | elif [$PATH_TO_SWAP -l 2>&1 >/dev/null] | ||
1158 | then | 1184 | then |
1159 | echo "found swap command" | 1185 | ac_cv_have_swap=yes |
1160 | AC_DEFINE(HAVE_SWAP,1,[Define if swap/swapinfo command is found]) | 1186 | ac_cv_swap_command="$PATH_TO_SWAP -l" |
1161 | AC_PATH_PROG(PATH_TO_SWAP,swap) | 1187 | if [$PATH_TO_SWAP -l 2>/dev/null | \ |
1162 | AC_DEFINE_UNQUOTED(SWAP_COMMAND,"$PATH_TO_SWAP -l",[Path to swap/swapinfo binary, with any args]) | 1188 | egrep -i "^lswap +path +pri +swaplo +blocks +free +maxswap" \ |
1163 | if [swap -l 2>/dev/null | egrep -i "^lswap +path +pri +swaplo +blocks +free +maxswap" >/dev/null] | 1189 | >/dev/null] |
1164 | then | 1190 | then |
1165 | AC_DEFINE_UNQUOTED(SWAP_FORMAT,[" %*d %*s %*d,%*d %*d %*d %d %d"],[Format string for parsing swap output]) | 1191 | ac_cv_swap_format=[" %*d %*s %*d,%*d %*d %*d %d %d"] |
1166 | echo " using IRIX format" | 1192 | AC_MSG_RESULT([using IRIX format swap]) |
1167 | elif [swap -l 2>/dev/null | egrep -i "^swapfile +dev +swaplo +blocks +free" >/dev/null] | 1193 | |
1194 | elif [$PATH_TO_SWAP -l 2>/dev/null | egrep -i "^swapfile +dev +swaplo +blocks +free" >/dev/null] | ||
1168 | then | 1195 | then |
1169 | AC_DEFINE_UNQUOTED(SWAP_FORMAT,["%*s %*[[0-9,-]] %*d %d %d"],[Format string for parsing swap output]) | 1196 | ac_cv_swap_format=["%*s %*[[0-9,-]] %*d %d %d"] |
1170 | echo " using Solaris format" | 1197 | AC_MSG_RESULT([using Solaris format swap]) |
1171 | elif [swap -l 2>/dev/null | egrep -i "^path +dev +swaplo +blocks +free" >/dev/null] | 1198 | |
1199 | elif [$PATH_TO_SWAP -l 2>/dev/null | egrep -i "^path +dev +swaplo +blocks +free" >/dev/null] | ||
1172 | then | 1200 | then |
1173 | AC_DEFINE_UNQUOTED(SWAP_FORMAT,["%*s %*[[0-9,-]] %*d %d %d"],[Format string for parsing swap output]) | 1201 | ac_cv_swap_format=["%*s %*[[0-9,-]] %*d %d %d"] |
1174 | echo " using Unixware format" | 1202 | AC_MSG_RESULT([using Unixware format swap]) |
1203 | |||
1175 | fi | 1204 | fi |
1176 | EXTRAS="$EXTRAS check_swap" | 1205 | EXTRAS="$EXTRAS check_swap" |
1177 | elif [swapinfo -k 2>&1 | egrep -i "^Device" >/dev/null] | 1206 | |
1207 | elif [$PATH_TO_SWAPINFO -k 2>&1 | egrep -i "^Device" >/dev/null] | ||
1178 | then | 1208 | then |
1179 | echo "found swapinfo command" | 1209 | ac_cv_have_swap=yes |
1180 | AC_DEFINE(HAVE_SWAP,1,[Define if swap/swapinfo command is found]) | 1210 | ac_cv_swap_command="$PATH_TO_SWAPINFO -k" |
1181 | AC_PATH_PROG(PATH_TO_SWAP,swapinfo) | 1211 | |
1182 | AC_DEFINE_UNQUOTED(SWAP_COMMAND,"$PATH_TO_SWAP -k",[Path to swap/swapinfo binary, with any args]) | 1212 | if [$PATH_TO_SWAPINFO -k 2>/dev/null | egrep -i "^Device +1K-blocks +Used +Avail" >/dev/null] |
1183 | if [swapinfo -k 2>/dev/null | egrep -i "^Device +1K-blocks +Used +Avail" >/dev/null] | ||
1184 | then | 1213 | then |
1185 | AC_DEFINE_UNQUOTED(SWAP_FORMAT,["%*s %d %*d %d"],[Format string for parsing swap output]) | 1214 | ac_cv_swap_format=["%*s %d %*d %d"] |
1186 | echo " using FreeBSD format" | 1215 | AC_MSG_RESULT([using FreeBSD format swapinfo]) |
1187 | fi | 1216 | fi |
1188 | EXTRAS="$EXTRAS check_swap" | 1217 | EXTRAS="$EXTRAS check_swap" |
1189 | elif [swapinfo -dfM 2>/dev/null | egrep -i "^TYPE +AVAIL +USED +FREE" >/dev/null] | 1218 | |
1219 | elif [$PATH_TO_SWAPINFO -dfM 2>/dev/null | egrep -i "^TYPE +AVAIL +USED +FREE" >/dev/null] | ||
1220 | then | ||
1221 | ac_cv_have_swap=yes | ||
1222 | ac_cv_swap_command="$PATH_TO_SWAPINFO -dfM", | ||
1223 | ac_cv_swap_format=["%*s %d %*d %d"] | ||
1224 | AC_MSG_RESULT([using HP-UX format swapinfo]) | ||
1225 | fi | ||
1226 | |||
1227 | if test x$ac_cv_have_swap != x | ||
1190 | then | 1228 | then |
1191 | AC_DEFINE(HAVE_SWAP,1,[Define if swap/swapinfo command is found]) | 1229 | AC_DEFINE(HAVE_SWAP,1,[Define if swap/swapinfo command is found]) |
1192 | AC_PATH_PROG(PATH_TO_SWAP,swapinfo) | 1230 | fi |
1193 | AC_DEFINE_UNQUOTED(SWAP_COMMAND,"$PATH_TO_SWAP -dfM",[Path to swap/swapinfo binary, with any args]) | 1231 | if test x$ac_cv_swap_format != x |
1194 | AC_DEFINE_UNQUOTED(SWAP_FORMAT,["%*s %d %*d %d"],[Format string for parsing swap output ]) | 1232 | then |
1195 | echo " using HP-UX format HP-UX" | 1233 | AC_DEFINE_UNQUOTED(SWAP_FORMAT,"$ac_cv_swap_format", |
1234 | [Format string for parsing swap output]) | ||
1235 | fi | ||
1236 | if test x$ac_cv_swap_command != x | ||
1237 | then | ||
1238 | AC_DEFINE_UNQUOTED(SWAP_COMMAND,"$ac_cv_swap_command", | ||
1239 | [Path to swap/swapinfo binary, with any args]) | ||
1196 | fi | 1240 | fi |
1197 | 1241 | ||
1198 | AC_PATH_PROG(PATH_TO_DIG,dig) | 1242 | AC_PATH_PROG(PATH_TO_DIG,dig) |
@@ -1207,18 +1251,19 @@ elif test -f ../plugins/check_nt.c ; then | |||
1207 | EXTRAS="$EXTRAS check_nt" | 1251 | EXTRAS="$EXTRAS check_nt" |
1208 | fi | 1252 | fi |
1209 | 1253 | ||
1254 | AC_MSG_CHECKING(for va_list) | ||
1210 | AC_TRY_COMPILE([#ifdef __STDC__ | 1255 | AC_TRY_COMPILE([#ifdef __STDC__ |
1211 | #include <stdio.h> | 1256 | #include <stdio.h> |
1212 | #include <stdlib.h> | 1257 | #include <stdlib.h> |
1213 | #include <stdarg.h> | 1258 | #include <stdarg.h> |
1214 | #else | 1259 | #else |
1215 | #include <sys/types.h> | 1260 | #include <sys/types.h> |
1216 | #include <stdio.h> | 1261 | #include <stdio.h> |
1217 | #include <varargs.h> | 1262 | #include <varargs.h> |
1218 | #endif], | 1263 | #endif], |
1219 | [va_list args;], | 1264 | [va_list args;], |
1220 | [AC_MSG_RESULT(yes)], | 1265 | [AC_MSG_RESULT(yes)], |
1221 | [NEED_VA_LIST=-DNEED_VA_LIST AC_SUBST(NEED_VA_LIST) AC_MSG_RESULT(no)]) | 1266 | [NEED_VA_LIST=-DNEED_VA_LIST AC_SUBST(NEED_VA_LIST) AC_MSG_RESULT(no)]) |
1222 | 1267 | ||
1223 | AC_SUBST(EXTRAS) | 1268 | AC_SUBST(EXTRAS) |
1224 | AC_SUBST(DEPLIBS) | 1269 | AC_SUBST(DEPLIBS) |