Code

fix bug with gettimeofday test, improve version/release handling, update rpm spec
authorKarl DeBisschop <kdebisschop@users.sourceforge.net>
Thu, 14 Nov 2002 18:25:10 +0000 (18:25 +0000)
committerKarl DeBisschop <kdebisschop@users.sourceforge.net>
Thu, 14 Nov 2002 18:25:10 +0000 (18:25 +0000)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@200 f882894a-f735-0410-b71e-b25c423dba1c

Makefile.am
acconfig.h
configure.in
nagios-plugins.spec.in
plugins/utils.c

index 9e0415e14f9f345e5f19f14714183afcd792a3c6..808e1a732af5d85860f65ff298ff38b9f8617f39 100644 (file)
@@ -6,7 +6,7 @@ EXTRA_DIST = REQUIREMENTS acconfig.h subst.in subst.sh Helper.pm        \
 contrib nagios-plugins.spec.in getloadavg.m4
 
 dist-hook:
-       sed "s/PACKAGE_VERSION/@PACKAGE_VERSION@/;s/PACKAGE_RELEASE/@PACKAGE_RELEASE@/;" $(srcdir)/nagios-plugins.spec.in > $(distdir)/nagios-plugins.spec
+       sed "s/%%{VER}/@VER@/;s/%%{REL}/@REL@/;" $(srcdir)/nagios-plugins.spec.in > $(distdir)/nagios-plugins.spec
 
 test:
        cd plugins; $(MAKE) test
index b283039609896fdcade900836ab582b2176952a2..f2fe07bedbaac8fe886a88c8e9d1901c0e39de62 100644 (file)
@@ -15,6 +15,7 @@
 #undef HAVE_VA_COPY
 #undef HAVE_VASPRINTF
 #undef HAVE_VSNPRINTF
+#undef NEED_GETTIMEOFDAY
 #undef NSLOOKUP_COMMAND
 #undef HOST_COMMAND
 #undef PACKAGE_VERSION
index c67301892ccf5947301dc20389407afdfc345a55..509b6236d3b0f56e26ebe0957abfbe93c4dca34c 100644 (file)
@@ -3,11 +3,15 @@ include(`aclocal.m4')
 include(`getloadavg.m4')
 AC_REVISION ($Revision$)
 AC_INIT(Helper.pm)
-PACKAGE_VERSION="1.3.0"
+VER=1.3.0
+REL=beta2
+AC_SUBST(VER)
+AC_SUBST(REL)
+PACKAGE_VERSION="${VER}-${REL}"
 AC_SUBST(PACKAGE_VERSION)
 PACKAGE_RELEASE="alpha1"
 AC_SUBST(PACKAGE_RELEASE)
-AM_INIT_AUTOMAKE(nagios-plugins,${PACKAGE_VERSION}-${PACKAGE_RELEASE})
+AM_INIT_AUTOMAKE(nagios-plugins,${PACKAGE_VERSION})
 AM_CONFIG_HEADER(plugins/config.h plugins/common.h plugins/version.h plugins/netutils.h plugins/utils.h plugins/popen.h)
 
 AC_PREFIX_DEFAULT(/usr/local/nagios)
@@ -366,12 +370,15 @@ AC_TRY_COMPILE([#include <getopt.h>
                 DEPLIBS="$DEPLIBS libgetopt.a"])
 
 AC_TRY_COMPILE([#include <sys/time.h>],
-               [struct timeval *foo;],
-               [AC_DEFINE(HAVE_STRUCT_TIMEVAL,1,[Define if we have a timeval structure])])
-
-AC_TRY_COMPILE([#include <sys/time.h>],
-               [gettimeofday(NULL, NULL);],
-               AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define if gettimeofday is found]))
+               [struct timeval *tv;
+                struct timezone *tz;],
+               AC_DEFINE(HAVE_STRUCT_TIMEVAL,1,[Define if we have a timeval structure])
+               AC_TRY_COMPILE([#include <sys/time.h>],
+                              [struct timeval *tv;
+                               struct timezone *tz;
+                               gettimeofday(tv, tz);],
+                              AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define if gettimeofday is found]),
+                              AC_DEFINE(NEED_GETTIMEOFDAY,1,[Define if gettimeofday is needed])))
 
 dnl Checks for library functions.
 AC_CHECK_FUNCS(memmove select socket strdup strstr strtod strtol strtoul)
index f8b9ee608dcb8f4c2967b61fe46d5d181779758a..a4e734cb1adee6b7bfeee505b27cf1ac54b2edbe 100644 (file)
@@ -8,8 +8,8 @@
 %define name %{archive}
 %endif
 
-%define version PACKAGE_VERSION
-%define release PACKAGE_RELEASE
+%define version %%{VER}
+%define release %%{REL}
 %define source %{archive}-%{version}
 
 Name: %{name}
@@ -95,6 +95,7 @@ rm -rf $RPM_BUILD_ROOT
 %else
 %{_prefix}/lib/nagios/plugins/check_by_ssh
 %{_prefix}/lib/nagios/plugins/check_breeze
+%{_prefix}/lib/nagios/plugins/check_dig
 %{_prefix}/lib/nagios/plugins/check_disk
 %{_prefix}/lib/nagios/plugins/check_disk_smb
 %{_prefix}/lib/nagios/plugins/check_dns
@@ -102,10 +103,13 @@ rm -rf $RPM_BUILD_ROOT
 %{_prefix}/lib/nagios/plugins/check_flexlm
 %{_prefix}/lib/nagios/plugins/check_ftp
 %{_prefix}/lib/nagios/plugins/check_http
+%{_prefix}/lib/nagios/plugins/check_ifoperstatus
+%{_prefix}/lib/nagios/plugins/check_ifstatus
 %{_prefix}/lib/nagios/plugins/check_imap
 %{_prefix}/lib/nagios/plugins/check_ircd
 %{_prefix}/lib/nagios/plugins/check_load
 %{_prefix}/lib/nagios/plugins/check_log
+%{_prefix}/lib/nagios/plugins/check_mailq
 %{_prefix}/lib/nagios/plugins/check_mrtg
 %{_prefix}/lib/nagios/plugins/check_mrtgtraf
 %{_prefix}/lib/nagios/plugins/check_nagios
@@ -130,6 +134,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_prefix}/lib/nagios/plugins/check_users
 %{_prefix}/lib/nagios/plugins/check_vsz
 %{_prefix}/lib/nagios/plugins/check_wave
+%{_prefix}/lib/nagios/plugins/negate
 %{_prefix}/lib/nagios/plugins/utils.pm
 %{_prefix}/lib/nagios/plugins/utils.sh
 %{_prefix}/lib/nagios/plugins/urlize
index bf6af8851c29d617dc1c1a873c36b6d29c9e5cc3..10d544c43bdf0aedf8a071714537db4f73020ea6 100644 (file)
@@ -316,7 +316,7 @@ is_option (char *str)
 
 
 
-#ifndef HAVE_GETTIMEOFDAY
+#ifdef NEED_GETTIMEOFDAY
 int
 gettimeofday (struct timeval *tv, struct timezone *tz)
 {