summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.in352
-rwxr-xr-xmissing166
2 files changed, 319 insertions, 199 deletions
diff --git a/configure.in b/configure.in
index f4974828..17952e7c 100644
--- a/configure.in
+++ b/configure.in
@@ -21,9 +21,9 @@ AC_PROG_CC
21AC_PROG_MAKE_SET 21AC_PROG_MAKE_SET
22AC_PROG_AWK 22AC_PROG_AWK
23 23
24AC_FUNC_GETLOADAVG 24AC_FUNC_GETLOADAVG(plugins)
25AC_FUNC_STRTOD 25AC_FUNC_STRTOD
26AM_WITH_REGEX 26dnl AM_WITH_REGEX
27AC_PROG_RANLIB 27AC_PROG_RANLIB
28 28
29AC_PATH_PROG(ACLOCAL,aclocal) 29AC_PATH_PROG(ACLOCAL,aclocal)
@@ -43,10 +43,6 @@ AC_SUBST(WARRANTY)
43SUPPORT="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" 43SUPPORT="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"
44AC_SUBST(SUPPORT) 44AC_SUBST(SUPPORT)
45 45
46dnl AC_ARG_PROGRAM
47
48dnl AC_ARG_WITH(nonposix_state_defs,--with-nonposix-state-defs uses POSIXLY incorrect states for netsaint < 0.0.7b2,,AC_DEFINE(POSIX_STATE_DEFS))
49
50dnl CGIURL has changed for Nagios with 1.0 beta 46dnl CGIURL has changed for Nagios with 1.0 beta
51AC_ARG_WITH(cgiurl,--with-cgiurl=<dir> sets URL for cgi programs,cgiurl=$withval,cgiurl=/nagios/cgi-bin) 47AC_ARG_WITH(cgiurl,--with-cgiurl=<dir> sets URL for cgi programs,cgiurl=$withval,cgiurl=/nagios/cgi-bin)
52CGIURL="$cgiurl" 48CGIURL="$cgiurl"
@@ -80,8 +76,6 @@ dnl
80dnl Checks for libraries. 76dnl Checks for libraries.
81dnl 77dnl
82 78
83AC_FUNC_GETLOADAVG(plugins)
84
85AC_CHECK_LIB(dce,main,SOCKETLIBS="$SOCKETLIBS -ldce") 79AC_CHECK_LIB(dce,main,SOCKETLIBS="$SOCKETLIBS -ldce")
86AC_CHECK_LIB(nsl,main,SOCKETLIBS="$SOCKETLIBS -lnsl") 80AC_CHECK_LIB(nsl,main,SOCKETLIBS="$SOCKETLIBS -lnsl")
87AC_CHECK_LIB(socket,socket,SOCKETLIBS="$SOCKETLIBS -lsocket") 81AC_CHECK_LIB(socket,socket,SOCKETLIBS="$SOCKETLIBS -lsocket")
@@ -282,7 +276,7 @@ AC_TRY_RUN([#include <stdio.h>
282main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }], 276main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }],
283ac_cv_have_longlong=yes,ac_cv_have_longlong=no,ac_cv_have_longlong=cross)]) 277ac_cv_have_longlong=yes,ac_cv_have_longlong=no,ac_cv_have_longlong=cross)])
284if test x"$ac_cv_have_longlong" = x"yes"; then 278if test x"$ac_cv_have_longlong" = x"yes"; then
285 AC_DEFINE(HAVE_LONGLONG) 279 AC_DEFINE(HAVE_LONGLONG,1,[Define if system has long long type])
286fi 280fi
287 281
288# 282#
@@ -293,14 +287,14 @@ AC_CACHE_CHECK([for LL suffix on long long integers],ac_cv_compiler_supports_ll,
293 AC_TRY_COMPILE([#include <stdio.h>],[long long i = 0x8000000000LL], 287 AC_TRY_COMPILE([#include <stdio.h>],[long long i = 0x8000000000LL],
294 ac_cv_compiler_supports_ll=yes,ac_cv_compiler_supports_ll=no)]) 288 ac_cv_compiler_supports_ll=yes,ac_cv_compiler_supports_ll=no)])
295if test x"$ac_cv_compiler_supports_ll" = x"yes"; then 289if test x"$ac_cv_compiler_supports_ll" = x"yes"; then
296 AC_DEFINE(COMPILER_SUPPORTS_LL) 290 AC_DEFINE(COMPILER_SUPPORTS_LL,1,[Define if compiler support long long])
297fi 291fi
298AC_CACHE_CHECK([for __va_copy],ac_cv_HAVE_VA_COPY,[ 292AC_CACHE_CHECK([for __va_copy],ac_cv_HAVE_VA_COPY,[
299AC_TRY_LINK([#include <stdarg.h> 293AC_TRY_LINK([#include <stdarg.h>
300va_list ap1,ap2;], [__va_copy(ap1,ap2);], 294va_list ap1,ap2;], [__va_copy(ap1,ap2);],
301ac_cv_HAVE_VA_COPY=yes,ac_cv_HAVE_VA_COPY=no)]) 295ac_cv_HAVE_VA_COPY=yes,ac_cv_HAVE_VA_COPY=no)])
302if test x"$ac_cv_HAVE_VA_COPY" = x"yes"; then 296if test x"$ac_cv_HAVE_VA_COPY" = x"yes"; then
303 AC_DEFINE(HAVE_VA_COPY) 297 AC_DEFINE(HAVE_VA_COPY,1,[Define if system has va_copy])
304fi 298fi
305 299
306AC_CACHE_CHECK([for C99 vsnprintf],ac_cv_HAVE_C99_VSNPRINTF,[ 300AC_CACHE_CHECK([for C99 vsnprintf],ac_cv_HAVE_C99_VSNPRINTF,[
@@ -330,7 +324,7 @@ main() { foo("hello"); }
330], 324],
331ac_cv_HAVE_C99_VSNPRINTF=yes,ac_cv_HAVE_C99_VSNPRINTF=no,ac_cv_HAVE_C99_VSNPRINTF=cross)]) 325ac_cv_HAVE_C99_VSNPRINTF=yes,ac_cv_HAVE_C99_VSNPRINTF=no,ac_cv_HAVE_C99_VSNPRINTF=cross)])
332if test x"$ac_cv_HAVE_C99_VSNPRINTF" = x"yes"; then 326if test x"$ac_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
333 AC_DEFINE(HAVE_C99_VSNPRINTF) 327 AC_DEFINE(HAVE_C99_VSNPRINTF,1,[Define if system has C99 compatible vsnprintf])
334fi 328fi
335 329
336dnl We used to not do long options unless a compatible lib was found 330dnl We used to not do long options unless a compatible lib was found
@@ -369,7 +363,7 @@ AC_TRY_COMPILE([#include <stdlib.h>
369if test -f "/proc/loadavg" 363if test -f "/proc/loadavg"
370then 364then
371 AC_DEFINE(HAVE_PROC_LOADAVG,1,[Define if /proc/loadavg or similar exists]) 365 AC_DEFINE(HAVE_PROC_LOADAVG,1,[Define if /proc/loadavg or similar exists])
372 AC_DEFINE_UNQUOTED(PROC_LOADAVG,"/proc/loadavg"[Location of /proc/loadavg]) 366 AC_DEFINE_UNQUOTED(PROC_LOADAVG,"/proc/loadavg",[Location of /proc/loadavg])
373fi 367fi
374 368
375AC_PATH_PROG(PATH_TO_PS,ps) 369AC_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
377dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND 371dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND
378if [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] 372if [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]
379then 373then
380 AC_DEFINE(USE_PS_VARS) 374 AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf])
381 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) 375 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[Variable list for sscanf of 'ps' output])
382 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -axo 'stat user ppid args'") 376 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -axo 'stat user ppid args'",[Verbatim command to execute for ps in check_netsaint])
383 EXTRAS="$EXTRAS check_nagios" 377 EXTRAS="$EXTRAS check_nagios"
384 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -axo 'stat uid ppid comm args'") 378 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -axo 'stat uid ppid comm args'",[Verbatim command to execute for ps in check_procs])
385 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n") 379 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n",[Format string for scanning ps output in check_procs])
386 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -axo 'vsz comm'") 380 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -axo 'vsz comm'",[Verbatim command to execute for ps in check_vsz])
387 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s") 381 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[Format string for scanning ps output in check_vsz])
388 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -axo 'rss comm'") 382 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -axo 'rss comm'",[Verbatim command to execute for ps in check_rss])
389 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s") 383 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[Format string for scanning ps output in check_rss])
390 echo " ps syntax... $PATH_TO_PS -axo 'stat comm vsz rss user ppid args'" 384 echo " ps syntax... $PATH_TO_PS -axo 'stat comm vsz rss user ppid args'"
391dnl AIX 4.3.3 - needs verification. 385dnl AIX 4.3.3 - needs verification.
392elif [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] 386elif [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]
393then 387then
394 AC_DEFINE(USE_PS_VARS) 388 AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf])
395 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) 389 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[Variable list for sscanf of 'ps' output])
396 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -ao 'stat user ppid args'") 390 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -ao 'stat user ppid args'",[Verbatim command to execute for ps in check_netsaint])
397 EXTRAS="$EXTRAS check_nagios" 391 EXTRAS="$EXTRAS check_nagios"
398 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -ao 'stat uid ppid comm args'") 392 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -ao 'stat uid ppid comm args'")
399 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n") 393 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n"[Format string for scanning ps output in check_procs])
400 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -ao 'vsz comm'") 394 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -ao 'vsz comm'",[])
401 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s") 395 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[])
402 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -ao 'rss comm'") 396 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -ao 'rss comm'",[])
403 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s") 397 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[])
404 echo " ps syntax... $PATH_TO_PS -ao 'stat comm vsz rss user ppid args'" 398 echo " ps syntax... $PATH_TO_PS -ao 'stat comm vsz rss user ppid args'"
405elif [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] 399elif [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]
406then 400then
407 AC_DEFINE(USE_PS_VARS) 401 AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf])
408 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) 402 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[Variable list for sscanf of 'ps' output])
409 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -eo 's user ppid args'") 403 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -eo 's user ppid args'",[Verbatim command to execute for ps in check_netsaint])
410 EXTRAS="$EXTRAS check_nagios" 404 EXTRAS="$EXTRAS check_nagios"
411 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -eo 's uid ppid comm args'") 405 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -eo 's uid ppid comm args'")
412 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n") 406 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n"[Format string for scanning ps output in check_procs])
413 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -eo 'vsz comm'") 407 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -eo 'vsz comm'",[])
414 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s") 408 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[])
415 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -eo 'rss comm'") 409 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -eo 'rss comm'",[])
416 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s") 410 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[])
417 echo " ps syntax... $PATH_TO_PS -eo 's comm vsz rss user ppid args'" 411 echo " ps syntax... $PATH_TO_PS -eo 's comm vsz rss user ppid args'"
418elif [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] 412elif [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]
419then 413then
420 AC_DEFINE(USE_PS_VARS) 414 AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf])
421 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) 415 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[Variable list for sscanf of 'ps' output])
422 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -Ao 's user ppid args'") 416 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -Ao 's user ppid args'",[Verbatim command to execute for ps in check_netsaint])
423 EXTRAS="$EXTRAS check_nagios" 417 EXTRAS="$EXTRAS check_nagios"
424 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -Ao 's uid ppid comm args'") 418 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -Ao 's uid ppid comm args'",[])
425 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n") 419 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n"[Format string for scanning ps output in check_procs],[])
426 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -Ao 'vsz comm'") 420 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -Ao 'vsz comm'",[])
427 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s") 421 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[])
428 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -Ao 'rss comm'") 422 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -Ao 'rss comm'",[])
429 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s") 423 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[])
430 echo " ps syntax... $PATH_TO_PS -Ao 's comm vsz rss'" 424 echo " ps syntax... $PATH_TO_PS -Ao 's comm vsz rss'"
431elif [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] 425elif [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]
432then 426then
433 AC_DEFINE(USE_PS_VARS) 427 AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
434 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) 428 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos])
435 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -Ao 'status user ppid args'") 429 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -Ao 'status user ppid args'",[Verbatim command to execute for ps in check_netsaint])
436 EXTRAS="$EXTRAS check_nagios" 430 EXTRAS="$EXTRAS check_nagios"
437 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -Ao 'status uid ppid comm args'") 431 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -Ao 'status uid ppid comm args'",[])
438 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n") 432 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n"[Format string for scanning ps output in check_procs])
439 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -Ao 'vsz comm'") 433 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -Ao 'vsz comm'",[])
440 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s") 434 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[])
441 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -Ao 'rss comm'") 435 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -Ao 'rss comm'",[])
442 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s") 436 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[])
443 echo " ps syntax... $PATH_TO_PS -Ao 'status comm vsz rss'" 437 echo " ps syntax... $PATH_TO_PS -Ao 'status comm vsz rss'"
444elif [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] 438elif [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]
445then 439then
446 AC_DEFINE(USE_PS_VARS) 440 AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
447 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) 441 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos])
448 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -Ao 'state user ppid args'") 442 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -Ao 'state user ppid args'",[Verbatim command to execute for ps in check_netsaint])
449 EXTRAS="$EXTRAS check_nagios" 443 EXTRAS="$EXTRAS check_nagios"
450 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -Ao 'state uid ppid comm args'") 444 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -Ao 'state uid ppid comm args'",[])
451 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n") 445 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n"[Format string for scanning ps output in check_procs])
452 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -Ao 'vsz comm'") 446 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -Ao 'vsz comm'",[])
453 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s") 447 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[])
454 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -Ao 'rss comm'") 448 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -Ao 'rss comm'",[])
455 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s") 449 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[])
456 echo " ps syntax... $PATH_TO_PS -Ao 'state comm vsz rss'" 450 echo " ps syntax... $PATH_TO_PS -Ao 'state comm vsz rss'"
457dnl wonder who takes state instead of stat 451dnl wonder who takes state instead of stat
458elif [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] 452elif [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]
459then 453then
460 AC_DEFINE(USE_PS_VARS) 454 AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
461 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) 455 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[])
462 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -ao 'state user ppid args'") 456 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -ao 'state user ppid args'",[])
463 EXTRAS="$EXTRAS check_nagios" 457 EXTRAS="$EXTRAS check_nagios"
464 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -ao 'state uid ppid command args'") 458 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -ao 'state uid ppid command args'",[])
465 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n") 459 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n",[])
466 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -ao 'vsz command'") 460 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -ao 'vsz command'",[])
467 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s") 461 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[])
468 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -ao 'rss command'") 462 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -ao 'rss command'",[])
469 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s") 463 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[])
470 echo " ps syntax... $PATH_TO_PS -ao 'state command vsz rss'" 464 echo " ps syntax... $PATH_TO_PS -ao 'state command vsz rss'"
471dnl FreeBSD 465dnl FreeBSD
472elif [ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | egrep -i "^STAT +COMMAND +VSZ +RSS +UID +USER +PPID" >/dev/null] 466elif [ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | egrep -i "^STAT +COMMAND +VSZ +RSS +UID +USER +PPID" >/dev/null]
473then 467then
474 AC_DEFINE(USE_PS_VARS) 468 AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
475 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) 469 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[])
476 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS waxo 'state uid ppid command'") 470 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS waxo 'state uid ppid command'",[])
477 EXTRAS="$EXTRAS check_nagios" 471 EXTRAS="$EXTRAS check_nagios"
478 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxco 'state uid ppid command command'") 472 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxco 'state uid ppid command command'",[])
479 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n") 473 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n",[])
480 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS waxco 'vsz command'") 474 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS waxco 'vsz command'",[])
481 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s") 475 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[])
482 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS waxco 'rss command'") 476 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS waxco 'rss command'",[])
483 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s") 477 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[])
484 echo " ps syntax... $PATH_TO_PS -Ao 'state command vsz rss'" 478 echo " ps syntax... $PATH_TO_PS -Ao 'state command vsz rss'"
485dnl BSD-like mode in RH 6.1 479dnl BSD-like mode in RH 6.1
486elif [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] 480elif [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]
487then 481then
488 AC_DEFINE(USE_PS_VARS) 482 AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
489 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) 483 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[])
490 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS waxno 'state user ppid comm'") 484 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS waxno 'state user ppid comm'",[])
491 EXTRAS="$EXTRAS check_nagios" 485 EXTRAS="$EXTRAS check_nagios"
492 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxno 'state uid ppid comm args'") 486 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxno 'state uid ppid comm args'",[])
493 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n") 487 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n",[])
494 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS waxno 'vsz comm'") 488 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS waxno 'vsz comm'",[])
495 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s") 489 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[])
496 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS waxno 'rss comm'") 490 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS waxno 'rss comm'",[])
497 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s") 491 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s,[]")
498 echo " ps syntax... $PATH_TO_PS -waxco 'state comm vsz rss'" 492 echo " ps syntax... $PATH_TO_PS -waxco 'state comm vsz rss'"
499dnl IRIX 53 493dnl IRIX 53
500elif [ps -el 2>/dev/null | egrep -i "^ *F +S +UID +PID +PPID +C +PRI +NI +P +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+" >/dev/null] 494elif [ps -el 2>/dev/null | egrep -i "^ *F +S +UID +PID +PPID +C +PRI +NI +P +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+" >/dev/null]
501then 495then
502 AC_DEFINE(USE_PS_VARS) 496 AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
503 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,&pos,procprog]) 497 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,&pos,procprog],[])
504 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -el") 498 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -el",[])
505 AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s") 499 AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s",[])
506 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -el") 500 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -el",[])
507 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %d") 501 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %d",[])
508 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -el") 502 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -el",[])
509 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %d") 503 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %d")
510 echo " ps syntax... $PATH_TO_PS -el" 504 echo " ps syntax... $PATH_TO_PS -el"
511dnl IRIX 63 505dnl IRIX 63
512elif [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] 506elif [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]
513then 507then
514 AC_DEFINE(USE_PS_VARS) 508 AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
515 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,&pos,procprog]) 509 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,&pos,procprog],[])
516 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -el") 510 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -el",[])
517 AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s") 511 AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s",[])
518 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -el") 512 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -el",[])
519 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %d") 513 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %d",[])
520 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -el") 514 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -el",[])
521 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %d") 515 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %d",[])
522 echo " ps syntax... $PATH_TO_PS -el" 516 echo " ps syntax... $PATH_TO_PS -el"
523dnl SunOS 4.1.3: 517dnl SunOS 4.1.3:
524dnl F UID PID PPID CP PRI NI SZ RSS WCHAN STAT TT TIME COMMAND 518dnl F UID PID PPID CP PRI NI SZ RSS WCHAN STAT TT TIME COMMAND
525dnl 519dnl
526elif [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] 520elif [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]
527then 521then
528 AC_DEFINE(USE_PS_VARS) 522 AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
529 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS laxnwww") 523 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS laxnwww",[])
530 EXTRAS="$EXTRAS check_nagios" 524 EXTRAS="$EXTRAS check_nagios"
531 AC_DEFINE_UNQUOTED(PS_VARLIST,[&procuid,&procppid,procstat,&pos,procprog]) 525 AC_DEFINE_UNQUOTED(PS_VARLIST,[&procuid,&procppid,procstat,&pos,procprog],[])
532 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -laxnwww") 526 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -laxnwww",[])
533 AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %d %*s %d %*s %*s %*s %*s %*s %*s %s %*s %*s %n%s") 527 AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %d %*s %d %*s %*s %*s %*s %*s %*s %s %*s %*s %n%s",[])
534 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS laxnwww") 528 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS laxnwww",[])
535 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %d") 529 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %d",[])
536 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS laxnwww") 530 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS laxnwww",[])
537 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %d") 531 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %d",[])
538 echo " ps syntax... $PATH_TO_PS laxnwww" 532 echo " ps syntax... $PATH_TO_PS laxnwww"
539dnl Debian Linux / procps v1.2.9: 533dnl Debian Linux / procps v1.2.9:
540dnl FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMAND 534dnl 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
542dnl 536dnl
543elif [ps laxnwww 2>/dev/null | egrep -i "^ *F(LAGS)? +UID +PID +PPID +PRI +NI +(VSZ)|(SIZE) +RSS +WCHAN +STAT? TTY +TIME +COMMAND" >/dev/null] 537elif [ps laxnwww 2>/dev/null | egrep -i "^ *F(LAGS)? +UID +PID +PPID +PRI +NI +(VSZ)|(SIZE) +RSS +WCHAN +STAT? TTY +TIME +COMMAND" >/dev/null]
544then 538then
545 AC_DEFINE(USE_PS_VARS) 539 AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
546 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS laxnwww") 540 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS laxnwww",[])
547 EXTRAS="$EXTRAS check_nagios" 541 EXTRAS="$EXTRAS check_nagios"
548 AC_DEFINE_UNQUOTED(PS_VARLIST,[&procuid,&procppid,procstat,&pos,procprog]) 542 AC_DEFINE_UNQUOTED(PS_VARLIST,[&procuid,&procppid,procstat,&pos,procprog],[])
549 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS laxnwww") 543 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS laxnwww",[])
550 AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %d %*s %d %*s %*s %*s %*s %*s %s %*s %*s %n%s") 544 AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %d %*s %d %*s %*s %*s %*s %*s %s %*s %*s %n%s",[])
551 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS laxnwww") 545 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS laxnwww",[])
552 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %d") 546 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %d",[])
553 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS laxnwww") 547 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS laxnwww",[])
554 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %d") 548 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %d",[])
555 echo " ps syntax... $PATH_TO_PS laxnwww" 549 echo " ps syntax... $PATH_TO_PS laxnwww"
556dnl 550dnl
557dnl AIX 4.1: 551dnl AIX 4.1:
@@ -559,47 +553,27 @@ dnl F S UID PID PPID C PRI NI ADDR SZ RSS WCHAN TTY TIME C
559dnl 303 A 0 0 0 120 16 -- 1c07 20 24 - 0:45 swapper 553dnl 303 A 0 0 0 120 16 -- 1c07 20 24 - 0:45 swapper
560elif [ps -el 2>/dev/null | egrep -i "^ *F +S +UID +PID +PPID +C +PRI +NI +ADDR +SZ +WCHAN +TTY +TIME +[RGSCOMDNA]+" >/dev/null] 554elif [ps -el 2>/dev/null | egrep -i "^ *F +S +UID +PID +PPID +C +PRI +NI +ADDR +SZ +WCHAN +TTY +TIME +[RGSCOMDNA]+" >/dev/null]
561then 555then
562 AC_DEFINE(USE_PS_VARS) 556 AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
563 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,&pos,procprog]) 557 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,&pos,procprog],[])
564 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -el") 558 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -el",[])
565 AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %n%s") 559 AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %n%s",[])
566 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -el") 560 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -el",[])
567 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %d") 561 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %d",[])
568 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -el") 562 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -el",[])
569 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %d") 563 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %d",[])
570 echo " ps syntax... $PATH_TO_PS -el" 564 echo " ps syntax... $PATH_TO_PS -el"
571dnl AIX? 565dnl AIX?
572elif [ps glaxen 2>/dev/null | egrep -i "^ *F +UID +PID +PPID +PRI +NI +VSZ +RSS +WCHAN +STAT +TTY +TIME +COMMAND" >/dev/null] 566elif [ps glaxen 2>/dev/null | egrep -i "^ *F +UID +PID +PPID +PRI +NI +VSZ +RSS +WCHAN +STAT +TTY +TIME +COMMAND" >/dev/null]
573then 567then
574 AC_DEFINE(USE_PS_VARS) 568 AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
575 AC_DEFINE_UNQUOTED(PS_VARLIST,[&procuid,&procppid,procstat,&pos,procprog]) 569 AC_DEFINE_UNQUOTED(PS_VARLIST,[&procuid,&procppid,procstat,&pos,procprog],[])
576 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS glaxen") 570 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS glaxen",[])
577 AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %d %*s %d %*s %*s %*s %*s %*s %s %*s %*s %n%s") 571 AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %d %*s %d %*s %*s %*s %*s %*s %s %*s %*s %n%s",[])
578 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS glaxen") 572 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS glaxen",[])
579 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %d") 573 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %d",[])
580 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS glaxen") 574 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS glaxen",[])
581 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %d") 575 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %d",[])
582 echo " ps syntax... $PATH_TO_PS glaxen" 576 echo " ps syntax... $PATH_TO_PS glaxen"
583dnl ucb style?
584dnl elif [ps axun 2>/dev/null | egrep -i "^USER +PID +%CPU +%MEM +SIZE +RSS +TTY +STAT +START +TIME +COMMAND *$" >/dev/null]
585dnl then
586dnl AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS axun")
587dnl AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %*s %*s %*s %*s %*s %s %*s %*s %s")
588dnl AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS axun")
589dnl AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %d")
590dnl AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS axun")
591dnl AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %d")
592dnl echo " ps syntax... $PATH_TO_PS axun"
593dnl ucb style?
594dnl elif [ps axun 2>/dev/null | egrep -i "^USER +PID +%CPU +%MEM +SIZE +RSS +TTY +STAT +START +TIME +COMMAND" >/dev/null]
595dnl then
596dnl AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS axun")
597dnl AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %*s %*s %*s %*s %*s %s %*s %*s %s")
598dnl AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS axun")
599dnl AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %d")
600dnl AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS axun")
601dnl AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %d")
602dnl echo " ps syntax... $PATH_TO_PS axun"
603else 577else
604 echo "** Unable to find usable ps syntax" 578 echo "** Unable to find usable ps syntax"
605fi 579fi
@@ -607,27 +581,27 @@ fi
607AC_ARG_WITH(df_command,--with-df-command=<syntax> sets syntax for df,DF_COMMAND=$withval) 581AC_ARG_WITH(df_command,--with-df-command=<syntax> sets syntax for df,DF_COMMAND=$withval)
608if test -n "$DF_COMMAND" 582if test -n "$DF_COMMAND"
609then 583then
610 AC_DEFINE_UNQUOTED(DF_COMMAND,"$DF_COMMAND") 584 AC_DEFINE_UNQUOTED(DF_COMMAND,"$DF_COMMAND",[path and args for df command])
611elif [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] 585elif [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]
612then 586then
613 AC_PATH_PROG(PATH_TO_DF,df) 587 AC_PATH_PROG(PATH_TO_DF,df)
614 AC_MSG_RESULT(" df syntax... $PATH_TO_DF -Pk") 588 AC_MSG_RESULT(" df syntax... $PATH_TO_DF -Pk")
615 AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF -Pk") 589 AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF -Pk",[path and args for df command])
616elif [df -k 2>/dev/null | egrep -i "^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*" >/dev/null] 590elif [df -k 2>/dev/null | egrep -i "^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*" >/dev/null]
617then 591then
618 AC_PATH_PROG(PATH_TO_DF,df) 592 AC_PATH_PROG(PATH_TO_DF,df)
619 AC_MSG_RESULT(" df syntax... $PATH_TO_DF -k") 593 AC_MSG_RESULT(" df syntax... $PATH_TO_DF -k")
620 AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF -k") 594 AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF -k",[path and args for df command])
621elif [df 2>/dev/null | egrep -i "^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*" >/dev/null] 595elif [df 2>/dev/null | egrep -i "^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*" >/dev/null]
622then 596then
623 AC_PATH_PROG(PATH_TO_DF,df) 597 AC_PATH_PROG(PATH_TO_DF,df)
624 AC_MSG_RESULT(" df syntax... $PATH_TO_DF") 598 AC_MSG_RESULT(" df syntax... $PATH_TO_DF")
625 AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF") 599 AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF",[path and args for df command])
626elif [bdf 2>/dev/null | egrep -i "^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*" >/dev/null] 600elif [bdf 2>/dev/null | egrep -i "^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*" >/dev/null]
627then 601then
628 AC_PATH_PROG(PATH_TO_DF,bdf) 602 AC_PATH_PROG(PATH_TO_DF,bdf)
629 AC_MSG_RESULT(" df syntax... $PATH_TO_DF") 603 AC_MSG_RESULT(" df syntax... $PATH_TO_DF")
630 AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF") 604 AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF",[path and args for df command])
631else 605else
632 AC_MSG_WARN("unable to find usable df syntax") 606 AC_MSG_WARN("unable to find usable df syntax")
633fi 607fi
@@ -640,17 +614,17 @@ then
640 echo " ping syntax... (command-line) $PING_COMMAND" 614 echo " ping syntax... (command-line) $PING_COMMAND"
641 if test -n "$PING_PACKETS_FIRST" 615 if test -n "$PING_PACKETS_FIRST"
642 then 616 then
643 AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND") 617 AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND",[Define if packet count must precede host])
644 fi 618 fi
645elif [ping -n -U -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] 619elif [ping -n -U -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null]
646then 620then
647 PING_COMMAND="$PATH_TO_PING -n -U -c %d %s" 621 PING_COMMAND="$PATH_TO_PING -n -U -c %d %s"
648 AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND") 622 AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND",[Define if packet count must precede host])
649 echo " ping syntax... $PATH_TO_PING -n -U -c <count> <host>" 623 echo " ping syntax... $PATH_TO_PING -n -U -c <count> <host>"
650elif [ping -n -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] 624elif [ping -n -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null]
651then 625then
652 PING_COMMAND="$PATH_TO_PING -n -c %d %s" 626 PING_COMMAND="$PATH_TO_PING -n -c %d %s"
653 AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND") 627 AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND",[Define if packet count must precede host])
654 echo " ping syntax... $PATH_TO_PING -n -c <count> <host>" 628 echo " ping syntax... $PATH_TO_PING -n -c <count> <host>"
655elif [ping -n 127.0.0.1 -c 1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] 629elif [ping -n 127.0.0.1 -c 1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null]
656then 630then
@@ -671,17 +645,17 @@ then
671elif [ping -n -s 56 -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] 645elif [ping -n -s 56 -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null]
672then 646then
673 PING_COMMAND="$PATH_TO_PING -n -s 56 -c %d %s" 647 PING_COMMAND="$PATH_TO_PING -n -s 56 -c %d %s"
674 AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND") 648 AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND",[Define if packet count must precede host])
675 echo " ping syntax... $PATH_TO_PING -n -s 56 -c <count> <host>" 649 echo " ping syntax... $PATH_TO_PING -n -s 56 -c <count> <host>"
676elif [ping -n -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] 650elif [ping -n -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null]
677then 651then
678 PING_COMMAND="$PATH_TO_PING -n -c %d %s" 652 PING_COMMAND="$PATH_TO_PING -n -c %d %s"
679 AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND") 653 AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND",[Define if packet count must precede host])
680 echo " ping syntax... $PATH_TO_PING -n -c <count> <host>" 654 echo " ping syntax... $PATH_TO_PING -n -c <count> <host>"
681else 655else
682 AC_MSG_WARN("unable to find usable ping syntax") 656 AC_MSG_WARN("unable to find usable ping syntax")
683fi 657fi
684AC_DEFINE_UNQUOTED(PING_COMMAND,"$PING_COMMAND") 658AC_DEFINE_UNQUOTED(PING_COMMAND,"$PING_COMMAND",[path and args for ping command])
685 659
686AC_PATH_PROG(PATH_TO_NSLOOKUP,nslookup) 660AC_PATH_PROG(PATH_TO_NSLOOKUP,nslookup)
687if test -n "$ac_cv_path_PATH_TO_NSLOOKUP" 661if test -n "$ac_cv_path_PATH_TO_NSLOOKUP"
@@ -690,10 +664,10 @@ then
690 if [nslookup -sil 127.0.0.1 2>&1 | grep "*** Invalid option: sil" >/dev/null] 664 if [nslookup -sil 127.0.0.1 2>&1 | grep "*** Invalid option: sil" >/dev/null]
691 then 665 then
692 AC_MSG_RESULT("$PATH_TO_NSLOOKUP") 666 AC_MSG_RESULT("$PATH_TO_NSLOOKUP")
693 AC_DEFINE_UNQUOTED(NSLOOKUP_COMMAND,"$PATH_TO_NSLOOKUP") 667 AC_DEFINE_UNQUOTED(NSLOOKUP_COMMAND,"$PATH_TO_NSLOOKUP",[path and args for nslookup])
694 else 668 else
695 AC_MSG_RESULT("$PATH_TO_NSLOOKUP -sil") 669 AC_MSG_RESULT("$PATH_TO_NSLOOKUP -sil")
696 AC_DEFINE_UNQUOTED(NSLOOKUP_COMMAND,"$PATH_TO_NSLOOKUP -sil") 670 AC_DEFINE_UNQUOTED(NSLOOKUP_COMMAND,"$PATH_TO_NSLOOKUP -sil",[path and args for nslookup])
697 fi 671 fi
698 EXTRAS="$EXTRAS check_dns" 672 EXTRAS="$EXTRAS check_dns"
699else 673else
@@ -707,7 +681,7 @@ then
707 if [host 127.0.0.1 2>&1 | grep -v "ommand not found" > /dev/null] 681 if [host 127.0.0.1 2>&1 | grep -v "ommand not found" > /dev/null]
708 then 682 then
709 AC_MSG_RESULT("$PATH_TO_HOST") 683 AC_MSG_RESULT("$PATH_TO_HOST")
710 AC_DEFINE_UNQUOTED(HOST_COMMAND,"$PATH_TO_HOST") 684 AC_DEFINE_UNQUOTED(HOST_COMMAND,"$PATH_TO_HOST",[path to host binary])
711 fi 685 fi
712 EXTRAS="$EXTRAS check_dns" 686 EXTRAS="$EXTRAS check_dns"
713else 687else
@@ -715,17 +689,17 @@ else
715fi 689fi
716 690
717AC_PATH_PROG(PATH_TO_UPTIME,uptime) 691AC_PATH_PROG(PATH_TO_UPTIME,uptime)
718AC_DEFINE_UNQUOTED(PATH_TO_UPTIME,"$PATH_TO_UPTIME") 692AC_DEFINE_UNQUOTED(PATH_TO_UPTIME,"$PATH_TO_UPTIME",[path to uptime binary])
719 693
720AC_PATH_PROG(PATH_TO_RPCINFO,rpcinfo) 694AC_PATH_PROG(PATH_TO_RPCINFO,rpcinfo)
721AC_DEFINE_UNQUOTED(PATH_TO_RPCINFO,"$PATH_TO_RPCINFO") 695AC_DEFINE_UNQUOTED(PATH_TO_RPCINFO,"$PATH_TO_RPCINFO",[path to rpcinfo binary])
722 696
723AC_PATH_PROG(PATH_TO_NTPDATE,ntpdate) 697AC_PATH_PROG(PATH_TO_NTPDATE,ntpdate)
724AC_PATH_PROGS(PATH_TO_NTPDC,ntpdc xntpdc) 698AC_PATH_PROGS(PATH_TO_NTPDC,ntpdc xntpdc)
725if (test -x "$PATH_TO_NTPDATE" || test -x "$PATH_TO_NTPDC") 699if (test -x "$PATH_TO_NTPDATE" || test -x "$PATH_TO_NTPDC")
726then 700then
727 AC_DEFINE_UNQUOTED(PATH_TO_NTPDC,"$PATH_TO_NTPDC") 701 AC_DEFINE_UNQUOTED(PATH_TO_NTPDC,"$PATH_TO_NTPDC",[path to ntpdc binary])
728 AC_DEFINE_UNQUOTED(PATH_TO_NTPDATE,"$PATH_TO_NTPDATE") 702 AC_DEFINE_UNQUOTED(PATH_TO_NTPDATE,"$PATH_TO_NTPDATE",[path to ntpdate binary])
729else 703else
730 echo "** Install NTP programs (http://www.ntp.org) if you want to monitor time synchronization" 704 echo "** Install NTP programs (http://www.ntp.org) if you want to monitor time synchronization"
731fi 705fi
@@ -733,7 +707,7 @@ fi
733AC_PATH_PROG(PATH_TO_LMSTAT,lmstat) 707AC_PATH_PROG(PATH_TO_LMSTAT,lmstat)
734if test -x "$PATH_TO_LMSTAT" 708if test -x "$PATH_TO_LMSTAT"
735then 709then
736 AC_DEFINE_UNQUOTED(PATH_TO_LMSTAT,"$PATH_TO_LMSTAT") 710 AC_DEFINE_UNQUOTED(PATH_TO_LMSTAT,"$PATH_TO_LMSTAT",[path to lmstat])
737else 711else
738 echo "** Get lmstat from Globetrotter Software to monitor flexlm licenses" 712 echo "** Get lmstat from Globetrotter Software to monitor flexlm licenses"
739fi 713fi
@@ -741,7 +715,7 @@ fi
741AC_PATH_PROG(PATH_TO_SMBCLIENT,smbclient) 715AC_PATH_PROG(PATH_TO_SMBCLIENT,smbclient)
742if test -x "$PATH_TO_SMBCLIENT" 716if test -x "$PATH_TO_SMBCLIENT"
743then 717then
744 AC_DEFINE_UNQUOTED(PATH_TO_SMBCLIENT,"$PATH_TO_SMBCLIENT") 718 AC_DEFINE_UNQUOTED(PATH_TO_SMBCLIENT,"$PATH_TO_SMBCLIENT",[path to smbclient binary])
745else 719else
746 echo "** Get smbclient from Samba.org to monitor SMB shares" 720 echo "** Get smbclient from Samba.org to monitor SMB shares"
747fi 721fi
@@ -750,15 +724,15 @@ fi
750AC_PATH_PROG(PATH_TO_WHO,who) 724AC_PATH_PROG(PATH_TO_WHO,who)
751if [who -q 2>/dev/null | egrep -i "^# users=[0-9]+$" >/dev/null] 725if [who -q 2>/dev/null | egrep -i "^# users=[0-9]+$" >/dev/null]
752then 726then
753 AC_DEFINE_UNQUOTED(WHO_COMMAND,"$PATH_TO_WHO -q") 727 AC_DEFINE_UNQUOTED(WHO_COMMAND,"$PATH_TO_WHO -q",[path and arguments for invoking 'who'])
754else 728else
755 AC_DEFINE_UNQUOTED(WHO_COMMAND,"$PATH_TO_WHO") 729 AC_DEFINE_UNQUOTED(WHO_COMMAND,"$PATH_TO_WHO",[path and arguments for invoking 'who'])
756fi 730fi
757 731
758AC_PATH_PROG(PATH_TO_SNMPGET,snmpget) 732AC_PATH_PROG(PATH_TO_SNMPGET,snmpget)
759if test -x "$PATH_TO_SNMPGET" 733if test -x "$PATH_TO_SNMPGET"
760then 734then
761 AC_DEFINE_UNQUOTED(PATH_TO_SNMPGET,"$PATH_TO_SNMPGET") 735 AC_DEFINE_UNQUOTED(PATH_TO_SNMPGET,"$PATH_TO_SNMPGET",[path to snmpget binary])
762 EXTRAS="$EXTRAS check_hpjd check_snmp" 736 EXTRAS="$EXTRAS check_hpjd check_snmp"
763else 737else
764 echo "** Get snmpget from http://net-snmp.sourceforge.net to make check_hpjd and check_snmp plugins" 738 echo "** Get snmpget from http://net-snmp.sourceforge.net to make check_hpjd and check_snmp plugins"
@@ -767,7 +741,7 @@ fi
767AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext) 741AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext)
768if test -x "$PATH_TO_SNMPGETNEXT" 742if test -x "$PATH_TO_SNMPGETNEXT"
769then 743then
770 AC_DEFINE_UNQUOTED(PATH_TO_SNMPGETNEXT,"$PATH_TO_SNMPGETNEXT") 744 AC_DEFINE_UNQUOTED(PATH_TO_SNMPGETNEXT,"$PATH_TO_SNMPGETNEXT",[path to snmpgetnext binary])
771fi 745fi
772 746
773if ( $PERL -M"Net::SNMP 3.6" -e 'exit' 2>/dev/null ) 747if ( $PERL -M"Net::SNMP 3.6" -e 'exit' 2>/dev/null )
@@ -782,11 +756,11 @@ AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat)
782AC_PATH_PROG(PATH_TO_QSTAT,qstat) 756AC_PATH_PROG(PATH_TO_QSTAT,qstat)
783if test -x "$PATH_TO_QUAKESTAT" 757if test -x "$PATH_TO_QUAKESTAT"
784then 758then
785 AC_DEFINE_UNQUOTED(PATH_TO_QSTAT,"$PATH_TO_QUAKESTAT") 759 AC_DEFINE_UNQUOTED(PATH_TO_QSTAT,"$PATH_TO_QUAKESTAT",[path to qstat/quakestat])
786 EXTRAS="$EXTRAS check_game" 760 EXTRAS="$EXTRAS check_game"
787elif test -x "$PATH_TO_QSTAT" 761elif test -x "$PATH_TO_QSTAT"
788then 762then
789 AC_DEFINE_UNQUOTED(PATH_TO_QSTAT,"$PATH_TO_QSTAT") 763 AC_DEFINE_UNQUOTED(PATH_TO_QSTAT,"$PATH_TO_QSTAT",[path to qstat/quakestat])
790 EXTRAS="$EXTRAS check_game" 764 EXTRAS="$EXTRAS check_game"
791else 765else
792 echo "** Get qstat from http://www.activesw.com/people/steve/qstat.html in order to make check_game plugin" 766 echo "** Get qstat from http://www.activesw.com/people/steve/qstat.html in order to make check_game plugin"
@@ -795,7 +769,7 @@ fi
795AC_PATH_PROG(PATH_TO_FPING,fping) 769AC_PATH_PROG(PATH_TO_FPING,fping)
796if test -x "$PATH_TO_FPING" 770if test -x "$PATH_TO_FPING"
797then 771then
798 AC_DEFINE_UNQUOTED(PATH_TO_FPING,"$PATH_TO_FPING") 772 AC_DEFINE_UNQUOTED(PATH_TO_FPING,"$PATH_TO_FPING",[path to fping])
799 EXTRAS="$EXTRAS check_fping" 773 EXTRAS="$EXTRAS check_fping"
800else 774else
801 echo "** Get fping from http://www.fping.com in order to make check_fping plugin" 775 echo "** Get fping from http://www.fping.com in order to make check_fping plugin"
@@ -804,7 +778,7 @@ fi
804AC_PATH_PROG(PATH_TO_SSH,ssh) 778AC_PATH_PROG(PATH_TO_SSH,ssh)
805if test -x "$PATH_TO_SSH" 779if test -x "$PATH_TO_SSH"
806then 780then
807 AC_DEFINE_UNQUOTED(SSH_COMMAND,"$PATH_TO_SSH") 781 AC_DEFINE_UNQUOTED(SSH_COMMAND,"$PATH_TO_SSH",[path to ssh binary])
808 EXTRAS="$EXTRAS check_by_ssh" 782 EXTRAS="$EXTRAS check_by_ssh"
809else 783else
810 echo "** Get ssh in order to make check_by_ssh plugin" 784 echo "** Get ssh in order to make check_by_ssh plugin"
@@ -817,8 +791,8 @@ dnl if /bin/test -e "/proc/meminfo"
817if [cat /proc/meminfo > /dev/null 2>&1] 791if [cat /proc/meminfo > /dev/null 2>&1]
818then 792then
819 echo "found /proc/meminfo" 793 echo "found /proc/meminfo"
820 AC_DEFINE(HAVE_PROC_MEMINFO) 794 AC_DEFINE(HAVE_PROC_MEMINFO,1,[Define if we have /proc/meminfo])
821 AC_DEFINE_UNQUOTED(PROC_MEMINFO,"/proc/meminfo") 795 AC_DEFINE_UNQUOTED(PROC_MEMINFO,"/proc/meminfo",[path to /proc/meminfo (if name changes or something)])
822 EXTRAS="$EXTRAS check_swap" 796 EXTRAS="$EXTRAS check_swap"
823elif [swap -l 2>&1 | egrep -i "swapfile" >/dev/null] 797elif [swap -l 2>&1 | egrep -i "swapfile" >/dev/null]
824then 798then
diff --git a/missing b/missing
index 7789652e..6a37006e 100755
--- a/missing
+++ b/missing
@@ -1,7 +1,7 @@
1#! /bin/sh 1#! /bin/sh
2# Common stub for a few missing GNU programs while installing. 2# Common stub for a few missing GNU programs while installing.
3# Copyright (C) 1996, 1997 Free Software Foundation, Inc. 3# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
4# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996. 4# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
5 5
6# This program is free software; you can redistribute it and/or modify 6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by 7# it under the terms of the GNU General Public License as published by
@@ -18,11 +18,37 @@
18# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 18# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19# 02111-1307, USA. 19# 02111-1307, USA.
20 20
21# As a special exception to the GNU General Public License, if you
22# distribute this file as part of a program that contains a
23# configuration script generated by Autoconf, you may include it under
24# the same distribution terms that you use for the rest of that program.
25
21if test $# -eq 0; then 26if test $# -eq 0; then
22 echo 1>&2 "Try \`$0 --help' for more information" 27 echo 1>&2 "Try \`$0 --help' for more information"
23 exit 1 28 exit 1
24fi 29fi
25 30
31run=:
32
33# In the cases where this matters, `missing' is being run in the
34# srcdir already.
35if test -f configure.ac; then
36 configure_ac=configure.ac
37else
38 configure_ac=configure.in
39fi
40
41case "$1" in
42--run)
43 # Try to run requested program, and just exit if it succeeds.
44 run=
45 shift
46 "$@" && exit 0
47 ;;
48esac
49
50# If it does not exist, or fails to run (possibly an outdated version),
51# try to emulate it.
26case "$1" in 52case "$1" in
27 53
28 -h|--h|--he|--hel|--help) 54 -h|--h|--he|--hel|--help)
@@ -35,6 +61,7 @@ error status if there is no known handling for PROGRAM.
35Options: 61Options:
36 -h, --help display this help and exit 62 -h, --help display this help and exit
37 -v, --version output version information and exit 63 -v, --version output version information and exit
64 --run try to run the given command, and emulate it if it fails
38 65
39Supported PROGRAM values: 66Supported PROGRAM values:
40 aclocal touch file \`aclocal.m4' 67 aclocal touch file \`aclocal.m4'
@@ -43,13 +70,15 @@ Supported PROGRAM values:
43 automake touch all \`Makefile.in' files 70 automake touch all \`Makefile.in' files
44 bison create \`y.tab.[ch]', if possible, from existing .[ch] 71 bison create \`y.tab.[ch]', if possible, from existing .[ch]
45 flex create \`lex.yy.c', if possible, from existing .c 72 flex create \`lex.yy.c', if possible, from existing .c
73 help2man touch the output file
46 lex create \`lex.yy.c', if possible, from existing .c 74 lex create \`lex.yy.c', if possible, from existing .c
47 makeinfo touch the output file 75 makeinfo touch the output file
76 tar try tar, gnutar, gtar, then tar without non-portable flags
48 yacc create \`y.tab.[ch]', if possible, from existing .[ch]" 77 yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
49 ;; 78 ;;
50 79
51 -v|--v|--ve|--ver|--vers|--versi|--versio|--version) 80 -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
52 echo "missing - GNU libit 0.0" 81 echo "missing 0.4 - GNU automake"
53 ;; 82 ;;
54 83
55 -*) 84 -*)
@@ -58,31 +87,46 @@ Supported PROGRAM values:
58 exit 1 87 exit 1
59 ;; 88 ;;
60 89
61 aclocal) 90 aclocal*)
91 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
92 # We have it, but it failed.
93 exit 1
94 fi
95
62 echo 1>&2 "\ 96 echo 1>&2 "\
63WARNING: \`$1' is missing on your system. You should only need it if 97WARNING: \`$1' is missing on your system. You should only need it if
64 you modified \`acinclude.m4' or \`configure.in'. You might want 98 you modified \`acinclude.m4' or \`${configure_ac}'. You might want
65 to install the \`Automake' and \`Perl' packages. Grab them from 99 to install the \`Automake' and \`Perl' packages. Grab them from
66 any GNU archive site." 100 any GNU archive site."
67 touch aclocal.m4 101 touch aclocal.m4
68 ;; 102 ;;
69 103
70 autoconf) 104 autoconf)
105 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
106 # We have it, but it failed.
107 exit 1
108 fi
109
71 echo 1>&2 "\ 110 echo 1>&2 "\
72WARNING: \`$1' is missing on your system. You should only need it if 111WARNING: \`$1' is missing on your system. You should only need it if
73 you modified \`configure.in'. You might want to install the 112 you modified \`${configure_ac}'. You might want to install the
74 \`Autoconf' and \`GNU m4' packages. Grab them from any GNU 113 \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
75 archive site." 114 archive site."
76 touch configure 115 touch configure
77 ;; 116 ;;
78 117
79 autoheader) 118 autoheader)
119 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
120 # We have it, but it failed.
121 exit 1
122 fi
123
80 echo 1>&2 "\ 124 echo 1>&2 "\
81WARNING: \`$1' is missing on your system. You should only need it if 125WARNING: \`$1' is missing on your system. You should only need it if
82 you modified \`acconfig.h' or \`configure.in'. You might want 126 you modified \`acconfig.h' or \`${configure_ac}'. You might want
83 to install the \`Autoconf' and \`GNU m4' packages. Grab them 127 to install the \`Autoconf' and \`GNU m4' packages. Grab them
84 from any GNU archive site." 128 from any GNU archive site."
85 files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in` 129 files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
86 test -z "$files" && files="config.h" 130 test -z "$files" && files="config.h"
87 touch_files= 131 touch_files=
88 for f in $files; do 132 for f in $files; do
@@ -95,10 +139,15 @@ WARNING: \`$1' is missing on your system. You should only need it if
95 touch $touch_files 139 touch $touch_files
96 ;; 140 ;;
97 141
98 automake) 142 automake*)
143 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
144 # We have it, but it failed.
145 exit 1
146 fi
147
99 echo 1>&2 "\ 148 echo 1>&2 "\
100WARNING: \`$1' is missing on your system. You should only need it if 149WARNING: \`$1' is missing on your system. You should only need it if
101 you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. 150 you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
102 You might want to install the \`Automake' and \`Perl' packages. 151 You might want to install the \`Automake' and \`Perl' packages.
103 Grab them from any GNU archive site." 152 Grab them from any GNU archive site."
104 find . -type f -name Makefile.am -print | 153 find . -type f -name Makefile.am -print |
@@ -106,6 +155,34 @@ WARNING: \`$1' is missing on your system. You should only need it if
106 while read f; do touch "$f"; done 155 while read f; do touch "$f"; done
107 ;; 156 ;;
108 157
158 autom4te)
159 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
160 # We have it, but it failed.
161 exit 1
162 fi
163
164 echo 1>&2 "\
165WARNING: \`$1' is needed, and you do not seem to have it handy on your
166 system. You might have modified some files without having the
167 proper tools for further handling them.
168 You can get \`$1Help2man' as part of \`Autoconf' from any GNU
169 archive site."
170
171 file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
172 test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
173 if test -f "$file"; then
174 touch $file
175 else
176 test -z "$file" || exec >$file
177 echo "#! /bin/sh"
178 echo "# Created by GNU Automake missing as a replacement of"
179 echo "# $ $@"
180 echo "exit 0"
181 chmod +x $file
182 exit 1
183 fi
184 ;;
185
109 bison|yacc) 186 bison|yacc)
110 echo 1>&2 "\ 187 echo 1>&2 "\
111WARNING: \`$1' is missing on your system. You should only need it if 188WARNING: \`$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
159 fi 236 fi
160 ;; 237 ;;
161 238
239 help2man)
240 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
241 # We have it, but it failed.
242 exit 1
243 fi
244
245 echo 1>&2 "\
246WARNING: \`$1' is missing on your system. You should only need it if
247 you modified a dependency of a manual page. You may need the
248 \`Help2man' package in order for those modifications to take
249 effect. You can get \`Help2man' from any GNU archive site."
250
251 file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
252 if test -z "$file"; then
253 file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
254 fi
255 if [ -f "$file" ]; then
256 touch $file
257 else
258 test -z "$file" || exec >$file
259 echo ".ab help2man is required to generate this page"
260 exit 1
261 fi
262 ;;
263
162 makeinfo) 264 makeinfo)
265 if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
266 # We have makeinfo, but it failed.
267 exit 1
268 fi
269
163 echo 1>&2 "\ 270 echo 1>&2 "\
164WARNING: \`$1' is missing on your system. You should only need it if 271WARNING: \`$1' is missing on your system. You should only need it if
165 you modified a \`.texi' or \`.texinfo' file, or any other file 272 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
175 touch $file 282 touch $file
176 ;; 283 ;;
177 284
285 tar)
286 shift
287 if test -n "$run"; then
288 echo 1>&2 "ERROR: \`tar' requires --run"
289 exit 1
290 fi
291
292 # We have already tried tar in the generic part.
293 # Look for gnutar/gtar before invocation to avoid ugly error
294 # messages.
295 if (gnutar --version > /dev/null 2>&1); then
296 gnutar "$@" && exit 0
297 fi
298 if (gtar --version > /dev/null 2>&1); then
299 gtar "$@" && exit 0
300 fi
301 firstarg="$1"
302 if shift; then
303 case "$firstarg" in
304 *o*)
305 firstarg=`echo "$firstarg" | sed s/o//`
306 tar "$firstarg" "$@" && exit 0
307 ;;
308 esac
309 case "$firstarg" in
310 *h*)
311 firstarg=`echo "$firstarg" | sed s/h//`
312 tar "$firstarg" "$@" && exit 0
313 ;;
314 esac
315 fi
316
317 echo 1>&2 "\
318WARNING: I can't seem to be able to run \`tar' with the given arguments.
319 You may want to install GNU tar or Free paxutils, or check the
320 command line arguments."
321 exit 1
322 ;;
323
178 *) 324 *)
179 echo 1>&2 "\ 325 echo 1>&2 "\
180WARNING: \`$1' is needed, and you do not seem to have it handy on your 326WARNING: \`$1' is needed, and you do not seem to have it handy on your