diff options
-rw-r--r-- | configure.in | 352 | ||||
-rwxr-xr-x | missing | 166 |
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 | |||
21 | AC_PROG_MAKE_SET | 21 | AC_PROG_MAKE_SET |
22 | AC_PROG_AWK | 22 | AC_PROG_AWK |
23 | 23 | ||
24 | AC_FUNC_GETLOADAVG | 24 | AC_FUNC_GETLOADAVG(plugins) |
25 | AC_FUNC_STRTOD | 25 | AC_FUNC_STRTOD |
26 | AM_WITH_REGEX | 26 | dnl AM_WITH_REGEX |
27 | AC_PROG_RANLIB | 27 | AC_PROG_RANLIB |
28 | 28 | ||
29 | AC_PATH_PROG(ACLOCAL,aclocal) | 29 | AC_PATH_PROG(ACLOCAL,aclocal) |
@@ -43,10 +43,6 @@ AC_SUBST(WARRANTY) | |||
43 | 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" | 43 | 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" |
44 | AC_SUBST(SUPPORT) | 44 | AC_SUBST(SUPPORT) |
45 | 45 | ||
46 | dnl AC_ARG_PROGRAM | ||
47 | |||
48 | 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)) | ||
49 | |||
50 | dnl CGIURL has changed for Nagios with 1.0 beta | 46 | dnl CGIURL has changed for Nagios with 1.0 beta |
51 | AC_ARG_WITH(cgiurl,--with-cgiurl=<dir> sets URL for cgi programs,cgiurl=$withval,cgiurl=/nagios/cgi-bin) | 47 | AC_ARG_WITH(cgiurl,--with-cgiurl=<dir> sets URL for cgi programs,cgiurl=$withval,cgiurl=/nagios/cgi-bin) |
52 | CGIURL="$cgiurl" | 48 | CGIURL="$cgiurl" |
@@ -80,8 +76,6 @@ dnl | |||
80 | dnl Checks for libraries. | 76 | dnl Checks for libraries. |
81 | dnl | 77 | dnl |
82 | 78 | ||
83 | AC_FUNC_GETLOADAVG(plugins) | ||
84 | |||
85 | AC_CHECK_LIB(dce,main,SOCKETLIBS="$SOCKETLIBS -ldce") | 79 | AC_CHECK_LIB(dce,main,SOCKETLIBS="$SOCKETLIBS -ldce") |
86 | AC_CHECK_LIB(nsl,main,SOCKETLIBS="$SOCKETLIBS -lnsl") | 80 | AC_CHECK_LIB(nsl,main,SOCKETLIBS="$SOCKETLIBS -lnsl") |
87 | AC_CHECK_LIB(socket,socket,SOCKETLIBS="$SOCKETLIBS -lsocket") | 81 | AC_CHECK_LIB(socket,socket,SOCKETLIBS="$SOCKETLIBS -lsocket") |
@@ -282,7 +276,7 @@ AC_TRY_RUN([#include <stdio.h> | |||
282 | main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }], | 276 | main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }], |
283 | ac_cv_have_longlong=yes,ac_cv_have_longlong=no,ac_cv_have_longlong=cross)]) | 277 | ac_cv_have_longlong=yes,ac_cv_have_longlong=no,ac_cv_have_longlong=cross)]) |
284 | if test x"$ac_cv_have_longlong" = x"yes"; then | 278 | if 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]) |
286 | fi | 280 | fi |
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)]) |
295 | if test x"$ac_cv_compiler_supports_ll" = x"yes"; then | 289 | if 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]) |
297 | fi | 291 | fi |
298 | AC_CACHE_CHECK([for __va_copy],ac_cv_HAVE_VA_COPY,[ | 292 | AC_CACHE_CHECK([for __va_copy],ac_cv_HAVE_VA_COPY,[ |
299 | AC_TRY_LINK([#include <stdarg.h> | 293 | AC_TRY_LINK([#include <stdarg.h> |
300 | va_list ap1,ap2;], [__va_copy(ap1,ap2);], | 294 | va_list ap1,ap2;], [__va_copy(ap1,ap2);], |
301 | ac_cv_HAVE_VA_COPY=yes,ac_cv_HAVE_VA_COPY=no)]) | 295 | ac_cv_HAVE_VA_COPY=yes,ac_cv_HAVE_VA_COPY=no)]) |
302 | if test x"$ac_cv_HAVE_VA_COPY" = x"yes"; then | 296 | if 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]) |
304 | fi | 298 | fi |
305 | 299 | ||
306 | AC_CACHE_CHECK([for C99 vsnprintf],ac_cv_HAVE_C99_VSNPRINTF,[ | 300 | AC_CACHE_CHECK([for C99 vsnprintf],ac_cv_HAVE_C99_VSNPRINTF,[ |
@@ -330,7 +324,7 @@ main() { foo("hello"); } | |||
330 | ], | 324 | ], |
331 | ac_cv_HAVE_C99_VSNPRINTF=yes,ac_cv_HAVE_C99_VSNPRINTF=no,ac_cv_HAVE_C99_VSNPRINTF=cross)]) | 325 | ac_cv_HAVE_C99_VSNPRINTF=yes,ac_cv_HAVE_C99_VSNPRINTF=no,ac_cv_HAVE_C99_VSNPRINTF=cross)]) |
332 | if test x"$ac_cv_HAVE_C99_VSNPRINTF" = x"yes"; then | 326 | if 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]) |
334 | fi | 328 | fi |
335 | 329 | ||
336 | dnl We used to not do long options unless a compatible lib was found | 330 | dnl We used to not do long options unless a compatible lib was found |
@@ -369,7 +363,7 @@ AC_TRY_COMPILE([#include <stdlib.h> | |||
369 | if test -f "/proc/loadavg" | 363 | if test -f "/proc/loadavg" |
370 | then | 364 | then |
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]) |
373 | fi | 367 | fi |
374 | 368 | ||
375 | AC_PATH_PROG(PATH_TO_PS,ps) | 369 | 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 | |||
377 | dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND | 371 | dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND |
378 | 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] | 372 | 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] |
379 | then | 373 | then |
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'" |
391 | dnl AIX 4.3.3 - needs verification. | 385 | dnl AIX 4.3.3 - needs verification. |
392 | 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] | 386 | 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] |
393 | then | 387 | then |
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'" |
405 | 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] | 399 | 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] |
406 | then | 400 | then |
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'" |
418 | 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] | 412 | 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] |
419 | then | 413 | then |
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'" |
431 | 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] | 425 | 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] |
432 | then | 426 | then |
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'" |
444 | 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] | 438 | 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] |
445 | then | 439 | then |
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'" |
457 | dnl wonder who takes state instead of stat | 451 | dnl wonder who takes state instead of stat |
458 | 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] | 452 | 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] |
459 | then | 453 | then |
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'" |
471 | dnl FreeBSD | 465 | dnl FreeBSD |
472 | elif [ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | egrep -i "^STAT +COMMAND +VSZ +RSS +UID +USER +PPID" >/dev/null] | 466 | elif [ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | egrep -i "^STAT +COMMAND +VSZ +RSS +UID +USER +PPID" >/dev/null] |
473 | then | 467 | then |
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'" |
485 | dnl BSD-like mode in RH 6.1 | 479 | dnl BSD-like mode in RH 6.1 |
486 | 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] | 480 | 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] |
487 | then | 481 | then |
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'" |
499 | dnl IRIX 53 | 493 | dnl IRIX 53 |
500 | 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] | 494 | 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] |
501 | then | 495 | then |
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" |
511 | dnl IRIX 63 | 505 | dnl IRIX 63 |
512 | 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] | 506 | 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] |
513 | then | 507 | then |
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" |
523 | dnl SunOS 4.1.3: | 517 | dnl SunOS 4.1.3: |
524 | dnl F UID PID PPID CP PRI NI SZ RSS WCHAN STAT TT TIME COMMAND | 518 | dnl F UID PID PPID CP PRI NI SZ RSS WCHAN STAT TT TIME COMMAND |
525 | dnl | 519 | dnl |
526 | 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] | 520 | 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] |
527 | then | 521 | then |
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" |
539 | dnl Debian Linux / procps v1.2.9: | 533 | dnl Debian Linux / procps v1.2.9: |
540 | dnl FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMAND | 534 | 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 | |||
542 | dnl | 536 | dnl |
543 | 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] | 537 | 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] |
544 | then | 538 | then |
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" |
556 | dnl | 550 | dnl |
557 | dnl AIX 4.1: | 551 | dnl AIX 4.1: |
@@ -559,47 +553,27 @@ dnl F S UID PID PPID C PRI NI ADDR SZ RSS WCHAN TTY TIME C | |||
559 | dnl 303 A 0 0 0 120 16 -- 1c07 20 24 - 0:45 swapper | 553 | dnl 303 A 0 0 0 120 16 -- 1c07 20 24 - 0:45 swapper |
560 | elif [ps -el 2>/dev/null | egrep -i "^ *F +S +UID +PID +PPID +C +PRI +NI +ADDR +SZ +WCHAN +TTY +TIME +[RGSCOMDNA]+" >/dev/null] | 554 | elif [ps -el 2>/dev/null | egrep -i "^ *F +S +UID +PID +PPID +C +PRI +NI +ADDR +SZ +WCHAN +TTY +TIME +[RGSCOMDNA]+" >/dev/null] |
561 | then | 555 | then |
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" |
571 | dnl AIX? | 565 | dnl AIX? |
572 | elif [ps glaxen 2>/dev/null | egrep -i "^ *F +UID +PID +PPID +PRI +NI +VSZ +RSS +WCHAN +STAT +TTY +TIME +COMMAND" >/dev/null] | 566 | elif [ps glaxen 2>/dev/null | egrep -i "^ *F +UID +PID +PPID +PRI +NI +VSZ +RSS +WCHAN +STAT +TTY +TIME +COMMAND" >/dev/null] |
573 | then | 567 | then |
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" |
583 | dnl ucb style? | ||
584 | dnl elif [ps axun 2>/dev/null | egrep -i "^USER +PID +%CPU +%MEM +SIZE +RSS +TTY +STAT +START +TIME +COMMAND *$" >/dev/null] | ||
585 | dnl then | ||
586 | dnl AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS axun") | ||
587 | dnl AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %*s %*s %*s %*s %*s %s %*s %*s %s") | ||
588 | dnl AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS axun") | ||
589 | dnl AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %d") | ||
590 | dnl AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS axun") | ||
591 | dnl AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %d") | ||
592 | dnl echo " ps syntax... $PATH_TO_PS axun" | ||
593 | dnl ucb style? | ||
594 | dnl elif [ps axun 2>/dev/null | egrep -i "^USER +PID +%CPU +%MEM +SIZE +RSS +TTY +STAT +START +TIME +COMMAND" >/dev/null] | ||
595 | dnl then | ||
596 | dnl AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS axun") | ||
597 | dnl AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %*s %*s %*s %*s %*s %s %*s %*s %s") | ||
598 | dnl AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS axun") | ||
599 | dnl AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %d") | ||
600 | dnl AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS axun") | ||
601 | dnl AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %d") | ||
602 | dnl echo " ps syntax... $PATH_TO_PS axun" | ||
603 | else | 577 | else |
604 | echo "** Unable to find usable ps syntax" | 578 | echo "** Unable to find usable ps syntax" |
605 | fi | 579 | fi |
@@ -607,27 +581,27 @@ fi | |||
607 | AC_ARG_WITH(df_command,--with-df-command=<syntax> sets syntax for df,DF_COMMAND=$withval) | 581 | AC_ARG_WITH(df_command,--with-df-command=<syntax> sets syntax for df,DF_COMMAND=$withval) |
608 | if test -n "$DF_COMMAND" | 582 | if test -n "$DF_COMMAND" |
609 | then | 583 | then |
610 | AC_DEFINE_UNQUOTED(DF_COMMAND,"$DF_COMMAND") | 584 | AC_DEFINE_UNQUOTED(DF_COMMAND,"$DF_COMMAND",[path and args for df command]) |
611 | 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] | 585 | 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] |
612 | then | 586 | then |
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]) |
616 | 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] | 590 | 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] |
617 | then | 591 | then |
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]) |
621 | elif [df 2>/dev/null | egrep -i "^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*" >/dev/null] | 595 | elif [df 2>/dev/null | egrep -i "^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*" >/dev/null] |
622 | then | 596 | then |
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]) |
626 | elif [bdf 2>/dev/null | egrep -i "^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*" >/dev/null] | 600 | elif [bdf 2>/dev/null | egrep -i "^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*" >/dev/null] |
627 | then | 601 | then |
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]) |
631 | else | 605 | else |
632 | AC_MSG_WARN("unable to find usable df syntax") | 606 | AC_MSG_WARN("unable to find usable df syntax") |
633 | fi | 607 | fi |
@@ -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 |
645 | elif [ping -n -U -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] | 619 | elif [ping -n -U -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] |
646 | then | 620 | then |
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>" |
650 | elif [ping -n -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] | 624 | elif [ping -n -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] |
651 | then | 625 | then |
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>" |
655 | elif [ping -n 127.0.0.1 -c 1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] | 629 | elif [ping -n 127.0.0.1 -c 1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] |
656 | then | 630 | then |
@@ -671,17 +645,17 @@ then | |||
671 | elif [ping -n -s 56 -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] | 645 | elif [ping -n -s 56 -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] |
672 | then | 646 | then |
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>" |
676 | elif [ping -n -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] | 650 | elif [ping -n -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] |
677 | then | 651 | then |
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>" |
681 | else | 655 | else |
682 | AC_MSG_WARN("unable to find usable ping syntax") | 656 | AC_MSG_WARN("unable to find usable ping syntax") |
683 | fi | 657 | fi |
684 | AC_DEFINE_UNQUOTED(PING_COMMAND,"$PING_COMMAND") | 658 | AC_DEFINE_UNQUOTED(PING_COMMAND,"$PING_COMMAND",[path and args for ping command]) |
685 | 659 | ||
686 | AC_PATH_PROG(PATH_TO_NSLOOKUP,nslookup) | 660 | AC_PATH_PROG(PATH_TO_NSLOOKUP,nslookup) |
687 | if test -n "$ac_cv_path_PATH_TO_NSLOOKUP" | 661 | if 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" |
699 | else | 673 | else |
@@ -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" |
713 | else | 687 | else |
@@ -715,17 +689,17 @@ else | |||
715 | fi | 689 | fi |
716 | 690 | ||
717 | AC_PATH_PROG(PATH_TO_UPTIME,uptime) | 691 | AC_PATH_PROG(PATH_TO_UPTIME,uptime) |
718 | AC_DEFINE_UNQUOTED(PATH_TO_UPTIME,"$PATH_TO_UPTIME") | 692 | AC_DEFINE_UNQUOTED(PATH_TO_UPTIME,"$PATH_TO_UPTIME",[path to uptime binary]) |
719 | 693 | ||
720 | AC_PATH_PROG(PATH_TO_RPCINFO,rpcinfo) | 694 | AC_PATH_PROG(PATH_TO_RPCINFO,rpcinfo) |
721 | AC_DEFINE_UNQUOTED(PATH_TO_RPCINFO,"$PATH_TO_RPCINFO") | 695 | AC_DEFINE_UNQUOTED(PATH_TO_RPCINFO,"$PATH_TO_RPCINFO",[path to rpcinfo binary]) |
722 | 696 | ||
723 | AC_PATH_PROG(PATH_TO_NTPDATE,ntpdate) | 697 | AC_PATH_PROG(PATH_TO_NTPDATE,ntpdate) |
724 | AC_PATH_PROGS(PATH_TO_NTPDC,ntpdc xntpdc) | 698 | AC_PATH_PROGS(PATH_TO_NTPDC,ntpdc xntpdc) |
725 | if (test -x "$PATH_TO_NTPDATE" || test -x "$PATH_TO_NTPDC") | 699 | if (test -x "$PATH_TO_NTPDATE" || test -x "$PATH_TO_NTPDC") |
726 | then | 700 | then |
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]) |
729 | else | 703 | else |
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" |
731 | fi | 705 | fi |
@@ -733,7 +707,7 @@ fi | |||
733 | AC_PATH_PROG(PATH_TO_LMSTAT,lmstat) | 707 | AC_PATH_PROG(PATH_TO_LMSTAT,lmstat) |
734 | if test -x "$PATH_TO_LMSTAT" | 708 | if test -x "$PATH_TO_LMSTAT" |
735 | then | 709 | then |
736 | AC_DEFINE_UNQUOTED(PATH_TO_LMSTAT,"$PATH_TO_LMSTAT") | 710 | AC_DEFINE_UNQUOTED(PATH_TO_LMSTAT,"$PATH_TO_LMSTAT",[path to lmstat]) |
737 | else | 711 | else |
738 | echo "** Get lmstat from Globetrotter Software to monitor flexlm licenses" | 712 | echo "** Get lmstat from Globetrotter Software to monitor flexlm licenses" |
739 | fi | 713 | fi |
@@ -741,7 +715,7 @@ fi | |||
741 | AC_PATH_PROG(PATH_TO_SMBCLIENT,smbclient) | 715 | AC_PATH_PROG(PATH_TO_SMBCLIENT,smbclient) |
742 | if test -x "$PATH_TO_SMBCLIENT" | 716 | if test -x "$PATH_TO_SMBCLIENT" |
743 | then | 717 | then |
744 | AC_DEFINE_UNQUOTED(PATH_TO_SMBCLIENT,"$PATH_TO_SMBCLIENT") | 718 | AC_DEFINE_UNQUOTED(PATH_TO_SMBCLIENT,"$PATH_TO_SMBCLIENT",[path to smbclient binary]) |
745 | else | 719 | else |
746 | echo "** Get smbclient from Samba.org to monitor SMB shares" | 720 | echo "** Get smbclient from Samba.org to monitor SMB shares" |
747 | fi | 721 | fi |
@@ -750,15 +724,15 @@ fi | |||
750 | AC_PATH_PROG(PATH_TO_WHO,who) | 724 | AC_PATH_PROG(PATH_TO_WHO,who) |
751 | if [who -q 2>/dev/null | egrep -i "^# users=[0-9]+$" >/dev/null] | 725 | if [who -q 2>/dev/null | egrep -i "^# users=[0-9]+$" >/dev/null] |
752 | then | 726 | then |
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']) |
754 | else | 728 | else |
755 | AC_DEFINE_UNQUOTED(WHO_COMMAND,"$PATH_TO_WHO") | 729 | AC_DEFINE_UNQUOTED(WHO_COMMAND,"$PATH_TO_WHO",[path and arguments for invoking 'who']) |
756 | fi | 730 | fi |
757 | 731 | ||
758 | AC_PATH_PROG(PATH_TO_SNMPGET,snmpget) | 732 | AC_PATH_PROG(PATH_TO_SNMPGET,snmpget) |
759 | if test -x "$PATH_TO_SNMPGET" | 733 | if test -x "$PATH_TO_SNMPGET" |
760 | then | 734 | then |
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" |
763 | else | 737 | else |
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 | |||
767 | AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext) | 741 | AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext) |
768 | if test -x "$PATH_TO_SNMPGETNEXT" | 742 | if test -x "$PATH_TO_SNMPGETNEXT" |
769 | then | 743 | then |
770 | AC_DEFINE_UNQUOTED(PATH_TO_SNMPGETNEXT,"$PATH_TO_SNMPGETNEXT") | 744 | AC_DEFINE_UNQUOTED(PATH_TO_SNMPGETNEXT,"$PATH_TO_SNMPGETNEXT",[path to snmpgetnext binary]) |
771 | fi | 745 | fi |
772 | 746 | ||
773 | if ( $PERL -M"Net::SNMP 3.6" -e 'exit' 2>/dev/null ) | 747 | if ( $PERL -M"Net::SNMP 3.6" -e 'exit' 2>/dev/null ) |
@@ -782,11 +756,11 @@ AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat) | |||
782 | AC_PATH_PROG(PATH_TO_QSTAT,qstat) | 756 | AC_PATH_PROG(PATH_TO_QSTAT,qstat) |
783 | if test -x "$PATH_TO_QUAKESTAT" | 757 | if test -x "$PATH_TO_QUAKESTAT" |
784 | then | 758 | then |
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" |
787 | elif test -x "$PATH_TO_QSTAT" | 761 | elif test -x "$PATH_TO_QSTAT" |
788 | then | 762 | then |
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" |
791 | else | 765 | else |
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 | |||
795 | AC_PATH_PROG(PATH_TO_FPING,fping) | 769 | AC_PATH_PROG(PATH_TO_FPING,fping) |
796 | if test -x "$PATH_TO_FPING" | 770 | if test -x "$PATH_TO_FPING" |
797 | then | 771 | then |
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" |
800 | else | 774 | else |
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 | |||
804 | AC_PATH_PROG(PATH_TO_SSH,ssh) | 778 | AC_PATH_PROG(PATH_TO_SSH,ssh) |
805 | if test -x "$PATH_TO_SSH" | 779 | if test -x "$PATH_TO_SSH" |
806 | then | 780 | then |
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" |
809 | else | 783 | else |
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" | |||
817 | if [cat /proc/meminfo > /dev/null 2>&1] | 791 | if [cat /proc/meminfo > /dev/null 2>&1] |
818 | then | 792 | then |
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" |
823 | elif [swap -l 2>&1 | egrep -i "swapfile" >/dev/null] | 797 | elif [swap -l 2>&1 | egrep -i "swapfile" >/dev/null] |
824 | then | 798 | then |
@@ -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 | |||
21 | if test $# -eq 0; then | 26 | if 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 |
24 | fi | 29 | fi |
25 | 30 | ||
31 | run=: | ||
32 | |||
33 | # In the cases where this matters, `missing' is being run in the | ||
34 | # srcdir already. | ||
35 | if test -f configure.ac; then | ||
36 | configure_ac=configure.ac | ||
37 | else | ||
38 | configure_ac=configure.in | ||
39 | fi | ||
40 | |||
41 | case "$1" in | ||
42 | --run) | ||
43 | # Try to run requested program, and just exit if it succeeds. | ||
44 | run= | ||
45 | shift | ||
46 | "$@" && exit 0 | ||
47 | ;; | ||
48 | esac | ||
49 | |||
50 | # If it does not exist, or fails to run (possibly an outdated version), | ||
51 | # try to emulate it. | ||
26 | case "$1" in | 52 | case "$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. | |||
35 | Options: | 61 | Options: |
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 | ||
39 | Supported PROGRAM values: | 66 | Supported 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 "\ |
63 | WARNING: \`$1' is missing on your system. You should only need it if | 97 | WARNING: \`$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 "\ |
72 | WARNING: \`$1' is missing on your system. You should only need it if | 111 | WARNING: \`$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 "\ |
81 | WARNING: \`$1' is missing on your system. You should only need it if | 125 | WARNING: \`$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 "\ |
100 | WARNING: \`$1' is missing on your system. You should only need it if | 149 | WARNING: \`$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 "\ | ||
165 | WARNING: \`$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 "\ |
111 | WARNING: \`$1' is missing on your system. You should only need it if | 188 | 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 | |||
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 "\ | ||
246 | WARNING: \`$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 "\ |
164 | WARNING: \`$1' is missing on your system. You should only need it if | 271 | WARNING: \`$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 "\ | ||
318 | WARNING: 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 "\ |
180 | WARNING: \`$1' is needed, and you do not seem to have it handy on your | 326 | WARNING: \`$1' is needed, and you do not seem to have it handy on your |