From 71bd3b1d464ebd213731abb28f0648f506541b39 Mon Sep 17 00:00:00 2001 From: Karl DeBisschop Date: Wed, 16 Oct 2002 21:31:39 +0000 Subject: build cleanly on RedHat 8.0 git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@124 f882894a-f735-0410-b71e-b25c423dba1c diff --git a/configure.in b/configure.in index f497482..17952e7 100644 --- a/configure.in +++ b/configure.in @@ -21,9 +21,9 @@ AC_PROG_CC AC_PROG_MAKE_SET AC_PROG_AWK -AC_FUNC_GETLOADAVG +AC_FUNC_GETLOADAVG(plugins) AC_FUNC_STRTOD -AM_WITH_REGEX +dnl AM_WITH_REGEX AC_PROG_RANLIB AC_PATH_PROG(ACLOCAL,aclocal) @@ -43,10 +43,6 @@ AC_SUBST(WARRANTY) SUPPORT="Send email to nagios-users@lists.sourceforge.net if you have questions\nregarding use of this software. To submit patches or suggest improvements,\nsend email to nagiosplug-devel@lists.sourceforge.net\n" AC_SUBST(SUPPORT) -dnl AC_ARG_PROGRAM - -dnl AC_ARG_WITH(nonposix_state_defs,--with-nonposix-state-defs uses POSIXLY incorrect states for netsaint < 0.0.7b2,,AC_DEFINE(POSIX_STATE_DEFS)) - dnl CGIURL has changed for Nagios with 1.0 beta AC_ARG_WITH(cgiurl,--with-cgiurl= sets URL for cgi programs,cgiurl=$withval,cgiurl=/nagios/cgi-bin) CGIURL="$cgiurl" @@ -80,8 +76,6 @@ dnl dnl Checks for libraries. dnl -AC_FUNC_GETLOADAVG(plugins) - AC_CHECK_LIB(dce,main,SOCKETLIBS="$SOCKETLIBS -ldce") AC_CHECK_LIB(nsl,main,SOCKETLIBS="$SOCKETLIBS -lnsl") AC_CHECK_LIB(socket,socket,SOCKETLIBS="$SOCKETLIBS -lsocket") @@ -282,7 +276,7 @@ AC_TRY_RUN([#include main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }], ac_cv_have_longlong=yes,ac_cv_have_longlong=no,ac_cv_have_longlong=cross)]) if test x"$ac_cv_have_longlong" = x"yes"; then - AC_DEFINE(HAVE_LONGLONG) + AC_DEFINE(HAVE_LONGLONG,1,[Define if system has long long type]) fi # @@ -293,14 +287,14 @@ AC_CACHE_CHECK([for LL suffix on long long integers],ac_cv_compiler_supports_ll, AC_TRY_COMPILE([#include ],[long long i = 0x8000000000LL], ac_cv_compiler_supports_ll=yes,ac_cv_compiler_supports_ll=no)]) if test x"$ac_cv_compiler_supports_ll" = x"yes"; then - AC_DEFINE(COMPILER_SUPPORTS_LL) + AC_DEFINE(COMPILER_SUPPORTS_LL,1,[Define if compiler support long long]) fi AC_CACHE_CHECK([for __va_copy],ac_cv_HAVE_VA_COPY,[ AC_TRY_LINK([#include va_list ap1,ap2;], [__va_copy(ap1,ap2);], ac_cv_HAVE_VA_COPY=yes,ac_cv_HAVE_VA_COPY=no)]) if test x"$ac_cv_HAVE_VA_COPY" = x"yes"; then - AC_DEFINE(HAVE_VA_COPY) + AC_DEFINE(HAVE_VA_COPY,1,[Define if system has va_copy]) fi AC_CACHE_CHECK([for C99 vsnprintf],ac_cv_HAVE_C99_VSNPRINTF,[ @@ -330,7 +324,7 @@ main() { foo("hello"); } ], ac_cv_HAVE_C99_VSNPRINTF=yes,ac_cv_HAVE_C99_VSNPRINTF=no,ac_cv_HAVE_C99_VSNPRINTF=cross)]) if test x"$ac_cv_HAVE_C99_VSNPRINTF" = x"yes"; then - AC_DEFINE(HAVE_C99_VSNPRINTF) + AC_DEFINE(HAVE_C99_VSNPRINTF,1,[Define if system has C99 compatible vsnprintf]) fi dnl We used to not do long options unless a compatible lib was found @@ -369,7 +363,7 @@ AC_TRY_COMPILE([#include if test -f "/proc/loadavg" then AC_DEFINE(HAVE_PROC_LOADAVG,1,[Define if /proc/loadavg or similar exists]) - AC_DEFINE_UNQUOTED(PROC_LOADAVG,"/proc/loadavg"[Location of /proc/loadavg]) + AC_DEFINE_UNQUOTED(PROC_LOADAVG,"/proc/loadavg",[Location of /proc/loadavg]) fi AC_PATH_PROG(PATH_TO_PS,ps) @@ -377,164 +371,164 @@ dnl OpenBSD (needs to come early because -exo appears to work, but does not give dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND if [ps -axo 'stat comm vsz rss user uid ppid args' 2>/dev/null | egrep -i "^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+" >/dev/null] then - AC_DEFINE(USE_PS_VARS) - AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) - AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -axo 'stat user ppid args'") + AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf]) + AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[Variable list for sscanf of 'ps' output]) + AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -axo 'stat user ppid args'",[Verbatim command to execute for ps in check_netsaint]) EXTRAS="$EXTRAS check_nagios" - AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -axo 'stat uid ppid comm args'") - AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n") - AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -axo 'vsz comm'") - AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s") - AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -axo 'rss comm'") - AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s") + AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -axo 'stat uid ppid comm args'",[Verbatim command to execute for ps in check_procs]) + AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n",[Format string for scanning ps output in check_procs]) + AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -axo 'vsz comm'",[Verbatim command to execute for ps in check_vsz]) + AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[Format string for scanning ps output in check_vsz]) + AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -axo 'rss comm'",[Verbatim command to execute for ps in check_rss]) + AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[Format string for scanning ps output in check_rss]) echo " ps syntax... $PATH_TO_PS -axo 'stat comm vsz rss user ppid args'" dnl AIX 4.3.3 - needs verification. elif [ps -ao 'stat comm vsz rss user uid ppid args' 2>/dev/null | egrep -i "^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+" >/dev/null] then - AC_DEFINE(USE_PS_VARS) - AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) - AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -ao 'stat user ppid args'") + AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf]) + AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[Variable list for sscanf of 'ps' output]) + AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -ao 'stat user ppid args'",[Verbatim command to execute for ps in check_netsaint]) EXTRAS="$EXTRAS check_nagios" AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -ao 'stat uid ppid comm args'") - AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n") - AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -ao 'vsz comm'") - AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s") - AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -ao 'rss comm'") - AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s") + AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n"[Format string for scanning ps output in check_procs]) + AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -ao 'vsz comm'",[]) + AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[]) + AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -ao 'rss comm'",[]) + AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) echo " ps syntax... $PATH_TO_PS -ao 'stat comm vsz rss user ppid args'" elif [ps -eo 's comm vsz rss user uid ppid args' 2>/dev/null | egrep -i "^S[TAUES]* +C[OMDNA]+ +[VSIZE]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+" >/dev/null] then - AC_DEFINE(USE_PS_VARS) - AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) - AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -eo 's user ppid args'") + AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf]) + AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[Variable list for sscanf of 'ps' output]) + AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -eo 's user ppid args'",[Verbatim command to execute for ps in check_netsaint]) EXTRAS="$EXTRAS check_nagios" AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -eo 's uid ppid comm args'") - AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n") - AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -eo 'vsz comm'") - AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s") - AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -eo 'rss comm'") - AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s") + AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n"[Format string for scanning ps output in check_procs]) + AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -eo 'vsz comm'",[]) + AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[]) + AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -eo 'rss comm'",[]) + AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) echo " ps syntax... $PATH_TO_PS -eo 's comm vsz rss user ppid args'" elif [ps -Ao 's comm vsz rss uid user ppid args' 2>/dev/null | egrep -i "^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+" >/dev/null] then - AC_DEFINE(USE_PS_VARS) - AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) - AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -Ao 's user ppid args'") + AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf]) + AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[Variable list for sscanf of 'ps' output]) + AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -Ao 's user ppid args'",[Verbatim command to execute for ps in check_netsaint]) EXTRAS="$EXTRAS check_nagios" - AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -Ao 's uid ppid comm args'") - AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n") - AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -Ao 'vsz comm'") - AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s") - AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -Ao 'rss comm'") - AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s") + AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -Ao 's uid ppid comm args'",[]) + AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n"[Format string for scanning ps output in check_procs],[]) + AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -Ao 'vsz comm'",[]) + AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[]) + AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -Ao 'rss comm'",[]) + AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) echo " ps syntax... $PATH_TO_PS -Ao 's comm vsz rss'" elif [ps -Ao 'status comm vsz rss uid user ppid args' 2>/dev/null | egrep -i "^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+" >/dev/null] then - AC_DEFINE(USE_PS_VARS) + AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) - AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -Ao 'status user ppid args'") + AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -Ao 'status user ppid args'",[Verbatim command to execute for ps in check_netsaint]) EXTRAS="$EXTRAS check_nagios" - AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -Ao 'status uid ppid comm args'") - AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n") - AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -Ao 'vsz comm'") - AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s") - AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -Ao 'rss comm'") - AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s") + AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -Ao 'status uid ppid comm args'",[]) + AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n"[Format string for scanning ps output in check_procs]) + AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -Ao 'vsz comm'",[]) + AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[]) + AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -Ao 'rss comm'",[]) + AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) echo " ps syntax... $PATH_TO_PS -Ao 'status comm vsz rss'" elif [ps -Ao 'state comm vsz rss uid user ppid args' 2>/dev/null | egrep -i "^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+" >/dev/null] then - AC_DEFINE(USE_PS_VARS) + AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) - AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -Ao 'state user ppid args'") + AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -Ao 'state user ppid args'",[Verbatim command to execute for ps in check_netsaint]) EXTRAS="$EXTRAS check_nagios" - AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -Ao 'state uid ppid comm args'") - AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n") - AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -Ao 'vsz comm'") - AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s") - AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -Ao 'rss comm'") - AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s") + AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -Ao 'state uid ppid comm args'",[]) + AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n"[Format string for scanning ps output in check_procs]) + AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -Ao 'vsz comm'",[]) + AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[]) + AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -Ao 'rss comm'",[]) + AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) echo " ps syntax... $PATH_TO_PS -Ao 'state comm vsz rss'" dnl wonder who takes state instead of stat elif [ps -ao 'state command vsz rss user ppid args' 2>/dev/null | egrep -i "^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+" >/dev/null] then - AC_DEFINE(USE_PS_VARS) - AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) - AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -ao 'state user ppid args'") + AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) + AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[]) + AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -ao 'state user ppid args'",[]) EXTRAS="$EXTRAS check_nagios" - AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -ao 'state uid ppid command args'") - AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n") - AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -ao 'vsz command'") - AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s") - AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -ao 'rss command'") - AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s") + AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -ao 'state uid ppid command args'",[]) + AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n",[]) + AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -ao 'vsz command'",[]) + AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[]) + AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -ao 'rss command'",[]) + AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) echo " ps syntax... $PATH_TO_PS -ao 'state command vsz rss'" dnl FreeBSD elif [ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | egrep -i "^STAT +COMMAND +VSZ +RSS +UID +USER +PPID" >/dev/null] then - AC_DEFINE(USE_PS_VARS) - AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) - AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS waxo 'state uid ppid command'") + AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) + AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[]) + AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS waxo 'state uid ppid command'",[]) EXTRAS="$EXTRAS check_nagios" - AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxco 'state uid ppid command command'") - AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n") - AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS waxco 'vsz command'") - AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s") - AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS waxco 'rss command'") - AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s") + AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxco 'state uid ppid command command'",[]) + AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n",[]) + AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS waxco 'vsz command'",[]) + AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[]) + AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS waxco 'rss command'",[]) + AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) echo " ps syntax... $PATH_TO_PS -Ao 'state command vsz rss'" dnl BSD-like mode in RH 6.1 elif [ps waxno 'state comm vsz rss uid user ppid args' 2>/dev/null | egrep -i "^S +COMMAND +VSZ +RSS +UID +USER +PPID +[RGSCOMDNA]+" >/dev/null] then - AC_DEFINE(USE_PS_VARS) - AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) - AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS waxno 'state user ppid comm'") + AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) + AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[]) + AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS waxno 'state user ppid comm'",[]) EXTRAS="$EXTRAS check_nagios" - AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxno 'state uid ppid comm args'") - AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n") - AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS waxno 'vsz comm'") - AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s") - AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS waxno 'rss comm'") - AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s") + AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxno 'state uid ppid comm args'",[]) + AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n",[]) + AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS waxno 'vsz comm'",[]) + AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[]) + AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS waxno 'rss comm'",[]) + AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s,[]") echo " ps syntax... $PATH_TO_PS -waxco 'state comm vsz rss'" dnl IRIX 53 elif [ps -el 2>/dev/null | egrep -i "^ *F +S +UID +PID +PPID +C +PRI +NI +P +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+" >/dev/null] then - AC_DEFINE(USE_PS_VARS) - AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,&pos,procprog]) - AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -el") - AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s") - AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -el") - AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %d") - AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -el") + AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) + AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,&pos,procprog],[]) + AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -el",[]) + AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s",[]) + AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -el",[]) + AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %d",[]) + AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -el",[]) AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %d") echo " ps syntax... $PATH_TO_PS -el" dnl IRIX 63 elif [ps -el 2>/dev/null | egrep -i "^ *F +S +UID +PID +PPID +C +PRI +NI +P +ADDR +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+" >/dev/null] then - AC_DEFINE(USE_PS_VARS) - AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,&pos,procprog]) - AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -el") - AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s") - AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -el") - AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %d") - AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -el") - AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %d") + AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) + AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,&pos,procprog],[]) + AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -el",[]) + AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s",[]) + AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -el",[]) + AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %d",[]) + AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -el",[]) + AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %d",[]) echo " ps syntax... $PATH_TO_PS -el" dnl SunOS 4.1.3: dnl F UID PID PPID CP PRI NI SZ RSS WCHAN STAT TT TIME COMMAND dnl elif [ps -laxnwww 2>/dev/null | egrep -i "^ *F(LAGS)? +UID +PID +PPID +CP +PRI +NI +(SZ)|(VSZ)|(SIZE) +RSS +WCHAN +STAT? +TTY? +TIME +COMMAND" >/dev/null] then - AC_DEFINE(USE_PS_VARS) - AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS laxnwww") + AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) + AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS laxnwww",[]) EXTRAS="$EXTRAS check_nagios" - AC_DEFINE_UNQUOTED(PS_VARLIST,[&procuid,&procppid,procstat,&pos,procprog]) - AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -laxnwww") - AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %d %*s %d %*s %*s %*s %*s %*s %*s %s %*s %*s %n%s") - AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS laxnwww") - AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %d") - AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS laxnwww") - AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %d") + AC_DEFINE_UNQUOTED(PS_VARLIST,[&procuid,&procppid,procstat,&pos,procprog],[]) + AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -laxnwww",[]) + AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %d %*s %d %*s %*s %*s %*s %*s %*s %s %*s %*s %n%s",[]) + AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS laxnwww",[]) + AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %d",[]) + AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS laxnwww",[]) + AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %d",[]) echo " ps syntax... $PATH_TO_PS laxnwww" dnl Debian Linux / procps v1.2.9: dnl FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMAND @@ -542,16 +536,16 @@ dnl 100 0 1 0 0 0 776 76 c0131c8c S ffff 0:11 init dnl elif [ps laxnwww 2>/dev/null | egrep -i "^ *F(LAGS)? +UID +PID +PPID +PRI +NI +(VSZ)|(SIZE) +RSS +WCHAN +STAT? TTY +TIME +COMMAND" >/dev/null] then - AC_DEFINE(USE_PS_VARS) - AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS laxnwww") + AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) + AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS laxnwww",[]) EXTRAS="$EXTRAS check_nagios" - AC_DEFINE_UNQUOTED(PS_VARLIST,[&procuid,&procppid,procstat,&pos,procprog]) - AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS laxnwww") - AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %d %*s %d %*s %*s %*s %*s %*s %s %*s %*s %n%s") - AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS laxnwww") - AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %d") - AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS laxnwww") - AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %d") + AC_DEFINE_UNQUOTED(PS_VARLIST,[&procuid,&procppid,procstat,&pos,procprog],[]) + AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS laxnwww",[]) + AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %d %*s %d %*s %*s %*s %*s %*s %s %*s %*s %n%s",[]) + AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS laxnwww",[]) + AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %d",[]) + AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS laxnwww",[]) + AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %d",[]) echo " ps syntax... $PATH_TO_PS laxnwww" dnl dnl AIX 4.1: @@ -559,47 +553,27 @@ dnl F S UID PID PPID C PRI NI ADDR SZ RSS WCHAN TTY TIME C dnl 303 A 0 0 0 120 16 -- 1c07 20 24 - 0:45 swapper elif [ps -el 2>/dev/null | egrep -i "^ *F +S +UID +PID +PPID +C +PRI +NI +ADDR +SZ +WCHAN +TTY +TIME +[RGSCOMDNA]+" >/dev/null] then - AC_DEFINE(USE_PS_VARS) - AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,&pos,procprog]) - AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -el") - AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %n%s") - AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -el") - AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %d") - AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -el") - AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %d") + AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) + AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,&pos,procprog],[]) + AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -el",[]) + AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %n%s",[]) + AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -el",[]) + AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %d",[]) + AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -el",[]) + AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %d",[]) echo " ps syntax... $PATH_TO_PS -el" dnl AIX? elif [ps glaxen 2>/dev/null | egrep -i "^ *F +UID +PID +PPID +PRI +NI +VSZ +RSS +WCHAN +STAT +TTY +TIME +COMMAND" >/dev/null] then - AC_DEFINE(USE_PS_VARS) - AC_DEFINE_UNQUOTED(PS_VARLIST,[&procuid,&procppid,procstat,&pos,procprog]) - AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS glaxen") - AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %d %*s %d %*s %*s %*s %*s %*s %s %*s %*s %n%s") - AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS glaxen") - AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %d") - AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS glaxen") - AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %d") + AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) + AC_DEFINE_UNQUOTED(PS_VARLIST,[&procuid,&procppid,procstat,&pos,procprog],[]) + AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS glaxen",[]) + AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %d %*s %d %*s %*s %*s %*s %*s %s %*s %*s %n%s",[]) + AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS glaxen",[]) + AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %d",[]) + AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS glaxen",[]) + AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %d",[]) echo " ps syntax... $PATH_TO_PS glaxen" -dnl ucb style? -dnl elif [ps axun 2>/dev/null | egrep -i "^USER +PID +%CPU +%MEM +SIZE +RSS +TTY +STAT +START +TIME +COMMAND *$" >/dev/null] -dnl then -dnl AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS axun") -dnl AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %*s %*s %*s %*s %*s %s %*s %*s %s") -dnl AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS axun") -dnl AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %d") -dnl AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS axun") -dnl AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %d") -dnl echo " ps syntax... $PATH_TO_PS axun" -dnl ucb style? -dnl elif [ps axun 2>/dev/null | egrep -i "^USER +PID +%CPU +%MEM +SIZE +RSS +TTY +STAT +START +TIME +COMMAND" >/dev/null] -dnl then -dnl AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS axun") -dnl AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %*s %*s %*s %*s %*s %s %*s %*s %s") -dnl AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS axun") -dnl AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %d") -dnl AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS axun") -dnl AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %d") -dnl echo " ps syntax... $PATH_TO_PS axun" else echo "** Unable to find usable ps syntax" fi @@ -607,27 +581,27 @@ fi AC_ARG_WITH(df_command,--with-df-command= sets syntax for df,DF_COMMAND=$withval) if test -n "$DF_COMMAND" then - AC_DEFINE_UNQUOTED(DF_COMMAND,"$DF_COMMAND") + AC_DEFINE_UNQUOTED(DF_COMMAND,"$DF_COMMAND",[path and args for df command]) 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] then AC_PATH_PROG(PATH_TO_DF,df) AC_MSG_RESULT(" df syntax... $PATH_TO_DF -Pk") - AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF -Pk") + AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF -Pk",[path and args for df command]) 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] then AC_PATH_PROG(PATH_TO_DF,df) AC_MSG_RESULT(" df syntax... $PATH_TO_DF -k") - AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF -k") + AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF -k",[path and args for df command]) elif [df 2>/dev/null | egrep -i "^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*" >/dev/null] then AC_PATH_PROG(PATH_TO_DF,df) AC_MSG_RESULT(" df syntax... $PATH_TO_DF") - AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF") + AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF",[path and args for df command]) elif [bdf 2>/dev/null | egrep -i "^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*" >/dev/null] then AC_PATH_PROG(PATH_TO_DF,bdf) AC_MSG_RESULT(" df syntax... $PATH_TO_DF") - AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF") + AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF",[path and args for df command]) else AC_MSG_WARN("unable to find usable df syntax") fi @@ -640,17 +614,17 @@ then echo " ping syntax... (command-line) $PING_COMMAND" if test -n "$PING_PACKETS_FIRST" then - AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND") + AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND",[Define if packet count must precede host]) fi elif [ping -n -U -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] then PING_COMMAND="$PATH_TO_PING -n -U -c %d %s" - AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND") + AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND",[Define if packet count must precede host]) echo " ping syntax... $PATH_TO_PING -n -U -c " elif [ping -n -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] then PING_COMMAND="$PATH_TO_PING -n -c %d %s" - AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND") + AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND",[Define if packet count must precede host]) echo " ping syntax... $PATH_TO_PING -n -c " elif [ping -n 127.0.0.1 -c 1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] then @@ -671,17 +645,17 @@ then elif [ping -n -s 56 -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] then PING_COMMAND="$PATH_TO_PING -n -s 56 -c %d %s" - AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND") + AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND",[Define if packet count must precede host]) echo " ping syntax... $PATH_TO_PING -n -s 56 -c " elif [ping -n -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] then PING_COMMAND="$PATH_TO_PING -n -c %d %s" - AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND") + AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND",[Define if packet count must precede host]) echo " ping syntax... $PATH_TO_PING -n -c " else AC_MSG_WARN("unable to find usable ping syntax") fi -AC_DEFINE_UNQUOTED(PING_COMMAND,"$PING_COMMAND") +AC_DEFINE_UNQUOTED(PING_COMMAND,"$PING_COMMAND",[path and args for ping command]) AC_PATH_PROG(PATH_TO_NSLOOKUP,nslookup) if test -n "$ac_cv_path_PATH_TO_NSLOOKUP" @@ -690,10 +664,10 @@ then if [nslookup -sil 127.0.0.1 2>&1 | grep "*** Invalid option: sil" >/dev/null] then AC_MSG_RESULT("$PATH_TO_NSLOOKUP") - AC_DEFINE_UNQUOTED(NSLOOKUP_COMMAND,"$PATH_TO_NSLOOKUP") + AC_DEFINE_UNQUOTED(NSLOOKUP_COMMAND,"$PATH_TO_NSLOOKUP",[path and args for nslookup]) else AC_MSG_RESULT("$PATH_TO_NSLOOKUP -sil") - AC_DEFINE_UNQUOTED(NSLOOKUP_COMMAND,"$PATH_TO_NSLOOKUP -sil") + AC_DEFINE_UNQUOTED(NSLOOKUP_COMMAND,"$PATH_TO_NSLOOKUP -sil",[path and args for nslookup]) fi EXTRAS="$EXTRAS check_dns" else @@ -707,7 +681,7 @@ then if [host 127.0.0.1 2>&1 | grep -v "ommand not found" > /dev/null] then AC_MSG_RESULT("$PATH_TO_HOST") - AC_DEFINE_UNQUOTED(HOST_COMMAND,"$PATH_TO_HOST") + AC_DEFINE_UNQUOTED(HOST_COMMAND,"$PATH_TO_HOST",[path to host binary]) fi EXTRAS="$EXTRAS check_dns" else @@ -715,17 +689,17 @@ else fi AC_PATH_PROG(PATH_TO_UPTIME,uptime) -AC_DEFINE_UNQUOTED(PATH_TO_UPTIME,"$PATH_TO_UPTIME") +AC_DEFINE_UNQUOTED(PATH_TO_UPTIME,"$PATH_TO_UPTIME",[path to uptime binary]) AC_PATH_PROG(PATH_TO_RPCINFO,rpcinfo) -AC_DEFINE_UNQUOTED(PATH_TO_RPCINFO,"$PATH_TO_RPCINFO") +AC_DEFINE_UNQUOTED(PATH_TO_RPCINFO,"$PATH_TO_RPCINFO",[path to rpcinfo binary]) AC_PATH_PROG(PATH_TO_NTPDATE,ntpdate) AC_PATH_PROGS(PATH_TO_NTPDC,ntpdc xntpdc) if (test -x "$PATH_TO_NTPDATE" || test -x "$PATH_TO_NTPDC") then - AC_DEFINE_UNQUOTED(PATH_TO_NTPDC,"$PATH_TO_NTPDC") - AC_DEFINE_UNQUOTED(PATH_TO_NTPDATE,"$PATH_TO_NTPDATE") + AC_DEFINE_UNQUOTED(PATH_TO_NTPDC,"$PATH_TO_NTPDC",[path to ntpdc binary]) + AC_DEFINE_UNQUOTED(PATH_TO_NTPDATE,"$PATH_TO_NTPDATE",[path to ntpdate binary]) else echo "** Install NTP programs (http://www.ntp.org) if you want to monitor time synchronization" fi @@ -733,7 +707,7 @@ fi AC_PATH_PROG(PATH_TO_LMSTAT,lmstat) if test -x "$PATH_TO_LMSTAT" then - AC_DEFINE_UNQUOTED(PATH_TO_LMSTAT,"$PATH_TO_LMSTAT") + AC_DEFINE_UNQUOTED(PATH_TO_LMSTAT,"$PATH_TO_LMSTAT",[path to lmstat]) else echo "** Get lmstat from Globetrotter Software to monitor flexlm licenses" fi @@ -741,7 +715,7 @@ fi AC_PATH_PROG(PATH_TO_SMBCLIENT,smbclient) if test -x "$PATH_TO_SMBCLIENT" then - AC_DEFINE_UNQUOTED(PATH_TO_SMBCLIENT,"$PATH_TO_SMBCLIENT") + AC_DEFINE_UNQUOTED(PATH_TO_SMBCLIENT,"$PATH_TO_SMBCLIENT",[path to smbclient binary]) else echo "** Get smbclient from Samba.org to monitor SMB shares" fi @@ -750,15 +724,15 @@ fi AC_PATH_PROG(PATH_TO_WHO,who) if [who -q 2>/dev/null | egrep -i "^# users=[0-9]+$" >/dev/null] then - AC_DEFINE_UNQUOTED(WHO_COMMAND,"$PATH_TO_WHO -q") + AC_DEFINE_UNQUOTED(WHO_COMMAND,"$PATH_TO_WHO -q",[path and arguments for invoking 'who']) else - AC_DEFINE_UNQUOTED(WHO_COMMAND,"$PATH_TO_WHO") + AC_DEFINE_UNQUOTED(WHO_COMMAND,"$PATH_TO_WHO",[path and arguments for invoking 'who']) fi AC_PATH_PROG(PATH_TO_SNMPGET,snmpget) if test -x "$PATH_TO_SNMPGET" then - AC_DEFINE_UNQUOTED(PATH_TO_SNMPGET,"$PATH_TO_SNMPGET") + AC_DEFINE_UNQUOTED(PATH_TO_SNMPGET,"$PATH_TO_SNMPGET",[path to snmpget binary]) EXTRAS="$EXTRAS check_hpjd check_snmp" else echo "** Get snmpget from http://net-snmp.sourceforge.net to make check_hpjd and check_snmp plugins" @@ -767,7 +741,7 @@ fi AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext) if test -x "$PATH_TO_SNMPGETNEXT" then - AC_DEFINE_UNQUOTED(PATH_TO_SNMPGETNEXT,"$PATH_TO_SNMPGETNEXT") + AC_DEFINE_UNQUOTED(PATH_TO_SNMPGETNEXT,"$PATH_TO_SNMPGETNEXT",[path to snmpgetnext binary]) fi if ( $PERL -M"Net::SNMP 3.6" -e 'exit' 2>/dev/null ) @@ -782,11 +756,11 @@ AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat) AC_PATH_PROG(PATH_TO_QSTAT,qstat) if test -x "$PATH_TO_QUAKESTAT" then - AC_DEFINE_UNQUOTED(PATH_TO_QSTAT,"$PATH_TO_QUAKESTAT") + AC_DEFINE_UNQUOTED(PATH_TO_QSTAT,"$PATH_TO_QUAKESTAT",[path to qstat/quakestat]) EXTRAS="$EXTRAS check_game" elif test -x "$PATH_TO_QSTAT" then - AC_DEFINE_UNQUOTED(PATH_TO_QSTAT,"$PATH_TO_QSTAT") + AC_DEFINE_UNQUOTED(PATH_TO_QSTAT,"$PATH_TO_QSTAT",[path to qstat/quakestat]) EXTRAS="$EXTRAS check_game" else echo "** Get qstat from http://www.activesw.com/people/steve/qstat.html in order to make check_game plugin" @@ -795,7 +769,7 @@ fi AC_PATH_PROG(PATH_TO_FPING,fping) if test -x "$PATH_TO_FPING" then - AC_DEFINE_UNQUOTED(PATH_TO_FPING,"$PATH_TO_FPING") + AC_DEFINE_UNQUOTED(PATH_TO_FPING,"$PATH_TO_FPING",[path to fping]) EXTRAS="$EXTRAS check_fping" else echo "** Get fping from http://www.fping.com in order to make check_fping plugin" @@ -804,7 +778,7 @@ fi AC_PATH_PROG(PATH_TO_SSH,ssh) if test -x "$PATH_TO_SSH" then - AC_DEFINE_UNQUOTED(SSH_COMMAND,"$PATH_TO_SSH") + AC_DEFINE_UNQUOTED(SSH_COMMAND,"$PATH_TO_SSH",[path to ssh binary]) EXTRAS="$EXTRAS check_by_ssh" else echo "** Get ssh in order to make check_by_ssh plugin" @@ -817,8 +791,8 @@ dnl if /bin/test -e "/proc/meminfo" if [cat /proc/meminfo > /dev/null 2>&1] then echo "found /proc/meminfo" - AC_DEFINE(HAVE_PROC_MEMINFO) - AC_DEFINE_UNQUOTED(PROC_MEMINFO,"/proc/meminfo") + AC_DEFINE(HAVE_PROC_MEMINFO,1,[Define if we have /proc/meminfo]) + AC_DEFINE_UNQUOTED(PROC_MEMINFO,"/proc/meminfo",[path to /proc/meminfo (if name changes or something)]) EXTRAS="$EXTRAS check_swap" elif [swap -l 2>&1 | egrep -i "swapfile" >/dev/null] then diff --git a/missing b/missing index 7789652..6a37006 100755 --- a/missing +++ b/missing @@ -1,7 +1,7 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -# Copyright (C) 1996, 1997 Free Software Foundation, Inc. -# Franc,ois Pinard , 1996. +# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc. +# Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,11 +18,37 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi +run=: + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +case "$1" in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. case "$1" in -h|--h|--he|--hel|--help) @@ -35,6 +61,7 @@ error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' @@ -43,13 +70,15 @@ Supported PROGRAM values: automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing - GNU libit 0.0" + echo "missing 0.4 - GNU automake" ;; -*) @@ -58,31 +87,46 @@ Supported PROGRAM values: exit 1 ;; - aclocal) + aclocal*) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acinclude.m4' or \`configure.in'. You might want + you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if - you modified \`configure.in'. You might want to install the + you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acconfig.h' or \`configure.in'. You might want + you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in` + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do @@ -95,10 +139,15 @@ WARNING: \`$1' is missing on your system. You should only need it if touch $touch_files ;; - automake) + automake*) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | @@ -106,6 +155,34 @@ WARNING: \`$1' is missing on your system. You should only need it if while read f; do touch "$f"; done ;; + autom4te) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is needed, and you do not seem to have it handy on your + system. You might have modified some files without having the + proper tools for further handling them. + You can get \`$1Help2man' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` + test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + bison|yacc) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if @@ -159,7 +236,37 @@ WARNING: \`$1' is missing on your system. You should only need it if fi ;; + help2man) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` + fi + if [ -f "$file" ]; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit 1 + fi + ;; + makeinfo) + if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then + # We have makeinfo, but it failed. + exit 1 + fi + echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file @@ -175,6 +282,45 @@ WARNING: \`$1' is missing on your system. You should only need it if touch $file ;; + tar) + shift + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + fi + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar "$@" && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar "$@" && exit 0 + fi + firstarg="$1" + if shift; then + case "$firstarg" in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + case "$firstarg" in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + *) echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your -- cgit v0.10-9-g596f