diff options
-rw-r--r-- | Makefile.am | 4 | ||||
-rw-r--r-- | configure.in | 122 | ||||
-rw-r--r-- | plugins/Makefile.am | 2 | ||||
-rwxr-xr-x | tools/setup | 2 |
4 files changed, 28 insertions, 102 deletions
diff --git a/Makefile.am b/Makefile.am index 2177840..5937848 100644 --- a/Makefile.am +++ b/Makefile.am | |||
@@ -1,12 +1,12 @@ | |||
1 | ## Process this file with automake to produce Makefile.in | 1 | ## Process this file with automake to produce Makefile.in |
2 | 2 | ||
3 | SUBDIRS = intl lib plugins plugins-scripts po | 3 | SUBDIRS = intl lib plugins plugins-scripts m4 po |
4 | 4 | ||
5 | EXTRA_DIST = config.rpath \ | 5 | EXTRA_DIST = config.rpath \ |
6 | ABOUT-NLS CHANGES CODING FAQ LEGAL REQUIREMENTS SUPPORT THANKS \ | 6 | ABOUT-NLS CHANGES CODING FAQ LEGAL REQUIREMENTS SUPPORT THANKS \ |
7 | Helper.pm contrib pkg nagios-plugins.spec | 7 | Helper.pm contrib pkg nagios-plugins.spec |
8 | 8 | ||
9 | ACLOCAL_AMFLAGS = -I lib | 9 | ACLOCAL_AMFLAGS = -I m4 |
10 | 10 | ||
11 | localedir = $(datadir)/locale | 11 | localedir = $(datadir)/locale |
12 | DEFS = -DLOCALEDIR=\"$(localedir)\" | 12 | DEFS = -DLOCALEDIR=\"$(localedir)\" |
diff --git a/configure.in b/configure.in index 4887257..38d91ea 100644 --- a/configure.in +++ b/configure.in | |||
@@ -1,6 +1,6 @@ | |||
1 | dnl Process this file with autoconf to produce a configure script. | 1 | dnl Process this file with autoconf to produce a configure script. |
2 | AC_REVISION ($Revision$) | 2 | AC_REVISION ($Revision$) |
3 | AC_PREREQ(2.50) | 3 | AC_PREREQ(2.58) |
4 | AC_INIT(nagios-plugins,1.4.0-alpha3) | 4 | AC_INIT(nagios-plugins,1.4.0-alpha3) |
5 | AC_CONFIG_SRCDIR(Helper.pm) | 5 | AC_CONFIG_SRCDIR(Helper.pm) |
6 | AM_INIT_AUTOMAKE | 6 | AM_INIT_AUTOMAKE |
@@ -16,20 +16,20 @@ dnl Figure out how to invoke "install" and what install options to use. | |||
16 | AC_PROG_INSTALL | 16 | AC_PROG_INSTALL |
17 | AC_SUBST(INSTALL) | 17 | AC_SUBST(INSTALL) |
18 | 18 | ||
19 | AC_GNU_SOURCE | 19 | dnl Must come very early on due to coreutils requirement |
20 | dnl Takes care of AC_GNU_SOURCE, AC_AIX and AC_MINIX | ||
21 | gl_USE_SYSTEM_EXTENSIONS | ||
22 | |||
20 | AC_PROG_CC | 23 | AC_PROG_CC |
21 | AC_PROG_CPP | 24 | AC_PROG_CPP |
22 | AC_PROG_GCC_TRADITIONAL | 25 | AC_PROG_GCC_TRADITIONAL |
23 | AC_PROG_RANLIB | 26 | AC_PROG_RANLIB |
24 | AC_AIX | ||
25 | AC_MINIX | ||
26 | 27 | ||
27 | AC_PROG_MAKE_SET | 28 | AC_PROG_MAKE_SET |
28 | AC_PROG_AWK | 29 | AC_PROG_AWK |
29 | 30 | ||
30 | AC_FUNC_MALLOC | 31 | AC_FUNC_MALLOC |
31 | AC_FUNC_REALLOC | 32 | AC_FUNC_REALLOC |
32 | jm_PREREQ_ERROR | ||
33 | AC_FUNC_ERROR_AT_LINE | 33 | AC_FUNC_ERROR_AT_LINE |
34 | 34 | ||
35 | AC_CONFIG_LIBOBJ_DIR(lib) | 35 | AC_CONFIG_LIBOBJ_DIR(lib) |
@@ -550,69 +550,6 @@ AC_HEADER_TIME | |||
550 | AC_HEADER_SYS_WAIT | 550 | AC_HEADER_SYS_WAIT |
551 | 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) | 551 | 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) |
552 | AC_CHECK_HEADERS(features.h stdarg.h sys/unistd.h ctype.h stdlib.h) | 552 | AC_CHECK_HEADERS(features.h stdarg.h sys/unistd.h ctype.h stdlib.h) |
553 | AC_CHECK_HEADERS(limits.h sys/param.h) | ||
554 | AC_CHECK_HEADERS([sys/mount.h],[],[],[ | ||
555 | #ifdef HAVE_SYS_PARAM_H | ||
556 | #include <sys/param.h> | ||
557 | #endif | ||
558 | ]) | ||
559 | AC_CHECK_HEADERS(sys/vfs.h sys/fs/s5param.h sys/filsys.h fcntl.h sys/statfs.h sys/dustat.h sys/statvfs.h) | ||
560 | |||
561 | # glibc 2.3.2 stdlib.h does not define HUGE_VAL (see man strtod) | ||
562 | AC_MSG_CHECKING([for HUGE_VAL in <stdlib.h>]) | ||
563 | AC_TRY_COMPILE([#include <stdlib.h>], | ||
564 | [double x = HUGE_VAL;], | ||
565 | [AC_MSG_RESULT(yes)], | ||
566 | [AC_MSG_RESULT(no) | ||
567 | AC_MSG_CHECKING([for HUGE_VAL in <math.h>]) | ||
568 | AC_TRY_COMPILE([#include <math.h>], | ||
569 | [double x = HUGE_VAL;], | ||
570 | [AC_MSG_RESULT(yes) | ||
571 | AC_DEFINE_UNQUOTED(HUGE_VAL_NEEDS_MATH_H, 1, | ||
572 | [Define if <math.h> is required for HUGE_VAL])], | ||
573 | [AC_MSG_RESULT(no)])]) | ||
574 | |||
575 | # Define HAVE_INTTYPES_H if <inttypes.h> exists, | ||
576 | # doesn't clash with <sys/types.h>, and declares uintmax_t. | ||
577 | |||
578 | AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h, | ||
579 | [AC_TRY_COMPILE( | ||
580 | [#include <sys/types.h> | ||
581 | #include <inttypes.h>], | ||
582 | [uintmax_t i = (uintmax_t) -1;], | ||
583 | jm_ac_cv_header_inttypes_h=yes, | ||
584 | jm_ac_cv_header_inttypes_h=no)]) | ||
585 | |||
586 | if test $jm_ac_cv_header_inttypes_h = yes; then | ||
587 | AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1, | ||
588 | [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, | ||
589 | and declares uintmax_t. ]) | ||
590 | fi | ||
591 | |||
592 | # Check for SunOS statfs brokenness wrt partitions 2GB and larger. | ||
593 | # If <sys/vfs.h> exists and struct statfs has a member named f_spare, | ||
594 | # enable the work-around code in fsusage.c. | ||
595 | AC_MSG_CHECKING([for statfs that truncates block counts]) | ||
596 | AC_CACHE_VAL(fu_cv_sys_truncating_statfs, | ||
597 | [AC_TRY_COMPILE([ | ||
598 | #if !defined(sun) && !defined(__sun) | ||
599 | choke -- this is a workaround for a Sun-specific problem | ||
600 | #endif | ||
601 | #include <sys/types.h> | ||
602 | #include <sys/vfs.h>], | ||
603 | [struct statfs t; long c = *(t.f_spare);], | ||
604 | fu_cv_sys_truncating_statfs=yes | ||
605 | AC_MSG_RESULT(yes), | ||
606 | fu_cv_sys_truncating_statfs=no | ||
607 | AC_MSG_RESULT(no), | ||
608 | )]) | ||
609 | if test $fu_cv_sys_truncating_statfs = yes; then | ||
610 | AC_DEFINE(STATFS_TRUNCATES_BLOCK_COUNTS, 1, | ||
611 | [ Define if the block counts reported by statfs may be truncated to 2GB | ||
612 | and the correct values may be stored in the f_spare array. | ||
613 | (SunOS 4.1.2, 4.1.3, and 4.1.3_U1 are reported to have this problem. | ||
614 | SunOS 4.1.1 seems not to be affected.)]) | ||
615 | fi | ||
616 | 553 | ||
617 | dnl Checks for typedefs, structures, and compiler characteristics. | 554 | dnl Checks for typedefs, structures, and compiler characteristics. |
618 | AC_C_CONST | 555 | AC_C_CONST |
@@ -621,29 +558,6 @@ AC_TYPE_PID_T | |||
621 | AC_TYPE_SIZE_T | 558 | AC_TYPE_SIZE_T |
622 | AC_TYPE_SIGNAL | 559 | AC_TYPE_SIGNAL |
623 | 560 | ||
624 | AC_CHECK_SIZEOF(int,cross) | ||
625 | AC_CHECK_SIZEOF(long,cross) | ||
626 | AC_CHECK_SIZEOF(short,cross) | ||
627 | |||
628 | AC_CACHE_CHECK([for long long],ac_cv_have_longlong,[ | ||
629 | AC_TRY_RUN([#include <stdio.h> | ||
630 | main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }], | ||
631 | ac_cv_have_longlong=yes,ac_cv_have_longlong=no,ac_cv_have_longlong=cross)]) | ||
632 | if test x"$ac_cv_have_longlong" = x"yes"; then | ||
633 | AC_DEFINE(HAVE_LONGLONG,1,[Define if system has long long type]) | ||
634 | fi | ||
635 | |||
636 | # | ||
637 | # Check if the compiler supports the LL prefix on long long integers. | ||
638 | # AIX needs this. | ||
639 | |||
640 | AC_CACHE_CHECK([for LL suffix on long long integers],ac_cv_compiler_supports_ll, [ | ||
641 | AC_TRY_COMPILE([#include <stdio.h>],[long long i = 0x8000000000LL], | ||
642 | ac_cv_compiler_supports_ll=yes,ac_cv_compiler_supports_ll=no)]) | ||
643 | if test x"$ac_cv_compiler_supports_ll" = x"yes"; then | ||
644 | AC_DEFINE(COMPILER_SUPPORTS_LL,1,[Define if compiler support long long]) | ||
645 | fi | ||
646 | |||
647 | AC_CACHE_CHECK([for va_copy],ac_cv_HAVE_VA_COPY,[ | 561 | AC_CACHE_CHECK([for va_copy],ac_cv_HAVE_VA_COPY,[ |
648 | AC_TRY_LINK([#include <stdarg.h> | 562 | AC_TRY_LINK([#include <stdarg.h> |
649 | va_list ap1,ap2;], [va_copy(ap1,ap2);], | 563 | va_list ap1,ap2;], [va_copy(ap1,ap2);], |
@@ -958,11 +872,6 @@ if test -n "$ac_cv_ps_varlist" ; then | |||
958 | EXTRAS="$EXTRAS check_procs check_nagios" | 872 | EXTRAS="$EXTRAS check_procs check_nagios" |
959 | fi | 873 | fi |
960 | 874 | ||
961 | dnl jm_AFS | ||
962 | jm_LIST_MOUNTED_FILESYSTEMS([list_mounted_fs=yes], [list_mounted_fs=no]) | ||
963 | jm_FSTYPENAME | ||
964 | jm_FILE_SYSTEM_USAGE([space=yes], [space=no]) | ||
965 | |||
966 | AC_PATH_PROG(PATH_TO_PING,ping) | 875 | AC_PATH_PROG(PATH_TO_PING,ping) |
967 | AC_PATH_PROG(PATH_TO_PING6,ping6) | 876 | AC_PATH_PROG(PATH_TO_PING6,ping6) |
968 | 877 | ||
@@ -1606,10 +1515,27 @@ AC_SUBST(EXTRAS) | |||
1606 | AC_SUBST(EXTRA_NETOBJS) | 1515 | AC_SUBST(EXTRA_NETOBJS) |
1607 | AC_SUBST(DEPLIBS) | 1516 | AC_SUBST(DEPLIBS) |
1608 | 1517 | ||
1609 | AM_GNU_GETTEXT_VERSION(0.11.5) | ||
1610 | AM_GNU_GETTEXT([no-libtool], [need-ngettext]) | 1518 | AM_GNU_GETTEXT([no-libtool], [need-ngettext]) |
1519 | AM_GNU_GETTEXT_VERSION(0.11.5) | ||
1611 | 1520 | ||
1612 | 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 ) | 1521 | dnl External libraries |
1522 | np_COREUTILS | ||
1523 | |||
1524 | AC_OUTPUT( | ||
1525 | Makefile | ||
1526 | lib/Makefile | ||
1527 | m4/Makefile | ||
1528 | plugins/Makefile | ||
1529 | plugins-scripts/Makefile | ||
1530 | plugins-scripts/subst | ||
1531 | plugins-scripts/utils.pm | ||
1532 | plugins-scripts/utils.sh | ||
1533 | command.cfg | ||
1534 | test.pl | ||
1535 | pkg/solaris/pkginfo | ||
1536 | intl/Makefile | ||
1537 | po/Makefile.in | ||
1538 | ) | ||
1613 | 1539 | ||
1614 | ACX_FEATURE([with],[cgiurl]) | 1540 | ACX_FEATURE([with],[cgiurl]) |
1615 | ACX_FEATURE([with],[nagios-user]) | 1541 | ACX_FEATURE([with],[nagios-user]) |
diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 1453488..13bca70 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 \ | |||
28 | 28 | ||
29 | PLUGINHDRS = common.h | 29 | PLUGINHDRS = common.h |
30 | 30 | ||
31 | BASEOBJS = utils.o ../lib/libnagiosplug.a | 31 | BASEOBJS = utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a |
32 | NETOBJS = netutils.o $(BASEOBJS) $(EXTRA_NETOBJS) | 32 | NETOBJS = netutils.o $(BASEOBJS) $(EXTRA_NETOBJS) |
33 | NETLIBS = $(NETOBJS) $(SOCKETLIBS) | 33 | NETLIBS = $(NETOBJS) $(SOCKETLIBS) |
34 | 34 | ||
diff --git a/tools/setup b/tools/setup index 8a7b6ce..39c6f74 100755 --- a/tools/setup +++ b/tools/setup | |||
@@ -19,7 +19,7 @@ else | |||
19 | fi | 19 | fi |
20 | 20 | ||
21 | autopoint --force | 21 | autopoint --force |
22 | aclocal -I lib | 22 | aclocal -I m4 |
23 | autoheader | 23 | autoheader |
24 | automake --add-missing --force-missing --copy | 24 | automake --add-missing --force-missing --copy |
25 | autoconf | 25 | autoconf |