summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in33
1 files changed, 29 insertions, 4 deletions
diff --git a/configure.in b/configure.in
index 5de4070..24291d0 100644
--- a/configure.in
+++ b/configure.in
@@ -37,7 +37,8 @@ AC_ARG_PROGRAM
37 37
38dnl AC_ARG_WITH(nonposix_state_defs,--with-nonposix-state-defs uses POSIXLY incorrect states for netsaint < 0.0.7b2,,AC_DEFINE(POSIX_STATE_DEFS)) 38dnl AC_ARG_WITH(nonposix_state_defs,--with-nonposix-state-defs uses POSIXLY incorrect states for netsaint < 0.0.7b2,,AC_DEFINE(POSIX_STATE_DEFS))
39 39
40AC_ARG_WITH(cgiurl,--with-cgiurl=<dir> sets URL for cgi programs,cgiurl=$withval,cgiurl=/cgi-bin/nagios) 40dnl CGIURL has changed for Nagios with 1.0 beta
41AC_ARG_WITH(cgiurl,--with-cgiurl=<dir> sets URL for cgi programs,cgiurl=$withval,cgiurl=/nagios/cgi-bin)
41CGIURL="$cgiurl" 42CGIURL="$cgiurl"
42AC_DEFINE_UNQUOTED(CGIURL,"$CGIURL") 43AC_DEFINE_UNQUOTED(CGIURL,"$CGIURL")
43 44
@@ -52,7 +53,7 @@ AC_ARG_WITH(trusted_path,--with-trusted-path=/bin:/sbin:/usr/bin:/usr/sbin sets
52AC_SUBST(trusted_path) 53AC_SUBST(trusted_path)
53 54
54EXTRAS= 55EXTRAS=
55PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/etc:/usr/local/bin:/usr/local/sbin:$PATH 56dnl PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/etc:/usr/local/bin:/usr/local/sbin:$PATH
56 57
57LDFLAGS="$LDFLAGS -L." 58LDFLAGS="$LDFLAGS -L."
58 59
@@ -314,7 +315,21 @@ then
314 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s") 315 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s")
315 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -axo 'rss comm'") 316 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -axo 'rss comm'")
316 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s") 317 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s")
317 echo " ps syntax... $PATH_TO_PS -eo 'stat comm vsz rss user ppid args'" 318 echo " ps syntax... $PATH_TO_PS -axo 'stat comm vsz rss user ppid args'"
319dnl AIX 4.3.3 - needs verification.
320elif [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]
321then
322 AC_DEFINE(USE_PS_VARS)
323 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos])
324 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -ao 'stat user ppid args'")
325 EXTRAS="$EXTRAS check_nagios"
326 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -ao 'stat uid ppid comm args'")
327 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n")
328 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -ao 'vsz comm'")
329 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s")
330 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -ao 'rss comm'")
331 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s")
332 echo " ps syntax... $PATH_TO_PS -ao 'stat comm vsz rss user ppid args'"
318elif [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] 333elif [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]
319then 334then
320 AC_DEFINE(USE_PS_VARS) 335 AC_DEFINE(USE_PS_VARS)
@@ -367,6 +382,7 @@ then
367 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -Ao 'rss comm'") 382 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -Ao 'rss comm'")
368 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s") 383 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s")
369 echo " ps syntax... $PATH_TO_PS -Ao 'state comm vsz rss'" 384 echo " ps syntax... $PATH_TO_PS -Ao 'state comm vsz rss'"
385dnl wonder who takes state instead of stat
370elif [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] 386elif [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]
371then 387then
372 AC_DEFINE(USE_PS_VARS) 388 AC_DEFINE(USE_PS_VARS)
@@ -650,6 +666,15 @@ else
650 echo "** Get lmstat from Globetrotter Software to monitor flexlm licenses" 666 echo "** Get lmstat from Globetrotter Software to monitor flexlm licenses"
651fi 667fi
652 668
669AC_PATH_PROG(PATH_TO_SMBCLIENT,smbclient)
670if test -x "$PATH_TO_SMBCLIENT"
671then
672 AC_DEFINE_UNQUOTED(PATH_TO_SMBCLIENT,"$PATH_TO_SMBCLIENT")
673else
674 echo "** Get smbclient from Samba.org to monitor SMB shares"
675fi
676
677
653AC_PATH_PROG(PATH_TO_WHO,who) 678AC_PATH_PROG(PATH_TO_WHO,who)
654if [who -q 2>/dev/null | egrep -i "^# users=[0-9]+$" >/dev/null] 679if [who -q 2>/dev/null | egrep -i "^# users=[0-9]+$" >/dev/null]
655then 680then
@@ -673,7 +698,7 @@ then
673 AC_DEFINE_UNQUOTED(PATH_TO_SNMPGETNEXT,"$PATH_TO_SNMPGETNEXT") 698 AC_DEFINE_UNQUOTED(PATH_TO_SNMPGETNEXT,"$PATH_TO_SNMPGETNEXT")
674fi 699fi
675 700
676if ( $PERL -MNet::SNMP -e 'print $Net::SNMP::VERSION;' ) 701if ( $PERL -M"Net::SNMP 3.6" -e 'exit' 2>/dev/null )
677then 702then
678 echo "Found Net::SNMP perl module" 703 echo "Found Net::SNMP perl module"
679else 704else