aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Ton Voon <tonvoon@users.sourceforge.net> 2004-12-15 20:54:38 +0000
committerGravatar Ton Voon <tonvoon@users.sourceforge.net> 2004-12-15 20:54:38 +0000
commitffb54640215b83f7f36b0052739a272ca6b4d128 (patch)
tree1583a9481e96126da98f94515748e519edbb2bc9
parent6fff4bcdcf97412a6d1422991ea9fe5e8a203e75 (diff)
downloadmonitoring-plugins-ffb54640215b83f7f36b0052739a272ca6b4d128.tar.gz
Support for coreutils lib. Configure tests via m4 scripts from coreutils
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1029 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r--Makefile.am4
-rw-r--r--configure.in122
-rw-r--r--plugins/Makefile.am2
-rwxr-xr-xtools/setup2
4 files changed, 28 insertions, 102 deletions
diff --git a/Makefile.am b/Makefile.am
index 21778407..59378483 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,12 +1,12 @@
## Process this file with automake to produce Makefile.in
-SUBDIRS = intl lib plugins plugins-scripts po
+SUBDIRS = intl lib plugins plugins-scripts m4 po
EXTRA_DIST = config.rpath \
ABOUT-NLS CHANGES CODING FAQ LEGAL REQUIREMENTS SUPPORT THANKS \
Helper.pm contrib pkg nagios-plugins.spec
-ACLOCAL_AMFLAGS = -I lib
+ACLOCAL_AMFLAGS = -I m4
localedir = $(datadir)/locale
DEFS = -DLOCALEDIR=\"$(localedir)\"
diff --git a/configure.in b/configure.in
index 4887257d..38d91ea8 100644
--- a/configure.in
+++ b/configure.in
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
AC_REVISION ($Revision$)
-AC_PREREQ(2.50)
+AC_PREREQ(2.58)
AC_INIT(nagios-plugins,1.4.0-alpha3)
AC_CONFIG_SRCDIR(Helper.pm)
AM_INIT_AUTOMAKE
@@ -16,20 +16,20 @@ dnl Figure out how to invoke "install" and what install options to use.
AC_PROG_INSTALL
AC_SUBST(INSTALL)
-AC_GNU_SOURCE
+dnl Must come very early on due to coreutils requirement
+dnl Takes care of AC_GNU_SOURCE, AC_AIX and AC_MINIX
+gl_USE_SYSTEM_EXTENSIONS
+
AC_PROG_CC
AC_PROG_CPP
AC_PROG_GCC_TRADITIONAL
AC_PROG_RANLIB
-AC_AIX
-AC_MINIX
AC_PROG_MAKE_SET
AC_PROG_AWK
AC_FUNC_MALLOC
AC_FUNC_REALLOC
-jm_PREREQ_ERROR
AC_FUNC_ERROR_AT_LINE
AC_CONFIG_LIBOBJ_DIR(lib)
@@ -550,69 +550,6 @@ AC_HEADER_TIME
AC_HEADER_SYS_WAIT
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)
AC_CHECK_HEADERS(features.h stdarg.h sys/unistd.h ctype.h stdlib.h)
-AC_CHECK_HEADERS(limits.h sys/param.h)
-AC_CHECK_HEADERS([sys/mount.h],[],[],[
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-])
-AC_CHECK_HEADERS(sys/vfs.h sys/fs/s5param.h sys/filsys.h fcntl.h sys/statfs.h sys/dustat.h sys/statvfs.h)
-
-# glibc 2.3.2 stdlib.h does not define HUGE_VAL (see man strtod)
-AC_MSG_CHECKING([for HUGE_VAL in <stdlib.h>])
-AC_TRY_COMPILE([#include <stdlib.h>],
- [double x = HUGE_VAL;],
- [AC_MSG_RESULT(yes)],
- [AC_MSG_RESULT(no)
- AC_MSG_CHECKING([for HUGE_VAL in <math.h>])
- AC_TRY_COMPILE([#include <math.h>],
- [double x = HUGE_VAL;],
- [AC_MSG_RESULT(yes)
- AC_DEFINE_UNQUOTED(HUGE_VAL_NEEDS_MATH_H, 1,
- [Define if <math.h> is required for HUGE_VAL])],
- [AC_MSG_RESULT(no)])])
-
-# Define HAVE_INTTYPES_H if <inttypes.h> exists,
-# doesn't clash with <sys/types.h>, and declares uintmax_t.
-
-AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
-[AC_TRY_COMPILE(
- [#include <sys/types.h>
-#include <inttypes.h>],
- [uintmax_t i = (uintmax_t) -1;],
- jm_ac_cv_header_inttypes_h=yes,
- jm_ac_cv_header_inttypes_h=no)])
-
-if test $jm_ac_cv_header_inttypes_h = yes; then
- AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
-[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
- and declares uintmax_t. ])
-fi
-
-# Check for SunOS statfs brokenness wrt partitions 2GB and larger.
-# If <sys/vfs.h> exists and struct statfs has a member named f_spare,
-# enable the work-around code in fsusage.c.
-AC_MSG_CHECKING([for statfs that truncates block counts])
-AC_CACHE_VAL(fu_cv_sys_truncating_statfs,
-[AC_TRY_COMPILE([
-#if !defined(sun) && !defined(__sun)
-choke -- this is a workaround for a Sun-specific problem
-#endif
-#include <sys/types.h>
-#include <sys/vfs.h>],
-[struct statfs t; long c = *(t.f_spare);],
-fu_cv_sys_truncating_statfs=yes
-AC_MSG_RESULT(yes),
-fu_cv_sys_truncating_statfs=no
-AC_MSG_RESULT(no),
-)])
-if test $fu_cv_sys_truncating_statfs = yes; then
- AC_DEFINE(STATFS_TRUNCATES_BLOCK_COUNTS, 1,
-[ Define if the block counts reported by statfs may be truncated to 2GB
- and the correct values may be stored in the f_spare array.
- (SunOS 4.1.2, 4.1.3, and 4.1.3_U1 are reported to have this problem.
- SunOS 4.1.1 seems not to be affected.)])
-fi
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
@@ -621,29 +558,6 @@ AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_SIGNAL
-AC_CHECK_SIZEOF(int,cross)
-AC_CHECK_SIZEOF(long,cross)
-AC_CHECK_SIZEOF(short,cross)
-
-AC_CACHE_CHECK([for long long],ac_cv_have_longlong,[
-AC_TRY_RUN([#include <stdio.h>
-main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }],
-ac_cv_have_longlong=yes,ac_cv_have_longlong=no,ac_cv_have_longlong=cross)])
-if test x"$ac_cv_have_longlong" = x"yes"; then
- AC_DEFINE(HAVE_LONGLONG,1,[Define if system has long long type])
-fi
-
-#
-# Check if the compiler supports the LL prefix on long long integers.
-# AIX needs this.
-
-AC_CACHE_CHECK([for LL suffix on long long integers],ac_cv_compiler_supports_ll, [
- AC_TRY_COMPILE([#include <stdio.h>],[long long i = 0x8000000000LL],
- ac_cv_compiler_supports_ll=yes,ac_cv_compiler_supports_ll=no)])
-if test x"$ac_cv_compiler_supports_ll" = x"yes"; then
- AC_DEFINE(COMPILER_SUPPORTS_LL,1,[Define if compiler support long long])
-fi
-
AC_CACHE_CHECK([for va_copy],ac_cv_HAVE_VA_COPY,[
AC_TRY_LINK([#include <stdarg.h>
va_list ap1,ap2;], [va_copy(ap1,ap2);],
@@ -958,11 +872,6 @@ if test -n "$ac_cv_ps_varlist" ; then
EXTRAS="$EXTRAS check_procs check_nagios"
fi
-dnl jm_AFS
-jm_LIST_MOUNTED_FILESYSTEMS([list_mounted_fs=yes], [list_mounted_fs=no])
-jm_FSTYPENAME
-jm_FILE_SYSTEM_USAGE([space=yes], [space=no])
-
AC_PATH_PROG(PATH_TO_PING,ping)
AC_PATH_PROG(PATH_TO_PING6,ping6)
@@ -1606,10 +1515,27 @@ AC_SUBST(EXTRAS)
AC_SUBST(EXTRA_NETOBJS)
AC_SUBST(DEPLIBS)
-AM_GNU_GETTEXT_VERSION(0.11.5)
AM_GNU_GETTEXT([no-libtool], [need-ngettext])
+AM_GNU_GETTEXT_VERSION(0.11.5)
-AC_OUTPUT(Makefile lib/Makefile plugins/Makefile plugins-scripts/Makefile plugins-scripts/subst plugins-scripts/utils.pm plugins-scripts/utils.sh command.cfg test.pl pkg/solaris/pkginfo intl/Makefile po/Makefile.in )
+dnl External libraries
+np_COREUTILS
+
+AC_OUTPUT(
+ Makefile
+ lib/Makefile
+ m4/Makefile
+ plugins/Makefile
+ plugins-scripts/Makefile
+ plugins-scripts/subst
+ plugins-scripts/utils.pm
+ plugins-scripts/utils.sh
+ command.cfg
+ test.pl
+ pkg/solaris/pkginfo
+ intl/Makefile
+ po/Makefile.in
+)
ACX_FEATURE([with],[cgiurl])
ACX_FEATURE([with],[nagios-user])
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 1453488e..13bca701 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -28,7 +28,7 @@ EXTRA_DIST = t utils.c netutils.c popen.c utils.h netutils.h popen.h common.h \
PLUGINHDRS = common.h
-BASEOBJS = utils.o ../lib/libnagiosplug.a
+BASEOBJS = utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a
NETOBJS = netutils.o $(BASEOBJS) $(EXTRA_NETOBJS)
NETLIBS = $(NETOBJS) $(SOCKETLIBS)
diff --git a/tools/setup b/tools/setup
index 8a7b6cee..39c6f74a 100755
--- a/tools/setup
+++ b/tools/setup
@@ -19,7 +19,7 @@ else
fi
autopoint --force
-aclocal -I lib
+aclocal -I m4
autoheader
automake --add-missing --force-missing --copy
autoconf