summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl DeBisschop <kdebisschop@users.sourceforge.net>2002-11-14 18:25:10 +0000
committerKarl DeBisschop <kdebisschop@users.sourceforge.net>2002-11-14 18:25:10 +0000
commitc77ffcedc423655621be9803b7f710c758a959b7 (patch)
treebf61006f5399497f83fdd9de9fddad5048512c28
parentbe0cbafb0be470dcd3d29c20d7c5ce503c467bd4 (diff)
downloadmonitoring-plugins-c77ffcedc423655621be9803b7f710c758a959b7.tar.gz
fix bug with gettimeofday test, improve version/release handling, update rpm spec
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@200 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r--Makefile.am2
-rw-r--r--acconfig.h1
-rw-r--r--configure.in23
-rw-r--r--nagios-plugins.spec.in9
-rw-r--r--plugins/utils.c2
5 files changed, 25 insertions, 12 deletions
diff --git a/Makefile.am b/Makefile.am
index 9e0415e1..808e1a73 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,7 +6,7 @@ EXTRA_DIST = REQUIREMENTS acconfig.h subst.in subst.sh Helper.pm \
6contrib nagios-plugins.spec.in getloadavg.m4 6contrib nagios-plugins.spec.in getloadavg.m4
7 7
8dist-hook: 8dist-hook:
9 sed "s/PACKAGE_VERSION/@PACKAGE_VERSION@/;s/PACKAGE_RELEASE/@PACKAGE_RELEASE@/;" $(srcdir)/nagios-plugins.spec.in > $(distdir)/nagios-plugins.spec 9 sed "s/%%{VER}/@VER@/;s/%%{REL}/@REL@/;" $(srcdir)/nagios-plugins.spec.in > $(distdir)/nagios-plugins.spec
10 10
11test: 11test:
12 cd plugins; $(MAKE) test 12 cd plugins; $(MAKE) test
diff --git a/acconfig.h b/acconfig.h
index b2830396..f2fe07be 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -15,6 +15,7 @@
15#undef HAVE_VA_COPY 15#undef HAVE_VA_COPY
16#undef HAVE_VASPRINTF 16#undef HAVE_VASPRINTF
17#undef HAVE_VSNPRINTF 17#undef HAVE_VSNPRINTF
18#undef NEED_GETTIMEOFDAY
18#undef NSLOOKUP_COMMAND 19#undef NSLOOKUP_COMMAND
19#undef HOST_COMMAND 20#undef HOST_COMMAND
20#undef PACKAGE_VERSION 21#undef PACKAGE_VERSION
diff --git a/configure.in b/configure.in
index c6730189..509b6236 100644
--- a/configure.in
+++ b/configure.in
@@ -3,11 +3,15 @@ include(`aclocal.m4')
3include(`getloadavg.m4') 3include(`getloadavg.m4')
4AC_REVISION ($Revision$) 4AC_REVISION ($Revision$)
5AC_INIT(Helper.pm) 5AC_INIT(Helper.pm)
6PACKAGE_VERSION="1.3.0" 6VER=1.3.0
7REL=beta2
8AC_SUBST(VER)
9AC_SUBST(REL)
10PACKAGE_VERSION="${VER}-${REL}"
7AC_SUBST(PACKAGE_VERSION) 11AC_SUBST(PACKAGE_VERSION)
8PACKAGE_RELEASE="alpha1" 12PACKAGE_RELEASE="alpha1"
9AC_SUBST(PACKAGE_RELEASE) 13AC_SUBST(PACKAGE_RELEASE)
10AM_INIT_AUTOMAKE(nagios-plugins,${PACKAGE_VERSION}-${PACKAGE_RELEASE}) 14AM_INIT_AUTOMAKE(nagios-plugins,${PACKAGE_VERSION})
11AM_CONFIG_HEADER(plugins/config.h plugins/common.h plugins/version.h plugins/netutils.h plugins/utils.h plugins/popen.h) 15AM_CONFIG_HEADER(plugins/config.h plugins/common.h plugins/version.h plugins/netutils.h plugins/utils.h plugins/popen.h)
12 16
13AC_PREFIX_DEFAULT(/usr/local/nagios) 17AC_PREFIX_DEFAULT(/usr/local/nagios)
@@ -366,12 +370,15 @@ AC_TRY_COMPILE([#include <getopt.h>
366 DEPLIBS="$DEPLIBS libgetopt.a"]) 370 DEPLIBS="$DEPLIBS libgetopt.a"])
367 371
368AC_TRY_COMPILE([#include <sys/time.h>], 372AC_TRY_COMPILE([#include <sys/time.h>],
369 [struct timeval *foo;], 373 [struct timeval *tv;
370 [AC_DEFINE(HAVE_STRUCT_TIMEVAL,1,[Define if we have a timeval structure])]) 374 struct timezone *tz;],
371 375 AC_DEFINE(HAVE_STRUCT_TIMEVAL,1,[Define if we have a timeval structure])
372AC_TRY_COMPILE([#include <sys/time.h>], 376 AC_TRY_COMPILE([#include <sys/time.h>],
373 [gettimeofday(NULL, NULL);], 377 [struct timeval *tv;
374 AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define if gettimeofday is found])) 378 struct timezone *tz;
379 gettimeofday(tv, tz);],
380 AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define if gettimeofday is found]),
381 AC_DEFINE(NEED_GETTIMEOFDAY,1,[Define if gettimeofday is needed])))
375 382
376dnl Checks for library functions. 383dnl Checks for library functions.
377AC_CHECK_FUNCS(memmove select socket strdup strstr strtod strtol strtoul) 384AC_CHECK_FUNCS(memmove select socket strdup strstr strtod strtol strtoul)
diff --git a/nagios-plugins.spec.in b/nagios-plugins.spec.in
index f8b9ee60..a4e734cb 100644
--- a/nagios-plugins.spec.in
+++ b/nagios-plugins.spec.in
@@ -8,8 +8,8 @@
8%define name %{archive} 8%define name %{archive}
9%endif 9%endif
10 10
11%define version PACKAGE_VERSION 11%define version %%{VER}
12%define release PACKAGE_RELEASE 12%define release %%{REL}
13%define source %{archive}-%{version} 13%define source %{archive}-%{version}
14 14
15Name: %{name} 15Name: %{name}
@@ -95,6 +95,7 @@ rm -rf $RPM_BUILD_ROOT
95%else 95%else
96%{_prefix}/lib/nagios/plugins/check_by_ssh 96%{_prefix}/lib/nagios/plugins/check_by_ssh
97%{_prefix}/lib/nagios/plugins/check_breeze 97%{_prefix}/lib/nagios/plugins/check_breeze
98%{_prefix}/lib/nagios/plugins/check_dig
98%{_prefix}/lib/nagios/plugins/check_disk 99%{_prefix}/lib/nagios/plugins/check_disk
99%{_prefix}/lib/nagios/plugins/check_disk_smb 100%{_prefix}/lib/nagios/plugins/check_disk_smb
100%{_prefix}/lib/nagios/plugins/check_dns 101%{_prefix}/lib/nagios/plugins/check_dns
@@ -102,10 +103,13 @@ rm -rf $RPM_BUILD_ROOT
102%{_prefix}/lib/nagios/plugins/check_flexlm 103%{_prefix}/lib/nagios/plugins/check_flexlm
103%{_prefix}/lib/nagios/plugins/check_ftp 104%{_prefix}/lib/nagios/plugins/check_ftp
104%{_prefix}/lib/nagios/plugins/check_http 105%{_prefix}/lib/nagios/plugins/check_http
106%{_prefix}/lib/nagios/plugins/check_ifoperstatus
107%{_prefix}/lib/nagios/plugins/check_ifstatus
105%{_prefix}/lib/nagios/plugins/check_imap 108%{_prefix}/lib/nagios/plugins/check_imap
106%{_prefix}/lib/nagios/plugins/check_ircd 109%{_prefix}/lib/nagios/plugins/check_ircd
107%{_prefix}/lib/nagios/plugins/check_load 110%{_prefix}/lib/nagios/plugins/check_load
108%{_prefix}/lib/nagios/plugins/check_log 111%{_prefix}/lib/nagios/plugins/check_log
112%{_prefix}/lib/nagios/plugins/check_mailq
109%{_prefix}/lib/nagios/plugins/check_mrtg 113%{_prefix}/lib/nagios/plugins/check_mrtg
110%{_prefix}/lib/nagios/plugins/check_mrtgtraf 114%{_prefix}/lib/nagios/plugins/check_mrtgtraf
111%{_prefix}/lib/nagios/plugins/check_nagios 115%{_prefix}/lib/nagios/plugins/check_nagios
@@ -130,6 +134,7 @@ rm -rf $RPM_BUILD_ROOT
130%{_prefix}/lib/nagios/plugins/check_users 134%{_prefix}/lib/nagios/plugins/check_users
131%{_prefix}/lib/nagios/plugins/check_vsz 135%{_prefix}/lib/nagios/plugins/check_vsz
132%{_prefix}/lib/nagios/plugins/check_wave 136%{_prefix}/lib/nagios/plugins/check_wave
137%{_prefix}/lib/nagios/plugins/negate
133%{_prefix}/lib/nagios/plugins/utils.pm 138%{_prefix}/lib/nagios/plugins/utils.pm
134%{_prefix}/lib/nagios/plugins/utils.sh 139%{_prefix}/lib/nagios/plugins/utils.sh
135%{_prefix}/lib/nagios/plugins/urlize 140%{_prefix}/lib/nagios/plugins/urlize
diff --git a/plugins/utils.c b/plugins/utils.c
index bf6af885..10d544c4 100644
--- a/plugins/utils.c
+++ b/plugins/utils.c
@@ -316,7 +316,7 @@ is_option (char *str)
316 316
317 317
318 318
319#ifndef HAVE_GETTIMEOFDAY 319#ifdef NEED_GETTIMEOFDAY
320int 320int
321gettimeofday (struct timeval *tv, struct timezone *tz) 321gettimeofday (struct timeval *tv, struct timezone *tz)
322{ 322{