diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2007-01-24 22:47:25 (GMT) |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2007-01-24 22:47:25 (GMT) |
commit | fe856aa957978504137c1d425815d4ed8a22be40 (patch) | |
tree | a5bb46ce0e64b2056f75700eadbf27aba7c39418 /configure.in | |
parent | 210f39bc84cfbb21cd72dc054e43f13815ee0616 (diff) | |
download | monitoring-plugins-fe856aa957978504137c1d425815d4ed8a22be40.tar.gz |
Sync with gnulib - lots of extraneous code removed in preference to GNU code
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1580 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 195 |
1 files changed, 6 insertions, 189 deletions
diff --git a/configure.in b/configure.in index 356e4e3..228a841 100644 --- a/configure.in +++ b/configure.in | |||
@@ -1,10 +1,12 @@ | |||
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.58) | 3 | AC_PREREQ(2.59) |
4 | AC_INIT(nagios-plugins,1.4.5) | 4 | AC_INIT(nagios-plugins,1.4.5) |
5 | AC_CONFIG_SRCDIR(NPTest.pm) | 5 | AC_CONFIG_SRCDIR(NPTest.pm) |
6 | AC_CONFIG_FILES(gl/Makefile) | ||
6 | AM_INIT_AUTOMAKE([1.8.3]) | 7 | AM_INIT_AUTOMAKE([1.8.3]) |
7 | AM_CONFIG_HEADER(config.h) | 8 | AM_CONFIG_HEADER(config.h) |
9 | dnl Not yet - AC_CONFIG_AUX_DIR(build-aux) | ||
8 | AC_CANONICAL_HOST | 10 | AC_CANONICAL_HOST |
9 | 11 | ||
10 | RELEASE=1 | 12 | RELEASE=1 |
@@ -22,11 +24,8 @@ dnl Figure out how to invoke "install" and what install options to use. | |||
22 | AC_PROG_INSTALL | 24 | AC_PROG_INSTALL |
23 | AC_SUBST(INSTALL) | 25 | AC_SUBST(INSTALL) |
24 | 26 | ||
25 | dnl Must come very early on due to coreutils requirement | ||
26 | dnl Takes care of AC_GNU_SOURCE, AC_AIX and AC_MINIX | ||
27 | gl_USE_SYSTEM_EXTENSIONS | ||
28 | |||
29 | AC_PROG_CC | 27 | AC_PROG_CC |
28 | gl_EARLY | ||
30 | AC_PROG_CPP | 29 | AC_PROG_CPP |
31 | AC_PROG_GCC_TRADITIONAL | 30 | AC_PROG_GCC_TRADITIONAL |
32 | AC_PROG_LIBTOOL | 31 | AC_PROG_LIBTOOL |
@@ -38,9 +37,6 @@ AC_FUNC_MALLOC | |||
38 | AC_FUNC_REALLOC | 37 | AC_FUNC_REALLOC |
39 | AC_FUNC_ERROR_AT_LINE | 38 | AC_FUNC_ERROR_AT_LINE |
40 | 39 | ||
41 | AC_CONFIG_LIBOBJ_DIR(lib) | ||
42 | AC_FUNC_GETLOADAVG([lib]) | ||
43 | |||
44 | ifdef([AC_FUNC_STRTOD],[AC_FUNC_STRTOD],[AM_FUNC_STRTOD]) | 40 | ifdef([AC_FUNC_STRTOD],[AC_FUNC_STRTOD],[AM_FUNC_STRTOD]) |
45 | 41 | ||
46 | PLUGIN_TEST=`echo $srcdir/plugins/t/*.t|sed -e 's,\.*/plugins/,,g'` | 42 | PLUGIN_TEST=`echo $srcdir/plugins/t/*.t|sed -e 's,\.*/plugins/,,g'` |
@@ -128,15 +124,6 @@ dnl the order should allow locally installed versions to override distros' ones | |||
128 | OPENSSL_DIRS="/usr /usr/local /usr/slocal /usr/local/openssl /usr/local/ssl \ | 124 | OPENSSL_DIRS="/usr /usr/local /usr/slocal /usr/local/openssl /usr/local/ssl \ |
129 | /opt /opt/openssl" | 125 | /opt /opt/openssl" |
130 | 126 | ||
131 | dnl | ||
132 | dnl Check for miscellaneous stuff | ||
133 | dnl | ||
134 | |||
135 | case $host_vender-$host_os in | ||
136 | osf*) | ||
137 | AC_DEFINE(_OSF_SOURCE,1,[OSF needs this for getaddrinfo]) | ||
138 | ;; | ||
139 | esac | ||
140 | 127 | ||
141 | dnl | 128 | dnl |
142 | dnl Checks for libraries. | 129 | dnl Checks for libraries. |
@@ -297,108 +284,6 @@ if test x"$with_ipv6" != xno ; then | |||
297 | AC_DEFINE(USE_IPV6,1,[Enable IPv6 support]) | 284 | AC_DEFINE(USE_IPV6,1,[Enable IPv6 support]) |
298 | fi | 285 | fi |
299 | 286 | ||
300 | dnl ######################################################################### | ||
301 | dnl Check if Posix getaddrinfo() is available. It is also possible to use | ||
302 | dnl the version from the lwres library distributed with BIND. | ||
303 | dnl ######################################################################### | ||
304 | AC_ARG_ENABLE([emulate-getaddrinfo], | ||
305 | ACX_HELP_STRING([--enable-emulate-getaddrinfo], | ||
306 | [enable getaddrinfo emulation (default=no)]), | ||
307 | , | ||
308 | enable_emulate_getaddrinfo=no) | ||
309 | |||
310 | AC_ARG_WITH(lwres, | ||
311 | ACX_HELP_STRING([--with-lwres=DIR], | ||
312 | [use lwres library for getaddrinfo (default=no)]), | ||
313 | , | ||
314 | with_lwres=no) | ||
315 | |||
316 | dnl ## enable force to test getaddrinfo.c | ||
317 | if test x$enable_emulate_getaddrinfo = xforce ; then | ||
318 | enable_emulate_getaddrinfo=yes | ||
319 | have_getaddrinfo=no | ||
320 | else | ||
321 | |||
322 | have_getaddrinfo=no | ||
323 | if test x$with_lwres != xno ; then | ||
324 | if test "$with_lwres" != yes ; then | ||
325 | CPPFLAGS="-I${with_lwres}/include $CPPFLAGS" | ||
326 | LDFLAGS="-L${with_lwres}/lib $LDFLAGS" | ||
327 | fi | ||
328 | AC_CHECK_HEADERS(lwres/netdb.h, , | ||
329 | [AC_MSG_ERROR([cannot find <lwres/netdb.h>])]) | ||
330 | AC_CHECK_LIB(lwres, lwres_getaddrinfo, , | ||
331 | [AC_MSG_ERROR([cannot find the lwres library])], | ||
332 | -lnsl -lpthread) | ||
333 | have_getaddrinfo=yes | ||
334 | fi | ||
335 | |||
336 | if test x$have_getaddrinfo != xyes ; then | ||
337 | AC_SEARCH_LIBS(getaddrinfo, socket resolv bind nsl c_r cr, have_getaddrinfo=yes) | ||
338 | fi | ||
339 | |||
340 | dnl # Special nonsense for systems that actually have getaddrinfo but | ||
341 | dnl # redefine the name to something else, e.g. OSF | ||
342 | if test x$have_getaddrinfo != xyes ; then | ||
343 | AC_MSG_CHECKING(if getaddrinfo is redefined in netdb.h) | ||
344 | AC_TRY_LINK([ | ||
345 | # include <netdb.h> | ||
346 | ], [ | ||
347 | struct addrinfo hints, *res; | ||
348 | int err; | ||
349 | |||
350 | err = getaddrinfo ("host", "service", &hints, &res); | ||
351 | ], [ | ||
352 | have_getaddrinfo=yes | ||
353 | AC_MSG_RESULT(yes) | ||
354 | ], [AC_MSG_RESULT(no)]) | ||
355 | fi | ||
356 | |||
357 | fi | ||
358 | |||
359 | if test x$have_getaddrinfo != xno ; then | ||
360 | if test x$enable_emulate_getaddrinfo != xno ; then | ||
361 | AC_MSG_ERROR([getaddrinfo found but emulate-getaddrinfo was enabled]) | ||
362 | fi | ||
363 | AC_DEFINE(HAVE_GETADDRINFO, 1, | ||
364 | [Does system provide RFC 2553/Posix getaddrinfo?]) | ||
365 | else | ||
366 | if test x$enable_emulate_getaddrinfo != xyes ; then | ||
367 | dnl AC_MSG_ERROR([getaddrinfo not found: try --with-lwres or --enable-emulate-getaddrinfo]) | ||
368 | enable_emulate_getaddrinfo=yes | ||
369 | AC_MSG_WARN([enabling getaddrinfo emulation]) | ||
370 | fi | ||
371 | EXTRA_NETOBJS="$EXTRA_NETOBJS getaddrinfo.o" | ||
372 | fi | ||
373 | |||
374 | if test x"$enable_emulate_getaddrinfo" != xno ; then | ||
375 | have_resolver=no | ||
376 | |||
377 | dnl Try for getipnodebyname | ||
378 | AC_SEARCH_LIBS(getipnodebyname, resolv bind nsl c_r cr, have_resolver=yes) | ||
379 | if test x"$have_resolver" != xno ; then | ||
380 | AC_DEFINE(HAVE_GETIPNODEBYNAME, 1, | ||
381 | [Set when getipnodebyname is available]) | ||
382 | fi | ||
383 | |||
384 | dnl Try for gethostbyname_r | ||
385 | if test x"$have_resolver" = xno ; then | ||
386 | AC_SEARCH_LIBS(gethostbyname_r, resolv bind nsl c_r cr, | ||
387 | [have_resolver=yes | ||
388 | ACX_WHICH_GETHOSTBYNAME_R]) | ||
389 | fi | ||
390 | |||
391 | dnl Try for gethostbyname | ||
392 | if test x"$have_resolver" = xno ; then | ||
393 | if test x"$enable_pthreads" != xno ; then | ||
394 | AC_MSG_WARN([using threads but cannot find gethostbyname_r or getipnodebyname]) | ||
395 | fi | ||
396 | AC_SEARCH_LIBS(gethostbyname, resolv bind nsl, , | ||
397 | [AC_MSG_ERROR([cannot find gethostbyname])]) | ||
398 | fi | ||
399 | EXTRA_NETOBJS="$EXTRA_NETOBJS gethostbyname.o" | ||
400 | |||
401 | fi | ||
402 | 287 | ||
403 | dnl Checks for Kerberos. Must come before openssl checks for Redhat EL 3 | 288 | dnl Checks for Kerberos. Must come before openssl checks for Redhat EL 3 |
404 | AC_CHECK_HEADERS(krb5.h,FOUNDINCLUDE=yes,FOUNDINCLUDE=no) | 289 | AC_CHECK_HEADERS(krb5.h,FOUNDINCLUDE=yes,FOUNDINCLUDE=no) |
@@ -519,7 +404,7 @@ dnl | |||
519 | AC_HEADER_STDC | 404 | AC_HEADER_STDC |
520 | AC_HEADER_TIME | 405 | AC_HEADER_TIME |
521 | AC_HEADER_SYS_WAIT | 406 | AC_HEADER_SYS_WAIT |
522 | AC_CHECK_HEADERS(signal.h strings.h string.h syslog.h uio.h errno.h sys/types.h sys/time.h sys/socket.h sys/loadavg.h sys/un.h sys/poll.h) | 407 | AC_CHECK_HEADERS(signal.h strings.h string.h syslog.h uio.h errno.h sys/types.h sys/time.h sys/socket.h sys/un.h sys/poll.h) |
523 | AC_CHECK_HEADERS(features.h stdarg.h sys/unistd.h ctype.h stdlib.h) | 408 | AC_CHECK_HEADERS(features.h stdarg.h sys/unistd.h ctype.h stdlib.h) |
524 | 409 | ||
525 | dnl Checks for typedefs, structures, and compiler characteristics. | 410 | dnl Checks for typedefs, structures, and compiler characteristics. |
@@ -547,37 +432,6 @@ else | |||
547 | fi | 432 | fi |
548 | fi | 433 | fi |
549 | 434 | ||
550 | AC_CHECK_FUNCS(vsnprintf snprintf asprintf vasprintf) | ||
551 | AC_CACHE_CHECK([for C99 vsnprintf],ac_cv_HAVE_C99_VSNPRINTF,[ | ||
552 | AC_TRY_RUN([ | ||
553 | #include <sys/types.h> | ||
554 | #include <stdarg.h> | ||
555 | void foo(const char *format, ...) { | ||
556 | va_list ap; | ||
557 | int len; | ||
558 | char buf[5]; | ||
559 | |||
560 | va_start(ap, format); | ||
561 | len = vsnprintf(buf, 0, format, ap); | ||
562 | va_end(ap); | ||
563 | if (len != 5) exit(1); | ||
564 | |||
565 | va_start(ap, format); | ||
566 | len = vsnprintf(0, 0, format, ap); | ||
567 | va_end(ap); | ||
568 | if (len != 5) exit(1); | ||
569 | |||
570 | if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1); | ||
571 | |||
572 | exit(0); | ||
573 | } | ||
574 | main() { foo("hello"); } | ||
575 | ], | ||
576 | ac_cv_HAVE_C99_VSNPRINTF=yes,ac_cv_HAVE_C99_VSNPRINTF=no,ac_cv_HAVE_C99_VSNPRINTF=cross)]) | ||
577 | if test x"$ac_cv_HAVE_C99_VSNPRINTF" = x"yes"; then | ||
578 | AC_DEFINE(HAVE_C99_VSNPRINTF,1,[Define if system has C99 compatible vsnprintf]) | ||
579 | fi | ||
580 | |||
581 | AC_TRY_COMPILE([#include <sys/time.h>], | 435 | AC_TRY_COMPILE([#include <sys/time.h>], |
582 | [struct timeval *tv; | 436 | [struct timeval *tv; |
583 | struct timezone *tz;], | 437 | struct timezone *tz;], |
@@ -606,24 +460,6 @@ AC_TRY_COMPILE([#include <stdlib.h> | |||
606 | AC_DEFINE_UNQUOTED(SOCKET_SIZE_TYPE, $ac_cv_socket_size_type , | 460 | AC_DEFINE_UNQUOTED(SOCKET_SIZE_TYPE, $ac_cv_socket_size_type , |
607 | [Define type of socket size]) | 461 | [Define type of socket size]) |
608 | 462 | ||
609 | AC_ARG_WITH(proc-loadavg, | ||
610 | ACX_HELP_STRING([--with-proc-loadavg=PATH], | ||
611 | [path to /proc/loadavg or equivalent]), | ||
612 | ac_cv_proc_loadavg=$withval) | ||
613 | AC_MSG_CHECKING([for /proc/loadavg]) | ||
614 | if test -n "$ac_cv_proc_loadavg"; then | ||
615 | AC_MSG_RESULT([(command line) $ac_cv_proc_loadavg]) | ||
616 | elif test -f "/proc/loadavg"; then | ||
617 | AC_MSG_RESULT([found /proc/loadavg]) | ||
618 | ac_cv_proc_loadavg="/proc/loadavg" | ||
619 | else | ||
620 | AC_MSG_RESULT([no]) | ||
621 | fi | ||
622 | |||
623 | if test -n "$ac_cv_proc_loadavg"; then | ||
624 | AC_DEFINE(HAVE_PROC_LOADAVG,1,[Define if /proc/loadavg or similar exists]) | ||
625 | AC_DEFINE_UNQUOTED(PROC_LOADAVG,"/proc/loadavg",[Location of /proc/loadavg]) | ||
626 | fi | ||
627 | 463 | ||
628 | dnl #### Process table test | 464 | dnl #### Process table test |
629 | 465 | ||
@@ -1615,21 +1451,6 @@ elif test -f ../plugins/check_nt.c ; then | |||
1615 | EXTRAS="$EXTRAS check_nt" | 1451 | EXTRAS="$EXTRAS check_nt" |
1616 | fi | 1452 | fi |
1617 | 1453 | ||
1618 | AC_MSG_CHECKING(for va_list) | ||
1619 | AC_TRY_COMPILE([#ifdef __STDC__ | ||
1620 | #include <stdio.h> | ||
1621 | #include <stdlib.h> | ||
1622 | #include <stdarg.h> | ||
1623 | #else | ||
1624 | #include <sys/types.h> | ||
1625 | #include <stdio.h> | ||
1626 | #include <varargs.h> | ||
1627 | #endif], | ||
1628 | [va_list args;], | ||
1629 | [AC_MSG_RESULT(yes)], | ||
1630 | [NEED_VA_LIST=-DNEED_VA_LIST | ||
1631 | AC_SUBST(NEED_VA_LIST) | ||
1632 | AC_MSG_RESULT(no)]) | ||
1633 | 1454 | ||
1634 | case $host in | 1455 | case $host in |
1635 | *bsd*) | 1456 | *bsd*) |
@@ -1682,8 +1503,7 @@ elif test "$ac_cv_enable_redhat_pthread_workaround" = "yes" ; then | |||
1682 | fi | 1503 | fi |
1683 | 1504 | ||
1684 | dnl External libraries - see ACKNOWLEDGEMENTS | 1505 | dnl External libraries - see ACKNOWLEDGEMENTS |
1685 | np_COREUTILS | 1506 | gl_INIT |
1686 | np_CURL | ||
1687 | 1507 | ||
1688 | dnl Some helpful common compile errors checked here | 1508 | dnl Some helpful common compile errors checked here |
1689 | if test "$ac_cv_uname_s" = 'SunOS' -a "$ac_cv_prog_ac_ct_AR" = 'false' ; then | 1509 | if test "$ac_cv_uname_s" = 'SunOS' -a "$ac_cv_prog_ac_ct_AR" = 'false' ; then |
@@ -1693,7 +1513,6 @@ fi | |||
1693 | AC_OUTPUT( | 1513 | AC_OUTPUT( |
1694 | Makefile | 1514 | Makefile |
1695 | lib/Makefile | 1515 | lib/Makefile |
1696 | m4/Makefile | ||
1697 | plugins/Makefile | 1516 | plugins/Makefile |
1698 | lib/tests/Makefile | 1517 | lib/tests/Makefile |
1699 | plugins-root/Makefile | 1518 | plugins-root/Makefile |
@@ -1727,7 +1546,6 @@ dnl ACX_FEATURE([with],[snmpgetnext-command]) | |||
1727 | dnl ACX_FEATURE([with],[ssh-command]) | 1546 | dnl ACX_FEATURE([with],[ssh-command]) |
1728 | dnl ACX_FEATURE([with],[uptime-command]) | 1547 | dnl ACX_FEATURE([with],[uptime-command]) |
1729 | 1548 | ||
1730 | dnl ACX_FEATURE([with],[proc-loadavg]) | ||
1731 | dnl ACX_FEATURE([with],[proc-meminfo]) | 1549 | dnl ACX_FEATURE([with],[proc-meminfo]) |
1732 | dnl ACX_FEATURE([with],[ps-command]) | 1550 | dnl ACX_FEATURE([with],[ps-command]) |
1733 | dnl ACX_FEATURE([with],[ps-format]) | 1551 | dnl ACX_FEATURE([with],[ps-format]) |
@@ -1739,7 +1557,6 @@ ACX_FEATURE([with],[ipv6]) | |||
1739 | ACX_FEATURE([with],[mysql]) | 1557 | ACX_FEATURE([with],[mysql]) |
1740 | ACX_FEATURE([with],[openssl]) | 1558 | ACX_FEATURE([with],[openssl]) |
1741 | ACX_FEATURE([with],[gnutls]) | 1559 | ACX_FEATURE([with],[gnutls]) |
1742 | ACX_FEATURE([enable],[emulate-getaddrinfo]) | ||
1743 | ACX_FEATURE([with],[perl]) | 1560 | ACX_FEATURE([with],[perl]) |
1744 | ACX_FEATURE([with],[cgiurl]) | 1561 | ACX_FEATURE([with],[cgiurl]) |
1745 | ACX_FEATURE([with],[trusted-path]) | 1562 | ACX_FEATURE([with],[trusted-path]) |