summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorTon Voon <tonvoon@users.sourceforge.net>2004-12-15 20:54:38 +0000
committerTon Voon <tonvoon@users.sourceforge.net>2004-12-15 20:54:38 +0000
commitffb54640215b83f7f36b0052739a272ca6b4d128 (patch)
tree1583a9481e96126da98f94515748e519edbb2bc9 /configure.in
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
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in122
1 files changed, 24 insertions, 98 deletions
diff --git a/configure.in b/configure.in
index 4887257d..38d91ea8 100644
--- a/configure.in
+++ b/configure.in
@@ -1,6 +1,6 @@
1dnl Process this file with autoconf to produce a configure script. 1dnl Process this file with autoconf to produce a configure script.
2AC_REVISION ($Revision$) 2AC_REVISION ($Revision$)
3AC_PREREQ(2.50) 3AC_PREREQ(2.58)
4AC_INIT(nagios-plugins,1.4.0-alpha3) 4AC_INIT(nagios-plugins,1.4.0-alpha3)
5AC_CONFIG_SRCDIR(Helper.pm) 5AC_CONFIG_SRCDIR(Helper.pm)
6AM_INIT_AUTOMAKE 6AM_INIT_AUTOMAKE
@@ -16,20 +16,20 @@ dnl Figure out how to invoke "install" and what install options to use.
16AC_PROG_INSTALL 16AC_PROG_INSTALL
17AC_SUBST(INSTALL) 17AC_SUBST(INSTALL)
18 18
19AC_GNU_SOURCE 19dnl Must come very early on due to coreutils requirement
20dnl Takes care of AC_GNU_SOURCE, AC_AIX and AC_MINIX
21gl_USE_SYSTEM_EXTENSIONS
22
20AC_PROG_CC 23AC_PROG_CC
21AC_PROG_CPP 24AC_PROG_CPP
22AC_PROG_GCC_TRADITIONAL 25AC_PROG_GCC_TRADITIONAL
23AC_PROG_RANLIB 26AC_PROG_RANLIB
24AC_AIX
25AC_MINIX
26 27
27AC_PROG_MAKE_SET 28AC_PROG_MAKE_SET
28AC_PROG_AWK 29AC_PROG_AWK
29 30
30AC_FUNC_MALLOC 31AC_FUNC_MALLOC
31AC_FUNC_REALLOC 32AC_FUNC_REALLOC
32jm_PREREQ_ERROR
33AC_FUNC_ERROR_AT_LINE 33AC_FUNC_ERROR_AT_LINE
34 34
35AC_CONFIG_LIBOBJ_DIR(lib) 35AC_CONFIG_LIBOBJ_DIR(lib)
@@ -550,69 +550,6 @@ AC_HEADER_TIME
550AC_HEADER_SYS_WAIT 550AC_HEADER_SYS_WAIT
551AC_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) 551AC_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)
552AC_CHECK_HEADERS(features.h stdarg.h sys/unistd.h ctype.h stdlib.h) 552AC_CHECK_HEADERS(features.h stdarg.h sys/unistd.h ctype.h stdlib.h)
553AC_CHECK_HEADERS(limits.h sys/param.h)
554AC_CHECK_HEADERS([sys/mount.h],[],[],[
555#ifdef HAVE_SYS_PARAM_H
556#include <sys/param.h>
557#endif
558])
559AC_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)
562AC_MSG_CHECKING([for HUGE_VAL in <stdlib.h>])
563AC_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
578AC_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
586if 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. ])
590fi
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.
595AC_MSG_CHECKING([for statfs that truncates block counts])
596AC_CACHE_VAL(fu_cv_sys_truncating_statfs,
597[AC_TRY_COMPILE([
598#if !defined(sun) && !defined(__sun)
599choke -- 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);],
604fu_cv_sys_truncating_statfs=yes
605AC_MSG_RESULT(yes),
606fu_cv_sys_truncating_statfs=no
607AC_MSG_RESULT(no),
608)])
609if 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.)])
615fi
616 553
617dnl Checks for typedefs, structures, and compiler characteristics. 554dnl Checks for typedefs, structures, and compiler characteristics.
618AC_C_CONST 555AC_C_CONST
@@ -621,29 +558,6 @@ AC_TYPE_PID_T
621AC_TYPE_SIZE_T 558AC_TYPE_SIZE_T
622AC_TYPE_SIGNAL 559AC_TYPE_SIGNAL
623 560
624AC_CHECK_SIZEOF(int,cross)
625AC_CHECK_SIZEOF(long,cross)
626AC_CHECK_SIZEOF(short,cross)
627
628AC_CACHE_CHECK([for long long],ac_cv_have_longlong,[
629AC_TRY_RUN([#include <stdio.h>
630main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }],
631ac_cv_have_longlong=yes,ac_cv_have_longlong=no,ac_cv_have_longlong=cross)])
632if test x"$ac_cv_have_longlong" = x"yes"; then
633 AC_DEFINE(HAVE_LONGLONG,1,[Define if system has long long type])
634fi
635
636#
637# Check if the compiler supports the LL prefix on long long integers.
638# AIX needs this.
639
640AC_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)])
643if test x"$ac_cv_compiler_supports_ll" = x"yes"; then
644 AC_DEFINE(COMPILER_SUPPORTS_LL,1,[Define if compiler support long long])
645fi
646
647AC_CACHE_CHECK([for va_copy],ac_cv_HAVE_VA_COPY,[ 561AC_CACHE_CHECK([for va_copy],ac_cv_HAVE_VA_COPY,[
648AC_TRY_LINK([#include <stdarg.h> 562AC_TRY_LINK([#include <stdarg.h>
649va_list ap1,ap2;], [va_copy(ap1,ap2);], 563va_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"
959fi 873fi
960 874
961dnl jm_AFS
962jm_LIST_MOUNTED_FILESYSTEMS([list_mounted_fs=yes], [list_mounted_fs=no])
963jm_FSTYPENAME
964jm_FILE_SYSTEM_USAGE([space=yes], [space=no])
965
966AC_PATH_PROG(PATH_TO_PING,ping) 875AC_PATH_PROG(PATH_TO_PING,ping)
967AC_PATH_PROG(PATH_TO_PING6,ping6) 876AC_PATH_PROG(PATH_TO_PING6,ping6)
968 877
@@ -1606,10 +1515,27 @@ AC_SUBST(EXTRAS)
1606AC_SUBST(EXTRA_NETOBJS) 1515AC_SUBST(EXTRA_NETOBJS)
1607AC_SUBST(DEPLIBS) 1516AC_SUBST(DEPLIBS)
1608 1517
1609AM_GNU_GETTEXT_VERSION(0.11.5)
1610AM_GNU_GETTEXT([no-libtool], [need-ngettext]) 1518AM_GNU_GETTEXT([no-libtool], [need-ngettext])
1519AM_GNU_GETTEXT_VERSION(0.11.5)
1611 1520
1612AC_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 ) 1521dnl External libraries
1522np_COREUTILS
1523
1524AC_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
1614ACX_FEATURE([with],[cgiurl]) 1540ACX_FEATURE([with],[cgiurl])
1615ACX_FEATURE([with],[nagios-user]) 1541ACX_FEATURE([with],[nagios-user])