diff options
-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 9e0415e..808e1a7 100644 --- a/Makefile.am +++ b/Makefile.am | |||
@@ -6,7 +6,7 @@ EXTRA_DIST = REQUIREMENTS acconfig.h subst.in subst.sh Helper.pm \ | |||
6 | contrib nagios-plugins.spec.in getloadavg.m4 | 6 | contrib nagios-plugins.spec.in getloadavg.m4 |
7 | 7 | ||
8 | dist-hook: | 8 | dist-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 | ||
11 | test: | 11 | test: |
12 | cd plugins; $(MAKE) test | 12 | cd plugins; $(MAKE) test |
@@ -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 c673018..509b623 100644 --- a/configure.in +++ b/configure.in | |||
@@ -3,11 +3,15 @@ include(`aclocal.m4') | |||
3 | include(`getloadavg.m4') | 3 | include(`getloadavg.m4') |
4 | AC_REVISION ($Revision$) | 4 | AC_REVISION ($Revision$) |
5 | AC_INIT(Helper.pm) | 5 | AC_INIT(Helper.pm) |
6 | PACKAGE_VERSION="1.3.0" | 6 | VER=1.3.0 |
7 | REL=beta2 | ||
8 | AC_SUBST(VER) | ||
9 | AC_SUBST(REL) | ||
10 | PACKAGE_VERSION="${VER}-${REL}" | ||
7 | AC_SUBST(PACKAGE_VERSION) | 11 | AC_SUBST(PACKAGE_VERSION) |
8 | PACKAGE_RELEASE="alpha1" | 12 | PACKAGE_RELEASE="alpha1" |
9 | AC_SUBST(PACKAGE_RELEASE) | 13 | AC_SUBST(PACKAGE_RELEASE) |
10 | AM_INIT_AUTOMAKE(nagios-plugins,${PACKAGE_VERSION}-${PACKAGE_RELEASE}) | 14 | AM_INIT_AUTOMAKE(nagios-plugins,${PACKAGE_VERSION}) |
11 | AM_CONFIG_HEADER(plugins/config.h plugins/common.h plugins/version.h plugins/netutils.h plugins/utils.h plugins/popen.h) | 15 | AM_CONFIG_HEADER(plugins/config.h plugins/common.h plugins/version.h plugins/netutils.h plugins/utils.h plugins/popen.h) |
12 | 16 | ||
13 | AC_PREFIX_DEFAULT(/usr/local/nagios) | 17 | AC_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 | ||
368 | AC_TRY_COMPILE([#include <sys/time.h>], | 372 | AC_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]) | |
372 | AC_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 | ||
376 | dnl Checks for library functions. | 383 | dnl Checks for library functions. |
377 | AC_CHECK_FUNCS(memmove select socket strdup strstr strtod strtol strtoul) | 384 | AC_CHECK_FUNCS(memmove select socket strdup strstr strtod strtol strtoul) |
diff --git a/nagios-plugins.spec.in b/nagios-plugins.spec.in index f8b9ee6..a4e734c 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 | ||
15 | Name: %{name} | 15 | Name: %{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 bf6af88..10d544c 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 |
320 | int | 320 | int |
321 | gettimeofday (struct timeval *tv, struct timezone *tz) | 321 | gettimeofday (struct timeval *tv, struct timezone *tz) |
322 | { | 322 | { |