diff options
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2002-11-14 18:25:10 +0000 |
---|---|---|
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2002-11-14 18:25:10 +0000 |
commit | c77ffcedc423655621be9803b7f710c758a959b7 (patch) | |
tree | bf61006f5399497f83fdd9de9fddad5048512c28 | |
parent | be0cbafb0be470dcd3d29c20d7c5ce503c467bd4 (diff) | |
download | monitoring-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.am | 2 | ||||
-rw-r--r-- | acconfig.h | 1 | ||||
-rw-r--r-- | configure.in | 23 | ||||
-rw-r--r-- | nagios-plugins.spec.in | 9 | ||||
-rw-r--r-- | plugins/utils.c | 2 |
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 \ 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 @@ -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 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') 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) 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 @@ %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 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) -#ifndef HAVE_GETTIMEOFDAY +#ifdef NEED_GETTIMEOFDAY int gettimeofday (struct timeval *tv, struct timezone *tz) { |