[Nagiosplug-checkins] nagiosplug configure.in,1.181,1.182

M. Sean Finney seanius at users.sourceforge.net
Mon May 1 14:53:07 CEST 2006

Update of /cvsroot/nagiosplug/nagiosplug
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6344

Modified Files:
Log Message:
- check_ntp:
  - now roughly feature-complete.
  - various bugfixes, esp. offset calculation.
  - enhanced the asynchronous offset polling to set requests that
    haven't recieved a response in >= 1 second to stale and retransmit them,
    which results in much better performance on unreliable networks.
  - we only spend timeout/2 seconds polling offsets, and if we don't get
    everything by that point we work with what we have and set status to
    warning/critical depending on how much data we have.
  - set the same defaults as the perl script.
- commit changes to configure.in to support automatic building of check_apt
  (if apt-get is installed and regex libraries available) and check_ntp
  (unconditionally), now defaulting to check_ntp.c instead of the perl script.
  if this is an issue we can back out the commit of course.  an eye
  should be kept on check_ntp building and running correctly in different
  environments, esp. 64-bit and big-endian platforms, and those with more
  "esoteric" API's (do any of the platforms not have poll()?).
- similar changes to Makefile.am's.
- common.h: add statement to include sys/poll.h
- runcmd.c: exit STATE_UNKNOWN if execve() fails.

Index: configure.in
RCS file: /cvsroot/nagiosplug/nagiosplug/configure.in,v
retrieving revision 1.181
retrieving revision 1.182
diff -u -d -r1.181 -r1.182
--- configure.in	28 Apr 2006 15:52:31 -0000	1.181
+++ configure.in	1 May 2006 21:52:42 -0000	1.182
@@ -529,8 +529,9 @@
-AC_CHECK_HEADERS(signal.h strings.h string.h syslog.h uio.h errno.h regex.h sys/types.h sys/time.h sys/socket.h sys/loadavg.h sys/un.h)
+AC_CHECK_HEADERS(signal.h strings.h string.h syslog.h uio.h errno.h sys/types.h sys/time.h sys/socket.h sys/loadavg.h sys/un.h sys/poll.h)
 AC_CHECK_HEADERS(features.h stdarg.h sys/unistd.h ctype.h stdlib.h)
 dnl Checks for typedefs, structures, and compiler characteristics.
@@ -601,7 +602,7 @@
 dnl Checks for library functions.
 AC_CHECK_FUNCS(memmove select socket strdup strstr strtod strtol strtoul floor)
+AC_CHECK_FUNCS(basename poll)
 AC_MSG_CHECKING(return type of socket size)
 AC_TRY_COMPILE([#include <stdlib.h>
@@ -1263,20 +1264,6 @@
                             [sets path to rpcinfo]), PATH_TO_RPCINFO=$withval)
-            ACX_HELP_STRING([--with-ntpdate-command=PATH],
-                            [sets path to ntpdate]), PATH_TO_NTPDATE=$withval)
-if (test -n "$PATH_TO_NTPDATE" || test -n "$PATH_TO_NTPQ")
-	AC_DEFINE_UNQUOTED(PATH_TO_NTPQ,"$PATH_TO_NTPQ",[path to ntpq binary])
-	AC_MSG_WARN([Install NTP programs (http://www.ntp.org) if you want to monitor time synchronization])
 if test -x "$PATH_TO_LMSTAT"
@@ -1621,6 +1608,19 @@
 	AC_DEFINE_UNQUOTED(PATH_TO_DIG,"$PATH_TO_DIG",[Path to dig command, if present])
+            ACX_HELP_STRING([--with-apt-get-command=PATH],
+                            [Path to apt-get command]), 
+                            with_apt_get_command=$withval,
+                            with_apt_get_command=$PATH_TO_APTGET)
+AC_DEFINE_UNQUOTED(PATH_TO_APTGET,"$PATH_TO_APTGET",[Path to apt-get command, if present])
+# check_apt needs regex support
+if test -n "$PATH_TO_APTGET" && test "$FOUNDREGEX" = "yes"; then
+	EXTRAS="$EXTRAS check_apt"
 if test -f plugins/check_nt.c ; then
   EXTRAS="$EXTRAS check_nt"
 elif test -f ../plugins/check_nt.c ; then
@@ -1718,11 +1718,11 @@
 dnl in the configure code above to use with_foo instead of ac_cv_foo
 dnl if we want them to show up here.  it'd also make the code cleaner.
 dnl i'll get to that on another rainy day :) -sf
 dnl ACX_FEATURE([with],[dig-command])
 dnl ACX_FEATURE([with],[fping-command])
 dnl ACX_FEATURE([with],[mailq-command])
 dnl ACX_FEATURE([with],[nslookup-command])
-dnl ACX_FEATURE([with],[ntpdate-command])
 dnl ACX_FEATURE([with],[qstat-command])

More information about the Commits mailing list