summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2024-12-31 11:07:00 +0100
committerHolger Weiss <holger@zedat.fu-berlin.de>2024-12-31 11:07:00 +0100
commit28b4f8dde4318a474c4d7e2ed1d284a304c419d1 (patch)
tree109c73c117ab3f4a0bb5d38c95f693a7d773297f
parent39680498ee0987a5e0eb203a2c0539aa1fa94d39 (diff)
downloadmonitoring-plugins-28b4f8dde4318a474c4d7e2ed1d284a304c419d1.tar.gz
configure.ac: Bump Autoconf to version 2.71
Apply all changes suggested by the autoupdate(1) tool.
-rw-r--r--configure.ac110
1 files changed, 48 insertions, 62 deletions
diff --git a/configure.ac b/configure.ac
index 0432336b..e3b66fef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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_PREREQ(2.64) 2AC_PREREQ([2.71])
3AC_INIT(monitoring-plugins,2.4git) 3AC_INIT([monitoring-plugins],[2.4git])
4AC_CONFIG_SRCDIR(NPTest.pm) 4AC_CONFIG_SRCDIR(NPTest.pm)
5AC_CONFIG_FILES([gl/Makefile]) 5AC_CONFIG_FILES([gl/Makefile])
6AC_CONFIG_AUX_DIR(build-aux) 6AC_CONFIG_AUX_DIR(build-aux)
@@ -43,14 +43,14 @@ AC_SUBST(INSTALL)
43AC_PROG_CC 43AC_PROG_CC
44gl_EARLY 44gl_EARLY
45AC_PROG_GCC_TRADITIONAL 45AC_PROG_GCC_TRADITIONAL
46AC_PROG_LIBTOOL 46LT_INIT
47 47
48AM_PROG_CC_C_O 48AM_PROG_CC_C_O
49 49
50AC_FUNC_ERROR_AT_LINE 50AC_FUNC_ERROR_AT_LINE
51AC_SYS_LARGEFILE 51AC_SYS_LARGEFILE
52 52
53ifdef([AC_FUNC_STRTOD],[AC_FUNC_STRTOD],[AM_FUNC_STRTOD]) 53ifdef([AC_FUNC_STRTOD],[AC_FUNC_STRTOD],[AC_FUNC_STRTOD])
54 54
55PLUGIN_TEST=`echo $srcdir/plugins/t/*.t|sed -e 's,\.*/plugins/,,g'` 55PLUGIN_TEST=`echo $srcdir/plugins/t/*.t|sed -e 's,\.*/plugins/,,g'`
56AC_SUBST(PLUGIN_TEST)dnl 56AC_SUBST(PLUGIN_TEST)dnl
@@ -125,8 +125,7 @@ AC_SUBST(PERL, $with_perl)
125 125
126dnl openssl/gnutls 126dnl openssl/gnutls
127AC_ARG_WITH(openssl, 127AC_ARG_WITH(openssl,
128 AC_HELP_STRING([--with-openssl=DIR], 128 AS_HELP_STRING([--with-openssl=DIR],[path to openssl installation]),)
129 [path to openssl installation]),)
130 129
131AC_ARG_WITH(gnutls, 130AC_ARG_WITH(gnutls,
132 ACX_HELP_STRING([--with-gnutls=PATH], 131 ACX_HELP_STRING([--with-gnutls=PATH],
@@ -167,8 +166,7 @@ AC_SUBST(MATHLIBS)
167 166
168dnl Check if we buils local libtap 167dnl Check if we buils local libtap
169AC_ARG_ENABLE(libtap, 168AC_ARG_ENABLE(libtap,
170 AC_HELP_STRING([--enable-libtap], 169 AS_HELP_STRING([--enable-libtap],[Enable built-in libtap for unit-testing (default: autodetect system library).]),
171 [Enable built-in libtap for unit-testing (default: autodetect system library).]),
172 [enable_libtap=$enableval], 170 [enable_libtap=$enableval],
173 [enable_libtap=no]) 171 [enable_libtap=no])
174AM_CONDITIONAL([USE_LIBTAP_LOCAL],[test "$enable_libtap" = "yes"]) 172AM_CONDITIONAL([USE_LIBTAP_LOCAL],[test "$enable_libtap" = "yes"])
@@ -192,8 +190,7 @@ fi
192 190
193dnl INI Parsing 191dnl INI Parsing
194AC_ARG_ENABLE(extra-opts, 192AC_ARG_ENABLE(extra-opts,
195 AC_HELP_STRING([--enable-extra-opts], 193 AS_HELP_STRING([--enable-extra-opts],[Enables parsing of plugins ini config files for extra options (default: no)]),
196 [Enables parsing of plugins ini config files for extra options (default: no)]),
197 [enable_extra_opts=$enableval], 194 [enable_extra_opts=$enableval],
198 [enable_extra_opts=yes]) 195 [enable_extra_opts=yes])
199AM_CONDITIONAL([USE_PARSE_INI],[test "$enable_extra_opts" = "yes"]) 196AM_CONDITIONAL([USE_PARSE_INI],[test "$enable_extra_opts" = "yes"])
@@ -467,20 +464,16 @@ AC_ARG_WITH([ipv6],
467dnl Check for AF_INET6 support - unistd.h required for Darwin 464dnl Check for AF_INET6 support - unistd.h required for Darwin
468if test "$with_ipv6" != "no"; then 465if test "$with_ipv6" != "no"; then
469 AC_CACHE_CHECK([for IPv6 support], np_cv_sys_ipv6, [ 466 AC_CACHE_CHECK([for IPv6 support], np_cv_sys_ipv6, [
470 AC_TRY_COMPILE( 467 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef HAVE_UNISTD_H
471 [#ifdef HAVE_UNISTD_H
472 #include <unistd.h> 468 #include <unistd.h>
473 #endif 469 #endif
474 #include <netinet/in.h> 470 #include <netinet/in.h>
475 #include <sys/socket.h>], 471 #include <sys/socket.h>]], [[struct sockaddr_in6 sin6;
476 [struct sockaddr_in6 sin6;
477 void *p; 472 void *p;
478 473
479 sin6.sin6_family = AF_INET6; 474 sin6.sin6_family = AF_INET6;
480 sin6.sin6_port = 587; 475 sin6.sin6_port = 587;
481 p = &sin6.sin6_addr;], 476 p = &sin6.sin6_addr;]])],[np_cv_sys_ipv6=yes],[np_cv_sys_ipv6=no])
482 [np_cv_sys_ipv6=yes],
483 [np_cv_sys_ipv6=no])
484 ]) 477 ])
485 if test "$np_cv_sys_ipv6" = "no" -a "$with_ipv6" != "check"; then 478 if test "$np_cv_sys_ipv6" = "no" -a "$with_ipv6" != "check"; then
486 AC_MSG_FAILURE([--with-ipv6 was given, but test for IPv6 support failed]) 479 AC_MSG_FAILURE([--with-ipv6 was given, but test for IPv6 support failed])
@@ -614,7 +607,20 @@ dnl
614dnl Checks for header files. 607dnl Checks for header files.
615dnl 608dnl
616 609
617AC_HEADER_TIME 610m4_warn([obsolete],
611[Update your code to rely only on HAVE_SYS_TIME_H,
612then remove this warning and the obsolete code below it.
613All current systems provide time.h; it need not be checked for.
614Not all systems provide sys/time.h, but those that do, all allow
615you to include it and time.h simultaneously.])dnl
616AC_CHECK_HEADERS_ONCE([sys/time.h])
617# Obsolete code to be removed.
618if test $ac_cv_header_sys_time_h = yes; then
619 AC_DEFINE([TIME_WITH_SYS_TIME],[1],[Define to 1 if you can safely include both <sys/time.h>
620 and <time.h>. This macro is obsolete.])
621fi
622# End of obsolete code.
623
618AC_HEADER_SYS_WAIT 624AC_HEADER_SYS_WAIT
619AC_CHECK_HEADERS(signal.h syslog.h uio.h errno.h sys/time.h sys/socket.h sys/un.h sys/poll.h) 625AC_CHECK_HEADERS(signal.h syslog.h uio.h errno.h sys/time.h sys/socket.h sys/un.h sys/poll.h)
620AC_CHECK_HEADERS(features.h stdarg.h sys/unistd.h ctype.h) 626AC_CHECK_HEADERS(features.h stdarg.h sys/unistd.h ctype.h)
@@ -626,36 +632,27 @@ AC_TYPE_PID_T
626AC_TYPE_SIZE_T 632AC_TYPE_SIZE_T
627 633
628AC_CACHE_CHECK([for va_copy],ac_cv_HAVE_VA_COPY,[ 634AC_CACHE_CHECK([for va_copy],ac_cv_HAVE_VA_COPY,[
629AC_TRY_LINK([#include <stdarg.h> 635AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
630va_list ap1,ap2;], [va_copy(ap1,ap2);], 636va_list ap1,ap2;]], [[va_copy(ap1,ap2);]])],[ac_cv_HAVE_VA_COPY=yes],[ac_cv_HAVE_VA_COPY=no])])
631ac_cv_HAVE_VA_COPY=yes,
632ac_cv_HAVE_VA_COPY=no)])
633if test x"$ac_cv_HAVE_VA_COPY" = x"yes"; then 637if test x"$ac_cv_HAVE_VA_COPY" = x"yes"; then
634 AC_DEFINE(HAVE_VA_COPY,1,[Whether va_copy() is available]) 638 AC_DEFINE(HAVE_VA_COPY,1,[Whether va_copy() is available])
635else 639else
636 AC_CACHE_CHECK([for __va_copy],ac_cv_HAVE___VA_COPY,[ 640 AC_CACHE_CHECK([for __va_copy],ac_cv_HAVE___VA_COPY,[
637 AC_TRY_LINK([#include <stdarg.h> 641 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
638 va_list ap1,ap2;], [__va_copy(ap1,ap2);], 642 va_list ap1,ap2;]], [[__va_copy(ap1,ap2);]])],[ac_cv_HAVE___VA_COPY=yes],[ac_cv_HAVE___VA_COPY=no])])
639 ac_cv_HAVE___VA_COPY=yes,
640 ac_cv_HAVE___VA_COPY=no)])
641 if test x"$ac_cv_HAVE___VA_COPY" = x"yes"; then 643 if test x"$ac_cv_HAVE___VA_COPY" = x"yes"; then
642 AC_DEFINE(HAVE___VA_COPY,1,[Whether __va_copy() is available]) 644 AC_DEFINE(HAVE___VA_COPY,1,[Whether __va_copy() is available])
643 fi 645 fi
644fi 646fi
645 647
646AC_TRY_COMPILE([#include <sys/time.h>], 648AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/time.h>]], [[struct timeval *tv;
647 [struct timeval *tv; 649 struct timezone *tz;]])],[AC_DEFINE(HAVE_STRUCT_TIMEVAL,1,Define if we have a timeval structure)
648 struct timezone *tz;], 650 FOUND_STRUCT_TIMEVAL="yes"],[])
649 AC_DEFINE(HAVE_STRUCT_TIMEVAL,1,[Define if we have a timeval structure])
650 FOUND_STRUCT_TIMEVAL="yes")
651 651
652if test x"$FOUND_STRUCT_TIMEVAL" = x"yes"; then 652if test x"$FOUND_STRUCT_TIMEVAL" = x"yes"; then
653 AC_TRY_COMPILE([#include <sys/time.h>], 653 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/time.h>]], [[struct timeval *tv;
654 [struct timeval *tv;
655 struct timezone *tz; 654 struct timezone *tz;
656 gettimeofday(tv, tz);], 655 gettimeofday(tv, tz);]])],[AC_DEFINE(HAVE_GETTIMEOFDAY,1,Define if gettimeofday is found)],[AC_DEFINE(NEED_GETTIMEOFDAY,1,Define if gettimeofday is needed)])
657 AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define if gettimeofday is found]),
658 AC_DEFINE(NEED_GETTIMEOFDAY,1,[Define if gettimeofday is needed]))
659fi 656fi
660 657
661dnl Checks for library functions. 658dnl Checks for library functions.
@@ -663,14 +660,11 @@ AC_CHECK_FUNCS(memmove select socket strdup strstr strtol strtoul floor)
663AC_CHECK_FUNCS(poll) 660AC_CHECK_FUNCS(poll)
664 661
665AC_MSG_CHECKING(return type of socket size) 662AC_MSG_CHECKING(return type of socket size)
666AC_TRY_COMPILE([#include <stdlib.h> 663AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
667 #include <sys/types.h> 664 #include <sys/types.h>
668 #include <sys/socket.h>], 665 #include <sys/socket.h>]], [[int a = send(1, (const void *) buffer, (size_t *) 0, (int *) 0);]])],[ac_cv_socket_size_type="size_t"
669 [int a = send(1, (const void *) buffer, (size_t *) 0, (int *) 0);], 666 AC_MSG_RESULT(size_t)],[ac_cv_socket_size_type="int"
670 ac_cv_socket_size_type=["size_t"] 667 AC_MSG_RESULT(int)])
671 AC_MSG_RESULT(size_t),
672 ac_cv_socket_size_type=["int"]
673 AC_MSG_RESULT(int))
674 668
675AC_DEFINE_UNQUOTED(SOCKET_SIZE_TYPE, $ac_cv_socket_size_type , 669AC_DEFINE_UNQUOTED(SOCKET_SIZE_TYPE, $ac_cv_socket_size_type ,
676 [Define type of socket size]) 670 [Define type of socket size])
@@ -1433,20 +1427,14 @@ if test -n "$ac_cv_nslookup_command"; then
1433fi 1427fi
1434 1428
1435AC_MSG_CHECKING([for number of online cpus]) 1429AC_MSG_CHECKING([for number of online cpus])
1436AC_TRY_COMPILE([#include <unistd.h>], 1430AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[sysconf(_SC_NPROCESSORS_ONLN) > 0;]])],[AC_DEFINE(HAVE_SYSCONF__SC_NPROCESSORS_ONLN,1,Define if sysconf returns number of online cpus)
1437 [sysconf(_SC_NPROCESSORS_ONLN) > 0;], 1431 AC_MSG_RESULT(sysconf(_SC_NPROCESSORS_ONLN))],[AC_MSG_RESULT(cannot calculate)
1438 AC_DEFINE(HAVE_SYSCONF__SC_NPROCESSORS_ONLN,1,[Define if sysconf returns number of online cpus]) 1432 ])
1439 AC_MSG_RESULT([sysconf(_SC_NPROCESSORS_ONLN)]),
1440 AC_MSG_RESULT([cannot calculate])
1441 )
1442 1433
1443AC_MSG_CHECKING([for number of available cpus]) 1434AC_MSG_CHECKING([for number of available cpus])
1444AC_TRY_COMPILE([#include <unistd.h>], 1435AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[sysconf(_SC_NPROCESSORS_CONF) > 0;]])],[AC_DEFINE(HAVE_SYSCONF__SC_NPROCESSORS_CONF,1,Define if sysconf returns number of available cpus)
1445 [sysconf(_SC_NPROCESSORS_CONF) > 0;], 1436 AC_MSG_RESULT(sysconf(_SC_NPROCESSORS_CONF))],[AC_MSG_RESULT(cannot calculate)
1446 AC_DEFINE(HAVE_SYSCONF__SC_NPROCESSORS_CONF,1,[Define if sysconf returns number of available cpus]) 1437 ])
1447 AC_MSG_RESULT([sysconf(_SC_NPROCESSORS_CONF)]),
1448 AC_MSG_RESULT([cannot calculate])
1449 )
1450 1438
1451AC_PATH_PROG(PATH_TO_UPTIME,uptime) 1439AC_PATH_PROG(PATH_TO_UPTIME,uptime)
1452AC_ARG_WITH(uptime_command, 1440AC_ARG_WITH(uptime_command,
@@ -1864,8 +1852,7 @@ dnl We patch plugins/popen.c
1864dnl Need to add smp because uname different on those 1852dnl Need to add smp because uname different on those
1865dnl Can force patch to be applied with --enable-redhat-pthread-workaround 1853dnl Can force patch to be applied with --enable-redhat-pthread-workaround
1866AC_ARG_ENABLE(redhat-pthread-workaround, 1854AC_ARG_ENABLE(redhat-pthread-workaround,
1867 AC_HELP_STRING([--enable-redhat-pthread-workaround], 1855 AS_HELP_STRING([--enable-redhat-pthread-workaround],[force Redhat patch to be applied (default: test system)]),
1868 [force Redhat patch to be applied (default: test system)]),
1869 [ac_cv_enable_redhat_pthread_workaround=$enableval], 1856 [ac_cv_enable_redhat_pthread_workaround=$enableval],
1870 [ac_cv_enable_redhat_pthread_workaround=test]) 1857 [ac_cv_enable_redhat_pthread_workaround=test])
1871if test "$ac_cv_enable_redhat_pthread_workaround" = "test" ; then 1858if test "$ac_cv_enable_redhat_pthread_workaround" = "test" ; then
@@ -1886,8 +1873,7 @@ fi
1886 1873
1887dnl Perl modules 1874dnl Perl modules
1888AC_ARG_ENABLE(perl-modules, 1875AC_ARG_ENABLE(perl-modules,
1889 AC_HELP_STRING([--enable-perl-modules], 1876 AS_HELP_STRING([--enable-perl-modules],[Enables installation of Monitoring::Plugin and its dependencies (default: no)]),
1890 [Enables installation of Monitoring::Plugin and its dependencies (default: no)]),
1891 [enable_perl_modules=$enableval], 1877 [enable_perl_modules=$enableval],
1892 [enable_perl_modules=no]) 1878 [enable_perl_modules=no])
1893if test "$enable_perl_modules" = "yes" ; then 1879if test "$enable_perl_modules" = "yes" ; then
@@ -1914,8 +1900,7 @@ if test "$ac_cv_uname_s" = 'SunOS' -a \( "x$ac_cv_prog_ac_ct_AR" = "x" -o "$ac_c
1914 AC_MSG_ERROR(No ar found for Solaris - is /usr/ccs/bin in PATH?) 1900 AC_MSG_ERROR(No ar found for Solaris - is /usr/ccs/bin in PATH?)
1915fi 1901fi
1916 1902
1917AC_OUTPUT( 1903AC_CONFIG_FILES([Makefile
1918 Makefile
1919 tap/Makefile 1904 tap/Makefile
1920 lib/Makefile 1905 lib/Makefile
1921 plugins/Makefile 1906 plugins/Makefile
@@ -1927,7 +1912,8 @@ AC_OUTPUT(
1927 perlmods/Makefile 1912 perlmods/Makefile
1928 test.pl 1913 test.pl
1929 pkg/solaris/pkginfo 1914 pkg/solaris/pkginfo
1930) 1915])
1916AC_OUTPUT
1931 1917
1932 1918
1933dnl the ones below that are commented out need to be cleaned up 1919dnl the ones below that are commented out need to be cleaned up