diff --git a/BUGS b/BUGS index bab53ce..f134080 100644 --- a/BUGS +++ b/BUGS @@ -1,4 +1,4 @@ -This file lists the major bugs from the Nagios Plugins page on Sourceforge +This file lists the major bugs from the Nagios Plugins page on Sourceforge at http://sourceforge.net/tracker/?group_id=29880&atid=397597. These are not necessarily verified as errors. @@ -30,4 +30,3 @@ For the 1.4.16 release: 1370031 - check_disk_smb requires DNS agree with NetBIOS names 1225470 - check_swap perf data incorrect 1090549 - check_dhcp ignores DHCP replies - 990948 - check_disk_smb doesn't allow spaces in share names diff --git a/ChangeLog b/ChangeLog index 050d42b..acc3575 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-01-23 Robin Sonefors + + * plugins/check_snmp.c: fix memory allocation if using >= 8 oids + 2012-06-27 Holger Weiss * plugins/check_tcp.c: check_tcp: Print performance data even with diff --git a/INSTALL b/INSTALL index 7d1c323..007e939 100644 --- a/INSTALL +++ b/INSTALL @@ -1,8 +1,8 @@ Installation Instructions ************************* -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006, 2007, 2008, 2009 Free Software Foundation, Inc. +Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, +Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -226,6 +226,11 @@ order to use an ANSI C compiler: and if that doesn't work, install pre-built binaries of GCC for HP-UX. + HP-UX `make' updates targets which have the same time stamps as +their prerequisites, which makes it generally unusable when shipped +generated files such as `configure' are involved. Use GNU `make' +instead. + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended @@ -304,9 +309,10 @@ causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to -an Autoconf bug. Until the bug is fixed you can use this workaround: +an Autoconf limitation. Until the limitation is lifted, you can use +this workaround: - CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== @@ -362,4 +368,3 @@ operates. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. - diff --git a/Makefile.am b/Makefile.am index cbca5d7..6f4e435 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,9 +5,9 @@ SUBDIRS = gl tap lib plugins plugins-scripts plugins-root po @PERLMODS_DIR@ EXTRA_DIST = config.rpath \ ABOUT-NLS ACKNOWLEDGEMENTS AUTHORS BUGS CODING FAQ LEGAL NEWS \ NP-VERSION-GEN REQUIREMENTS SUPPORT THANKS \ - NPTest.pm contrib pkg nagios-plugins.spec \ + NPTest.pm pkg nagios-plugins.spec \ config_test/Makefile config_test/run_tests config_test/child_test.c \ - perlmods tools/build_perl_modules \ + tools/build_perl_modules \ tools/tinderbox_build ACLOCAL_AMFLAGS = -I gl/m4 -I m4 @@ -24,7 +24,7 @@ install-root: test test-debug: cd lib && $(MAKE) $@ - if test "$(PERLMODS_DIR)" != ""; then cd perlmods && $(MAKE) $@; fi + if test "$(PERLMODS_DIR)" != ""; then cd && $(MAKE) $@; fi cd plugins && $(MAKE) $@ cd plugins-scripts && $(MAKE) $@ diff --git a/Makefile.in b/Makefile.in index 8cd0c37..3ee89b9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,10 +14,54 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -34,37 +77,42 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/command.cfg.in \ - $(srcdir)/config.h.in $(srcdir)/nagios-plugins.spec.in \ - $(srcdir)/test.pl.in $(top_srcdir)/configure \ - $(top_srcdir)/pkg/solaris/pkginfo.in ABOUT-NLS AUTHORS COPYING \ - ChangeLog INSTALL NEWS THANKS build-aux/compile \ - build-aux/config.guess build-aux/config.rpath \ - build-aux/config.sub build-aux/depcomp build-aux/install-sh \ - build-aux/ltmain.sh build-aux/missing build-aux/mkinstalldirs \ - config.rpath mkinstalldirs +DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ + $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/configure $(am__configure_deps) \ + $(srcdir)/config.h.in $(top_srcdir)/build-aux/mkinstalldirs \ + $(srcdir)/nagios-plugins.spec.in $(srcdir)/test.pl.in \ + $(top_srcdir)/pkg/solaris/pkginfo.in ABOUT-NLS COPYING THANKS \ + build-aux/compile build-aux/config.guess config.rpath \ + build-aux/config.rpath build-aux/config.sub \ + build-aux/install-sh build-aux/missing mkinstalldirs \ + build-aux/mkinstalldirs build-aux/ltmain.sh \ + $(top_srcdir)/build-aux/compile \ + $(top_srcdir)/build-aux/config.guess \ + $(top_srcdir)/build-aux/config.rpath \ + $(top_srcdir)/build-aux/config.sub \ + $(top_srcdir)/build-aux/install-sh \ + $(top_srcdir)/build-aux/ltmain.sh \ + $(top_srcdir)/build-aux/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/np_mysqlclient.m4 \ $(top_srcdir)/gl/m4/00gnulib.m4 $(top_srcdir)/gl/m4/alloca.m4 \ $(top_srcdir)/gl/m4/arpa_inet_h.m4 \ - $(top_srcdir)/gl/m4/asm-underscore.m4 \ $(top_srcdir)/gl/m4/base64.m4 $(top_srcdir)/gl/m4/btowc.m4 \ - $(top_srcdir)/gl/m4/c-strtod.m4 $(top_srcdir)/gl/m4/cloexec.m4 \ - $(top_srcdir)/gl/m4/codeset.m4 $(top_srcdir)/gl/m4/dirname.m4 \ - $(top_srcdir)/gl/m4/dos.m4 \ + $(top_srcdir)/gl/m4/codeset.m4 \ + $(top_srcdir)/gl/m4/configmake.m4 \ + $(top_srcdir)/gl/m4/dirname.m4 \ $(top_srcdir)/gl/m4/double-slash-root.m4 \ - $(top_srcdir)/gl/m4/dup2.m4 $(top_srcdir)/gl/m4/eealloc.m4 \ - $(top_srcdir)/gl/m4/environ.m4 $(top_srcdir)/gl/m4/errno_h.m4 \ - $(top_srcdir)/gl/m4/error.m4 $(top_srcdir)/gl/m4/extensions.m4 \ - $(top_srcdir)/gl/m4/fcntl-o.m4 \ - $(top_srcdir)/gl/m4/fcntl-safer.m4 \ - $(top_srcdir)/gl/m4/fcntl.m4 $(top_srcdir)/gl/m4/fcntl_h.m4 \ - $(top_srcdir)/gl/m4/float_h.m4 $(top_srcdir)/gl/m4/floorf.m4 \ + $(top_srcdir)/gl/m4/eealloc.m4 $(top_srcdir)/gl/m4/environ.m4 \ + $(top_srcdir)/gl/m4/errno_h.m4 $(top_srcdir)/gl/m4/error.m4 \ + $(top_srcdir)/gl/m4/exponentd.m4 \ + $(top_srcdir)/gl/m4/extensions.m4 \ + $(top_srcdir)/gl/m4/extern-inline.m4 \ + $(top_srcdir)/gl/m4/fcntl-o.m4 $(top_srcdir)/gl/m4/float_h.m4 \ + $(top_srcdir)/gl/m4/floorf.m4 \ $(top_srcdir)/gl/m4/fstypename.m4 \ $(top_srcdir)/gl/m4/fsusage.m4 \ $(top_srcdir)/gl/m4/getaddrinfo.m4 \ - $(top_srcdir)/gl/m4/getdtablesize.m4 \ $(top_srcdir)/gl/m4/gethostname.m4 \ $(top_srcdir)/gl/m4/getloadavg.m4 \ $(top_srcdir)/gl/m4/getopt.m4 $(top_srcdir)/gl/m4/gettext.m4 \ @@ -73,12 +121,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/np_mysqlclient.m4 \ $(top_srcdir)/gl/m4/gnulib-comp.m4 \ $(top_srcdir)/gl/m4/hostent.m4 $(top_srcdir)/gl/m4/iconv.m4 \ $(top_srcdir)/gl/m4/include_next.m4 \ - $(top_srcdir)/gl/m4/inet_ntop.m4 $(top_srcdir)/gl/m4/inline.m4 \ + $(top_srcdir)/gl/m4/inet_ntop.m4 \ $(top_srcdir)/gl/m4/intlmacosx.m4 \ $(top_srcdir)/gl/m4/intmax_t.m4 \ $(top_srcdir)/gl/m4/inttypes_h.m4 \ $(top_srcdir)/gl/m4/langinfo_h.m4 \ - $(top_srcdir)/gl/m4/lib-ld.m4 $(top_srcdir)/gl/m4/lib-link.m4 \ + $(top_srcdir)/gl/m4/largefile.m4 $(top_srcdir)/gl/m4/lib-ld.m4 \ + $(top_srcdir)/gl/m4/lib-link.m4 \ $(top_srcdir)/gl/m4/lib-prefix.m4 \ $(top_srcdir)/gl/m4/libtool.m4 \ $(top_srcdir)/gl/m4/localcharset.m4 \ @@ -86,6 +135,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/np_mysqlclient.m4 \ $(top_srcdir)/gl/m4/locale-ja.m4 \ $(top_srcdir)/gl/m4/locale-zh.m4 \ $(top_srcdir)/gl/m4/locale_h.m4 \ + $(top_srcdir)/gl/m4/localeconv.m4 $(top_srcdir)/gl/m4/lock.m4 \ $(top_srcdir)/gl/m4/longlong.m4 \ $(top_srcdir)/gl/m4/ls-mntd-fs.m4 \ $(top_srcdir)/gl/m4/ltoptions.m4 \ @@ -95,35 +145,40 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/np_mysqlclient.m4 \ $(top_srcdir)/gl/m4/malloc.m4 $(top_srcdir)/gl/m4/malloca.m4 \ $(top_srcdir)/gl/m4/math_h.m4 $(top_srcdir)/gl/m4/mbrtowc.m4 \ $(top_srcdir)/gl/m4/mbsinit.m4 \ - $(top_srcdir)/gl/m4/mbstate_t.m4 $(top_srcdir)/gl/m4/memchr.m4 \ - $(top_srcdir)/gl/m4/mktime.m4 $(top_srcdir)/gl/m4/mmap-anon.m4 \ - $(top_srcdir)/gl/m4/mode_t.m4 $(top_srcdir)/gl/m4/mountlist.m4 \ + $(top_srcdir)/gl/m4/mbstate_t.m4 $(top_srcdir)/gl/m4/mbtowc.m4 \ + $(top_srcdir)/gl/m4/memchr.m4 $(top_srcdir)/gl/m4/mktime.m4 \ + $(top_srcdir)/gl/m4/mmap-anon.m4 \ + $(top_srcdir)/gl/m4/mountlist.m4 \ + $(top_srcdir)/gl/m4/msvc-inval.m4 \ + $(top_srcdir)/gl/m4/msvc-nothrow.m4 \ $(top_srcdir)/gl/m4/multiarch.m4 \ $(top_srcdir)/gl/m4/netdb_h.m4 \ $(top_srcdir)/gl/m4/netinet_in_h.m4 \ $(top_srcdir)/gl/m4/nl_langinfo.m4 $(top_srcdir)/gl/m4/nls.m4 \ - $(top_srcdir)/gl/m4/onceonly.m4 $(top_srcdir)/gl/m4/open.m4 \ - $(top_srcdir)/gl/m4/po.m4 $(top_srcdir)/gl/m4/printf.m4 \ - $(top_srcdir)/gl/m4/progtest.m4 $(top_srcdir)/gl/m4/regex.m4 \ + $(top_srcdir)/gl/m4/nocrash.m4 $(top_srcdir)/gl/m4/off_t.m4 \ + $(top_srcdir)/gl/m4/onceonly.m4 $(top_srcdir)/gl/m4/po.m4 \ + $(top_srcdir)/gl/m4/printf.m4 $(top_srcdir)/gl/m4/progtest.m4 \ + $(top_srcdir)/gl/m4/read.m4 $(top_srcdir)/gl/m4/regex.m4 \ $(top_srcdir)/gl/m4/safe-read.m4 \ - $(top_srcdir)/gl/m4/safe-write.m4 \ $(top_srcdir)/gl/m4/servent.m4 $(top_srcdir)/gl/m4/setenv.m4 \ $(top_srcdir)/gl/m4/sha1.m4 $(top_srcdir)/gl/m4/size_max.m4 \ - $(top_srcdir)/gl/m4/snprintf.m4 $(top_srcdir)/gl/m4/sockets.m4 \ - $(top_srcdir)/gl/m4/socklen.m4 $(top_srcdir)/gl/m4/sockpfaf.m4 \ - $(top_srcdir)/gl/m4/ssize_t.m4 $(top_srcdir)/gl/m4/stat.m4 \ - $(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stddef_h.m4 \ - $(top_srcdir)/gl/m4/stdint.m4 $(top_srcdir)/gl/m4/stdint_h.m4 \ - $(top_srcdir)/gl/m4/stdio_h.m4 $(top_srcdir)/gl/m4/stdlib_h.m4 \ - $(top_srcdir)/gl/m4/strdup.m4 $(top_srcdir)/gl/m4/strerror.m4 \ + $(top_srcdir)/gl/m4/snprintf.m4 \ + $(top_srcdir)/gl/m4/socketlib.m4 \ + $(top_srcdir)/gl/m4/sockets.m4 $(top_srcdir)/gl/m4/socklen.m4 \ + $(top_srcdir)/gl/m4/sockpfaf.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \ + $(top_srcdir)/gl/m4/stdalign.m4 $(top_srcdir)/gl/m4/stdbool.m4 \ + $(top_srcdir)/gl/m4/stddef_h.m4 $(top_srcdir)/gl/m4/stdint.m4 \ + $(top_srcdir)/gl/m4/stdint_h.m4 $(top_srcdir)/gl/m4/stdio_h.m4 \ + $(top_srcdir)/gl/m4/stdlib_h.m4 \ + $(top_srcdir)/gl/m4/strerror.m4 \ $(top_srcdir)/gl/m4/string_h.m4 $(top_srcdir)/gl/m4/strndup.m4 \ $(top_srcdir)/gl/m4/strnlen.m4 $(top_srcdir)/gl/m4/strsep.m4 \ $(top_srcdir)/gl/m4/strstr.m4 \ $(top_srcdir)/gl/m4/sys_socket_h.m4 \ - $(top_srcdir)/gl/m4/sys_stat_h.m4 \ - $(top_srcdir)/gl/m4/time_h.m4 $(top_srcdir)/gl/m4/time_r.m4 \ - $(top_srcdir)/gl/m4/timegm.m4 \ - $(top_srcdir)/gl/m4/unistd-safer.m4 \ + $(top_srcdir)/gl/m4/sys_types_h.m4 \ + $(top_srcdir)/gl/m4/sys_uio_h.m4 \ + $(top_srcdir)/gl/m4/threadlib.m4 $(top_srcdir)/gl/m4/time_h.m4 \ + $(top_srcdir)/gl/m4/time_r.m4 $(top_srcdir)/gl/m4/timegm.m4 \ $(top_srcdir)/gl/m4/unistd_h.m4 \ $(top_srcdir)/gl/m4/vasnprintf.m4 \ $(top_srcdir)/gl/m4/vasprintf.m4 \ @@ -131,43 +186,84 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/np_mysqlclient.m4 \ $(top_srcdir)/gl/m4/warn-on-use.m4 \ $(top_srcdir)/gl/m4/wchar_h.m4 $(top_srcdir)/gl/m4/wchar_t.m4 \ $(top_srcdir)/gl/m4/wcrtomb.m4 $(top_srcdir)/gl/m4/wctype_h.m4 \ - $(top_srcdir)/gl/m4/wint_t.m4 $(top_srcdir)/gl/m4/write.m4 \ - $(top_srcdir)/gl/m4/xalloc.m4 $(top_srcdir)/gl/m4/xsize.m4 \ - $(top_srcdir)/gl/m4/xstrndup.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/gl/m4/wint_t.m4 $(top_srcdir)/gl/m4/xalloc.m4 \ + $(top_srcdir)/gl/m4/xsize.m4 $(top_srcdir)/gl/m4/xstrndup.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = nagios-plugins.spec command.cfg test.pl \ - pkg/solaris/pkginfo +CONFIG_CLEAN_FILES = nagios-plugins.spec test.pl pkg/solaris/pkginfo CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir dist dist-all distcheck +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + cscope distdir dist dist-all distcheck +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.h.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ @@ -195,15 +291,20 @@ am__relativize = \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best +DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print +pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ -ASM_SYMBOL_PREFIX = @ASM_SYMBOL_PREFIX@ +ARFLAGS = @ARFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -220,6 +321,7 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ +DBILIBS = @DBILIBS@ DEFS = -DLOCALEDIR=\"$(localedir)\" DEPDIR = @DEPDIR@ DEPLIBS = @DEPLIBS@ @@ -254,55 +356,93 @@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ +GNULIB_ACOSF = @GNULIB_ACOSF@ GNULIB_ACOSL = @GNULIB_ACOSL@ +GNULIB_ASINF = @GNULIB_ASINF@ GNULIB_ASINL = @GNULIB_ASINL@ +GNULIB_ATAN2F = @GNULIB_ATAN2F@ +GNULIB_ATANF = @GNULIB_ATANF@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ +GNULIB_CBRT = @GNULIB_CBRT@ +GNULIB_CBRTF = @GNULIB_CBRTF@ +GNULIB_CBRTL = @GNULIB_CBRTL@ +GNULIB_CEIL = @GNULIB_CEIL@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ +GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ +GNULIB_COPYSIGN = @GNULIB_COPYSIGN@ +GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@ +GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@ +GNULIB_COSF = @GNULIB_COSF@ +GNULIB_COSHF = @GNULIB_COSHF@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ +GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ +GNULIB_EXP2 = @GNULIB_EXP2@ +GNULIB_EXP2F = @GNULIB_EXP2F@ +GNULIB_EXP2L = @GNULIB_EXP2L@ +GNULIB_EXPF = @GNULIB_EXPF@ GNULIB_EXPL = @GNULIB_EXPL@ +GNULIB_EXPM1 = @GNULIB_EXPM1@ +GNULIB_EXPM1F = @GNULIB_EXPM1F@ +GNULIB_EXPM1L = @GNULIB_EXPM1L@ +GNULIB_FABSF = @GNULIB_FABSF@ +GNULIB_FABSL = @GNULIB_FABSL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ -GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ -GNULIB_FCNTL = @GNULIB_FCNTL@ +GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ +GNULIB_FDOPEN = @GNULIB_FDOPEN@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ +GNULIB_FFSL = @GNULIB_FFSL@ +GNULIB_FFSLL = @GNULIB_FFSLL@ +GNULIB_FGETC = @GNULIB_FGETC@ +GNULIB_FGETS = @GNULIB_FGETS@ +GNULIB_FLOOR = @GNULIB_FLOOR@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ +GNULIB_FMA = @GNULIB_FMA@ +GNULIB_FMAF = @GNULIB_FMAF@ +GNULIB_FMAL = @GNULIB_FMAL@ +GNULIB_FMOD = @GNULIB_FMOD@ +GNULIB_FMODF = @GNULIB_FMODF@ +GNULIB_FMODL = @GNULIB_FMODL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ +GNULIB_FREAD = @GNULIB_FREAD@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ +GNULIB_FREXPF = @GNULIB_FREXPF@ GNULIB_FREXPL = @GNULIB_FREXPL@ +GNULIB_FSCANF = @GNULIB_FSCANF@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ -GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ -GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ +GNULIB_GETC = @GNULIB_GETC@ +GNULIB_GETCHAR = @GNULIB_GETCHAR@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ @@ -319,25 +459,49 @@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ +GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ +GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ +GNULIB_HYPOT = @GNULIB_HYPOT@ +GNULIB_HYPOTF = @GNULIB_HYPOTF@ +GNULIB_HYPOTL = @GNULIB_HYPOTL@ +GNULIB_ILOGB = @GNULIB_ILOGB@ +GNULIB_ILOGBF = @GNULIB_ILOGBF@ +GNULIB_ILOGBL = @GNULIB_ILOGBL@ GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ GNULIB_INET_PTON = @GNULIB_INET_PTON@ +GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ -GNULIB_LCHMOD = @GNULIB_LCHMOD@ +GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ +GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ +GNULIB_LDEXPF = @GNULIB_LDEXPF@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ +GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ +GNULIB_LOG = @GNULIB_LOG@ +GNULIB_LOG10 = @GNULIB_LOG10@ +GNULIB_LOG10F = @GNULIB_LOG10F@ +GNULIB_LOG10L = @GNULIB_LOG10L@ +GNULIB_LOG1P = @GNULIB_LOG1P@ +GNULIB_LOG1PF = @GNULIB_LOG1PF@ +GNULIB_LOG1PL = @GNULIB_LOG1PL@ +GNULIB_LOG2 = @GNULIB_LOG2@ +GNULIB_LOG2F = @GNULIB_LOG2F@ +GNULIB_LOG2L = @GNULIB_LOG2L@ GNULIB_LOGB = @GNULIB_LOGB@ +GNULIB_LOGBF = @GNULIB_LOGBF@ +GNULIB_LOGBL = @GNULIB_LOGBL@ +GNULIB_LOGF = @GNULIB_LOGF@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ -GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ @@ -358,68 +522,85 @@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ +GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ -GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ -GNULIB_MKFIFO = @GNULIB_MKFIFO@ -GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ -GNULIB_MKNOD = @GNULIB_MKNOD@ -GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ +GNULIB_MODF = @GNULIB_MODF@ +GNULIB_MODFF = @GNULIB_MODFF@ +GNULIB_MODFL = @GNULIB_MODFL@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ -GNULIB_OPEN = @GNULIB_OPEN@ -GNULIB_OPENAT = @GNULIB_OPENAT@ +GNULIB_PCLOSE = @GNULIB_PCLOSE@ GNULIB_PERROR = @GNULIB_PERROR@ +GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ +GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ +GNULIB_POWF = @GNULIB_POWF@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ +GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ +GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ +GNULIB_READ = @GNULIB_READ@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ +GNULIB_REMAINDER = @GNULIB_REMAINDER@ +GNULIB_REMAINDERF = @GNULIB_REMAINDERF@ +GNULIB_REMAINDERL = @GNULIB_REMAINDERL@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ +GNULIB_RINT = @GNULIB_RINT@ +GNULIB_RINTF = @GNULIB_RINTF@ +GNULIB_RINTL = @GNULIB_RINTL@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ +GNULIB_SCANF = @GNULIB_SCANF@ +GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ +GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ +GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ +GNULIB_SINF = @GNULIB_SINF@ +GNULIB_SINHF = @GNULIB_SINHF@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ +GNULIB_SQRTF = @GNULIB_SQRTF@ GNULIB_SQRTL = @GNULIB_SQRTL@ -GNULIB_STAT = @GNULIB_STAT@ +GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ @@ -427,6 +608,7 @@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ +GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ @@ -442,64 +624,123 @@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ +GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ +GNULIB_TANF = @GNULIB_TANF@ +GNULIB_TANHF = @GNULIB_TANHF@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ +GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ +GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ -GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ +GNULIB_VFSCANF = @GNULIB_VFSCANF@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ +GNULIB_VSCANF = @GNULIB_VSCANF@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ +GNULIB_WCPCPY = @GNULIB_WCPCPY@ +GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ +GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ +GNULIB_WCSCAT = @GNULIB_WCSCAT@ +GNULIB_WCSCHR = @GNULIB_WCSCHR@ +GNULIB_WCSCMP = @GNULIB_WCSCMP@ +GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ +GNULIB_WCSCPY = @GNULIB_WCSCPY@ +GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ +GNULIB_WCSDUP = @GNULIB_WCSDUP@ +GNULIB_WCSLEN = @GNULIB_WCSLEN@ +GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ +GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ +GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ +GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ +GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ +GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ +GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ +GNULIB_WCSSPN = @GNULIB_WCSSPN@ +GNULIB_WCSSTR = @GNULIB_WCSSTR@ +GNULIB_WCSTOK = @GNULIB_WCSTOK@ +GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ +GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ GNULIB_WCTOB = @GNULIB_WCTOB@ +GNULIB_WCTOMB = @GNULIB_WCTOMB@ +GNULIB_WCTRANS = @GNULIB_WCTRANS@ +GNULIB_WCTYPE = @GNULIB_WCTYPE@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ +GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ +GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ +GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ +GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ +GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ +GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ +HAVE_ACOSF = @HAVE_ACOSF@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ +HAVE_ASINF = @HAVE_ASINF@ HAVE_ASINL = @HAVE_ASINL@ +HAVE_ATAN2F = @HAVE_ATAN2F@ +HAVE_ATANF = @HAVE_ATANF@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ -HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ +HAVE_CBRT = @HAVE_CBRT@ +HAVE_CBRTF = @HAVE_CBRTF@ +HAVE_CBRTL = @HAVE_CBRTL@ HAVE_CHOWN = @HAVE_CHOWN@ +HAVE_COPYSIGN = @HAVE_COPYSIGN@ +HAVE_COPYSIGNL = @HAVE_COPYSIGNL@ +HAVE_COSF = @HAVE_COSF@ +HAVE_COSHF = @HAVE_COSHF@ HAVE_COSL = @HAVE_COSL@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ +HAVE_DECL_CBRTF = @HAVE_DECL_CBRTF@ +HAVE_DECL_CBRTL = @HAVE_DECL_CBRTL@ HAVE_DECL_CEILF = @HAVE_DECL_CEILF@ HAVE_DECL_CEILL = @HAVE_DECL_CEILL@ +HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ +HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@ +HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@ +HAVE_DECL_EXP2L = @HAVE_DECL_EXP2L@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ +HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@ +HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ +HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@ HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ +HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ +HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ +HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ @@ -509,18 +750,29 @@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ +HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ +HAVE_DECL_LOG10L = @HAVE_DECL_LOG10L@ +HAVE_DECL_LOG2 = @HAVE_DECL_LOG2@ +HAVE_DECL_LOG2F = @HAVE_DECL_LOG2F@ +HAVE_DECL_LOG2L = @HAVE_DECL_LOG2L@ HAVE_DECL_LOGB = @HAVE_DECL_LOGB@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ +HAVE_DECL_REMAINDER = @HAVE_DECL_REMAINDER@ +HAVE_DECL_REMAINDERL = @HAVE_DECL_REMAINDERL@ +HAVE_DECL_RINTF = @HAVE_DECL_RINTF@ HAVE_DECL_ROUND = @HAVE_DECL_ROUND@ HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@ HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@ +HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ +HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ +HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ @@ -529,6 +781,8 @@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_TRUNCL = @HAVE_DECL_TRUNCL@ +HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ +HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ @@ -537,19 +791,29 @@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ +HAVE_EXPF = @HAVE_EXPF@ HAVE_EXPL = @HAVE_EXPL@ +HAVE_EXPM1 = @HAVE_EXPM1@ +HAVE_EXPM1F = @HAVE_EXPM1F@ +HAVE_FABSF = @HAVE_FABSF@ +HAVE_FABSL = @HAVE_FABSL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ -HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ -HAVE_FCNTL = @HAVE_FCNTL@ +HAVE_FDATASYNC = @HAVE_FDATASYNC@ +HAVE_FEATURES_H = @HAVE_FEATURES_H@ +HAVE_FFSL = @HAVE_FFSL@ +HAVE_FFSLL = @HAVE_FFSLL@ +HAVE_FMA = @HAVE_FMA@ +HAVE_FMAF = @HAVE_FMAF@ +HAVE_FMAL = @HAVE_FMAL@ +HAVE_FMODF = @HAVE_FMODF@ +HAVE_FMODL = @HAVE_FMODL@ +HAVE_FREXPF = @HAVE_FREXPF@ HAVE_FSEEKO = @HAVE_FSEEKO@ -HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTELLO = @HAVE_FTELLO@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ -HAVE_FUTIMENS = @HAVE_FUTIMENS@ -HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ @@ -558,6 +822,12 @@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GRANTPT = @HAVE_GRANTPT@ +HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ +HAVE_HYPOTF = @HAVE_HYPOTF@ +HAVE_HYPOTL = @HAVE_HYPOTL@ +HAVE_ILOGB = @HAVE_ILOGB@ +HAVE_ILOGBF = @HAVE_ILOGBF@ +HAVE_ILOGBL = @HAVE_ILOGBL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ @@ -567,15 +837,22 @@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ -HAVE_LCHMOD = @HAVE_LCHMOD@ +HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ +HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHOWN = @HAVE_LCHOWN@ +HAVE_LDEXPF = @HAVE_LDEXPF@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ -HAVE_LOCALTIME_R = @HAVE_LOCALTIME_R@ +HAVE_LOG10F = @HAVE_LOG10F@ +HAVE_LOG10L = @HAVE_LOG10L@ +HAVE_LOG1P = @HAVE_LOG1P@ +HAVE_LOG1PF = @HAVE_LOG1PF@ +HAVE_LOG1PL = @HAVE_LOG1PL@ +HAVE_LOGBF = @HAVE_LOGBF@ +HAVE_LOGBL = @HAVE_LOGBL@ +HAVE_LOGF = @HAVE_LOGF@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ -HAVE_LSTAT = @HAVE_LSTAT@ -HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ @@ -584,42 +861,54 @@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ -HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ -HAVE_MKFIFO = @HAVE_MKFIFO@ -HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ -HAVE_MKNOD = @HAVE_MKNOD@ -HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ +HAVE_MODFF = @HAVE_MODFF@ +HAVE_MODFL = @HAVE_MODFL@ +HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ -HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OS_H = @HAVE_OS_H@ +HAVE_PCLOSE = @HAVE_PCLOSE@ +HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ +HAVE_POPEN = @HAVE_POPEN@ +HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ +HAVE_POWF = @HAVE_POWF@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ +HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ +HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ -HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_REALPATH = @HAVE_REALPATH@ +HAVE_REMAINDER = @HAVE_REMAINDER@ +HAVE_REMAINDERF = @HAVE_REMAINDERF@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ +HAVE_RINT = @HAVE_RINT@ +HAVE_RINTL = @HAVE_RINTL@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ +HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ HAVE_SETENV = @HAVE_SETENV@ +HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ +HAVE_SINF = @HAVE_SINF@ +HAVE_SINHF = @HAVE_SINHF@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ +HAVE_SQRTF = @HAVE_SQRTF@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ @@ -635,6 +924,7 @@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ +HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ @@ -644,29 +934,60 @@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ +HAVE_TANF = @HAVE_TANF@ +HAVE_TANHF = @HAVE_TANHF@ HAVE_TANL = @HAVE_TANL@ HAVE_TIMEGM = @HAVE_TIMEGM@ -HAVE_TTYNAME_R = @HAVE_TTYNAME_R@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -HAVE_UNSETENV = @HAVE_UNSETENV@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ -HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ +HAVE_WCPCPY = @HAVE_WCPCPY@ +HAVE_WCPNCPY = @HAVE_WCPNCPY@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ +HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ +HAVE_WCSCAT = @HAVE_WCSCAT@ +HAVE_WCSCHR = @HAVE_WCSCHR@ +HAVE_WCSCMP = @HAVE_WCSCMP@ +HAVE_WCSCOLL = @HAVE_WCSCOLL@ +HAVE_WCSCPY = @HAVE_WCSCPY@ +HAVE_WCSCSPN = @HAVE_WCSCSPN@ +HAVE_WCSDUP = @HAVE_WCSDUP@ +HAVE_WCSLEN = @HAVE_WCSLEN@ +HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ +HAVE_WCSNCAT = @HAVE_WCSNCAT@ +HAVE_WCSNCMP = @HAVE_WCSNCMP@ +HAVE_WCSNCPY = @HAVE_WCSNCPY@ +HAVE_WCSNLEN = @HAVE_WCSNLEN@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ +HAVE_WCSPBRK = @HAVE_WCSPBRK@ +HAVE_WCSRCHR = @HAVE_WCSRCHR@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ +HAVE_WCSSPN = @HAVE_WCSSPN@ +HAVE_WCSSTR = @HAVE_WCSSTR@ +HAVE_WCSTOK = @HAVE_WCSTOK@ +HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ +HAVE_WCSXFRM = @HAVE_WCSXFRM@ +HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ +HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ +HAVE_WMEMCHR = @HAVE_WMEMCHR@ +HAVE_WMEMCMP = @HAVE_WMEMCMP@ +HAVE_WMEMCPY = @HAVE_WMEMCPY@ +HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ +HAVE_WMEMSET = @HAVE_WMEMSET@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ +HAVE__EXIT = @HAVE__EXIT@ HOSTENT_LIB = @HOSTENT_LIB@ HOSTNAME = @HOSTNAME@ INCLUDE_NEXT = @INCLUDE_NEXT@ @@ -679,7 +1000,6 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -KMEM_GROUP = @KMEM_GROUP@ KRBINCLUDE = @KRBINCLUDE@ LD = @LD@ LDAPINCLUDE = @LDAPINCLUDE@ @@ -690,9 +1010,13 @@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ +LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ +LIBPTH = @LIBPTH@ +LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ +LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -703,7 +1027,10 @@ LOCALE_JA = @LOCALE_JA@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ +LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ +LTLIBPTH = @LTLIBPTH@ +LTLIBTHREAD = @LTLIBTHREAD@ MAKEINFO = @MAKEINFO@ MATHLIBS = @MATHLIBS@ MKDIR_P = @MKDIR_P@ @@ -713,12 +1040,10 @@ MSGMERGE = @MSGMERGE@ MYSQLCFLAGS = @MYSQLCFLAGS@ MYSQLINCLUDE = @MYSQLINCLUDE@ MYSQLLIBS = @MYSQLLIBS@ -NEED_SETGID = @NEED_SETGID@ NETINET_IN_H = @NETINET_IN_H@ NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ -NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ @@ -732,13 +1057,13 @@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ -NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ -NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ @@ -752,7 +1077,8 @@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ -NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ +NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ +NEXT_SYS_UIO_H = @NEXT_SYS_UIO_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ @@ -775,6 +1101,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_TO_APTGET = @PATH_TO_APTGET@ PATH_TO_DIG = @PATH_TO_DIG@ PATH_TO_FPING = @PATH_TO_FPING@ +PATH_TO_FPING6 = @PATH_TO_FPING6@ PATH_TO_LMSTAT = @PATH_TO_LMSTAT@ PATH_TO_LSPS = @PATH_TO_LSPS@ PATH_TO_MAILQ = @PATH_TO_MAILQ@ @@ -802,6 +1129,7 @@ PKG_ARCH = @PKG_ARCH@ PLUGIN_TEST = @PLUGIN_TEST@ POSUB = @POSUB@ POW_LIB = @POW_LIB@ +PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PST3CFLAGS = @PST3CFLAGS@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ @@ -811,7 +1139,11 @@ RADIUSLIBS = @RADIUSLIBS@ RANLIB = @RANLIB@ RELEASE = @RELEASE@ REPLACE_BTOWC = @REPLACE_BTOWC@ +REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ +REPLACE_CBRTF = @REPLACE_CBRTF@ +REPLACE_CBRTL = @REPLACE_CBRTL@ +REPLACE_CEIL = @REPLACE_CEIL@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ @@ -820,70 +1152,117 @@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ +REPLACE_EXP2 = @REPLACE_EXP2@ +REPLACE_EXP2L = @REPLACE_EXP2L@ +REPLACE_EXPM1 = @REPLACE_EXPM1@ +REPLACE_EXPM1F = @REPLACE_EXPM1F@ +REPLACE_FABSL = @REPLACE_FABSL@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ -REPLACE_FCNTL = @REPLACE_FCNTL@ +REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ +REPLACE_FLOOR = @REPLACE_FLOOR@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ +REPLACE_FMA = @REPLACE_FMA@ +REPLACE_FMAF = @REPLACE_FMAF@ +REPLACE_FMAL = @REPLACE_FMAL@ +REPLACE_FMOD = @REPLACE_FMOD@ +REPLACE_FMODF = @REPLACE_FMODF@ +REPLACE_FMODL = @REPLACE_FMODL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ +REPLACE_FREXPF = @REPLACE_FREXPF@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ -REPLACE_FSTAT = @REPLACE_FSTAT@ -REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ -REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ +REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@ +REPLACE_GAI_STRERROR = @REPLACE_GAI_STRERROR@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ +REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ +REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ +REPLACE_HYPOT = @REPLACE_HYPOT@ +REPLACE_HYPOTF = @REPLACE_HYPOTF@ +REPLACE_HYPOTL = @REPLACE_HYPOTL@ +REPLACE_ILOGB = @REPLACE_ILOGB@ +REPLACE_ILOGBF = @REPLACE_ILOGBF@ +REPLACE_INET_NTOP = @REPLACE_INET_NTOP@ +REPLACE_INET_PTON = @REPLACE_INET_PTON@ +REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ +REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ +REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ +REPLACE_LOCALECONV = @REPLACE_LOCALECONV@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ +REPLACE_LOG = @REPLACE_LOG@ +REPLACE_LOG10 = @REPLACE_LOG10@ +REPLACE_LOG10F = @REPLACE_LOG10F@ +REPLACE_LOG10L = @REPLACE_LOG10L@ +REPLACE_LOG1P = @REPLACE_LOG1P@ +REPLACE_LOG1PF = @REPLACE_LOG1PF@ +REPLACE_LOG1PL = @REPLACE_LOG1PL@ +REPLACE_LOG2 = @REPLACE_LOG2@ +REPLACE_LOG2F = @REPLACE_LOG2F@ +REPLACE_LOG2L = @REPLACE_LOG2L@ +REPLACE_LOGB = @REPLACE_LOGB@ +REPLACE_LOGBF = @REPLACE_LOGBF@ +REPLACE_LOGBL = @REPLACE_LOGBL@ +REPLACE_LOGF = @REPLACE_LOGF@ +REPLACE_LOGL = @REPLACE_LOGL@ REPLACE_LSEEK = @REPLACE_LSEEK@ -REPLACE_LSTAT = @REPLACE_LSTAT@ +REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ +REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ -REPLACE_MKDIR = @REPLACE_MKDIR@ -REPLACE_MKFIFO = @REPLACE_MKFIFO@ -REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ +REPLACE_MODF = @REPLACE_MODF@ +REPLACE_MODFF = @REPLACE_MODFF@ +REPLACE_MODFL = @REPLACE_MODFL@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ -REPLACE_OPEN = @REPLACE_OPEN@ -REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ +REPLACE_PTSNAME = @REPLACE_PTSNAME@ +REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ +REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ +REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ +REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ +REPLACE_REMAINDER = @REPLACE_REMAINDER@ +REPLACE_REMAINDERF = @REPLACE_REMAINDERF@ +REPLACE_REMAINDERL = @REPLACE_REMAINDERL@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ @@ -892,17 +1271,21 @@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SETENV = @REPLACE_SETENV@ +REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ -REPLACE_STAT = @REPLACE_STAT@ +REPLACE_SQRTL = @REPLACE_SQRTL@ +REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ +REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ +REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ @@ -910,16 +1293,19 @@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ +REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ +REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ +REPLACE_TRUNC = @REPLACE_TRUNC@ +REPLACE_TRUNCF = @REPLACE_TRUNCF@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ -REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ @@ -929,7 +1315,9 @@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ +REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ REPLACE_WCTOB = @REPLACE_WCTOB@ +REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ REV_DATESTAMP = @REV_DATESTAMP@ @@ -945,6 +1333,7 @@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SOCKETLIBS = @SOCKETLIBS@ SSLINCLUDE = @SSLINCLUDE@ SSLLIBS = @SSLLIBS@ +STDALIGN_H = @STDALIGN_H@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ @@ -959,6 +1348,7 @@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARRANTY = @WARRANTY@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ @@ -1003,6 +1393,7 @@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +lispdir = @lispdir@ localedir = $(datadir)/locale localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ @@ -1027,9 +1418,9 @@ SUBDIRS = gl tap lib plugins plugins-scripts plugins-root po @PERLMODS_DIR@ EXTRA_DIST = config.rpath \ ABOUT-NLS ACKNOWLEDGEMENTS AUTHORS BUGS CODING FAQ LEGAL NEWS \ NP-VERSION-GEN REQUIREMENTS SUPPORT THANKS \ - NPTest.pm contrib pkg nagios-plugins.spec \ + NPTest.pm pkg nagios-plugins.spec \ config_test/Makefile config_test/run_tests config_test/child_test.c \ - perlmods tools/build_perl_modules \ + tools/build_perl_modules \ tools/tinderbox_build ACLOCAL_AMFLAGS = -I gl/m4 -I m4 @@ -1042,7 +1433,7 @@ all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -am--refresh: +am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ @@ -1078,10 +1469,8 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi + @if test ! -f $@; then rm -f stamp-h1; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -1095,8 +1484,6 @@ distclean-hdr: -rm -f config.h stamp-h1 nagios-plugins.spec: $(top_builddir)/config.status $(srcdir)/nagios-plugins.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ -command.cfg: $(top_builddir)/config.status $(srcdir)/command.cfg.in - cd $(top_builddir) && $(SHELL) ./config.status $@ test.pl: $(top_builddir)/config.status $(srcdir)/test.pl.in cd $(top_builddir) && $(SHELL) ./config.status $@ pkg/solaris/pkginfo: $(top_builddir)/config.status $(top_srcdir)/pkg/solaris/pkginfo.in @@ -1112,22 +1499,25 @@ distclean-libtool: -rm -f libtool config.lt # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -1142,57 +1532,12 @@ $(RECURSIVE_TARGETS): $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -1208,12 +1553,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -1225,15 +1565,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -1242,9 +1578,31 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) @@ -1280,13 +1638,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -1318,36 +1673,36 @@ distdir: $(DISTFILES) || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz - $(am__remove_distdir) + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) + $(am__post_remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) + $(am__post_remove_distdir) -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another @@ -1358,8 +1713,8 @@ distcheck: dist GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ @@ -1369,9 +1724,9 @@ distcheck: dist *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ @@ -1379,6 +1734,7 @@ distcheck: dist && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ @@ -1402,13 +1758,21 @@ distcheck: dist && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 - $(am__remove_distdir) + $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ @@ -1439,10 +1803,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -1524,24 +1893,24 @@ ps-am: uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ - ctags-recursive install-am install-strip tags-recursive +.MAKE: $(am__recursive_targets) all install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-generic \ - clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ - dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-xz \ - dist-zip distcheck distclean distclean-generic distclean-hdr \ - distclean-libtool distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-recursive uninstall uninstall-am +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--refresh check check-am clean clean-cscope clean-generic \ + clean-libtool cscope cscopelist-am ctags ctags-am dist \ + dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \ + dist-tarZ dist-xz dist-zip distcheck distclean \ + distclean-generic distclean-hdr distclean-libtool \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am dist-hook: @@ -1553,7 +1922,7 @@ install-root: test test-debug: cd lib && $(MAKE) $@ - if test "$(PERLMODS_DIR)" != ""; then cd perlmods && $(MAKE) $@; fi + if test "$(PERLMODS_DIR)" != ""; then cd && $(MAKE) $@; fi cd plugins && $(MAKE) $@ cd plugins-scripts && $(MAKE) $@ diff --git a/NEWS b/NEWS index 49795aa..0261e49 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,51 @@ This file documents the major additions and syntax changes between releases. +... + ENHANCEMENTS + New check_dbi plugin for checking an (SQL) database using DBI + Let OpenSSL load its configuration file (see the OPENSSL_config(3) man page) + Add performance data to check_apt + Add performance data to check_procs + Added -4/-6 options to check_dig (Ville Mattila) + New check_oracle --connect option to perform real login + New check_nagios -t option to override the default timeout + New check_disk -f/--freespace-ignore-reserved option to ignore space reserved for root + New check_disk -N/--include-type option to limit the filesystem types to check + Allow for building the plugins in parallel + Add --without-{dbi,ldap,radius} options to ./configure + Made Verbose output of check_sensors compliant (Gabriele Tozzi) + New switch -E/--extended-perfdata for check_http to print additional performance data (Sebastian Nohn) + New check_http -d option to specify a string to expect within the response headers + New check_http -J/-K options for client certificate authentication support + Add support for executing queries to check_pgsql + Let check_pgsql accept a UNIX socket directory as hostname + New check_pgsql -o option to specify additional connection parameters + New check_fping -S option to specify the source IP address + New check_fping -I option to specify the interface to bind to + Let check_fping support IPv6 + New check_procs -k option to ignore kernel threads (on Linux) + Let check_procs use /proc//exe (if available) instead of getpid(2), unless -T is specified + Let check_mysql support SSL + Let check_mysql add perfromance metrics for all checks + New check_mysql -f option to specify a client options file + New check_mysql -g option to specify a client options group + New check_snmp --offset option to allow for adding/substracting an offset value to sensor data + Let check_snmp support an arbitrary number of OIDs + Let check_ide_smart support NetBSD + + FIXES + Change the MAIL FROM command generated by check_smtp to be RFC compliant + Fix compilation of check_http without SSL support + Fix check_snmp reversed threshold ranges (backward-compatibility) + Fix check_snmp memory violation when using more than 8 oids (Robin Sonefors) + Fix check_apt security regular expression (Alex Bradley) + Fix check_http handling extra header (-k) containing semicolons (Richard Leitner) + Fix check_apt handling unknown exit codes from apt-get (Richard Leitner) + Fix deprecated imports of check_nmap.py (Fabio Rueda) + + WARNINGS + check_http behaviour of -k/--header changed since it does not seperate multiple headers by semicolons anymore. Use multiple -k switches instead. + 1.4.16 27th June 2012 ENHANCEMENTS check_nt UPTIME accepts warning/critical thresholds (Ryan Kelly) diff --git a/REQUIREMENTS b/REQUIREMENTS index fd41ded..1f673e9 100644 --- a/REQUIREMENTS +++ b/REQUIREMENTS @@ -36,16 +36,19 @@ check_ldap: check_mysql, check_mysql_query: - Requires the MySQL libraries available from - http://www.mysql.org/ + http://dev.mysql.com/downloads/ Lib: libmysql, libmysqlclient - Redhat Powertools Source: mysql-3.20.32a-3.i386.rpm, mysql-devel-3.20.32a-3.i386.rpm (these seem to be broken, however) - RPMS from www.mysql.org work better + Redhat Source (RHEL6, YUM): mysql-devel, mysql-libs Must have mysql_config in PATH or specified with --with-mysql=DIR for DIR/bin/mysql_config check_pqsql: - Requires the PostgreSQL libraries available from http://www.postgresql.org/ +check_dbi: + - Requires the DBI libraries available from + http://libdbi.sourceforge.net/ + check_radius: - Requires the radiusclient-ng library available from: http://developer.berlios.de/projects/radiusclient-ng/ diff --git a/THANKS b/THANKS index 00f12d1..fd873f6 100644 --- a/THANKS +++ b/THANKS @@ -2,6 +2,7 @@ This software is brought to you by the Nagios Plugins Development Team. However, there have been many contributors to this project. Everyone below has helped in raising bug reports, creating patches or contributing new plugins. +Diego Elio Pettenò fabiodds dag rob?le Randy O'Meara @@ -39,6 +40,7 @@ Jeffery Blank Tom De Blende Eric Bollengier Aurelien Bompard +Alex Bradley Richard Brodie Matthew Brown Tobias Brox @@ -66,6 +68,7 @@ Phil Dibowitz Jason Dixon Paul Dlug Andy Doran +Emmanuel Dreyfus Rainer Duffner Ian Duggan Edwin Eefting @@ -87,6 +90,7 @@ Duncan Ferguson Paulo Fessel Paulo Afonso Graner Fessel James Fidell +Roman Fiedler Johan Fischer Bernhard Fischer Matthias Flacke @@ -128,6 +132,7 @@ Mark Jewiss Nikita Kalabukhov Frank Kannemann Roy Sigurd Karlsbakk +Anders Kaseorg Jason Kau Ryan Kelly Bo Kersey @@ -149,6 +154,7 @@ Lynne Lawrence Sakari Lehtonen William Leibzon Pedro Leite +Richard Leitner Craig Leres Jan Lipphaus Larry Low @@ -181,8 +187,10 @@ Sivakumar Nellurandi Truongchinh Nguyen Simon L Nielsen Thomas Nilsen +Sebastian Nohn Walbert Oberngruber Craig Orsinger +Vaclav Ovsik Remi Paulmier Tom Payerle Fabian Pehla @@ -217,6 +225,7 @@ Kenny Root Wolfgang Rosenauer John Rouillard Jonathan Rozes +Fabio Rueda Sascha Runschke Dietmar Ruzicka Ralph Rye @@ -239,6 +248,7 @@ Sean Shore Antony Simmonds John Sivak Nik Soggia +Robin Sonefors Lars Stavholm Nikolay Sturm David Sullivan @@ -249,6 +259,7 @@ Ben Timby Ronald Tin Ibere Tizio Julien Touche +Gabriele Tozzi Kyle Tucker Jerome Tytgat Stéphane Urbanovski @@ -277,4 +288,5 @@ Howard Wilkinson Shawn Wills Rob Windsor Mario Witte +Brian De Wolf Jamie Zawinski diff --git a/aclocal.m4 b/aclocal.m4 index 45e9f1e..1a0e9c5 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- +# generated automatically by aclocal 1.13.3 -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,15 +11,16 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, -[m4_warning([this file was generated for autoconf 2.67. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -31,10 +32,10 @@ To do so, use the procedure documented by the package, typically `autoreconf'.]) # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.11' +[am__api_version='1.13' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.1], [], +m4_if([$1], [1.13.3], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -50,22 +51,22 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.1])dnl +[AM_AUTOMAKE_VERSION([1.13.3])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and @@ -84,7 +85,7 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you +# harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, @@ -110,22 +111,19 @@ am_aux_dir=`cd $ac_aux_dir && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 9 - # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl @@ -144,16 +142,14 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 10 -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing @@ -163,7 +159,7 @@ fi])]) # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was @@ -176,12 +172,13 @@ AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], @@ -189,8 +186,9 @@ AC_CACHE_CHECK([dependency style of $depcc], # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -229,16 +227,16 @@ AC_CACHE_CHECK([dependency style of $depcc], : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -247,16 +245,16 @@ AC_CACHE_CHECK([dependency style of $depcc], test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} @@ -304,7 +302,7 @@ AM_CONDITIONAL([am__fastdep$1], [ # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl @@ -314,34 +312,39 @@ AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -#serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in @@ -354,7 +357,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but + # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. @@ -366,21 +369,19 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. + # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` @@ -398,7 +399,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will +# is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], @@ -406,29 +407,14 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 8 - -# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. -AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) - # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 16 - # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. @@ -444,7 +430,7 @@ AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl +[AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -473,31 +459,40 @@ AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AM_PROG_MKDIR_P])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl @@ -508,28 +503,32 @@ _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The `parallel-tests' driver may need to know about EXEEXT, so add the -dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) -dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], @@ -557,7 +556,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -576,16 +575,14 @@ if test x"${install_sh}" != xset; then install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi -AC_SUBST(install_sh)]) +AC_SUBST([install_sh])]) -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2003-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], @@ -601,14 +598,12 @@ AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 - # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. @@ -626,7 +621,7 @@ am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. +# Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include @@ -651,15 +646,12 @@ AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) -# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 6 - # AM_PROG_CC_C_O # -------------- # Like AC_PROG_CC_C_O, but changed for automake. @@ -688,15 +680,12 @@ m4_define([AC_PROG_CC], # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 6 - # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], @@ -704,11 +693,10 @@ AC_DEFUN([AM_MISSING_PROG], $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) - # AM_MISSING_HAS_RUN # ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl @@ -721,63 +709,64 @@ if test x"${MISSING+set}" != xset; then esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) + AC_MSG_WARN(['missing' script is too old or missing]) fi ]) -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# -*- Autoconf -*- +# Obsolete and "removed" macros, that must however still report explicit +# error messages when used, to smooth transition. +# +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) +AC_DEFUN([AM_CONFIG_HEADER], +[AC_DIAGNOSE([obsolete], +['$0': this macro is obsolete. +You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl +AC_CONFIG_HEADERS($@)]) + +AC_DEFUN([AM_PROG_CC_STDC], +[AC_PROG_CC +am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc +AC_DIAGNOSE([obsolete], +['$0': this macro is obsolete. +You should simply use the 'AC][_PROG_CC' macro instead. +Also, your code should no longer depend upon 'am_cv_prog_cc_stdc', +but upon 'ac_cv_prog_cc_stdc'.])]) + +AC_DEFUN([AM_C_PROTOTYPES], + [AC_FATAL([automatic de-ANSI-fication support has been removed])]) +AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 - # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) -# ------------------------------ +# -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- +# ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) @@ -790,22 +779,16 @@ AC_DEFUN([_AM_IF_OPTION], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 5 - # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -816,32 +799,40 @@ case `pwd` in esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac -# Do `set' in a subshell so we don't clobber the current shell's +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$[2]" = conftest.file ) then @@ -851,9 +842,85 @@ else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi -AC_MSG_RESULT(yes)]) +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Enable less verbose build rules; with the default set to DEFAULT +# ("yes" being less verbose, "no" or empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -861,34 +928,32 @@ AC_MSG_RESULT(yes)]) # AM_PROG_INSTALL_STRIP # --------------------- -# One issue with vendor `install' (even GNU) is that you can't +# One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize +# always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. +# Copyright (C) 2006-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. @@ -896,24 +961,22 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])]) AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- +# -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory @@ -923,75 +986,114 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar +# AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) + +# We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - # tar/untar a dummy directory, and stop if the command works + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi + done rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR @@ -1000,31 +1102,25 @@ m4_include([m4/np_mysqlclient.m4]) m4_include([gl/m4/00gnulib.m4]) m4_include([gl/m4/alloca.m4]) m4_include([gl/m4/arpa_inet_h.m4]) -m4_include([gl/m4/asm-underscore.m4]) m4_include([gl/m4/base64.m4]) m4_include([gl/m4/btowc.m4]) -m4_include([gl/m4/c-strtod.m4]) -m4_include([gl/m4/cloexec.m4]) m4_include([gl/m4/codeset.m4]) +m4_include([gl/m4/configmake.m4]) m4_include([gl/m4/dirname.m4]) -m4_include([gl/m4/dos.m4]) m4_include([gl/m4/double-slash-root.m4]) -m4_include([gl/m4/dup2.m4]) m4_include([gl/m4/eealloc.m4]) m4_include([gl/m4/environ.m4]) m4_include([gl/m4/errno_h.m4]) m4_include([gl/m4/error.m4]) +m4_include([gl/m4/exponentd.m4]) m4_include([gl/m4/extensions.m4]) +m4_include([gl/m4/extern-inline.m4]) m4_include([gl/m4/fcntl-o.m4]) -m4_include([gl/m4/fcntl-safer.m4]) -m4_include([gl/m4/fcntl.m4]) -m4_include([gl/m4/fcntl_h.m4]) m4_include([gl/m4/float_h.m4]) m4_include([gl/m4/floorf.m4]) m4_include([gl/m4/fstypename.m4]) m4_include([gl/m4/fsusage.m4]) m4_include([gl/m4/getaddrinfo.m4]) -m4_include([gl/m4/getdtablesize.m4]) m4_include([gl/m4/gethostname.m4]) m4_include([gl/m4/getloadavg.m4]) m4_include([gl/m4/getopt.m4]) @@ -1036,11 +1132,11 @@ m4_include([gl/m4/hostent.m4]) m4_include([gl/m4/iconv.m4]) m4_include([gl/m4/include_next.m4]) m4_include([gl/m4/inet_ntop.m4]) -m4_include([gl/m4/inline.m4]) m4_include([gl/m4/intlmacosx.m4]) m4_include([gl/m4/intmax_t.m4]) m4_include([gl/m4/inttypes_h.m4]) m4_include([gl/m4/langinfo_h.m4]) +m4_include([gl/m4/largefile.m4]) m4_include([gl/m4/lib-ld.m4]) m4_include([gl/m4/lib-link.m4]) m4_include([gl/m4/lib-prefix.m4]) @@ -1050,6 +1146,8 @@ m4_include([gl/m4/locale-fr.m4]) m4_include([gl/m4/locale-ja.m4]) m4_include([gl/m4/locale-zh.m4]) m4_include([gl/m4/locale_h.m4]) +m4_include([gl/m4/localeconv.m4]) +m4_include([gl/m4/lock.m4]) m4_include([gl/m4/longlong.m4]) m4_include([gl/m4/ls-mntd-fs.m4]) m4_include([gl/m4/ltoptions.m4]) @@ -1062,41 +1160,44 @@ m4_include([gl/m4/math_h.m4]) m4_include([gl/m4/mbrtowc.m4]) m4_include([gl/m4/mbsinit.m4]) m4_include([gl/m4/mbstate_t.m4]) +m4_include([gl/m4/mbtowc.m4]) m4_include([gl/m4/memchr.m4]) m4_include([gl/m4/mktime.m4]) m4_include([gl/m4/mmap-anon.m4]) -m4_include([gl/m4/mode_t.m4]) m4_include([gl/m4/mountlist.m4]) +m4_include([gl/m4/msvc-inval.m4]) +m4_include([gl/m4/msvc-nothrow.m4]) m4_include([gl/m4/multiarch.m4]) m4_include([gl/m4/netdb_h.m4]) m4_include([gl/m4/netinet_in_h.m4]) m4_include([gl/m4/nl_langinfo.m4]) m4_include([gl/m4/nls.m4]) +m4_include([gl/m4/nocrash.m4]) +m4_include([gl/m4/off_t.m4]) m4_include([gl/m4/onceonly.m4]) -m4_include([gl/m4/open.m4]) m4_include([gl/m4/po.m4]) m4_include([gl/m4/printf.m4]) m4_include([gl/m4/progtest.m4]) +m4_include([gl/m4/read.m4]) m4_include([gl/m4/regex.m4]) m4_include([gl/m4/safe-read.m4]) -m4_include([gl/m4/safe-write.m4]) m4_include([gl/m4/servent.m4]) m4_include([gl/m4/setenv.m4]) m4_include([gl/m4/sha1.m4]) m4_include([gl/m4/size_max.m4]) m4_include([gl/m4/snprintf.m4]) +m4_include([gl/m4/socketlib.m4]) m4_include([gl/m4/sockets.m4]) m4_include([gl/m4/socklen.m4]) m4_include([gl/m4/sockpfaf.m4]) m4_include([gl/m4/ssize_t.m4]) -m4_include([gl/m4/stat.m4]) +m4_include([gl/m4/stdalign.m4]) m4_include([gl/m4/stdbool.m4]) m4_include([gl/m4/stddef_h.m4]) m4_include([gl/m4/stdint.m4]) m4_include([gl/m4/stdint_h.m4]) m4_include([gl/m4/stdio_h.m4]) m4_include([gl/m4/stdlib_h.m4]) -m4_include([gl/m4/strdup.m4]) m4_include([gl/m4/strerror.m4]) m4_include([gl/m4/string_h.m4]) m4_include([gl/m4/strndup.m4]) @@ -1104,11 +1205,12 @@ m4_include([gl/m4/strnlen.m4]) m4_include([gl/m4/strsep.m4]) m4_include([gl/m4/strstr.m4]) m4_include([gl/m4/sys_socket_h.m4]) -m4_include([gl/m4/sys_stat_h.m4]) +m4_include([gl/m4/sys_types_h.m4]) +m4_include([gl/m4/sys_uio_h.m4]) +m4_include([gl/m4/threadlib.m4]) m4_include([gl/m4/time_h.m4]) m4_include([gl/m4/time_r.m4]) m4_include([gl/m4/timegm.m4]) -m4_include([gl/m4/unistd-safer.m4]) m4_include([gl/m4/unistd_h.m4]) m4_include([gl/m4/vasnprintf.m4]) m4_include([gl/m4/vasprintf.m4]) @@ -1119,7 +1221,6 @@ m4_include([gl/m4/wchar_t.m4]) m4_include([gl/m4/wcrtomb.m4]) m4_include([gl/m4/wctype_h.m4]) m4_include([gl/m4/wint_t.m4]) -m4_include([gl/m4/write.m4]) m4_include([gl/m4/xalloc.m4]) m4_include([gl/m4/xsize.m4]) m4_include([gl/m4/xstrndup.m4]) diff --git a/build-aux/compile b/build-aux/compile index c0096a7..531136b 100755 --- a/build-aux/compile +++ b/build-aux/compile @@ -1,10 +1,9 @@ #! /bin/sh -# Wrapper for compilers which do not understand `-c -o'. +# Wrapper for compilers which do not understand '-c -o'. -scriptversion=2009-10-06.20; # UTC +scriptversion=2012-10-14.11; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software -# Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -29,21 +28,224 @@ scriptversion=2009-10-06.20; # UTC # bugs to or send patches to # . +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + case $1 in '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] -Wrapper for compilers which do not understand `-c -o'. -Remove `-o dest.o' from ARGS, run PROGRAM with the remaining +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the -right script to run: please start by reading the file `INSTALL'. +right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF @@ -53,11 +255,13 @@ EOF echo "compile $scriptversion" exit $? ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; esac ofile= cfile= -eat= for arg do @@ -66,8 +270,8 @@ do else case $1 in -o) - # configure might choose to run compile as `compile cc -o foo foo.c'. - # So we strip `-o arg' only if arg is an object. + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) @@ -94,10 +298,10 @@ do done if test -z "$ofile" || test -z "$cfile"; then - # If no `-o' option was seen then we might have been invoked from a + # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no - # `.c' file was seen then we are probably linking. That is also + # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi @@ -106,7 +310,7 @@ fi cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. -# Note: use `[/\\:.-]' here to ensure that we don't use the same name +# Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d diff --git a/build-aux/config.guess b/build-aux/config.guess index c2246a4..b79252d 100755 --- a/build-aux/config.guess +++ b/build-aux/config.guess @@ -1,14 +1,12 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. +# Copyright 1992-2013 Free Software Foundation, Inc. -timestamp='2009-12-30' +timestamp='2013-06-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -17,26 +15,22 @@ timestamp='2009-12-30' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). # -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. +# Originally written by Per Bothner. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# +# Please send patches with a ChangeLog entry to config-patches@gnu.org. + me=`echo "$0" | sed -e 's,.*/,,'` @@ -56,9 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -Software Foundation, Inc. +Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -140,12 +132,33 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + ;; +esac + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward @@ -181,7 +194,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in fi ;; *) - os=netbsd + os=netbsd ;; esac # The OS release @@ -202,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} @@ -224,7 +241,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on @@ -270,7 +287,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead @@ -296,12 +316,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo s390-ibm-zvmoe exit ;; *:OS400:*:*) - echo powerpc-ibm-os400 + echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) + arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) @@ -395,23 +415,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; @@ -481,8 +501,8 @@ EOF echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ @@ -495,7 +515,7 @@ EOF else echo i586-dg-dgux${UNAME_RELEASE} fi - exit ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; @@ -552,7 +572,7 @@ EOF echo rs6000-ibm-aix3.2 fi exit ;; - *:AIX:*:[456]) + *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 @@ -595,52 +615,52 @@ EOF 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac + esac ;; + esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + sed 's/^ //' << EOF >$dummy.c - #define _HPUX_SOURCE - #include - #include + #define _HPUX_SOURCE + #include + #include - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa @@ -731,22 +751,22 @@ EOF exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; @@ -770,14 +790,14 @@ EOF exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} @@ -789,30 +809,35 @@ EOF echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; + i*:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) - case ${UNAME_MACHINE} in + case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; @@ -849,15 +874,22 @@ EOF exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -867,52 +899,56 @@ EOF EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; - esac + esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi + else + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf + fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) - echo cris-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) - echo frv-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build @@ -931,51 +967,63 @@ EOF #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; + or1k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; or32:Linux:*:*) - echo or32-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-gnu + echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu + echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -984,11 +1032,11 @@ EOF echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. + # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) @@ -1020,7 +1068,7 @@ EOF fi exit ;; i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. + # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; @@ -1048,13 +1096,13 @@ EOF exit ;; pc:*:*:*) # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp - exit ;; + exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; @@ -1089,8 +1137,8 @@ EOF /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ @@ -1133,10 +1181,10 @@ EOF echo ns32k-sni-sysv fi exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm @@ -1162,11 +1210,11 @@ EOF exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv${UNAME_RELEASE} else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv${UNAME_RELEASE} fi - exit ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; @@ -1179,6 +1227,9 @@ EOF BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; @@ -1205,19 +1256,21 @@ EOF exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) @@ -1231,7 +1284,10 @@ EOF *:QNX:*:4*) echo i386-pc-qnx exit ;; - NSE-?:NONSTOP_KERNEL:*:*) + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) @@ -1276,13 +1332,13 @@ EOF echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} + echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` + UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; @@ -1300,11 +1356,11 @@ EOF i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; esac -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - eval $set_cc_for_build cat >$dummy.c < printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 - "4" + "4" #else - "" + "" #endif - ); exit (0); + ); exit (0); #endif #endif diff --git a/build-aux/config.rpath b/build-aux/config.rpath index 17298f2..c38b914 100755 --- a/build-aux/config.rpath +++ b/build-aux/config.rpath @@ -2,7 +2,7 @@ # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # -# Copyright 1996-2010 Free Software Foundation, Inc. +# Copyright 1996-2013 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # @@ -25,7 +25,7 @@ # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. -# All known linkers require a `.a' archive for static linking (except MSVC, +# All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so @@ -57,13 +57,6 @@ else aix*) wl='-Wl,' ;; - darwin*) - case $cc_basename in - xlc*) - wl='-Wl,' - ;; - esac - ;; mingw* | cygwin* | pw32* | os2* | cegcc*) ;; hpux9* | hpux10* | hpux11*) @@ -72,9 +65,7 @@ else irix5* | irix6* | nonstopux*) wl='-Wl,' ;; - newsos6) - ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in ecc*) wl='-Wl,' @@ -85,17 +76,26 @@ else lf95*) wl='-Wl,' ;; - pgcc | pgf77 | pgf90) + nagfor*) + wl='-Wl,-Wl,,' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) wl='-Wl,' ;; ccc*) wl='-Wl,' ;; + xl* | bgxl* | bgf* | mpixl*) + wl='-Wl,' + ;; como) wl='-lopt=' ;; *) case `$CC -V 2>&1 | sed 5q` in + *Sun\ F* | *Sun*Fortran*) + wl= + ;; *Sun\ C*) wl='-Wl,' ;; @@ -103,13 +103,24 @@ else ;; esac ;; + newsos6) + ;; + *nto* | *qnx*) + ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; rdos*) ;; solaris*) - wl='-Wl,' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + wl='-Qoption ld ' + ;; + *) + wl='-Wl,' + ;; + esac ;; sunos4*) wl='-Qoption ld ' @@ -171,15 +182,14 @@ if test "$with_gnu_ld" = yes; then fi ;; amigaos*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we cannot use - # them. - ld_shlibs=no + case "$host_cpu" in + powerpc) + ;; + m68k) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then @@ -198,11 +208,13 @@ if test "$with_gnu_ld" = yes; then ld_shlibs=no fi ;; + haiku*) + ;; interix[3-9]*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; - gnu* | linux* | k*bsd*-gnu) + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else @@ -325,10 +337,14 @@ else fi ;; amigaos*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - # see comment about different semantics on the GNU ld section - ld_shlibs=no + case "$host_cpu" in + powerpc) + ;; + m68k) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac ;; bsdi[45]*) ;; @@ -342,24 +358,15 @@ else ;; darwin* | rhapsody*) hardcode_direct=no - if test "$GCC" = yes ; then + if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then : else - case $cc_basename in - xlc*) - ;; - *) - ld_shlibs=no - ;; - esac + ld_shlibs=no fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; - freebsd1*) - ld_shlibs=no - ;; freebsd2.2*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes @@ -420,6 +427,8 @@ else hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; + *nto* | *qnx*) + ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes @@ -515,7 +524,12 @@ case "$host_os" in library_names_spec='$libname$shrext' ;; amigaos*) - library_names_spec='$libname.a' + case "$host_cpu" in + powerpc*) + library_names_spec='$libname$shrext' ;; + m68k) + library_names_spec='$libname.a' ;; + esac ;; beos*) library_names_spec='$libname$shrext' @@ -534,8 +548,6 @@ case "$host_os" in dgux*) library_names_spec='$libname$shrext' ;; - freebsd1*) - ;; freebsd* | dragonfly*) case "$host_os" in freebsd[123]*) @@ -547,6 +559,9 @@ case "$host_os" in gnu*) library_names_spec='$libname$shrext' ;; + haiku*) + library_names_spec='$libname$shrext' + ;; hpux9* | hpux10* | hpux11*) case $host_cpu in ia64*) @@ -582,7 +597,7 @@ case "$host_os" in ;; linux*oldld* | linux*aout* | linux*coff*) ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) library_names_spec='$libname$shrext' ;; knetbsd*-gnu) @@ -594,7 +609,7 @@ case "$host_os" in newsos6) library_names_spec='$libname$shrext' ;; - nto-qnx*) + *nto* | *qnx*) library_names_spec='$libname$shrext' ;; openbsd*) @@ -625,6 +640,9 @@ case "$host_os" in sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) library_names_spec='$libname$shrext' ;; + tpf*) + library_names_spec='$libname$shrext' + ;; uts4*) library_names_spec='$libname$shrext' ;; diff --git a/build-aux/config.sub b/build-aux/config.sub index c2d1257..9633db7 100755 --- a/build-aux/config.sub +++ b/build-aux/config.sub @@ -1,38 +1,31 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. +# Copyright 1992-2013 Free Software Foundation, Inc. -timestamp='2010-01-22' +timestamp='2013-08-10' -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. +# Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -75,9 +68,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -Software Foundation, Inc. +Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -124,13 +115,18 @@ esac # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] @@ -153,12 +149,12 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) + -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; - -bluegene*) - os=-cnk + -bluegene*) + os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= @@ -174,10 +170,10 @@ case $os in os=-chorusos basic_machine=$1 ;; - -chorusrdb) - os=-chorusrdb + -chorusrdb) + os=-chorusrdb basic_machine=$1 - ;; + ;; -hiux*) os=-hiuxwe2 ;; @@ -222,6 +218,12 @@ case $os in -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; -lynx*) os=-lynxos ;; @@ -246,20 +248,27 @@ case $basic_machine in # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ + | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | be32 | be64 \ | bfin \ - | c4x | clipper \ + | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ + | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -277,34 +286,45 @@ case $basic_machine in | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ - | nios | nios2 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ - | or32 \ + | open8 \ + | or1k | or32 \ | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ - | rx \ + | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ - | v850 | v850e \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -314,6 +334,21 @@ case $basic_machine in basic_machine=mt-unknown ;; + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. @@ -328,25 +363,30 @@ case $basic_machine in # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ + | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | be32-* | be64-* \ | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -364,30 +404,34 @@ case $basic_machine in | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ - | nios-* | nios2-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ - | romp-* | rs6000-* | rx-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile-* | tilegx-* \ + | tile*-* \ | tron-* \ | ubicom32-* \ - | v850-* | v850e-* | vax-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) @@ -412,7 +456,7 @@ case $basic_machine in basic_machine=a29k-amd os=-udi ;; - abacus) + abacus) basic_machine=abacus-unknown ;; adobe68k) @@ -482,11 +526,20 @@ case $basic_machine in basic_machine=powerpc-ibm os=-cnk ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; c90) basic_machine=c90-cray os=-unicos ;; - cegcc) + cegcc) basic_machine=arm-unknown os=-cegcc ;; @@ -518,7 +571,7 @@ case $basic_machine in basic_machine=craynv-cray os=-unicosmp ;; - cr16) + cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; @@ -676,7 +729,6 @@ case $basic_machine in i370-ibm* | ibm*) basic_machine=i370-ibm ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 @@ -734,11 +786,15 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; - microblaze) + microblaze*) basic_machine=microblaze-xilinx ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; mingw32) - basic_machine=i386-pc + basic_machine=i686-pc os=-mingw32 ;; mingw32ce) @@ -773,10 +829,18 @@ case $basic_machine in ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; + msys) + basic_machine=i686-pc + os=-msys + ;; mvs) basic_machine=i370-ibm os=-mvs ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 @@ -841,6 +905,12 @@ case $basic_machine in np1) basic_machine=np1-gould ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; nsr-tandem) basic_machine=nsr-tandem ;; @@ -923,9 +993,10 @@ case $basic_machine in ;; power) basic_machine=power-ibm ;; - ppc) basic_machine=powerpc-unknown + ppc | ppcbe) basic_machine=powerpc-unknown ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown @@ -950,7 +1021,11 @@ case $basic_machine in basic_machine=i586-unknown os=-pw32 ;; - rdos) + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) basic_machine=i386-pc os=-rdos ;; @@ -1019,6 +1094,9 @@ case $basic_machine in basic_machine=i860-stratus os=-sysv4 ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; sun2) basic_machine=m68000-sun ;; @@ -1075,25 +1153,8 @@ case $basic_machine in basic_machine=t90-cray os=-unicos ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - # This must be matched before tile*. - tilegx*) - basic_machine=tilegx-unknown - os=-linux-gnu - ;; tile*) - basic_machine=tile-unknown + basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) @@ -1163,6 +1224,9 @@ case $basic_machine in xps | xps100) basic_machine=xps100-honeywell ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; ymp) basic_machine=ymp-cray os=-unicos @@ -1260,11 +1324,11 @@ esac if [ x"$os" != x"" ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. + # First match some system type aliases + # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux + -auroraux) + os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` @@ -1288,20 +1352,21 @@ case $os in -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ + | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ + | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ @@ -1348,7 +1413,7 @@ case $os in -opened*) os=-openedition ;; - -os400*) + -os400*) os=-os400 ;; -wince*) @@ -1397,7 +1462,7 @@ case $os in -sinix*) os=-sysv4 ;; - -tpf*) + -tpf*) os=-tpf ;; -triton*) @@ -1433,17 +1498,14 @@ case $os in -aros*) os=-aros ;; - -kaos*) - os=-kaos - ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; - -nacl*) - ;; + -nacl*) + ;; -none) ;; *) @@ -1466,10 +1528,10 @@ else # system, and we'll never get to this point. case $basic_machine in - score-*) + score-*) os=-elf ;; - spu-*) + spu-*) os=-elf ;; *-acorn) @@ -1481,8 +1543,23 @@ case $basic_machine in arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff + c4x-* | tic4x-*) + os=-coff + ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff ;; # This must come before the *-dec entry. pdp10-*) @@ -1502,14 +1579,11 @@ case $basic_machine in ;; m68000-sun) os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 ;; m68*-cisco) os=-aout ;; - mep-*) + mep-*) os=-elf ;; mips*-cisco) @@ -1518,6 +1592,9 @@ case $basic_machine in mips*-*) os=-elf ;; + or1k-*) + os=-elf + ;; or32-*) os=-coff ;; @@ -1536,7 +1613,7 @@ case $basic_machine in *-ibm) os=-aix ;; - *-knuth) + *-knuth) os=-mmixware ;; *-wec) diff --git a/build-aux/depcomp b/build-aux/depcomp index df8eea7..4ebd5b3 100755 --- a/build-aux/depcomp +++ b/build-aux/depcomp @@ -1,10 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2009-04-28.21; # UTC +scriptversion=2013-05-30.07; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free -# Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,9 +27,9 @@ scriptversion=2009-04-28.21; # UTC case $1 in '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] @@ -40,11 +39,11 @@ as side-effects. Environment variables: depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. + source Source file read by 'PROGRAMS ARGS'. + object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. + tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . @@ -57,6 +56,66 @@ EOF ;; esac +# Get the directory component of the given path, and save it in the +# global variables '$dir'. Note that this directory component will +# be either empty or ending with a '/' character. This is deliberate. +set_dir_from () +{ + case $1 in + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; + *) dir=;; + esac +} + +# Get the suffix-stripped basename of the given path, and save it the +# global variable '$base'. +set_base_from () +{ + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` +} + +# If no dependency file was actually created by the compiler invocation, +# we still have to create a dummy depfile, to avoid errors with the +# Makefile "include basename.Plo" scheme. +make_dummy_depfile () +{ + echo "#dummy" > "$depfile" +} + +# Factor out some common post-processing of the generated depfile. +# Requires the auxiliary global variable '$tmpdepfile' to be set. +aix_post_process_depfile () +{ + # If the compiler actually managed to produce a dependency file, + # post-process it. + if test -f "$tmpdepfile"; then + # Each line is of the form 'foo.o: dependency.h'. + # Do two passes, one to just change these to + # $object: dependency.h + # and one to simply output + # dependency.h: + # which is needed to avoid the deleted-header problem. + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" + } > "$depfile" + rm -f "$tmpdepfile" + else + make_dummy_depfile + fi +} + +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' +# Character ranges might be problematic outside the C locale. +# These definitions help. +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ +lower=abcdefghijklmnopqrstuvwxyz +digits=0123456789 +alpha=${upper}${lower} + if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 @@ -69,6 +128,9 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" +# Avoid interferences from the environment. +gccflag= dashmflag= + # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case @@ -80,18 +142,32 @@ if test "$depmode" = hp; then fi if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then - # This is just like msvisualcpp but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u="sed s,\\\\\\\\,/,g" - depmode=msvisualcpp + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvisualcpp +fi + +if test "$depmode" = msvc7msys; then + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. + gccflag=-qmakedep=gcc,-MF + depmode=gcc fi case "$depmode" in @@ -114,8 +190,7 @@ gcc3) done "$@" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -123,13 +198,17 @@ gcc3) ;; gcc) +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). +## -MM, not -M (despite what the docs say). Also, it might not be +## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then @@ -137,31 +216,31 @@ gcc) fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. + # The second -e expression handles DOS-style file names with drive + # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. +## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory +## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as -## well. +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -179,8 +258,7 @@ sgi) "$@" -MDupdate "$tmpdepfile" fi stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -188,43 +266,41 @@ sgi) if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" - # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the + # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> "$depfile" + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ + | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" - # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" + make_dummy_depfile fi rm -f "$tmpdepfile" ;; +xlc) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the + # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + set_dir_from "$object" + set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u @@ -237,9 +313,7 @@ aix) "$@" -M fi stat=$? - - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi @@ -248,44 +322,100 @@ aix) do test -f "$tmpdepfile" && break done - if test -f "$tmpdepfile"; then - # Each line is of the form `foo.o: dependent.h'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" + aix_post_process_depfile + ;; + +tcc) + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 + # FIXME: That version still under development at the moment of writing. + # Make that this statement remains true also for stable, released + # versions. + # It will wrap lines (doesn't matter whether long or short) with a + # trailing '\', as in: + # + # foo.o : \ + # foo.c \ + # foo.h \ + # + # It will put a trailing '\' even on the last line, and will use leading + # spaces rather than leading tabs (at least since its commit 0394caf7 + # "Emit spaces for -MD"). + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat fi + rm -f "$depfile" + # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. + # We have to change lines of the first kind to '$object: \'. + sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" + # And for each line of the second kind, we have to emit a 'dep.h:' + # dummy dependency, to avoid the deleted-header problem. + sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; -icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want: - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output +## The order of this option in the case statement is important, since the +## shell code in configure will try each of these formats in the order +## listed in this file. A plain '-MD' option would be understood by many +## compilers, so we must ensure this comes after the gcc and icc options. +pgcc) + # Portland's C compiler understands '-MD'. + # Will always output deps to 'file.d' where file is the root name of the + # source file under compilation, even if file resides in a subdirectory. + # The object file name does not affect the name of the '.d' file. + # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : + # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... + set_dir_from "$object" + # Use the source, not the object, to determine the base name, since + # that's sadly what pgcc will do too. + set_base_from "$source" + tmpdepfile=$base.d - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else + # For projects that build the same source file twice into different object + # files, the pgcc approach of using the *source* file root name can cause + # problems in parallel builds. Use a locking strategy to avoid stomping on + # the same $tmpdepfile. + lockdir=$base.d-lock + trap " + echo '$0: caught signal, cleaning up...' >&2 + rmdir '$lockdir' + exit 1 + " 1 2 13 15 + numtries=100 + i=$numtries + while test $i -gt 0; do + # mkdir is a portable test-and-set. + if mkdir "$lockdir" 2>/dev/null; then + # This process acquired the lock. + "$@" -MD + stat=$? + # Release the lock. + rmdir "$lockdir" + break + else + # If the lock is being held by a different process, wait + # until the winning process is done or we timeout. + while test -d "$lockdir" && test $i -gt 0; do + sleep 1 + i=`expr $i - 1` + done + fi + i=`expr $i - 1` + done + trap - 1 2 13 15 + if test $i -le 0; then + echo "$0: failed to acquire lock after $numtries attempts" >&2 + echo "$0: check lockdir '$lockdir'" >&2 + exit 1 + fi + + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -297,8 +427,8 @@ icc) sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -309,9 +439,8 @@ hp2) # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + set_dir_from "$object" + set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d @@ -322,8 +451,7 @@ hp2) "$@" +Maked fi stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi @@ -333,77 +461,107 @@ hp2) test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. + sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" + # Add 'dependent.h:' lines. sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" else - echo "#dummy" > "$depfile" + make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in 'foo.d' instead, so we check for that too. + # Subdirectories are respected. + set_dir_from "$object" + set_base_from "$object" - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi + if test "$libtool" = yes; then + # Libtool generates 2 separate objects for the 2 libraries. These + # two compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir$base.o.d # libtool 1.5 + tmpdepfile2=$dir.libs/$base.o.d # Likewise. + tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + "$@" -MD + fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + # Same post-processing that is required for AIX mode. + aix_post_process_depfile + ;; + +msvc7) + if test "$libtool" = yes; then + showIncludes=-Wc,-showIncludes + else + showIncludes=-showIncludes + fi + "$@" $showIncludes > "$tmpdepfile" + stat=$? + grep -v '^Note: including file: ' "$tmpdepfile" + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The first sed program below extracts the file names and escapes + # backslashes for cygpath. The second sed program outputs the file + # name when reading, but also accumulates all include files in the + # hold buffer in order to output them again at the end. This only + # works with sed implementations that can handle large buffers. + sed < "$tmpdepfile" -n ' +/^Note: including file: *\(.*\)/ { + s//\1/ + s/\\/\\\\/g + p +}' | $cygpath_u | sort -u | sed -n ' +s/ /\\ /g +s/\(.*\)/'"$tab"'\1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { + s/.*/'"$tab"'/ + G + p +}' >> "$depfile" + echo >> "$depfile" # make sure the fragment doesn't end with a backslash + rm -f "$tmpdepfile" + ;; + +msvc7msys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; #nosideeffect) # This comment above is used by automake to tell side-effect @@ -422,7 +580,7 @@ dashmstdout) shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -442,18 +600,18 @@ dashmstdout) done test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' + # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + # Some versions of the HPUX 10.20 sed can't process this sed invocation + # correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -503,12 +661,15 @@ makedepend) touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + # makedepend may prepend the VPATH from the source file name to the object. + # No need to regex-escape $object, excess matching of '.' is harmless. + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process the last invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed '1,2d' "$tmpdepfile" \ + | tr ' ' "$nl" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; @@ -525,7 +686,7 @@ cpp) shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -544,10 +705,10 @@ cpp) esac done - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" + "$@" -E \ + | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" @@ -579,23 +740,23 @@ msvisualcpp) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; + set fnord "$@" + shift + shift + ;; *) - set fnord "$@" "$arg" - shift - shift - ;; + set fnord "$@" "$arg" + shift + shift + ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; diff --git a/build-aux/install-sh b/build-aux/install-sh index 6781b98..377bb86 100755 --- a/build-aux/install-sh +++ b/build-aux/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2009-04-28.21; # UTC +scriptversion=2011-11-20.07; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -35,7 +35,7 @@ scriptversion=2009-04-28.21; # UTC # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it +# 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written @@ -156,6 +156,10 @@ while test $# -ne 0; do -s) stripcmd=$stripprog;; -t) dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac shift;; -T) no_target_directory=true;; @@ -186,6 +190,10 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then fi shift # arg dst_arg=$arg + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac done fi @@ -194,13 +202,17 @@ if test $# -eq 0; then echo "$0: no input file specified." >&2 exit 1 fi - # It's OK to call `install-sh -d' without argument. + # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then - trap '(exit $?); exit' 1 2 13 15 + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. @@ -228,9 +240,9 @@ fi for src do - # Protect names starting with `-'. + # Protect names problematic for 'test' and other utilities. case $src in - -*) src=./$src;; + -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then @@ -252,12 +264,7 @@ do echo "$0: no destination specified." >&2 exit 1 fi - dst=$dst_arg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst;; - esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. @@ -347,7 +354,7 @@ do if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. + # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in @@ -385,7 +392,7 @@ do case $dstdir in /*) prefix='/';; - -*) prefix='./';; + [-=\(\)!]*) prefix='./';; *) prefix='';; esac @@ -403,7 +410,7 @@ do for d do - test -z "$d" && continue + test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then diff --git a/build-aux/missing b/build-aux/missing index 28055d2..cdea514 100755 --- a/build-aux/missing +++ b/build-aux/missing @@ -1,11 +1,10 @@ #! /bin/sh -# Common stub for a few missing GNU programs while installing. +# Common wrapper for a few potentially missing GNU programs. -scriptversion=2009-04-28.21; # UTC +scriptversion=2012-06-26.16; # UTC -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009 Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -26,69 +25,40 @@ scriptversion=2009-04-28.21; # UTC # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" + echo 1>&2 "Try '$0 --help' for more information" exit 1 fi -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -msg="missing on your system" - case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; + + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; + + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - autom4te touch the output file, or create a stub one - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man -Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and -\`g' are ignored when checking the name. +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. Send bug reports to ." exit $? @@ -100,272 +70,141 @@ Send bug reports to ." ;; -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" + echo 1>&2 "$0: unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac -# normalize program name to check for. -program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` +# Run the given program, remember its exit status. +"$@"; st=$? -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). This is about non-GNU programs, so use $1 not -# $program. -case $1 in - lex*|yacc*) - # Not GNU programs, they don't have --version. +# If it succeeded, we are done. +test $st -eq 0 && exit 0 + +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi + +perl_URL=http://www.perl.org/ +flex_URL=http://flex.sourceforge.net/ +gnu_software_URL=http://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'automa4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" ;; + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} - tar*) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $program in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te*) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison*|yacc*) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex*|flex*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit $? - fi - ;; - - makeinfo*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - tar*) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) diff --git a/build-aux/mkinstalldirs b/build-aux/mkinstalldirs index 4191a45..55d537f 100755 --- a/build-aux/mkinstalldirs +++ b/build-aux/mkinstalldirs @@ -81,9 +81,9 @@ case $dirmode in echo "mkdir -p -- $*" exec mkdir -p -- "$@" else - # On NextStep and OpenStep, the `mkdir' command does not + # On NextStep and OpenStep, the 'mkdir' command does not # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already + # directories to create, and then abort because '.' already # exists. test -d ./-p && rmdir ./-p test -d ./--version && rmdir ./--version diff --git a/build-aux/snippet/_Noreturn.h b/build-aux/snippet/_Noreturn.h new file mode 100644 index 0000000..c44ad89 --- /dev/null +++ b/build-aux/snippet/_Noreturn.h @@ -0,0 +1,10 @@ +#if !defined _Noreturn && __STDC_VERSION__ < 201112 +# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ + || 0x5110 <= __SUNPRO_C) +# define _Noreturn __attribute__ ((__noreturn__)) +# elif 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn +# endif +#endif diff --git a/build-aux/arg-nonnull.h b/build-aux/snippet/arg-nonnull.h similarity index 91% rename from build-aux/arg-nonnull.h rename to build-aux/snippet/arg-nonnull.h index 7e3e2db..8ea2a47 100644 --- a/build-aux/arg-nonnull.h +++ b/build-aux/snippet/arg-nonnull.h @@ -1,5 +1,5 @@ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2009-2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -9,7 +9,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. + General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ diff --git a/build-aux/c++defs.h b/build-aux/snippet/c++defs.h similarity index 99% rename from build-aux/c++defs.h rename to build-aux/snippet/c++defs.h index 0c2fad7..b35b933 100644 --- a/build-aux/c++defs.h +++ b/build-aux/snippet/c++defs.h @@ -1,5 +1,5 @@ /* C++ compatible function declaration macros. - Copyright (C) 2010 Free Software Foundation, Inc. + Copyright (C) 2010-2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -9,7 +9,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. + General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ diff --git a/build-aux/warn-on-use.h b/build-aux/snippet/warn-on-use.h similarity index 96% rename from build-aux/warn-on-use.h rename to build-aux/snippet/warn-on-use.h index 171e599..1736a1b 100644 --- a/build-aux/warn-on-use.h +++ b/build-aux/snippet/warn-on-use.h @@ -1,5 +1,5 @@ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010 Free Software Foundation, Inc. + Copyright (C) 2010-2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -9,7 +9,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. + General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ @@ -55,7 +55,7 @@ rather than issue the nice warning, but the end result of informing the developer about their portability problem is still achieved): #if HAVE_RAW_DECL_ENVIRON - static inline char ***rpl_environ (void) { return &environ; } + static char ***rpl_environ (void) { return &environ; } _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); # undef environ # define environ (*rpl_environ ()) diff --git a/build-aux/test-driver b/build-aux/test-driver new file mode 100755 index 0000000..32bf39e --- /dev/null +++ b/build-aux/test-driver @@ -0,0 +1,127 @@ +#! /bin/sh +# test-driver - basic testsuite driver script. + +scriptversion=2012-06-27.10; # UTC + +# Copyright (C) 2011-2013 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +# Make unconditional expansion of undefined variables an error. This +# helps a lot in preventing typo-related bugs. +set -u + +usage_error () +{ + echo "$0: $*" >&2 + print_usage >&2 + exit 2 +} + +print_usage () +{ + cat <$log_file 2>&1 +estatus=$? +if test $enable_hard_errors = no && test $estatus -eq 99; then + estatus=1 +fi + +case $estatus:$expect_failure in + 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; + 0:*) col=$grn res=PASS recheck=no gcopy=no;; + 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; + 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; + *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; + *:*) col=$red res=FAIL recheck=yes gcopy=yes;; +esac + +# Report outcome to console. +echo "${col}${res}${std}: $test_name" + +# Register the test result, and other relevant metadata. +echo ":test-result: $res" > $trs_file +echo ":global-test-result: $res" >> $trs_file +echo ":recheck: $recheck" >> $trs_file +echo ":copy-in-global-log: $gcopy" >> $trs_file + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/command.cfg.in b/command.cfg.in deleted file mode 100644 index aff33d2..0000000 --- a/command.cfg.in +++ /dev/null @@ -1,273 +0,0 @@ -############################################################################### -# COMMAND CONFIGURATION -# -# SYNTAX: -# command[]= -# -# = A short name used to identify the command -# = The actual command line. The command line doesn't have to -# be surrounded in quotes, but may contain quotes as needed within -# the command line. Take care to use single quotes at the -# outer edges of commands or you will have command line -# expansion problems when the command is executed by the shell. -# Any valid shell command can be used. Multiple commands can -# be separated with semicolons, piping is allowed. The -# command line can contain macros, but not are macros are valid -# at all time (notifications, service checks, etc). See the -# HTML documentaion for more informationon on using macros in -# commands. -# -# Note: Service check, service notification, host check, host notification, -# service event handler, and host event handler functions are all defined -# here. -# -# Note: Use the convertcfg program in the contrib directory of the Nagios -# distribution to convert this file into a object file format. -# -############################################################################### - -# Service notification command - send email with problem summary - -command[notify-by-email]=/bin/printf "$OUTPUT$" | /bin/mail -s '$SERVICESTATE$ alert for $HOSTALIAS$/$SERVICEDESC$' $CONTACTEMAIL$ - -# Service notification command - send email to alphanumeric pager -# gateway The notify-by-epager command assumes that each contact has a -# pager email gateway, and that the address has been entered into the -# appropriate contact field instead of an actual pager number. -# (i.e. 'pagejoe@nowhere.com' routes mail to Joe's alphanumeric pager) - -command[notify-by-epager]=/bin/echo "$OUTPUT$" | /bin/mail -s '$HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$' $CONTACTPAGER$ - -# Host notification commands (one for email, one for alphanumeric -# pager with email gateway) - -command[host-notify-by-email]=/bin/echo -e "***** Nagios *****\n\nHost "$HOSTALIAS$" is $HOSTSTATE$!\n\nDate/Time: $DATETIME$\n" | /bin/mail -s 'Host $HOSTNAME$ is $HOSTSTATE$!' $CONTACTEMAIL$ - -command[host-notify-by-epager]=/bin/echo '$HOSTALIAS$ is $HOSTSTATE$!' | /bin/mail -s 'Host $HOSTNAME$ is $HOSTSTATE$!' $CONTACTPAGER$ - - -## Send notifications to a pager using modem with Qpage (www.qpage.com) - -command[notify-by-qpage]=/usr/bin/printf "Service: %s\nHost: %s\nAddress: %s\nState: %s\nInfo: %s\nDate: %s" '$SERVICEDESC$' '$HOSTNAME$' '$HOSTADDRESS$' '$SERVICESTATE$' '$OUTPUT$' '$DATETIME' | /usr/local/bin/qpage -l 0 -p $CONTACTPAGER$ - -command[host-notify-by-qpage]=/usr/bin/printf "Host: %s is %s\nInfo: %s\nDate: %s" '$HOSTALIAS$' '$HOSTSTATES$' '$OUTPUT$' '$DATETIME' | /usr/local/bin/qpage -l 0 -p $CONTACTPAGER$ - -## Send notifications using SMSclient (www.smsclient.org) -command[notify-by-smsclient]=/usr/bin/sms_client -q $CONTACTPAGER$ "$NOTIFICATIONTYPE$: $HOSTADDRESS$ $HOSTALIAS$: $SERVICEDESC$ is $SERVICESTATE$" -command[host-notify-by-smsclient]=/usr/bin/sms_client -q $CONTACTPAGER$ "Host $HOSTALIAS$ is $HOSTSTATE$; $OUTPUT$; $DATETIME$" - - - - -# These are some example service check commands. See the HTML -# documentation on the plugins for examples of how to configure -# command definitions. - -command[check_tcp]=@libexecdir@/check_tcp -H $HOSTADDRESS$ -p $ARG1$ -command[check_udp]=@libexecdir@/check_udp -H $HOSTADDRESS$ -p $ARG1$ -command[check_ftp]=@libexecdir@/check_ftp -H $HOSTADDRESS$ -command[check_pop]=@libexecdir@/check_pop -H $HOSTADDRESS$ -command[check_smtp]=@libexecdir@/check_smtp -H $HOSTADDRESS$ -command[check_nntp]=@libexecdir@/check_nntp -H $HOSTADDRESS$ -command[check_telnet]=@libexecdir@/check_tcp -H $HOSTADDRESS$ -p 23 -command[check_users]=@libexecdir@/check_users -w $ARG1$ -c $ARG2$ -command[check_ntp]=@libexecdir@/check_ntp -H $HOSTADDRESS$ -command[check_ntp_ntpq]=@libexecdir@/check_ntp -H $HOSTADDRESS$ -j 10 -k 15 -command[check_flexlm]=@libexecdir@/check_flexlm -F $ARG1$ -command[check_hpjd]=@libexecdir@/check_hpjd -H $HOSTADDRESS$ -C public -command[check_mrtg]=@libexecdir@/check_mrtg $ARG1$ 10 AVG $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ -command[traffic_average]=@libexecdir@/check_mrtgtraf $ARG1$ 10 AVG $ARG2$ $ARG3$ $ARG4$ $ARG5$ -command[check_load]=@libexecdir@/check_load $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ - -command[check_disk]=@libexecdir@/check_disk -w 85% -c 95% -p $ARG1$ -command[check_dns]=@libexecdir@/check_dns -H www.yahoo.com -s $HOSTADDRESS$ -command[check_http]=@libexecdir@/check_http -H $HOSTADDRESS$ -I $HOSTADDRESS$ -command[check_http2]=@libexecdir@/check_http -H $ARG1$ -I $HOSTADDRESS$ -w $ARG2$ -c $ARG3$ -command[check_pgsql]=@libexecdir@/check_pgsql -H $HOSTADDRESS$ -command[check_ping]=@libexecdir@/check_ping -H $HOSTADDRESS$ -w 10:20% -c 60:100% -command[check_procs]=@libexecdir@/check_procs -w $ARG1$ -c $ARG2$ -command[check_procs_zombie]=@libexecdir@/check_procs -w $ARG1$ -c $ARG2$ -s Z -command[check_procs_httpd]=@libexecdir@/check_procs -w 5:$ARG1$ -c 1:$ARG2$ -C httpd -command[check_procs_vsz]=@libexecdir@/check_procs -w 8096 -c 16182 -C httpd --metric VSZ -command[check_ups]=@libexecdir@/check_ups -H $HOSTADDRESS$ -u $ARG1$ - -# An example of using check_by_ssh as an active service check -command[ssh_disk]=@libexecdir@/check_by_ssh -H $HOSTADDRESS$ -C '@libexecdir@/check_disk -w 85% -c 95% -p $ARG1$' - -# -# UCD_SNMP equivalents for some of the commands above -# - -command[snmp_load]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.2021.10.1.5.1,.1.3.6.1.4.1.2021.10.1.5.2,.1.3.6.1.4.1.2021.10.1.5.3 -w :$ARG2$,:$ARG3$,:$ARG4$ -w :$ARG5$,:$ARG6$,:$ARG7$ -l load - -command[snmp_cpustats]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.2021.11.9.0,.1.3.6.1.4.1.2021.11.10.0,.1.3.6.1.4.1.2021.11.11.0 -l 'CPU usage (user system idle)' -u '%' - -command[snmp_procname]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o 1.3.6.1.4.1.2021.2.1.5.$ARG2$ -w $ARG3$:$ARG4$ -c $ARG5$:$ARG6$ - -command[snmp_disk]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o 1.3.6.1.4.1.2021.9.1.7.$ARG1$,1.3.6.1.4.1.2021.9.1.9.$ARG1$ -w $ARG2$:,:$ARG3$ -c $ARG4$:,:$ARG5$ -u 'kB free (','% used)' -l 'disk space' - -command[snmp_mem]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.2021.4.6.0,.1.3.6.1.4.1.2021.4.5.0 -w $ARG2$: -c $ARG3$: - -command[snmp_swap]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.2021.4.4.0,.1.3.6.1.4.1.2021.4.3.0 -w $ARG2$: -c $ARG3$: - -# -# Slightly more generic SNMP OIDs -# note: using partial textual OIDs here - use numeric oids if you don't have MIBDIRS defined per Net-SNMP (net-snmp.org) - -command[snmp_procs]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrSystem.hrSystemProcesses -w :$ARG2$ -c :$ARG3$ -l processes - -command[snmp_users]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrSystem.hrSystemNumUsers -w :$ARG2$ -c :$ARG3$ -l users - -command[snmp_mem2]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.101,host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.101 -w $ARG2$ -c $ARG3$ - -command[snmp_swap2]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.102,host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.102 -w $ARG2$ -c $ARG3$ - -command[snmp_mem3]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.101,host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.101 -w $ARG2$ -c $ARG3$ - -command[snmp_swap3]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.102,host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.102 -w $ARG2$ -c $ARG3$ - -command[snmp_disk2]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.$ARG2$ -w $ARG3$ -c $ARG4$ - -command[snmp_tcpopen]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o tcp.tcpCurrEstab.0 -w $ARG2$ -c $ARG3$ - -command[snmp_tcpstats]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o tcp.tcpActiveOpens.0,tcp.tcpPassiveOpens.0,tcp.tcpInSegs.0,tcp.tcpOutSegs.0,tcp.tcpRetransSegs.0 -l 'TCP stats' - - -# Some snmp based network device checks (requires Net::SNMP perl module) - -# check all admin-up interfaces -command[check_ifstatus]=@libexecdir@/check_ifstatus -H $HOSTADDRESS$ -C public - -# check particular interface by snmp ifIndex key -command[check_ifoperstatus_ifindex]=@libexecdir@/check_ifoperstatus -H $HOSTADDRESS$ -C public -k $ARG1$ - -# check particular interface by snmp ifDescr value (verify uniqueness before using) -command[check_ifoperstatus_ifdescr]=@libexecdir@/check_ifoperstatus -H $HOSTADDRESS$ -C public -d $ARG1$ - -# verify all you BGP session on a device are running (only returns warning due to some hardcoded option - to be fixed soon) -command[check_snmp_bgpstate]=@libexecdir@/check_bgpstate -H $HOSTADDRESS$ -C public - -# -# SNMP NetApp checks (Jason Truong) -# -# -#command[check_netapp_uptime]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C public -o .1.3.6.1.2.1.1.3.0 --delimiter=')' -l "Uptime is" -# -#command[check_netapp_cpuload]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C public -o .1.3.6.1.4.1.789.1.2.1.3.0 -w 90 -c 95 -u '%' -l "CPU LOAD " -# -#command[check_netapp_numdisks]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C public -o .1.3.6.1.4.1.789.1.6.4.1.0,.1.3.6.1.4.1.789.1.6.4.2.0,.1.3.6.1.4.1.789.1.6.4.8.0,.1.3.6.1.4.1.789.1.6.4.7.0 -u 'Total Disks','Active','Spare','Failed' -l "" -# - -# -# SNMP Compaq Insight Agent (oids courtesy of vol) -# -# the following 4 return the following codes: other=1, ok=2, degraded=3, failed=4 -# -#command[check_compaq_thermalCondition]=@libexec@/check_snmp -H $HOSTADDRESS$ -C public -o .1.3.6.1.4.1.232.6.2.1.0,.1.3.6.1.4.1.232.6.2.2.0,.1.3.6.1.4.1.232.6.2.3.0,.1.3.6.1.4.1.232.6.2.4.0 -u 'ThermalCondition','ThermalTemp','ThermalSystem','ThermalCPUFan' -w 2:2,2:2,2:2,2:2 -c 1:2,1:2,1:2,1:2 -l "Thermal status " -# -# - - - -# This command checks to see if a host is "alive" by pinging it. The -# check must result in a 100% packet loss or 5 second (5000ms) round -# trip average to produce an error. - -# This command checks to see if a host is "alive" by pinging it. -command[check-host-alive]=@libexecdir@/check_ping -H $HOSTADDRESS$ -w 5000,100% -c 5000,100% -p 1 - -# This command checks to see if a printer is "alive" by pinging it. -command[check-printer-alive]=@libexecdir@/check_ping -H $HOSTADDRESS$ -w 5000,100% -c 5000,100% -p 1 - -# This command checks to see if a switch is "alive" by pinging it. -command[check-switch-alive]=@libexecdir@/check_ping $HOSTADDRESS$ -w 5000,100% -c 5000,100% -p 1 - -# This command checks to see if a router is "alive" by pinging it. -command[check-router-alive]=@libexecdir@/check_ping -H $HOSTADDRESS$ -w 5000,100% -c 5000,100% -p 1 - -# Check if a host is alive by doing a fast ping instead of a regular ping -command[check-fast-alive]=@libexecdir@/check_fping -H $HOSTADDRESS$ - -# Check if the IMAP service is alive (default port=143) -command[check-imap]=@libexecdir@/check_imap -H $HOSTADDRESS$ - -# Check RPC services -command[check-rpc]=@libexecdir@/check_rpc -H $HOSTADDRESS$ -C $ARG1$ - -# Check if the NFS server is running (version 2 and version 3) -command[check-nfs]=@libexecdir@/check_rpc -H $HOSTADDRESS$ -C nfs -c2,3 - -# Check game servers -command[check_quake]=@libexecdir@/check_game qs $HOSTADDRESS$ -command[check_unreal]=@libexecdir@/check_game uns $HOSTADDRESS$ -p $ARG1$ -pf 8 - -# Check a port that should be open -command[check_nmap]=@libexecdir@/check_nmap -H $HOSTADDRESS$ -t 30 -p $ARG1$ - -# Check a port that should be open and another that *could* be open, -# but no warning is given if optional port is closed. - -command[check_nmap_optional]=@libexecdir@/check_nmap -H $HOSTADDRESS$ -t 60 -p $ARG1$ -o $ARG2$ - -# Specify range to nmap -command[check_nmap_range]=@libexecdir@/check_nmap -H $HOSTADDRESS$ -t 60 -p $ARG1$ -r $ARG2$ - -# Specify both optional and range -command[check_nmap_opt_range]=@libexecdir@/check_nmap -H $HOSTADDRESS$ -t 60 -p $ARG1$ -o $ARG2$ -r$ARG3$ - -# Check Radius -command[check_radius]=@libexecdir@/check_radius $ARG1$ $ARG2$ $HOSTADDRESS$ 1812 $ARG3$ - - -# Check HTTP proxy -# This is a command for checking squid or other proxy servers which uses check -# http to ensure an HTTP 200 comes back ..... i.e. squid actually -# serves the page and not an error message. -# Using check_http will allow verification of authenticated proxies -# -# Note:: This used to call "check_reply" which was pretty close to check_tcp -# The functionality of check_reply has been merged into check_tcp - -command[check_squid]=@libexecdir@/check_http -H $HOSTADDRESS$ -p $ARG1$ -u $ARG2$ -e 'HTTP/1.0 200 OK' - - -## Check RealAudio url -command[check_real_url]=@libexecdir@/check_real $HOSTADDRESS$ -p $ARG1$ -wt $ARG2$ -ct $ARG3$ -to 5 -u $ARG4$ - -## Check RealAudio server response -command[check_real]=@libexecdir@/check_real $HOSTADDRESS$ -p $ARG1$ -wt $ARG2$ -ct $ARG3$ -to 5 - -# NetWare checks via check_nwstat ( see "check_nwstat -h" for more options) -# how many current logins -command[check_netware_logins]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v "LOGINS" -w $ARG1$ -c $ARG2$ -# how many current connections -command[check_nwstat_conns]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v CONNS -w $ARG1$ -c $ARG2$ -# 1 minute avg cpu load -command[check_netware_1load]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v "LOAD1" -w 70 -c 90 -# 5 minute avg cpu load -command[check_netware_5load]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v "LOAD5" -w 70 -c 90 -# 15 minute avg cpu load -command[check_netware_15load]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v "LOAD15" -w 70 -c 90 -# Disk volume (% free) -command[check_nwstat_vol_p]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v VPF$ARG1$ -w $ARG2$ -c $ARG3$ -# Disk volume (KB free) -command[check_nwstat_vol_k]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v VKF$ARG1$ -w $ARG2$ -c $ARG3$ -# % Long term cache hits -command[check_nwstat_ltch]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v LTCH -w $ARG1$ -c $ARG2$ -# % (of max) used packet receive buffers -command[check_nwstat_puprb]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v PUPRB -w $ARG1$ -c $ARG2$ -# Check to see if the DS database is open -command[check_nwstat_dsdb]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v DSDB - - - -# Netware 5 abends -command[check_netware_abend]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v "ABENDS" -w 10 -c 30 -# Netware 5 number of current service procs -command[check_nwstat_csprocs]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v CSPROCS -w $ARG1$ -c $ARG2$ - - -# Still have to write sample entries for the following: -# -# check_ldap -# check_overcr diff --git a/config.h.in b/config.h.in index f460bd5..ece9d78 100644 --- a/config.h.in +++ b/config.h.in @@ -1,9 +1,5 @@ /* config.h.in. Generated from configure.in by autoheader. */ -/* Define if the compiler is building for multiple architectures of Apple - platforms at once. */ -#undef AA_APPLE_UNIVERSAL_BUILD - /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD @@ -39,8 +35,12 @@ /* Define to 1 if using `alloca.c'. */ #undef C_ALLOCA -/* Define to 1 if using `getloadavg.c'. */ -#undef C_GETLOADAVG +/* Define as the bit index in the word where to find bit 0 of the exponent of + 'double'. */ +#undef DBL_EXPBIT0_BIT + +/* Define as the word index where to find the exponent of 'double'. */ +#undef DBL_EXPBIT0_WORD /* Define to 1 for DGUX with . */ #undef DGUX @@ -52,57 +52,48 @@ language is requested. */ #undef ENABLE_NLS -/* Define this to 1 if F_DUPFD behavior does not match POSIX */ -#undef FCNTL_DUPFD_BUGGY - -/* Define on systems for which file names may have a so-called `drive letter' - prefix, define this to compute the length of that prefix, including the - colon. */ -#undef FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX - -/* Define if the backslash character may also serve as a file name component - separator. */ -#undef FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR - -/* Define if a drive letter prefix denotes a relative path if it is not - followed by a file name component separator. */ -#undef FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE - -/* Define to 1 if the `getloadavg' function needs to be run setuid or setgid. - */ -#undef GETLOADAVG_PRIVILEGED +/* Define to 1 if nl_langinfo (YESEXPR) returns a non-empty string. */ +#undef FUNC_NL_LANGINFO_YESEXPR_WORKS /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module dirname shall be considered present. */ #undef GNULIB_DIRNAME /* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fcntl-safer shall be considered present. */ -#undef GNULIB_FCNTL_SAFER + whether the gnulib module fscanf shall be considered present. */ +#undef GNULIB_FSCANF -/* Define to indicate the 'malloc' module. */ +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module lock shall be considered present. */ +#undef GNULIB_LOCK + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module malloc-gnu shall be considered present. */ #undef GNULIB_MALLOC_GNU +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module scanf shall be considered present. */ +#undef GNULIB_SCANF + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module snprintf shall be considered present. */ +#undef GNULIB_SNPRINTF + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module strerror shall be considered present. */ +#undef GNULIB_STRERROR + /* Define to 1 when the gnulib module btowc should be tested. */ #undef GNULIB_TEST_BTOWC -/* Define to 1 when the gnulib module cloexec should be tested. */ -#undef GNULIB_TEST_CLOEXEC - -/* Define to 1 when the gnulib module dup2 should be tested. */ -#undef GNULIB_TEST_DUP2 - /* Define to 1 when the gnulib module environ should be tested. */ #undef GNULIB_TEST_ENVIRON -/* Define to 1 when the gnulib module fcntl should be tested. */ -#undef GNULIB_TEST_FCNTL - /* Define to 1 when the gnulib module floorf should be tested. */ #undef GNULIB_TEST_FLOORF -/* Define to 1 when the gnulib module getdtablesize should be tested. */ -#undef GNULIB_TEST_GETDTABLESIZE +/* Define to 1 when the gnulib module getaddrinfo should be tested. */ +#undef GNULIB_TEST_GETADDRINFO /* Define to 1 when the gnulib module gethostname should be tested. */ #undef GNULIB_TEST_GETHOSTNAME @@ -113,6 +104,9 @@ /* Define to 1 when the gnulib module getopt-gnu should be tested. */ #undef GNULIB_TEST_GETOPT_GNU +/* Define to 1 when the gnulib module localeconv should be tested. */ +#undef GNULIB_TEST_LOCALECONV + /* Define to 1 when the gnulib module malloc-posix should be tested. */ #undef GNULIB_TEST_MALLOC_POSIX @@ -122,6 +116,9 @@ /* Define to 1 when the gnulib module mbsinit should be tested. */ #undef GNULIB_TEST_MBSINIT +/* Define to 1 when the gnulib module mbtowc should be tested. */ +#undef GNULIB_TEST_MBTOWC + /* Define to 1 when the gnulib module memchr should be tested. */ #undef GNULIB_TEST_MEMCHR @@ -131,8 +128,8 @@ /* Define to 1 when the gnulib module nl_langinfo should be tested. */ #undef GNULIB_TEST_NL_LANGINFO -/* Define to 1 when the gnulib module open should be tested. */ -#undef GNULIB_TEST_OPEN +/* Define to 1 when the gnulib module read should be tested. */ +#undef GNULIB_TEST_READ /* Define to 1 when the gnulib module setenv should be tested. */ #undef GNULIB_TEST_SETENV @@ -140,12 +137,6 @@ /* Define to 1 when the gnulib module snprintf should be tested. */ #undef GNULIB_TEST_SNPRINTF -/* Define to 1 when the gnulib module stat should be tested. */ -#undef GNULIB_TEST_STAT - -/* Define to 1 when the gnulib module strdup should be tested. */ -#undef GNULIB_TEST_STRDUP - /* Define to 1 when the gnulib module strerror should be tested. */ #undef GNULIB_TEST_STRERROR @@ -179,12 +170,6 @@ /* Define to 1 when the gnulib module wcrtomb should be tested. */ #undef GNULIB_TEST_WCRTOMB -/* Define to 1 when the gnulib module write should be tested. */ -#undef GNULIB_TEST_WRITE - -/* Define to 1 if you have the `alarm' function. */ -#undef HAVE_ALARM - /* Define to 1 if you have 'alloca' after including , a header that may be supplied by this distribution. */ #undef HAVE_ALLOCA @@ -199,14 +184,14 @@ /* Define to 1 if you have the header file. */ #undef HAVE_BP_SYM_H -/* Define to 1 if you have the `btowc' function. */ +/* Define to 1 if you have the 'btowc' function. */ #undef HAVE_BTOWC -/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the +/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework. */ #undef HAVE_CFLOCALECOPYCURRENT -/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework. */ #undef HAVE_CFPREFERENCESCOPYAPPVALUE @@ -220,6 +205,10 @@ */ #undef HAVE_DCGETTEXT +/* Define to 1 if you have the declaration of `alarm', and to 0 if you don't. + */ +#undef HAVE_DECL_ALARM + /* Define to 1 if you have the declaration of `floorf', and to 0 if you don't. */ #undef HAVE_DECL_FLOORF @@ -232,6 +221,10 @@ don't. */ #undef HAVE_DECL_GAI_STRERROR +/* Define to 1 if you have the declaration of `gai_strerrorA', and to 0 if you + don't. */ +#undef HAVE_DECL_GAI_STRERRORA + /* Define to 1 if you have the declaration of `getaddrinfo', and to 0 if you don't. */ #undef HAVE_DECL_GETADDRINFO @@ -248,10 +241,6 @@ don't. */ #undef HAVE_DECL_GETNAMEINFO -/* Define to 1 if you have the declaration of `getopt_clip', and to 0 if you - don't. */ -#undef HAVE_DECL_GETOPT_CLIP - /* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you don't. */ #undef HAVE_DECL_INET_NTOP @@ -260,22 +249,26 @@ don't. */ #undef HAVE_DECL_ISBLANK -/* Define to 1 if you have the declaration of `optreset', and to 0 if you +/* Define to 1 if you have the declaration of `localtime_r', and to 0 if you don't. */ -#undef HAVE_DECL_OPTRESET +#undef HAVE_DECL_LOCALTIME_R + +/* Define to 1 if you have the declaration of `mbrtowc', and to 0 if you + don't. */ +#undef HAVE_DECL_MBRTOWC + +/* Define to 1 if you have the declaration of `mbsinit', and to 0 if you + don't. */ +#undef HAVE_DECL_MBSINIT + +/* Define to 1 if you have the declaration of `setenv', and to 0 if you don't. + */ +#undef HAVE_DECL_SETENV /* Define to 1 if you have the declaration of `snprintf', and to 0 if you don't. */ #undef HAVE_DECL_SNPRINTF -/* Define to 1 if you have the declaration of `strdup', and to 0 if you don't. - */ -#undef HAVE_DECL_STRDUP - -/* Define to 1 if you have the declaration of `strerror', and to 0 if you - don't. */ -#undef HAVE_DECL_STRERROR - /* Define to 1 if you have the declaration of `strerror_r', and to 0 if you don't. */ #undef HAVE_DECL_STRERROR_R @@ -296,10 +289,22 @@ don't. */ #undef HAVE_DECL_SYSCONF +/* Define to 1 if you have the declaration of `towlower', and to 0 if you + don't. */ +#undef HAVE_DECL_TOWLOWER + +/* Define to 1 if you have the declaration of `unsetenv', and to 0 if you + don't. */ +#undef HAVE_DECL_UNSETENV + /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #undef HAVE_DECL_VSNPRINTF +/* Define to 1 if you have the declaration of `wcrtomb', and to 0 if you + don't. */ +#undef HAVE_DECL_WCRTOMB + /* Define to 1 if you have the declaration of `_snprintf', and to 0 if you don't. */ #undef HAVE_DECL__SNPRINTF @@ -307,9 +312,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the `dup2' function. */ -#undef HAVE_DUP2 - /* Define to 1 if you have the header file. */ #undef HAVE_DUSTAT_H @@ -322,18 +324,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_ERR_H -/* Define to 1 if you have the `fcntl' function. */ -#undef HAVE_FCNTL - -/* Define to 1 if you have the header file. */ -#undef HAVE_FCNTL_H - /* Define to 1 if you have the header file. */ #undef HAVE_FEATURES_H -/* Define to 1 if you have the header file. */ -#undef HAVE_FLOAT_H - /* Define to 1 if you have the `floor' function. */ #undef HAVE_FLOOR @@ -343,18 +336,12 @@ /* Define to 1 if you have the `fs_stat_dev' function. */ #undef HAVE_FS_STAT_DEV -/* Define to 1 if you have the `getdtablesize' function. */ -#undef HAVE_GETDTABLESIZE - /* Define to 1 if you have the `gethostbyname' function. */ #undef HAVE_GETHOSTBYNAME /* Define to 1 if you have the `gethostname' function. */ #undef HAVE_GETHOSTNAME -/* Define to 1 if you have the `getloadavg' function. */ -#undef HAVE_GETLOADAVG - /* Define to 1 if you have the `getmntent' function. */ #undef HAVE_GETMNTENT @@ -388,11 +375,6 @@ /* Define to 1 if you have the `inet_ntop' function. */ #undef HAVE_INET_NTOP -/* Define to 1 if the compiler supports one of the keywords 'inline', - '__inline__', '__inline' and effectively inlines functions marked as such. - */ -#undef HAVE_INLINE - /* Define if you have the 'intmax_t' type in or . */ #undef HAVE_INTMAX_T @@ -409,16 +391,13 @@ /* Define to 1 if defines AF_INET6. */ #undef HAVE_IPV6 -/* Define to 1 if you have the `isblank' function. */ +/* Define to 1 if you have the 'isblank' function. */ #undef HAVE_ISBLANK -/* Define to 1 if you have the `iswblank' function. */ -#undef HAVE_ISWBLANK - -/* Define to 1 if you have the `iswcntrl' function. */ +/* Define to 1 if you have the 'iswcntrl' function. */ #undef HAVE_ISWCNTRL -/* Define to 1 if you have the `iswctype' function. */ +/* Define to 1 if you have the 'iswctype' function. */ #undef HAVE_ISWCTYPE /* Define to 1 if you have the header file. */ @@ -448,6 +427,9 @@ /* Define to 1 if you have the `crypto' library (-lcrypto). */ #undef HAVE_LIBCRYPTO +/* Define to 1 if you have the `dbi' library (-ldbi). */ +#undef HAVE_LIBDBI + /* Define to 1 if you have the `dgc' library (-ldgc). */ #undef HAVE_LIBDGC @@ -485,24 +467,18 @@ /* Define to 1 if you have the `listmntent' function. */ #undef HAVE_LISTMNTENT -/* Define to 1 if you have the header file. */ -#undef HAVE_LOCALE_H - -/* Define to 1 if you have the `localtime_r' function. */ +/* Define to 1 if you have the 'localtime_r' function. */ #undef HAVE_LOCALTIME_R -/* Define to 1 if the system has the type `long long int'. */ +/* Define to 1 if the system has the type 'long long int'. */ #undef HAVE_LONG_LONG_INT -/* Define to 1 if you have the `lstat' function. */ -#undef HAVE_LSTAT - /* Define to 1 if you have the header file. */ #undef HAVE_MACH_MACH_H -/* Define to 1 if your system has a GNU libc compatible `malloc' function, and +/* Define to 1 if your system has a GNU libc compatible 'malloc' function, and to 0 otherwise. */ -#undef HAVE_MALLOC +#undef HAVE_MALLOC_GNU /* Define if the 'malloc' function is POSIX compliant. */ #undef HAVE_MALLOC_POSIX @@ -517,15 +493,12 @@ /* Define to 1 if you have the `mbrtowc' function. */ #undef HAVE_MBRTOWC -/* Define to 1 if you have the `mbsinit' function. */ +/* Define to 1 if you have the 'mbsinit' function. */ #undef HAVE_MBSINIT /* Define to 1 if declares mbstate_t. */ #undef HAVE_MBSTATE_T -/* Define to 1 if you have the `memchr' function. */ -#undef HAVE_MEMCHR - /* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE @@ -535,12 +508,16 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MNTENT_H -/* Define to 1 if you have the `mprotect' function. */ +/* Define to 1 if you have the 'mprotect' function. */ #undef HAVE_MPROTECT /* Define to 1 if you have the header file. */ #undef HAVE_MP_H +/* Define to 1 on MSVC platforms that have the "invalid parameter handler" + concept. */ +#undef HAVE_MSVC_INVALID_PARAMETER_HANDLER + /* Defined if mysqlclient is found and can compile */ #undef HAVE_MYSQLCLIENT @@ -556,7 +533,7 @@ /* Define to 1 if you have the header file. */ #undef HAVE_NLIST_H -/* Define to 1 if you have the `nl_langinfo' function. */ +/* Define to 1 if you have the 'nl_langinfo' function. */ #undef HAVE_NL_LANGINFO /* Define to 1 if you have the header file. */ @@ -583,9 +560,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_PGSQL_LIBPQ_FE_H -/* Define to 1 if you have the `pipe' function. */ -#undef HAVE_PIPE - /* Define to 1 if you have the `poll' function. */ #undef HAVE_POLL @@ -598,8 +572,11 @@ /* Define to 1 if you have the `pstat_getdynamic' function. */ #undef HAVE_PSTAT_GETDYNAMIC -/* Define to 1 if you have the header file. */ -#undef HAVE_RANDOM_H +/* Define if the defines PTHREAD_MUTEX_RECURSIVE. */ +#undef HAVE_PTHREAD_MUTEX_RECURSIVE + +/* Define if the POSIX multithreading library has read/write locks. */ +#undef HAVE_PTHREAD_RWLOCK /* Define to 1 if accept is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ACCEPT @@ -607,12 +584,21 @@ /* Define to 1 if accept4 is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ACCEPT4 +/* Define to 1 if acosf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ACOSF + /* Define to 1 if acosl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ACOSL +/* Define to 1 if asinf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ASINF + /* Define to 1 if asinl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ASINL +/* Define to 1 if atanf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ATANF + /* Define to 1 if atanl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ATANL @@ -629,24 +615,54 @@ macros. */ #undef HAVE_RAW_DECL_CANONICALIZE_FILE_NAME +/* Define to 1 if cbrt is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_CBRT + +/* Define to 1 if cbrtf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_CBRTF + +/* Define to 1 if cbrtl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_CBRTL + /* Define to 1 if ceilf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_CEILF /* Define to 1 if ceill is declared even after undefining macros. */ #undef HAVE_RAW_DECL_CEILL +/* Define to 1 if chdir is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_CHDIR + /* Define to 1 if chown is declared even after undefining macros. */ #undef HAVE_RAW_DECL_CHOWN /* Define to 1 if connect is declared even after undefining macros. */ #undef HAVE_RAW_DECL_CONNECT +/* Define to 1 if copysign is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_COPYSIGN + +/* Define to 1 if copysignf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_COPYSIGNF + +/* Define to 1 if copysignl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_COPYSIGNL + +/* Define to 1 if cosf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_COSF + +/* Define to 1 if coshf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_COSHF + /* Define to 1 if cosl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_COSL /* Define to 1 if dprintf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_DPRINTF +/* Define to 1 if dup is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_DUP + /* Define to 1 if dup2 is declared even after undefining macros. */ #undef HAVE_RAW_DECL_DUP2 @@ -665,23 +681,53 @@ /* Define to 1 if euidaccess is declared even after undefining macros. */ #undef HAVE_RAW_DECL_EUIDACCESS +/* Define to 1 if exp2 is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_EXP2 + +/* Define to 1 if exp2f is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_EXP2F + +/* Define to 1 if exp2l is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_EXP2L + +/* Define to 1 if expf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_EXPF + /* Define to 1 if expl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_EXPL +/* Define to 1 if expm1 is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_EXPM1 + +/* Define to 1 if expm1f is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_EXPM1F + +/* Define to 1 if expm1l is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_EXPM1L + +/* Define to 1 if fabsf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FABSF + +/* Define to 1 if fabsl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FABSL + /* Define to 1 if faccessat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FACCESSAT /* Define to 1 if fchdir is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FCHDIR -/* Define to 1 if fchmodat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_FCHMODAT - /* Define to 1 if fchownat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FCHOWNAT -/* Define to 1 if fcntl is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_FCNTL +/* Define to 1 if fdatasync is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FDATASYNC + +/* Define to 1 if ffsl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FFSL + +/* Define to 1 if ffsll is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FFSLL /* Define to 1 if floorf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FLOORF @@ -689,21 +735,39 @@ /* Define to 1 if floorl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FLOORL +/* Define to 1 if fma is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FMA + +/* Define to 1 if fmaf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FMAF + +/* Define to 1 if fmal is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FMAL + +/* Define to 1 if fmod is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FMOD + +/* Define to 1 if fmodf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FMODF + +/* Define to 1 if fmodl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FMODL + /* Define to 1 if fpurge is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FPURGE /* Define to 1 if freeaddrinfo is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FREEADDRINFO +/* Define to 1 if frexpf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FREXPF + /* Define to 1 if frexpl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FREXPL /* Define to 1 if fseeko is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FSEEKO -/* Define to 1 if fstatat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_FSTATAT - /* Define to 1 if fsync is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FSYNC @@ -713,9 +777,6 @@ /* Define to 1 if ftruncate is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FTRUNCATE -/* Define to 1 if futimens is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_FUTIMENS - /* Define to 1 if gai_strerror is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GAI_STRERROR @@ -761,6 +822,9 @@ /* Define to 1 if getpeername is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETPEERNAME +/* Define to 1 if gets is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GETS + /* Define to 1 if getsockname is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETSOCKNAME @@ -776,21 +840,48 @@ /* Define to 1 if grantpt is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GRANTPT +/* Define to 1 if group_member is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GROUP_MEMBER + +/* Define to 1 if hypotf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_HYPOTF + +/* Define to 1 if hypotl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_HYPOTL + +/* Define to 1 if ilogb is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ILOGB + +/* Define to 1 if ilogbf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ILOGBF + +/* Define to 1 if ilogbl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ILOGBL + /* Define to 1 if inet_ntop is declared even after undefining macros. */ #undef HAVE_RAW_DECL_INET_NTOP /* Define to 1 if inet_pton is declared even after undefining macros. */ #undef HAVE_RAW_DECL_INET_PTON -/* Define to 1 if initstat_r is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_INITSTAT_R +/* Define to 1 if initstate is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_INITSTATE -/* Define to 1 if lchmod is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_LCHMOD +/* Define to 1 if initstate_r is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_INITSTATE_R + +/* Define to 1 if isatty is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ISATTY + +/* Define to 1 if iswctype is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ISWCTYPE /* Define to 1 if lchown is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LCHOWN +/* Define to 1 if ldexpf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LDEXPF + /* Define to 1 if ldexpl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LDEXPL @@ -803,18 +894,54 @@ /* Define to 1 if listen is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LISTEN +/* Define to 1 if log is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOG + +/* Define to 1 if log10 is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOG10 + +/* Define to 1 if log10f is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOG10F + +/* Define to 1 if log10l is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOG10L + +/* Define to 1 if log1p is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOG1P + +/* Define to 1 if log1pf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOG1PF + +/* Define to 1 if log1pl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOG1PL + +/* Define to 1 if log2 is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOG2 + +/* Define to 1 if log2f is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOG2F + +/* Define to 1 if log2l is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOG2L + /* Define to 1 if logb is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LOGB +/* Define to 1 if logbf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOGBF + +/* Define to 1 if logbl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOGBL + +/* Define to 1 if logf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOGF + /* Define to 1 if logl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LOGL /* Define to 1 if lseek is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LSEEK -/* Define to 1 if lstat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_LSTAT - /* Define to 1 if mbrlen is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MBRLEN @@ -839,24 +966,9 @@ /* Define to 1 if memrchr is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MEMRCHR -/* Define to 1 if mkdirat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MKDIRAT - /* Define to 1 if mkdtemp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKDTEMP -/* Define to 1 if mkfifo is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MKFIFO - -/* Define to 1 if mkfifoat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MKFIFOAT - -/* Define to 1 if mknod is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MKNOD - -/* Define to 1 if mknodat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MKNODAT - /* Define to 1 if mkostemp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKOSTEMP @@ -869,11 +981,23 @@ /* Define to 1 if mkstemps is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKSTEMPS +/* Define to 1 if modf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_MODF + +/* Define to 1 if modff is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_MODFF + +/* Define to 1 if modfl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_MODFL + /* Define to 1 if nl_langinfo is declared even after undefining macros. */ #undef HAVE_RAW_DECL_NL_LANGINFO -/* Define to 1 if openat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_OPENAT +/* Define to 1 if pclose is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_PCLOSE + +/* Define to 1 if pipe is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_PIPE /* Define to 1 if pipe2 is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PIPE2 @@ -881,15 +1005,27 @@ /* Define to 1 if popen is declared even after undefining macros. */ #undef HAVE_RAW_DECL_POPEN +/* Define to 1 if posix_openpt is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_POSIX_OPENPT + +/* Define to 1 if powf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_POWF + /* Define to 1 if pread is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PREAD /* Define to 1 if ptsname is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PTSNAME +/* Define to 1 if ptsname_r is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_PTSNAME_R + /* Define to 1 if pwrite is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PWRITE +/* Define to 1 if random is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_RANDOM + /* Define to 1 if random_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RANDOM_R @@ -911,9 +1047,27 @@ /* Define to 1 if recvfrom is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RECVFROM +/* Define to 1 if remainder is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_REMAINDER + +/* Define to 1 if remainderf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_REMAINDERF + +/* Define to 1 if remainderl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_REMAINDERL + /* Define to 1 if renameat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RENAMEAT +/* Define to 1 if rint is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_RINT + +/* Define to 1 if rintf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_RINTF + +/* Define to 1 if rintl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_RINTL + /* Define to 1 if rmdir is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RMDIR @@ -929,6 +1083,9 @@ /* Define to 1 if rpmatch is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RPMATCH +/* Define to 1 if secure_getenv is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SECURE_GETENV + /* Define to 1 if send is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SEND @@ -938,9 +1095,18 @@ /* Define to 1 if setenv is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SETENV +/* Define to 1 if sethostname is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SETHOSTNAME + +/* Define to 1 if setlocale is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SETLOCALE + /* Define to 1 if setsockopt is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SETSOCKOPT +/* Define to 1 if setstate is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SETSTATE + /* Define to 1 if setstate_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SETSTATE_R @@ -950,6 +1116,12 @@ /* Define to 1 if shutdown is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SHUTDOWN +/* Define to 1 if sinf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SINF + +/* Define to 1 if sinhf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SINHF + /* Define to 1 if sinl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SINL @@ -962,15 +1134,18 @@ /* Define to 1 if socket is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SOCKET +/* Define to 1 if sqrtf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SQRTF + /* Define to 1 if sqrtl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SQRTL +/* Define to 1 if srandom is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SRANDOM + /* Define to 1 if srandom_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SRANDOM_R -/* Define to 1 if stat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STAT - /* Define to 1 if stpcpy is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STPCPY @@ -986,6 +1161,9 @@ /* Define to 1 if strdup is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRDUP +/* Define to 1 if strerror_r is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_STRERROR_R + /* Define to 1 if strncat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRNCAT @@ -1025,12 +1203,21 @@ /* Define to 1 if symlinkat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SYMLINKAT +/* Define to 1 if tanf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_TANF + +/* Define to 1 if tanhf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_TANHF + /* Define to 1 if tanl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_TANL /* Define to 1 if tmpfile is declared even after undefining macros. */ #undef HAVE_RAW_DECL_TMPFILE +/* Define to 1 if towctrans is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_TOWCTRANS + /* Define to 1 if trunc is declared even after undefining macros. */ #undef HAVE_RAW_DECL_TRUNC @@ -1058,30 +1245,120 @@ /* Define to 1 if usleep is declared even after undefining macros. */ #undef HAVE_RAW_DECL_USLEEP -/* Define to 1 if utimensat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_UTIMENSAT - /* Define to 1 if vdprintf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_VDPRINTF /* Define to 1 if vsnprintf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_VSNPRINTF +/* Define to 1 if wcpcpy is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCPCPY + +/* Define to 1 if wcpncpy is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCPNCPY + /* Define to 1 if wcrtomb is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCRTOMB +/* Define to 1 if wcscasecmp is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSCASECMP + +/* Define to 1 if wcscat is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSCAT + +/* Define to 1 if wcschr is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSCHR + +/* Define to 1 if wcscmp is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSCMP + +/* Define to 1 if wcscoll is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSCOLL + +/* Define to 1 if wcscpy is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSCPY + +/* Define to 1 if wcscspn is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSCSPN + +/* Define to 1 if wcsdup is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSDUP + +/* Define to 1 if wcslen is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSLEN + +/* Define to 1 if wcsncasecmp is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSNCASECMP + +/* Define to 1 if wcsncat is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSNCAT + +/* Define to 1 if wcsncmp is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSNCMP + +/* Define to 1 if wcsncpy is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSNCPY + +/* Define to 1 if wcsnlen is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSNLEN + /* Define to 1 if wcsnrtombs is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSNRTOMBS +/* Define to 1 if wcspbrk is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSPBRK + +/* Define to 1 if wcsrchr is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSRCHR + /* Define to 1 if wcsrtombs is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSRTOMBS +/* Define to 1 if wcsspn is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSSPN + +/* Define to 1 if wcsstr is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSSTR + +/* Define to 1 if wcstok is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSTOK + +/* Define to 1 if wcswidth is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSWIDTH + +/* Define to 1 if wcsxfrm is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSXFRM + /* Define to 1 if wctob is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCTOB +/* Define to 1 if wctrans is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCTRANS + +/* Define to 1 if wctype is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCTYPE + /* Define to 1 if wcwidth is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCWIDTH +/* Define to 1 if wmemchr is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WMEMCHR + +/* Define to 1 if wmemcmp is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WMEMCMP + +/* Define to 1 if wmemcpy is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WMEMCPY + +/* Define to 1 if wmemmove is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WMEMMOVE + +/* Define to 1 if wmemset is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WMEMSET + +/* Define to 1 if _Exit is declared even after undefining macros. */ +#undef HAVE_RAW_DECL__EXIT + /* Define to 1 if you have the header file. */ #undef HAVE_RSA_H @@ -1094,7 +1371,7 @@ /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT -/* Define to 1 if you have the `setenv' function. */ +/* Define to 1 if you have the 'setenv' function. */ #undef HAVE_SETENV /* Define to 1 if you have the `shutdown' function. */ @@ -1129,15 +1406,12 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SSL_H +/* Define to 1 if you have the `statvfs' function. */ +#undef HAVE_STATVFS + /* Define to 1 if you have the header file. */ #undef HAVE_STDARG_H -/* Define to 1 if stdbool.h conforms to C99. */ -#undef HAVE_STDBOOL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDDEF_H - /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H @@ -1145,9 +1419,6 @@ uintmax_t. */ #undef HAVE_STDINT_H_WITH_UINTMAX -/* Define to 1 if you have the header file. */ -#undef HAVE_STDIO_H - /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H @@ -1163,7 +1434,7 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H -/* Define to 1 if you have the `strndup' function. */ +/* Define to 1 if you have the 'strndup' function. */ #undef HAVE_STRNDUP /* Define to 1 if you have the `strnlen' function. */ @@ -1187,18 +1458,21 @@ /* Define to 1 if `f_fstypename' is a member of `struct fsstat'. */ #undef HAVE_STRUCT_FSSTAT_F_FSTYPENAME +/* Define to 1 if `decimal_point' is a member of `struct lconv'. */ +#undef HAVE_STRUCT_LCONV_DECIMAL_POINT + /* Define to 1 if `n_un.n_name' is a member of `struct nlist'. */ #undef HAVE_STRUCT_NLIST_N_UN_N_NAME -/* Define to 1 if the system has the type `struct random_data'. */ -#undef HAVE_STRUCT_RANDOM_DATA - /* Define to 1 if `sa_len' is a member of `struct sockaddr'. */ #undef HAVE_STRUCT_SOCKADDR_SA_LEN /* Define to 1 if the system has the type `struct sockaddr_storage'. */ #undef HAVE_STRUCT_SOCKADDR_STORAGE +/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */ +#undef HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY + /* Define to 1 if `f_fstypename' is a member of `struct statfs'. */ #undef HAVE_STRUCT_STATFS_F_FSTYPENAME @@ -1217,9 +1491,15 @@ /* Define to 1 if the system has the type `swaptbl_t'. */ #undef HAVE_SWAPTBL_T -/* Define if sysconf returns number of cpus */ +/* Define to 1 if you have the 'symlink' function. */ +#undef HAVE_SYMLINK + +/* Define if sysconf returns number of available cpus */ #undef HAVE_SYSCONF__SC_NPROCESSORS_CONF +/* Define if sysconf returns number of online cpus */ +#undef HAVE_SYSCONF__SC_NPROCESSORS_ONLN + /* Define to 1 if you have the header file. */ #undef HAVE_SYSLOG_H @@ -1283,6 +1563,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_UCRED_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_UIO_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_UNISTD_H @@ -1295,11 +1578,11 @@ /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H -/* Define to 1 if you have the `timegm' function. */ +/* Define to 1 if you have the 'timegm' function. */ #undef HAVE_TIMEGM -/* Define to 1 if you have the header file. */ -#undef HAVE_TIME_H +/* Define to 1 if you have the `towlower' function. */ +#undef HAVE_TOWLOWER /* Define to 1 if you have the `tsearch' function. */ #undef HAVE_TSEARCH @@ -1316,10 +1599,13 @@ /* Define to 1 if you have the `unsetenv' function. */ #undef HAVE_UNSETENV -/* Define to 1 if the system has the type `unsigned long long int'. */ +/* Define to 1 if the system has the type 'unsigned long long int'. */ #undef HAVE_UNSIGNED_LONG_LONG_INT -/* Define to 1 if you have the `vasnprintf' function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_UTMPX_H + +/* Define to 1 if you have the 'vasnprintf' function. */ #undef HAVE_VASNPRINTF /* Define to 1 if you have the `vasprintf' function. */ @@ -1337,10 +1623,10 @@ /* Define if you have the 'wchar_t' type. */ #undef HAVE_WCHAR_T -/* Define to 1 if you have the `wcrtomb' function. */ +/* Define to 1 if you have the 'wcrtomb' function. */ #undef HAVE_WCRTOMB -/* Define to 1 if you have the `wcscoll' function. */ +/* Define to 1 if you have the 'wcscoll' function. */ #undef HAVE_WCSCOLL /* Define to 1 if you have the `wcslen' function. */ @@ -1376,18 +1662,15 @@ /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL +/* Define to 1 if you have the '_set_invalid_parameter_handler' function. */ +#undef HAVE__SET_INVALID_PARAMETER_HANDLER + /* Whether __va_copy() is available */ #undef HAVE___VA_COPY /* Define HOST_NAME_MAX when does not define it. */ #undef HOST_NAME_MAX -#if FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR -# define ISSLASH(C) ((C) == '/' || (C) == '\\') -#else -# define ISSLASH(C) ((C) == '/') -#endif - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR @@ -1398,8 +1681,11 @@ /* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */ #undef MAP_ANONYMOUS +/* Define if the mbrtowc function has the NULL pwc argument bug. */ +#undef MBRTOWC_NULL_ARG1_BUG + /* Define if the mbrtowc function has the NULL string argument bug. */ -#undef MBRTOWC_NULL_ARG_BUG +#undef MBRTOWC_NULL_ARG2_BUG /* Define if the mbrtowc function does not return 0 for a NUL character. */ #undef MBRTOWC_NUL_RETVAL_BUG @@ -1447,22 +1733,22 @@ 3.0) */ #undef MOUNTED_GETMNTINFO2 +/* Define if we are on interix, and ought to use statvfs plus some special + knowledge on where mounted file systems can be found. (Interix) */ +#undef MOUNTED_INTERIX_STATVFS + /* Define if there is a function named listmntent that can be used to list all mounted file systems. (UNICOS) */ #undef MOUNTED_LISTMNTENT /* Define if there is a function named mntctl that can be used to read the list of mounted file systems, and there is a system header file that - declares `struct vmount.' (AIX) */ + declares 'struct vmount'. (AIX) */ #undef MOUNTED_VMOUNT /* Define if gettimeofday is needed */ #undef NEED_GETTIMEOFDAY -/* Define to 1 if your `struct nlist' has an `n_un' member. Obsolete, depend - on `HAVE_STRUCT_NLIST_N_UN_N_NAME */ -#undef NLIST_NAME_UNION - /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O @@ -1475,9 +1761,6 @@ /* Define to 1 if the nlist n_name member is a pointer */ #undef N_NAME_POINTER -/* Define to 1 if open() fails to recognize a trailing slash. */ -#undef OPEN_TRAILING_SLASH_BUG - /* Name of package */ #undef PACKAGE @@ -1508,6 +1791,9 @@ /* path to fping */ #undef PATH_TO_FPING +/* path to fping6 */ +#undef PATH_TO_FPING6 + /* path to lmstat */ #undef PATH_TO_LMSTAT @@ -1550,10 +1836,6 @@ /* path to /proc/meminfo if name changes */ #undef PROC_MEMINFO -/* Define to the type that is the result of default argument promotions of - type mode_t. */ -#undef PROMOTED_MODE_T - /* Number of columns in ps command */ #undef PS_COLS @@ -1569,6 +1851,9 @@ /* Variable list for sscanf of 'ps' output */ #undef PS_VARLIST +/* Define if the pthread_in_use() detection is hard. */ +#undef PTHREAD_IN_USE_DETECTION_HARD + /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'ptrdiff_t'. */ #undef PTRDIFF_T_SUFFIX @@ -1576,19 +1861,11 @@ /* Forced workaround on redhat in spopen */ #undef REDHAT_SPOPEN_ERROR -/* Define to 1 if stat needs help when passed a directory name with a trailing - slash */ -#undef REPLACE_FUNC_STAT_DIR - -/* Define to 1 if stat needs help when passed a file name with a trailing - slash */ -#undef REPLACE_FUNC_STAT_FILE - /* Define if nl_langinfo exists but is overridden by gnulib. */ #undef REPLACE_NL_LANGINFO -/* Define this to 1 if strerror is broken. */ -#undef REPLACE_STRERROR +/* Define to 1 if strerror(0) does not return a message implying success. */ +#undef REPLACE_STRERROR_0 /* Define if vasnprintf exists but is overridden by gnulib. */ #undef REPLACE_VASNPRINTF @@ -1630,9 +1907,6 @@ affected.) */ #undef STATFS_TRUNCATES_BLOCK_COUNTS -/* Define to 1 if the `S_IS*' macros in do not work properly. */ -#undef STAT_MACROS_BROKEN - /* Define if there is no specific function for reading file systems usage information and you have the header file. (SVR2) */ #undef STAT_READ_FILSYS @@ -1641,6 +1915,10 @@ (4.3BSD, SunOS 4, HP-UX, AIX PS/2) */ #undef STAT_STATFS2_BSIZE +/* Define if statfs takes 2 args and struct statfs has a field named f_frsize. + (glibc/Linux > 2.6) */ +#undef STAT_STATFS2_FRSIZE + /* Define if statfs takes 2 args and struct statfs has a field named f_fsize. (4.4BSD, NetBSD) */ #undef STAT_STATFS2_FSIZE @@ -1652,12 +1930,15 @@ /* Define if statfs takes 3 args. (DEC Alpha running OSF/1) */ #undef STAT_STATFS3_OSF1 -/* Define if statfs takes 4 args. (SVR3, Dynix, Irix, Dolphin) */ +/* Define if statfs takes 4 args. (SVR3, Dynix, old Irix, old AIX, Dolphin) */ #undef STAT_STATFS4 /* Define if there is a function named statvfs. (SVR4) */ #undef STAT_STATVFS +/* Define if statvfs64 should be preferred over statvfs. */ +#undef STAT_STATVFS64 + /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS @@ -1689,10 +1970,6 @@ . */ #undef UMAX4_3 -/* Define to the prefix of C symbols at the assembler and linker level, either - an underscore or empty. */ -#undef USER_LABEL_PREFIX - /* Define if using gnutls libraries */ #undef USE_GNUTLS @@ -1702,6 +1979,62 @@ /* Define if using OpenSSL libraries */ #undef USE_OPENSSL +/* Define if the POSIX multithreading library can be used. */ +#undef USE_POSIX_THREADS + +/* Define if references to the POSIX multithreading library should be made + weak. */ +#undef USE_POSIX_THREADS_WEAK + +/* Define if the GNU Pth multithreading library can be used. */ +#undef USE_PTH_THREADS + +/* Define if references to the GNU Pth multithreading library should be made + weak. */ +#undef USE_PTH_THREADS_WEAK + +/* Define if the old Solaris multithreading library can be used. */ +#undef USE_SOLARIS_THREADS + +/* Define if references to the old Solaris multithreading library should be + made weak. */ +#undef USE_SOLARIS_THREADS_WEAK + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif +/* Enable general extensions on OS X. */ +#ifndef _DARWIN_C_SOURCE +# undef _DARWIN_C_SOURCE +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#endif +/* Enable X/Open extensions if necessary. HP-UX 11.11 defines + mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of + whether compiling with -Ae or -D_HPUX_SOURCE=1. */ +#ifndef _XOPEN_SOURCE +# undef _XOPEN_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif + + +/* Define if the native Windows multithreading API can be used. */ +#undef USE_WINDOWS_THREADS + /* Version number of package */ #undef VERSION @@ -1734,50 +2067,56 @@ # endif #endif +/* Enable large inode numbers on Mac OS X 10.5. */ +#undef _DARWIN_USE_64_BIT_INODE + /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES +/* Define to 1 on Solaris. */ +#undef _LCONV_C99 + /* Define to 1 if on MINIX. */ #undef _MINIX +/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */ +#undef _NETBSD_SOURCE + +/* The _Noreturn keyword of C11. */ +#if ! (defined _Noreturn \ + || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) +# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ + || 0x5110 <= __SUNPRO_C) +# define _Noreturn __attribute__ ((__noreturn__)) +# elif defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn +# endif +#endif + + /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE -/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* Define to 1 in order to get the POSIX compatible declarations of socket + functions. */ +#undef _POSIX_PII_SOCKET + +/* Define to 1 if you need to in order for 'stat' and other things to work. */ #undef _POSIX_SOURCE +/* Define if you want to include , so that it consistently + overrides 's RE_DUP_MAX. */ +#undef _REGEX_INCLUDE_LIMITS_H + /* Define if you want regoff_t to be at least as wide POSIX requires. */ #undef _REGEX_LARGE_OFFSETS -/* Define to 500 only on HP-UX. */ -#undef _XOPEN_SOURCE - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# undef _ALL_SOURCE -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# undef _GNU_SOURCE -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# undef _POSIX_PTHREAD_SEMANTICS -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# undef _TANDEM_SOURCE -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ -#endif - - /* Define to rpl_ if the getopt replacement functions and variables should be used. */ #undef __GETOPT_PREFIX @@ -1797,6 +2136,66 @@ /* Define to empty if `const' does not conform to ANSI C. */ #undef const +/* Please see the Gnulib manual for how to use these macros. + + Suppress extern inline with HP-UX cc, as it appears to be broken; see + . + + Suppress extern inline with Sun C in standards-conformance mode, as it + mishandles inline functions that call each other. E.g., for 'inline void f + (void) { } inline void g (void) { f (); }', c99 incorrectly complains + 'reference to static identifier "f" in extern inline function'. + This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. + + Suppress the use of extern inline on Apple's platforms, as Libc at least + through Libc-825.26 (2013-04-09) is incompatible with it; see, e.g., + . + Perhaps Apple will fix this some day. */ +#if ((__GNUC__ \ + ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ + : (199901L <= __STDC_VERSION__ \ + && !defined __HP_cc \ + && !(defined __SUNPRO_C && __STDC__))) \ + && !defined __APPLE__) +# define _GL_INLINE inline +# define _GL_EXTERN_INLINE extern inline +#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ + && !defined __APPLE__) +# if __GNUC_GNU_INLINE__ + /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ +# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) +# else +# define _GL_INLINE extern inline +# endif +# define _GL_EXTERN_INLINE extern +#else +# define _GL_INLINE static _GL_UNUSED +# define _GL_EXTERN_INLINE static _GL_UNUSED +#endif + +#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) +# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ +# define _GL_INLINE_HEADER_CONST_PRAGMA +# else +# define _GL_INLINE_HEADER_CONST_PRAGMA \ + _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") +# endif + /* Suppress GCC's bogus "no previous prototype for 'FOO'" + and "no previous declaration for 'FOO'" diagnostics, + when FOO is an inline function in the header; see + . */ +# define _GL_INLINE_HEADER_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ + _GL_INLINE_HEADER_CONST_PRAGMA +# define _GL_INLINE_HEADER_END \ + _Pragma ("GCC diagnostic pop") +#else +# define _GL_INLINE_HEADER_BEGIN +# define _GL_INLINE_HEADER_END +#endif + /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus @@ -1809,28 +2208,22 @@ /* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. - __APPLE__ && __MACH__ test for MacOS X. + __APPLE__ && __MACH__ test for Mac OS X. __APPLE_CC__ tests for the Apple compiler and its version. __STDC_VERSION__ tests for the C99 mode. */ #if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ # define __GNUC_STDC_INLINE__ 1 #endif -/* Define to rpl_malloc if the replacement function should be used. */ -#undef malloc - /* Define to a type if does not define. */ #undef mbstate_t -/* Define to rpl_mktime if the replacement function should be used. */ -#undef mktime +/* Define to the real name of the mktime_internal function. */ +#undef mktime_internal /* Define to `int' if does not define. */ #undef mode_t -/* Define to the type of st_nlink in struct stat, or a supertype. */ -#undef nlink_t - /* Define to `int' if does not define. */ #undef pid_t @@ -1918,3 +2311,17 @@ is a misnomer outside of parameter lists. */ #define _UNUSED_PARAMETER_ _GL_UNUSED +/* The __pure__ attribute was added in gcc 2.96. */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +#else +# define _GL_ATTRIBUTE_PURE /* empty */ +#endif + +/* The __const__ attribute was added in gcc 2.95. */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) +# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) +#else +# define _GL_ATTRIBUTE_CONST /* empty */ +#endif + diff --git a/configure b/configure index 1b92218..177983e 100755 --- a/configure +++ b/configure @@ -1,11 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for nagios-plugins 1.4.16. +# Generated by GNU Autoconf 2.69 for nagios-plugins 1.4.16. # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -89,6 +87,7 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -133,6 +132,31 @@ export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -166,7 +190,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -211,14 +236,25 @@ IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -320,6 +356,14 @@ $as_echo X"$as_dir" | } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -441,6 +485,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -475,16 +523,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -496,28 +544,8 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -741,9 +769,11 @@ ac_includes_default="\ # include #endif" +gl_use_threads_default= gt_needs= gl_header_list= gl_func_list= +gl_floorf_required=plain gl_getopt_required=POSIX gl_getopt_required=POSIX ac_subst_vars='gltests_LTLIBOBJS @@ -756,14 +786,22 @@ LTLIBOBJS LIBGNU_LTLIBDEPS LIBGNU_LIBDEPS gltests_WITNESS +REPLACE_TOWLOWER REPLACE_ISWCNTRL HAVE_WCTYPE_H NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H NEXT_WCTYPE_H -HAVE_ISWBLANK HAVE_ISWCNTRL +REPLACE_ISWBLANK +HAVE_WCTRANS_T +HAVE_WCTYPE_T +HAVE_ISWBLANK +GNULIB_TOWCTRANS +GNULIB_WCTRANS +GNULIB_ISWCTYPE +GNULIB_WCTYPE +GNULIB_ISWBLANK HAVE_WINT_T -HAVE_WCHAR_H NEXT_AS_FIRST_DIRECTIVE_WCHAR_H NEXT_WCHAR_H HAVE_UNISTD_H @@ -774,16 +812,20 @@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC TIME_H_DEFINES_STRUCT_TIMESPEC NEXT_AS_FIRST_DIRECTIVE_TIME_H NEXT_TIME_H -NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H -NEXT_SYS_STAT_H +HAVE_SYS_UIO_H +NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H +NEXT_SYS_UIO_H +WINDOWS_64_BIT_OFF_T +NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H +NEXT_SYS_TYPES_H NEXT_AS_FIRST_DIRECTIVE_STRING_H NEXT_STRING_H -HAVE_RANDOM_H NEXT_AS_FIRST_DIRECTIVE_STDLIB_H NEXT_STDLIB_H NEXT_AS_FIRST_DIRECTIVE_STDIO_H NEXT_STDIO_H -ASM_SYMBOL_PREFIX +GL_GENERATE_STDINT_H_FALSE +GL_GENERATE_STDINT_H_TRUE STDINT_H WINT_T_SUFFIX WCHAR_T_SUFFIX @@ -805,42 +847,16 @@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H NEXT_STDINT_H HAVE_SYS_TYPES_H HAVE_INTTYPES_H +HAVE_WCHAR_H HAVE_UNSIGNED_LONG_LONG_INT HAVE_LONG_LONG_INT HAVE__BOOL +GL_GENERATE_STDBOOL_H_FALSE +GL_GENERATE_STDBOOL_H_TRUE STDBOOL_H -REPLACE_UTIMENSAT -REPLACE_STAT -REPLACE_MKNOD -REPLACE_MKFIFO -REPLACE_MKDIR -REPLACE_LSTAT -REPLACE_FUTIMENS -REPLACE_FSTATAT -REPLACE_FSTAT -HAVE_UTIMENSAT -HAVE_MKNODAT -HAVE_MKNOD -HAVE_MKFIFOAT -HAVE_MKFIFO -HAVE_MKDIRAT -HAVE_LSTAT -HAVE_LCHMOD -HAVE_FUTIMENS -HAVE_FSTATAT -HAVE_FCHMODAT -GNULIB_UTIMENSAT -GNULIB_STAT -GNULIB_MKNODAT -GNULIB_MKNOD -GNULIB_MKFIFOAT -GNULIB_MKFIFO -GNULIB_MKDIRAT -GNULIB_LSTAT -GNULIB_LCHMOD -GNULIB_FUTIMENS -GNULIB_FSTATAT -GNULIB_FCHMODAT +GL_GENERATE_STDALIGN_H_FALSE +GL_GENERATE_STDALIGN_H_TRUE +STDALIGN_H LIBSOCKET REPLACE_VSPRINTF REPLACE_VSNPRINTF @@ -850,6 +866,7 @@ REPLACE_VDPRINTF REPLACE_VASPRINTF REPLACE_TMPFILE REPLACE_STDIO_WRITE_FUNCS +REPLACE_STDIO_READ_FUNCS REPLACE_SPRINTF REPLACE_SNPRINTF REPLACE_RENAMEAT @@ -870,11 +887,14 @@ REPLACE_FPURGE REPLACE_FPRINTF REPLACE_FOPEN REPLACE_FFLUSH +REPLACE_FDOPEN REPLACE_FCLOSE REPLACE_DPRINTF HAVE_VDPRINTF HAVE_VASPRINTF HAVE_RENAMEAT +HAVE_POPEN +HAVE_PCLOSE HAVE_FTELLO HAVE_FSEEKO HAVE_DPRINTF @@ -883,6 +903,8 @@ HAVE_DECL_SNPRINTF HAVE_DECL_OBSTACK_PRINTF HAVE_DECL_GETLINE HAVE_DECL_GETDELIM +HAVE_DECL_FTELLO +HAVE_DECL_FSEEKO HAVE_DECL_FPURGE GNULIB_VSPRINTF_POSIX GNULIB_VSNPRINTF @@ -891,11 +913,15 @@ GNULIB_VPRINTF GNULIB_VFPRINTF_POSIX GNULIB_VFPRINTF GNULIB_VDPRINTF +GNULIB_VSCANF +GNULIB_VFSCANF GNULIB_VASPRINTF GNULIB_TMPFILE GNULIB_STDIO_H_SIGPIPE +GNULIB_STDIO_H_NONBLOCKING GNULIB_SPRINTF_POSIX GNULIB_SNPRINTF +GNULIB_SCANF GNULIB_RENAMEAT GNULIB_RENAME GNULIB_REMOVE @@ -906,29 +932,40 @@ GNULIB_PRINTF_POSIX GNULIB_PRINTF GNULIB_POPEN GNULIB_PERROR +GNULIB_PCLOSE GNULIB_OBSTACK_PRINTF_POSIX GNULIB_OBSTACK_PRINTF GNULIB_GETLINE GNULIB_GETDELIM +GNULIB_GETCHAR +GNULIB_GETC GNULIB_FWRITE GNULIB_FTELLO GNULIB_FTELL GNULIB_FSEEKO GNULIB_FSEEK +GNULIB_FSCANF GNULIB_FREOPEN +GNULIB_FREAD GNULIB_FPUTS GNULIB_FPUTC GNULIB_FPURGE GNULIB_FPRINTF_POSIX GNULIB_FPRINTF GNULIB_FOPEN +GNULIB_FGETS +GNULIB_FGETC GNULIB_FFLUSH +GNULIB_FDOPEN GNULIB_FCLOSE GNULIB_DPRINTF +GL_GENERATE_NETINET_IN_H_FALSE +GL_GENERATE_NETINET_IN_H_TRUE NETINET_IN_H HAVE_NETINET_IN_H NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H NEXT_NETINET_IN_H +HAVE_MSVC_INVALID_PARAMETER_HANDLER APPLE_UNIVERSAL_BUILD REPLACE_TIMEGM REPLACE_NANOSLEEP @@ -937,7 +974,7 @@ REPLACE_LOCALTIME_R HAVE_TIMEGM HAVE_STRPTIME HAVE_NANOSLEEP -HAVE_LOCALTIME_R +HAVE_DECL_LOCALTIME_R GNULIB_TIME_R GNULIB_TIMEGM GNULIB_STRPTIME @@ -949,7 +986,9 @@ REPLACE_STRSIGNAL REPLACE_STRNLEN REPLACE_STRNDUP REPLACE_STRNCAT +REPLACE_STRERROR_R REPLACE_STRERROR +REPLACE_STRCHRNUL REPLACE_STRCASESTR REPLACE_STRSTR REPLACE_STRDUP @@ -958,6 +997,7 @@ REPLACE_MEMMEM REPLACE_MEMCHR HAVE_STRVERSCMP HAVE_DECL_STRSIGNAL +HAVE_DECL_STRERROR_R HAVE_DECL_STRTOK_R HAVE_STRCASESTR HAVE_STRSEP @@ -973,9 +1013,12 @@ HAVE_DECL_MEMRCHR HAVE_MEMPCPY HAVE_DECL_MEMMEM HAVE_MEMCHR +HAVE_FFSLL +HAVE_FFSL HAVE_MBSLEN GNULIB_STRVERSCMP GNULIB_STRSIGNAL +GNULIB_STRERROR_R GNULIB_STRERROR GNULIB_MBSTOK_R GNULIB_MBSSEP @@ -1008,25 +1051,43 @@ GNULIB_MEMRCHR GNULIB_MEMPCPY GNULIB_MEMMEM GNULIB_MEMCHR +GNULIB_FFSLL +GNULIB_FFSL LOCALE_FR_UTF8 LOCALE_ZH_CN LOCALE_JA NEXT_AS_FIRST_DIRECTIVE_MATH_H NEXT_MATH_H +LTLIBMULTITHREAD +LIBMULTITHREAD +LTLIBTHREAD +LIBTHREAD +LIBPTH_PREFIX +LTLIBPTH +LIBPTH NEXT_AS_FIRST_DIRECTIVE_LOCALE_H NEXT_LOCALE_H HAVE_XLOCALE_H NEXT_AS_FIRST_DIRECTIVE_STDDEF_H NEXT_STDDEF_H +GL_GENERATE_STDDEF_H_FALSE +GL_GENERATE_STDDEF_H_TRUE STDDEF_H HAVE_WCHAR_T REPLACE_NULL +REPLACE_STRUCT_LCONV REPLACE_DUPLOCALE +REPLACE_SETLOCALE +REPLACE_LOCALECONV HAVE_DUPLOCALE GNULIB_DUPLOCALE +GNULIB_SETLOCALE +GNULIB_LOCALECONV LOCALCHARSET_TESTS_ENVIRONMENT GLIBC21 +HAVE_LANGINFO_YESEXPR HAVE_LANGINFO_ERA +HAVE_LANGINFO_T_FMT_AMPM HAVE_LANGINFO_CODESET HAVE_LANGINFO_H NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H @@ -1034,62 +1095,80 @@ NEXT_LANGINFO_H REPLACE_NL_LANGINFO HAVE_NL_LANGINFO GNULIB_NL_LANGINFO +GNULIB_GL_UNISTD_H_GETOPT GETOPT_H HAVE_GETOPT_H NEXT_AS_FIRST_DIRECTIVE_GETOPT_H NEXT_GETOPT_H GETLOADAVG_LIBS -KMEM_GROUP -NEED_SETGID +REPLACE_WCTOMB REPLACE_UNSETENV REPLACE_STRTOD REPLACE_SETENV REPLACE_REALPATH +REPLACE_REALLOC +REPLACE_RANDOM_R REPLACE_PUTENV +REPLACE_PTSNAME_R +REPLACE_PTSNAME REPLACE_MKSTEMP +REPLACE_MBTOWC +REPLACE_MALLOC REPLACE_CANONICALIZE_FILE_NAME -HAVE_UNSETENV +REPLACE_CALLOC +HAVE_DECL_UNSETENV HAVE_UNLOCKPT HAVE_SYS_LOADAVG_H HAVE_STRUCT_RANDOM_DATA HAVE_STRTOULL HAVE_STRTOLL HAVE_STRTOD +HAVE_DECL_SETENV HAVE_SETENV +HAVE_SECURE_GETENV HAVE_RPMATCH HAVE_REALPATH -HAVE_REALLOC_POSIX HAVE_RANDOM_R +HAVE_RANDOM_H +HAVE_RANDOM +HAVE_PTSNAME_R HAVE_PTSNAME +HAVE_POSIX_OPENPT HAVE_MKSTEMPS HAVE_MKSTEMP HAVE_MKOSTEMPS HAVE_MKOSTEMP HAVE_MKDTEMP -HAVE_MALLOC_POSIX HAVE_GRANTPT HAVE_GETSUBOPT HAVE_DECL_GETLOADAVG HAVE_CANONICALIZE_FILE_NAME -HAVE_CALLOC_POSIX HAVE_ATOLL +HAVE__EXIT +GNULIB_WCTOMB GNULIB_UNSETENV GNULIB_UNLOCKPT +GNULIB_SYSTEM_POSIX GNULIB_STRTOULL GNULIB_STRTOLL GNULIB_STRTOD GNULIB_SETENV +GNULIB_SECURE_GETENV GNULIB_RPMATCH GNULIB_REALPATH GNULIB_REALLOC_POSIX GNULIB_RANDOM_R +GNULIB_RANDOM GNULIB_PUTENV +GNULIB_PTSNAME_R GNULIB_PTSNAME +GNULIB_POSIX_OPENPT GNULIB_MKSTEMPS GNULIB_MKSTEMP GNULIB_MKOSTEMPS GNULIB_MKOSTEMP GNULIB_MKDTEMP +GNULIB_MBTOWC GNULIB_MALLOC_POSIX GNULIB_GRANTPT GNULIB_GETSUBOPT @@ -1097,6 +1176,7 @@ GNULIB_GETLOADAVG GNULIB_CANONICALIZE_FILE_NAME GNULIB_CALLOC_POSIX GNULIB_ATOLL +GNULIB__EXIT GETHOSTNAME_LIB GETADDRINFO_LIB INET_NTOP_LIB @@ -1105,6 +1185,7 @@ HOSTENT_LIB HAVE_NETDB_H NEXT_AS_FIRST_DIRECTIVE_NETDB_H NEXT_NETDB_H +REPLACE_GAI_STRERROR HAVE_DECL_GETNAMEINFO HAVE_DECL_GETADDRINFO HAVE_DECL_GAI_STRERROR @@ -1118,6 +1199,7 @@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H NEXT_SYS_SOCKET_H HAVE_ACCEPT4 HAVE_SA_FAMILY_T +HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY HAVE_STRUCT_SOCKADDR_STORAGE GNULIB_ACCEPT4 GNULIB_SHUTDOWN @@ -1136,23 +1218,68 @@ GNULIB_CONNECT GNULIB_SOCKET FLOORF_LIBM REPLACE_TRUNCL +REPLACE_TRUNCF +REPLACE_TRUNC +REPLACE_SQRTL REPLACE_SIGNBIT_USING_GCC REPLACE_SIGNBIT REPLACE_ROUNDL REPLACE_ROUNDF REPLACE_ROUND +REPLACE_REMAINDERL +REPLACE_REMAINDERF +REPLACE_REMAINDER REPLACE_NAN +REPLACE_MODFL +REPLACE_MODFF +REPLACE_MODF +REPLACE_LOGBL +REPLACE_LOGBF +REPLACE_LOGB +REPLACE_LOG2L +REPLACE_LOG2F +REPLACE_LOG2 +REPLACE_LOG1PL +REPLACE_LOG1PF +REPLACE_LOG1P +REPLACE_LOG10L +REPLACE_LOG10F +REPLACE_LOG10 +REPLACE_LOGL +REPLACE_LOGF +REPLACE_LOG REPLACE_LDEXPL REPLACE_ISNAN REPLACE_ISINF REPLACE_ISFINITE +REPLACE_ILOGBF +REPLACE_ILOGB +REPLACE_HYPOTL +REPLACE_HYPOTF +REPLACE_HYPOT REPLACE_HUGE_VAL REPLACE_FREXPL REPLACE_FREXP +REPLACE_FREXPF +REPLACE_FMODL +REPLACE_FMODF +REPLACE_FMOD +REPLACE_FMAL +REPLACE_FMAF +REPLACE_FMA REPLACE_FLOORL REPLACE_FLOORF +REPLACE_FLOOR +REPLACE_FABSL +REPLACE_EXP2L +REPLACE_EXP2 +REPLACE_EXPM1F +REPLACE_EXPM1 REPLACE_CEILL REPLACE_CEILF +REPLACE_CEIL +REPLACE_CBRTL +REPLACE_CBRTF HAVE_DECL_TRUNCL HAVE_DECL_TRUNCF HAVE_DECL_TRUNC @@ -1162,80 +1289,202 @@ HAVE_DECL_SINL HAVE_DECL_ROUNDL HAVE_DECL_ROUNDF HAVE_DECL_ROUND -HAVE_DECL_LOGL +HAVE_DECL_RINTF +HAVE_DECL_REMAINDERL +HAVE_DECL_REMAINDER HAVE_DECL_LOGB +HAVE_DECL_LOG2L +HAVE_DECL_LOG2F +HAVE_DECL_LOG2 +HAVE_DECL_LOG10L +HAVE_DECL_LOGL HAVE_DECL_LDEXPL HAVE_DECL_FREXPL HAVE_DECL_FLOORL HAVE_DECL_FLOORF +HAVE_DECL_EXPM1L +HAVE_DECL_EXP2L +HAVE_DECL_EXP2F +HAVE_DECL_EXP2 HAVE_DECL_EXPL HAVE_DECL_COSL +HAVE_DECL_COPYSIGNF HAVE_DECL_CEILL HAVE_DECL_CEILF +HAVE_DECL_CBRTL +HAVE_DECL_CBRTF HAVE_DECL_ATANL HAVE_DECL_ASINL HAVE_DECL_ACOSL +HAVE_TANHF HAVE_TANL +HAVE_TANF HAVE_SQRTL +HAVE_SQRTF +HAVE_SINHF HAVE_SINL +HAVE_SINF +HAVE_RINTL +HAVE_RINT +HAVE_REMAINDERF +HAVE_REMAINDER +HAVE_POWF +HAVE_MODFL +HAVE_MODFF +HAVE_LOGBL +HAVE_LOGBF +HAVE_LOG1PL +HAVE_LOG1PF +HAVE_LOG1P +HAVE_LOG10L +HAVE_LOG10F HAVE_LOGL +HAVE_LOGF +HAVE_LDEXPF HAVE_ISNANL HAVE_ISNAND HAVE_ISNANF +HAVE_ILOGBL +HAVE_ILOGBF +HAVE_ILOGB +HAVE_HYPOTL +HAVE_HYPOTF +HAVE_FREXPF +HAVE_FMODL +HAVE_FMODF +HAVE_FMAL +HAVE_FMAF +HAVE_FMA +HAVE_FABSL +HAVE_FABSF +HAVE_EXPM1F +HAVE_EXPM1 HAVE_EXPL +HAVE_EXPF +HAVE_COSHF HAVE_COSL +HAVE_COSF +HAVE_COPYSIGNL +HAVE_COPYSIGN +HAVE_CBRTL +HAVE_CBRTF +HAVE_CBRT +HAVE_ATAN2F HAVE_ATANL +HAVE_ATANF HAVE_ASINL +HAVE_ASINF HAVE_ACOSL +HAVE_ACOSF GNULIB_TRUNCL GNULIB_TRUNCF GNULIB_TRUNC +GNULIB_TANHF GNULIB_TANL +GNULIB_TANF GNULIB_SQRTL +GNULIB_SQRTF +GNULIB_SINHF GNULIB_SINL +GNULIB_SINF GNULIB_SIGNBIT GNULIB_ROUNDL GNULIB_ROUNDF GNULIB_ROUND -GNULIB_LOGL +GNULIB_RINTL +GNULIB_RINTF +GNULIB_RINT +GNULIB_REMAINDERL +GNULIB_REMAINDERF +GNULIB_REMAINDER +GNULIB_POWF +GNULIB_MODFL +GNULIB_MODFF +GNULIB_MODF +GNULIB_LOGBL +GNULIB_LOGBF GNULIB_LOGB +GNULIB_LOG2L +GNULIB_LOG2F +GNULIB_LOG2 +GNULIB_LOG1PL +GNULIB_LOG1PF +GNULIB_LOG1P +GNULIB_LOG10L +GNULIB_LOG10F +GNULIB_LOG10 +GNULIB_LOGL +GNULIB_LOGF +GNULIB_LOG GNULIB_LDEXPL +GNULIB_LDEXPF GNULIB_ISNANL GNULIB_ISNAND GNULIB_ISNANF GNULIB_ISNAN GNULIB_ISINF GNULIB_ISFINITE +GNULIB_ILOGBL +GNULIB_ILOGBF +GNULIB_ILOGB +GNULIB_HYPOTL +GNULIB_HYPOTF +GNULIB_HYPOT GNULIB_FREXPL GNULIB_FREXP +GNULIB_FREXPF +GNULIB_FMODL +GNULIB_FMODF +GNULIB_FMOD +GNULIB_FMAL +GNULIB_FMAF +GNULIB_FMA GNULIB_FLOORL GNULIB_FLOORF +GNULIB_FLOOR +GNULIB_FABSL +GNULIB_FABSF +GNULIB_EXPM1L +GNULIB_EXPM1F +GNULIB_EXPM1 +GNULIB_EXP2L +GNULIB_EXP2F +GNULIB_EXP2 GNULIB_EXPL +GNULIB_EXPF +GNULIB_COSHF GNULIB_COSL +GNULIB_COSF +GNULIB_COPYSIGNL +GNULIB_COPYSIGNF +GNULIB_COPYSIGN GNULIB_CEILL GNULIB_CEILF +GNULIB_CEIL +GNULIB_CBRTL +GNULIB_CBRTF +GNULIB_CBRT +GNULIB_ATAN2F GNULIB_ATANL +GNULIB_ATANF GNULIB_ASINL +GNULIB_ASINF GNULIB_ACOSL +GNULIB_ACOSF +REPLACE_ITOLD +GL_GENERATE_FLOAT_H_FALSE +GL_GENERATE_FLOAT_H_TRUE FLOAT_H NEXT_AS_FIRST_DIRECTIVE_FLOAT_H NEXT_FLOAT_H -NEXT_AS_FIRST_DIRECTIVE_FCNTL_H -NEXT_FCNTL_H -REPLACE_OPENAT -REPLACE_OPEN -REPLACE_FCNTL -HAVE_OPENAT -HAVE_FCNTL -GNULIB_OPENAT -GNULIB_OPEN -GNULIB_FCNTL EOVERFLOW_VALUE EOVERFLOW_HIDDEN ENOLINK_VALUE ENOLINK_HIDDEN EMULTIHOP_VALUE EMULTIHOP_HIDDEN +GL_GENERATE_ERRNO_H_FALSE +GL_GENERATE_ERRNO_H_TRUE ERRNO_H NEXT_AS_FIRST_DIRECTIVE_ERRNO_H NEXT_ERRNO_H @@ -1250,15 +1499,20 @@ REPLACE_SYMLINK REPLACE_SLEEP REPLACE_RMDIR REPLACE_READLINK +REPLACE_READ REPLACE_PWRITE REPLACE_PREAD REPLACE_LSEEK REPLACE_LINKAT REPLACE_LINK REPLACE_LCHOWN +REPLACE_ISATTY REPLACE_GETPAGESIZE REPLACE_GETGROUPS +REPLACE_GETLOGIN_R +REPLACE_GETDOMAINNAME REPLACE_GETCWD +REPLACE_FTRUNCATE REPLACE_FCHOWNAT REPLACE_DUP2 REPLACE_DUP @@ -1266,32 +1520,39 @@ REPLACE_CLOSE REPLACE_CHOWN HAVE_SYS_PARAM_H HAVE_OS_H +HAVE_DECL_TTYNAME_R +HAVE_DECL_SETHOSTNAME HAVE_DECL_GETUSERSHELL HAVE_DECL_GETPAGESIZE HAVE_DECL_GETLOGIN_R +HAVE_DECL_GETDOMAINNAME +HAVE_DECL_FDATASYNC +HAVE_DECL_FCHDIR HAVE_DECL_ENVIRON HAVE_USLEEP HAVE_UNLINKAT -HAVE_TTYNAME_R HAVE_SYMLINKAT HAVE_SYMLINK HAVE_SLEEP +HAVE_SETHOSTNAME HAVE_READLINKAT HAVE_READLINK HAVE_PWRITE HAVE_PREAD HAVE_PIPE2 +HAVE_PIPE HAVE_LINKAT HAVE_LINK HAVE_LCHOWN +HAVE_GROUP_MEMBER HAVE_GETPAGESIZE HAVE_GETLOGIN HAVE_GETHOSTNAME HAVE_GETGROUPS HAVE_GETDTABLESIZE -HAVE_GETDOMAINNAME HAVE_FTRUNCATE HAVE_FSYNC +HAVE_FDATASYNC HAVE_FCHOWNAT HAVE_FCHDIR HAVE_FACCESSAT @@ -1304,21 +1565,26 @@ GNULIB_USLEEP GNULIB_UNLINKAT GNULIB_UNLINK GNULIB_UNISTD_H_SIGPIPE -GNULIB_UNISTD_H_GETOPT +GNULIB_UNISTD_H_NONBLOCKING GNULIB_TTYNAME_R GNULIB_SYMLINKAT GNULIB_SYMLINK GNULIB_SLEEP +GNULIB_SETHOSTNAME GNULIB_RMDIR GNULIB_READLINKAT GNULIB_READLINK +GNULIB_READ GNULIB_PWRITE GNULIB_PREAD GNULIB_PIPE2 +GNULIB_PIPE GNULIB_LSEEK GNULIB_LINKAT GNULIB_LINK GNULIB_LCHOWN +GNULIB_ISATTY +GNULIB_GROUP_MEMBER GNULIB_GETUSERSHELL GNULIB_GETPAGESIZE GNULIB_GETLOGIN_R @@ -1330,6 +1596,7 @@ GNULIB_GETDOMAINNAME GNULIB_GETCWD GNULIB_FTRUNCATE GNULIB_FSYNC +GNULIB_FDATASYNC GNULIB_FCHOWNAT GNULIB_FCHDIR GNULIB_FACCESSAT @@ -1337,9 +1604,14 @@ GNULIB_EUIDACCESS GNULIB_ENVIRON GNULIB_DUP3 GNULIB_DUP2 +GNULIB_DUP GNULIB_CLOSE GNULIB_CHOWN +GNULIB_CHDIR +pkglibexecdir +lispdir LOCALE_FR +REPLACE_WCSWIDTH REPLACE_WCWIDTH REPLACE_WCSNRTOMBS REPLACE_WCSRTOMBS @@ -1354,6 +1626,34 @@ REPLACE_BTOWC REPLACE_MBSTATE_T HAVE_DECL_WCWIDTH HAVE_DECL_WCTOB +HAVE_WCSWIDTH +HAVE_WCSTOK +HAVE_WCSSTR +HAVE_WCSPBRK +HAVE_WCSSPN +HAVE_WCSCSPN +HAVE_WCSRCHR +HAVE_WCSCHR +HAVE_WCSDUP +HAVE_WCSXFRM +HAVE_WCSCOLL +HAVE_WCSNCASECMP +HAVE_WCSCASECMP +HAVE_WCSNCMP +HAVE_WCSCMP +HAVE_WCSNCAT +HAVE_WCSCAT +HAVE_WCPNCPY +HAVE_WCSNCPY +HAVE_WCPCPY +HAVE_WCSCPY +HAVE_WCSNLEN +HAVE_WCSLEN +HAVE_WMEMSET +HAVE_WMEMMOVE +HAVE_WMEMCPY +HAVE_WMEMCMP +HAVE_WMEMCHR HAVE_WCSNRTOMBS HAVE_WCSRTOMBS HAVE_WCRTOMB @@ -1363,6 +1663,34 @@ HAVE_MBRLEN HAVE_MBRTOWC HAVE_MBSINIT HAVE_BTOWC +GNULIB_WCSWIDTH +GNULIB_WCSTOK +GNULIB_WCSSTR +GNULIB_WCSPBRK +GNULIB_WCSSPN +GNULIB_WCSCSPN +GNULIB_WCSRCHR +GNULIB_WCSCHR +GNULIB_WCSDUP +GNULIB_WCSXFRM +GNULIB_WCSCOLL +GNULIB_WCSNCASECMP +GNULIB_WCSCASECMP +GNULIB_WCSNCMP +GNULIB_WCSCMP +GNULIB_WCSNCAT +GNULIB_WCSCAT +GNULIB_WCPNCPY +GNULIB_WCSNCPY +GNULIB_WCPCPY +GNULIB_WCSCPY +GNULIB_WCSNLEN +GNULIB_WCSLEN +GNULIB_WMEMSET +GNULIB_WMEMMOVE +GNULIB_WMEMCPY +GNULIB_WMEMCMP +GNULIB_WMEMCHR GNULIB_WCWIDTH GNULIB_WCSNRTOMBS GNULIB_WCSRTOMBS @@ -1374,16 +1702,22 @@ GNULIB_MBRTOWC GNULIB_MBSINIT GNULIB_WCTOB GNULIB_BTOWC +HAVE_FEATURES_H NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H NEXT_ARPA_INET_H +PRAGMA_COLUMNS PRAGMA_SYSTEM_HEADER INCLUDE_NEXT_AS_FIRST_DIRECTIVE INCLUDE_NEXT HAVE_ARPA_INET_H +REPLACE_INET_PTON +REPLACE_INET_NTOP HAVE_DECL_INET_PTON HAVE_DECL_INET_NTOP GNULIB_INET_PTON GNULIB_INET_NTOP +GL_GENERATE_ALLOCA_H_FALSE +GL_GENERATE_ALLOCA_H_TRUE ALLOCA_H ALLOCA GL_COND_LIBTOOL_FALSE @@ -1418,12 +1752,12 @@ PATH_TO_SWAP PATH_TO_QMAIL_QSTAT PATH_TO_MAILQ PATH_TO_SSH +PATH_TO_FPING6 PATH_TO_FPING PATH_TO_QSTAT PATH_TO_QUAKESTAT PATH_TO_SNMPGETNEXT PATH_TO_SNMPGET -PATH_TO_WHO PATH_TO_SMBCLIENT PATH_TO_LMSTAT PATH_TO_RPCINFO @@ -1437,6 +1771,9 @@ SSLLIBS check_tcp_ssl SSLINCLUDE KRBINCLUDE +PATH_TO_WHO +HAVE_UTMPX_FALSE +HAVE_UTMPX_TRUE MYSQLCFLAGS MYSQLLIBS MYSQLINCLUDE @@ -1444,6 +1781,7 @@ np_mysql_config LDAPINCLUDE LDAPLIBS RADIUSLIBS +DBILIBS PGINCLUDE PGLIBS USE_PARSE_INI_FALSE @@ -1478,7 +1816,6 @@ LIPO NMEDIT DSYMUTIL lt_ECHO -AR OBJDUMP LN_S NM @@ -1488,13 +1825,16 @@ LD FGREP SED LIBTOOL +RANLIB +ARFLAGS +AR EGREP GREP CPP -RANLIB am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE +am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE @@ -1518,6 +1858,10 @@ build_os build_vendor build_cpu build +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V am__untar am__tar AMTAR @@ -1582,17 +1926,19 @@ SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking +enable_silent_rules with_nagios_user with_nagios_group with_world_permissions enable_dependency_tracking +enable_largefile +enable_threads enable_shared enable_static with_pic enable_fast_install with_gnu_ld enable_libtool_lock -enable_largefile with_cgiurl with_trusted_path with_perl @@ -1601,6 +1947,9 @@ with_gnutls enable_libtap enable_extra_opts with_pgsql +with_dbi +with_radius +with_ldap with_mysql with_ipv6 with_ps_command @@ -1617,6 +1966,7 @@ with_snmpget_command with_snmpgetnext_command with_qstat_command with_fping_command +with_fping6_command with_ssh_command with_mailq_command with_proc_meminfo @@ -1628,6 +1978,7 @@ with_libiconv_prefix with_libintl_prefix enable_redhat_pthread_workaround enable_perl_modules +with_libpth_prefix with_included_regex ' ac_precious_vars='build_alias @@ -2043,7 +2394,7 @@ Try \`$0 --help' for more information" $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -2094,8 +2445,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -2259,14 +2608,21 @@ Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build + --disable-largefile omit support for large files + --enable-threads={posix|solaris|pth|windows} + specify multithreading API + --disable-threads build without multithread safety --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) - --disable-largefile omit support for large files --enable-libtap Enable built-in libtap for unit-testing (default: autodetect system library). --enable-extra-opts Enables parsing of plugins ini config files for @@ -2294,6 +2650,9 @@ Optional Packages: --with-openssl=DIR path to openssl installation --with-gnutls=PATH path to gnutls installation root --with-pgsql=DIR sets path to pgsql installation + --without-dbi Skips the dbi plugin + --without-radius Skips the radius plugin + --without-ldap Skips the LDAP plugin --with-mysql=DIR Locates mysql libraries. Expects DIR/bin/mysql_config. Default to search for mysql_config in PATH @@ -2312,16 +2671,19 @@ Optional Packages: --with-snmpgetnext-command=PATH Path to snmpgetnext command --with-qstat-command=PATH Path to qstat command --with-fping-command=PATH Path to fping command + --with-fping6-command=PATH Path to fping6 command --with-ssh-command=PATH sets path for ssh --with-mailq-command=PATH sets path to mailq --with-proc-meminfo=PATH path to /proc/meminfo or equivalent --with-dig-command=PATH Path to dig command --with-apt-get-command=PATH Path to apt-get command - --with-gnu-ld assume the C compiler uses GNU ld default=no + --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib --without-libintl-prefix don't search for libintl in includedir and libdir + --with-libpth-prefix[=DIR] search for libpth in DIR/include and DIR/lib + --without-libpth-prefix don't search for libpth in includedir and libdir --without-included-regex don't compile regex; this is the default on systems with recent-enough versions of the GNU C Library @@ -2404,9 +2766,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF nagios-plugins configure 1.4.16 -generated by GNU Autoconf 2.67 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -2450,7 +2812,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -2487,7 +2849,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -2500,10 +2862,10 @@ fi ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval "test \"\${$3+set}\"" = set; then : + if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -2566,7 +2928,7 @@ $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -2575,7 +2937,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel @@ -2616,7 +2978,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -2630,7 +2992,7 @@ ac_fn_c_check_header_compile () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2648,7 +3010,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile @@ -2679,7 +3041,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -2693,7 +3055,7 @@ fi # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link @@ -2706,7 +3068,7 @@ ac_fn_c_check_func () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2761,7 +3123,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func @@ -2774,7 +3136,7 @@ ac_fn_c_check_type () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -2815,7 +3177,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type @@ -2830,7 +3192,7 @@ ac_fn_c_check_decl () as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2861,7 +3223,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl @@ -2874,7 +3236,7 @@ ac_fn_c_check_member () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 $as_echo_n "checking for $2.$3... " >&6; } -if eval "test \"\${$4+set}\"" = set; then : +if eval \${$4+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2918,7 +3280,7 @@ fi eval ac_res=\$$4 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member @@ -2939,7 +3301,8 @@ int main () { static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2955,7 +3318,8 @@ int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2981,7 +3345,8 @@ int main () { static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2997,7 +3362,8 @@ int main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -3031,7 +3397,8 @@ int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -3095,7 +3462,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ rm -f conftest.val fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_compute_int @@ -3104,7 +3471,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by nagios-plugins $as_me 1.4.16, which was -generated by GNU Autoconf 2.67. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3362,7 +3729,7 @@ $as_echo "$as_me: loading site script $ac_site_file" >&6;} || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -3385,57 +3752,43 @@ fi gt_needs="$gt_needs need-ngettext" gl_header_list="$gl_header_list arpa/inet.h" +gl_header_list="$gl_header_list features.h" gl_func_list="$gl_func_list btowc" -gl_func_list="$gl_func_list dup2" -gl_header_list="$gl_header_list errno.h" -gl_func_list="$gl_func_list fcntl" -gl_header_list="$gl_header_list fcntl.h" -gl_header_list="$gl_header_list float.h" +gl_header_list="$gl_header_list unistd.h" gl_header_list="$gl_header_list sys/param.h" gl_header_list="$gl_header_list sys/vfs.h" gl_header_list="$gl_header_list sys/fs_types.h" gl_header_list="$gl_header_list sys/socket.h" gl_header_list="$gl_header_list netdb.h" gl_header_list="$gl_header_list netinet/in.h" -gl_func_list="$gl_func_list getdtablesize" gl_getopt_required=GNU gl_header_list="$gl_header_list getopt.h" gl_header_list="$gl_header_list langinfo.h" -gl_header_list="$gl_header_list stddef.h" +gl_func_list="$gl_func_list symlink" gl_header_list="$gl_header_list xlocale.h" -gl_header_list="$gl_header_list locale.h" gl_header_list="$gl_header_list math.h" gl_func_list="$gl_func_list mbsinit" gl_func_list="$gl_func_list mbrtowc" gl_header_list="$gl_header_list sys/mman.h" gl_func_list="$gl_func_list mprotect" -gl_func_list="$gl_func_list memchr" -gl_header_list="$gl_header_list unistd.h" -gl_func_list="$gl_func_list alarm" gl_header_list="$gl_header_list sys/statvfs.h" +gl_func_list="$gl_func_list _set_invalid_parameter_handler" gl_func_list="$gl_func_list nl_langinfo" -gl_func_list="$gl_func_list lstat" gl_func_list="$gl_func_list isblank" gl_func_list="$gl_func_list iswctype" gl_func_list="$gl_func_list wcscoll" gl_func_list="$gl_func_list setenv" -gl_header_list="$gl_header_list stdint.h" +gl_func_list="$gl_func_list snprintf" gl_header_list="$gl_header_list wchar.h" -gl_header_list="$gl_header_list stdio.h" -gl_header_list="$gl_header_list stdlib.h" -gl_func_list="$gl_func_list strdup" -gl_header_list="$gl_header_list string.h" +gl_header_list="$gl_header_list stdint.h" gl_func_list="$gl_func_list strndup" -gl_header_list="$gl_header_list sys/stat.h" -gl_header_list="$gl_header_list time.h" +gl_header_list="$gl_header_list sys/uio.h" gl_header_list="$gl_header_list sys/time.h" gl_func_list="$gl_func_list localtime_r" gl_func_list="$gl_func_list timegm" -gl_func_list="$gl_func_list pipe" gl_func_list="$gl_func_list vasnprintf" gl_func_list="$gl_func_list wcrtomb" gl_func_list="$gl_func_list iswcntrl" -gl_func_list="$gl_func_list iswblank" gl_header_list="$gl_header_list wctype.h" # Check that the precious variables saved in the cache have kept the same # value. @@ -3537,7 +3890,7 @@ ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. -am__api_version='1.11' +am__api_version='1.13' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -3556,7 +3909,7 @@ am__api_version='1.11' { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : +if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3576,7 +3929,7 @@ case $as_dir/ in #(( # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -3634,45 +3987,50 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac -# Do `set' in a subshell so we don't clobber the current shell's +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$2" = conftest.file ) then @@ -3684,6 +4042,16 @@ Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. @@ -3706,12 +4074,12 @@ if test x"${MISSING+set}" != xset; then esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then @@ -3723,17 +4091,17 @@ if test x"${install_sh}" != xset; then esac fi -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. +# will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -3745,7 +4113,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3773,7 +4141,7 @@ if test -z "$ac_cv_prog_STRIP"; then set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -3785,7 +4153,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3826,7 +4194,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then : + if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3836,7 +4204,7 @@ do test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ @@ -3865,20 +4233,13 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } - -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : +if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -3890,7 +4251,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3918,7 +4279,7 @@ done $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -3954,6 +4315,45 @@ else fi rmdir .tst 2>/dev/null +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." @@ -4004,13 +4404,24 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +mkdir_p='$(MKDIR_P)' + # We need awk for the "check" target. The system "awk" is bad on # some platforms. -# Always define AMTAR for backward compatibility. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' -AMTAR=${AMTAR-"${am_missing_run}tar"} -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar pax cpio none' + +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + @@ -4024,7 +4435,7 @@ $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : +if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias @@ -4040,7 +4451,7 @@ fi $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -4058,7 +4469,7 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : +if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then @@ -4073,7 +4484,7 @@ fi $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -4135,7 +4546,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4147,7 +4558,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4175,7 +4586,7 @@ if test -z "$ac_cv_prog_CC"; then set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -4187,7 +4598,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4228,7 +4639,7 @@ if test -z "$CC"; then set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4240,7 +4651,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4268,7 +4679,7 @@ if test -z "$CC"; then set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4281,7 +4692,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -4327,7 +4738,7 @@ if test -z "$CC"; then set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4339,7 +4750,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4371,7 +4782,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -4383,7 +4794,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4426,7 +4837,7 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -4541,7 +4952,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -4584,7 +4995,7 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -4643,7 +5054,7 @@ $as_echo "$ac_try_echo"; } >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -4654,7 +5065,7 @@ rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4695,7 +5106,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -4705,7 +5116,7 @@ OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4742,7 +5153,7 @@ ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -4820,7 +5231,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -4829,8 +5240,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -4933,7 +5343,7 @@ am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. +# Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include @@ -4966,6 +5376,7 @@ fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= @@ -4981,15 +5392,16 @@ depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : +if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -5023,16 +5435,16 @@ else : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -5041,16 +5453,16 @@ else test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} @@ -5104,98 +5516,6 @@ else fi -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -5209,7 +5529,7 @@ if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -5325,7 +5645,7 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -5337,7 +5657,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -5351,7 +5671,7 @@ do for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -5400,7 +5720,7 @@ $as_echo "$ac_cv_path_GREP" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -5417,7 +5737,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -5465,9 +5785,373 @@ $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5 +$as_echo_n "checking for Minix Amsterdam compiler... " >&6; } +if ${gl_cv_c_amsterdam_compiler+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef __ACK__ +Amsterdam +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Amsterdam" >/dev/null 2>&1; then : + gl_cv_c_amsterdam_compiler=yes +else + gl_cv_c_amsterdam_compiler=no +fi +rm -f conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5 +$as_echo "$gl_cv_c_amsterdam_compiler" >&6; } + if test -z "$AR"; then + if test $gl_cv_c_amsterdam_compiler = yes; then + AR='cc -c.a' + if test -z "$ARFLAGS"; then + ARFLAGS='-o' + fi + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="ar" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + + if test -z "$ARFLAGS"; then + ARFLAGS='cru' + fi + fi + else + if test -z "$ARFLAGS"; then + ARFLAGS='cru' + fi + fi + + + if test -z "$RANLIB"; then + if test $gl_cv_c_amsterdam_compiler = yes; then + RANLIB=':' + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + + fi + fi + + +if test "x$CC" != xcc; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 +$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 +$as_echo_n "checking whether cc understands -c and -o together... " >&6; } +fi +set dummy $CC; ac_cc=`$as_echo "$2" | + sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` +if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +# Make sure it works both with $CC and with simple cc. +# We do the test twice because some compilers refuse to overwrite an +# existing .o file with -o, though they will create one. +ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' +rm -f conftest2.* +if { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && + test -f conftest2.$ac_objext && { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; +then + eval ac_cv_prog_cc_${ac_cc}_c_o=yes + if test "x$CC" != xcc; then + # Test first that cc exists at all. + if { ac_try='cc -c conftest.$ac_ext >&5' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' + rm -f conftest2.* + if { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && + test -f conftest2.$ac_objext && { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; + then + # cc works too. + : + else + # cc exists but doesn't like -o. + eval ac_cv_prog_cc_${ac_cc}_c_o=no + fi + fi + fi +else + eval ac_cv_prog_cc_${ac_cc}_c_o=no +fi +rm -f core conftest* + +fi +if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h + +fi + +# FIXME: we rely on the cache variable name because +# there is no other way. +set dummy $CC +am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` +eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o +if test "$am_t" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5595,10 +6279,8 @@ done - - ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" -if test "x$ac_cv_header_minix_config_h" = x""yes; then : +if test "x$ac_cv_header_minix_config_h" = xyes; then : MINIX=yes else MINIX= @@ -5615,20 +6297,15 @@ $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h $as_echo "#define _MINIX 1" >>confdefs.h + +$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h + fi - case "$host_os" in - hpux*) - -$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h - - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } -if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : +if ${ac_cv_safe_to_define___extensions__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5658,12 +6335,61 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } $as_echo "#define _ALL_SOURCE 1" >>confdefs.h + $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h + $as_echo "#define _GNU_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5 +$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; } +if ${ac_cv_should_define__xopen_source+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_should_define__xopen_source=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + mbstate_t x; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #define _XOPEN_SOURCE 500 + #include + mbstate_t x; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_should_define__xopen_source=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5 +$as_echo "$ac_cv_should_define__xopen_source" >&6; } + test $ac_cv_should_define__xopen_source = yes && + $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h @@ -5672,42 +6398,284 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then : + enableval=$enable_largefile; +fi + +if test "$enable_largefile" != no; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 +$as_echo_n "checking for special C compiler options needed for large files... " >&6; } +if ${ac_cv_sys_largefile_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF + if ac_fn_c_try_compile "$LINENO"; then : + break +fi +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_largefile_CC=' -n32'; break +fi +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 +$as_echo "$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +if ${ac_cv_sys_file_offset_bits+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _FILE_OFFSET_BITS 64 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=64; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 +$as_echo "$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +_ACEOF +;; +esac +rm -rf conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 +$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } +if ${ac_cv_sys_large_files+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _LARGE_FILES 1 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=1; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 +$as_echo "$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files +_ACEOF +;; +esac +rm -rf conftest* + fi + + +$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h + +fi + + + + + + + # Check whether --enable-threads was given. +if test "${enable_threads+set}" = set; then : + enableval=$enable_threads; gl_use_threads=$enableval +else + if test -n "$gl_use_threads_default"; then + gl_use_threads="$gl_use_threads_default" + else + case "$host_os" in + osf*) gl_use_threads=no ;; + cygwin*) + case `uname -r` in + 1.[0-5].*) gl_use_threads=no ;; + *) gl_use_threads=yes ;; + esac + ;; + *) gl_use_threads=yes ;; + esac + fi + +fi + + if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then + # For using : + case "$host_os" in + osf*) + # On OSF/1, the compiler needs the flag -D_REENTRANT so that it + # groks . cc also understands the flag -pthread, but + # we don't use it because 1. gcc-2.95 doesn't understand -pthread, + # 2. putting a flag into CPPFLAGS that has an effect on the linker + # causes the AC_LINK_IFELSE test below to succeed unexpectedly, + # leading to wrong values of LIBTHREAD and LTLIBTHREAD. + CPPFLAGS="$CPPFLAGS -D_REENTRANT" + ;; + esac + # Some systems optimize for single-threaded programs by default, and + # need special flags to disable these optimizations. For example, the + # definition of 'errno' in . + case "$host_os" in + aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; + solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; + esac + fi + + + - # Code from module alignof: # Code from module alloca-opt: - # Code from module arg-nonnull: # Code from module arpa_inet: # Code from module base64: # Code from module btowc: - # Code from module c++defs: - # Code from module c-strtod: - # Code from module cloexec: - # Code from module close-hook: # Code from module configmake: # Code from module crypto/sha1: # Code from module dirname: # Code from module dirname-lgpl: + # Code from module dosname: # Code from module double-slash-root: - # Code from module dup2: # Code from module environ: # Code from module errno: # Code from module error: # Code from module exitfail: # Code from module extensions: - # Code from module fcntl: - # Code from module fcntl-h: - # Code from module fcntl-safer: + # Code from module extern-inline: + # Code from module fd-hook: # Code from module float: # Code from module floorf: # Code from module fsusage: # Code from module full-read: - # Code from module full-write: # Code from module getaddrinfo: - # Code from module getdtablesize: # Code from module gethostname: # Code from module getloadavg: - # Code from module getopt: # Code from module getopt-gnu: # Code from module getopt-posix: # Code from module gettext: @@ -5716,75 +6684,90 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } # Code from module hostent: # Code from module include_next: # Code from module inet_ntop: - # Code from module inline: # Code from module intprops: # Code from module langinfo: + # Code from module largefile: + # Code from module localcharset: # Code from module locale: - # Code from module malloc: + # Code from module localeconv: + # Code from module lock: + # Code from module malloc-gnu: # Code from module malloc-posix: # Code from module malloca: # Code from module math: # Code from module mbrtowc: # Code from module mbsinit: + # Code from module mbtowc: # Code from module memchr: # Code from module mktime: + # Code from module mktime-internal: # Code from module mountlist: + # Code from module msvc-inval: + # Code from module msvc-nothrow: # Code from module multiarch: # Code from module netdb: # Code from module netinet_in: # Code from module nl_langinfo: - # Code from module open: + # Code from module nocrash: + # Code from module read: # Code from module regex: # Code from module safe-read: - # Code from module safe-write: # Code from module servent: # Code from module setenv: # Code from module size_max: + # Code from module snippet/_Noreturn: + # Code from module snippet/arg-nonnull: + # Code from module snippet/c++defs: + # Code from module snippet/warn-on-use: # Code from module snprintf: + # Code from module socketlib: # Code from module sockets: # Code from module socklen: # Code from module ssize_t: - # Code from module stat: + # Code from module stdalign: # Code from module stdbool: # Code from module stddef: # Code from module stdint: # Code from module stdio: # Code from module stdlib: - # Code from module strdup-posix: # Code from module streq: # Code from module strerror: + # Code from module strerror-override: # Code from module string: # Code from module strndup: # Code from module strnlen: # Code from module strsep: # Code from module strstr-simple: # Code from module sys_socket: - # Code from module sys_stat: + # Code from module sys_types: + # Code from module sys_uio: + # Code from module threadlib: + + + # Code from module time: # Code from module time_r: # Code from module timegm: # Code from module unistd: - # Code from module unistd-safer: # Code from module unsetenv: # Code from module vasnprintf: # Code from module vasprintf: # Code from module verify: # Code from module vsnprintf: - # Code from module warn-on-use: # Code from module wchar: # Code from module wcrtomb: - # Code from module wctype: - # Code from module write: + # Code from module wctype-h: # Code from module xalloc: # Code from module xalloc-die: + # Code from module xalloc-oversized: # Code from module xsize: # Code from module xstrndup: if test $ac_cv_c_compiler_gnu = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 $as_echo_n "checking whether $CC needs -traditional... " >&6; } -if test "${ac_cv_prog_gcc_traditional+set}" = set; then : +if ${ac_cv_prog_gcc_traditional+:} false; then : $as_echo_n "(cached) " >&6 else ac_pattern="Autoconf.*'x'" @@ -5850,7 +6833,7 @@ ltmain="$ac_aux_dir/ltmain.sh" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : +if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ @@ -5870,7 +6853,7 @@ do for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue + as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in @@ -5932,7 +6915,7 @@ Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then : +if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 @@ -5949,7 +6932,7 @@ do for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue + as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in @@ -6063,7 +7046,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${lt_cv_path_LD+set}" = set; then : +if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -6103,7 +7086,7 @@ fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : +if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. @@ -6130,7 +7113,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then : +if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then @@ -6190,7 +7173,7 @@ else set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then : +if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then @@ -6202,7 +7185,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6234,7 +7217,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then @@ -6246,7 +7229,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6297,18 +7280,18 @@ test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then : +if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:6305: $ac_compile\"" >&5) + (eval echo "\"\$as_me:7288: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:6308: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:7291: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:6311: output\"" >&5) + (eval echo "\"\$as_me:7294: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -6332,7 +7315,7 @@ fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then : +if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 @@ -6524,7 +7507,7 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then : +if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' @@ -6560,7 +7543,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then : +if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then @@ -6572,7 +7555,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6600,7 +7583,7 @@ if test -z "$ac_cv_prog_OBJDUMP"; then set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then @@ -6612,7 +7595,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6659,7 +7642,7 @@ test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then : +if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' @@ -6875,7 +7858,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : +if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then @@ -6887,7 +7870,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6915,7 +7898,7 @@ if test -z "$ac_cv_prog_AR"; then set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : +if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then @@ -6927,7 +7910,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6980,7 +7963,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -6992,7 +7975,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7020,7 +8003,7 @@ if test -z "$ac_cv_prog_STRIP"; then set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -7032,7 +8015,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7079,7 +8062,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : +if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -7091,7 +8074,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7119,7 +8102,7 @@ if test -z "$ac_cv_prog_RANLIB"; then set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -7131,7 +8114,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7236,7 +8219,7 @@ compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : +if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else @@ -7513,7 +8496,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 7516 "configure"' > conftest.$ac_ext + echo '#line 8499 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7607,7 +8590,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then : +if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c @@ -7683,7 +8666,7 @@ need_locks="$enable_libtool_lock" set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : +if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then @@ -7695,7 +8678,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7723,7 +8706,7 @@ if test -z "$ac_cv_prog_DSYMUTIL"; then set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then @@ -7735,7 +8718,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7775,7 +8758,7 @@ fi set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then : +if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then @@ -7787,7 +8770,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7815,7 +8798,7 @@ if test -z "$ac_cv_prog_NMEDIT"; then set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then @@ -7827,7 +8810,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7867,7 +8850,7 @@ fi set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LIPO+set}" = set; then : +if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then @@ -7879,7 +8862,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7907,7 +8890,7 @@ if test -z "$ac_cv_prog_LIPO"; then set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then @@ -7919,7 +8902,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7959,7 +8942,7 @@ fi set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL+set}" = set; then : +if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then @@ -7971,7 +8954,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7999,7 +8982,7 @@ if test -z "$ac_cv_prog_OTOOL"; then set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then @@ -8011,7 +8994,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8051,7 +9034,7 @@ fi set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL64+set}" = set; then : +if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then @@ -8063,7 +9046,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8091,7 +9074,7 @@ if test -z "$ac_cv_prog_OTOOL64"; then set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then @@ -8103,7 +9086,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8166,7 +9149,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then : +if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no @@ -8195,7 +9178,7 @@ fi $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : +if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no @@ -8264,7 +9247,7 @@ for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " -if test "x$ac_cv_header_dlfcn_h" = x""yes; then : +if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF @@ -8448,7 +9431,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; then : +if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null @@ -8556,7 +9539,7 @@ file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : +if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -8622,7 +9605,7 @@ if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : +if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -8759,7 +9742,7 @@ if test "$GCC" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no @@ -8775,11 +9758,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8778: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9761: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8782: \$? = $ac_status" >&5 + echo "$as_me:9765: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -9098,7 +10081,7 @@ $as_echo "$lt_prog_compiler_pic" >&6; } if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : +if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no @@ -9114,11 +10097,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9117: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10100: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9121: \$? = $ac_status" >&5 + echo "$as_me:10104: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -9157,7 +10140,7 @@ fi wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then : +if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no @@ -9200,7 +10183,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : +if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -9219,11 +10202,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9222: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10205: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9226: \$? = $ac_status" >&5 + echo "$as_me:10209: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -9255,7 +10238,7 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : +if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -9274,11 +10257,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9277: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10260: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9281: \$? = $ac_status" >&5 + echo "$as_me:10264: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11400,7 +12383,7 @@ else # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11434,7 +12417,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else @@ -11448,12 +12431,12 @@ fi *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = x""yes; then : +if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then : +if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11487,16 +12470,16 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = x""yes; then : +if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11530,12 +12513,12 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then : +if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11569,12 +12552,12 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then : +if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11608,7 +12591,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi @@ -11649,7 +12632,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then : +if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -11658,7 +12641,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11661 "configure" +#line 12644 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11745,7 +12728,7 @@ $as_echo "$lt_cv_dlopen_self" >&6; } wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then : +if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -11754,7 +12737,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11757 "configure" +#line 12740 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11982,117 +12965,6 @@ CC="$lt_save_CC" -if test "x$CC" != xcc; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 -$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 -$as_echo_n "checking whether cc understands -c and -o together... " >&6; } -fi -set dummy $CC; ac_cc=`$as_echo "$2" | - sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -rm -f conftest2.* -if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if { ac_try='cc -c conftest.$ac_ext >&5' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' - rm -f conftest2.* - if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi - fi -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -fi -rm -f core conftest* - -fi -if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h - -fi - # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC @@ -12111,7 +12983,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5 $as_echo_n "checking for error_at_line... " >&6; } -if test "${ac_cv_lib_error_at_line+set}" = set; then : +if ${ac_cv_lib_error_at_line+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12153,16 +13025,16 @@ if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } -if test "${ac_cv_sys_largefile_CC+set}" = set; then : +if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. @@ -12171,8 +13043,8 @@ else incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; int main () { @@ -12181,16 +13053,16 @@ main () return 0; } _ACEOF - if ac_fn_c_try_compile "$LINENO"; then : + if ac_fn_c_try_compile "$LINENO"; then : break fi rm -f core conftest.err conftest.$ac_objext - CC="$CC -n32" - if ac_fn_c_try_compile "$LINENO"; then : + CC="$CC -n32" + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext - break + break done CC=$ac_save_CC rm -f conftest.$ac_ext @@ -12204,7 +13076,7 @@ $as_echo "$ac_cv_sys_largefile_CC" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if test "${ac_cv_sys_file_offset_bits+set}" = set; then : +if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else while :; do @@ -12217,8 +13089,8 @@ else incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; int main () { @@ -12241,8 +13113,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; int main () { @@ -12273,7 +13145,7 @@ rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } -if test "${ac_cv_sys_large_files+set}" = set; then : +if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else while :; do @@ -12286,8 +13158,8 @@ else incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; int main () { @@ -12310,8 +13182,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; int main () { @@ -12340,12 +13212,16 @@ _ACEOF esac rm -rf conftest* fi + + +$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h + fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5 $as_echo_n "checking for working strtod... " >&6; } -if test "${ac_cv_func_strtod+set}" = set; then : +if ${ac_cv_func_strtod+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -12404,14 +13280,14 @@ if test $ac_cv_func_strtod = no; then esac ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow" -if test "x$ac_cv_func_pow" = x""yes; then : +if test "x$ac_cv_func_pow" = xyes; then : fi if test $ac_cv_func_pow = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5 $as_echo_n "checking for pow in -lm... " >&6; } -if test "${ac_cv_lib_m_pow+set}" = set; then : +if ${ac_cv_lib_m_pow+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12445,7 +13321,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5 $as_echo "$ac_cv_lib_m_pow" >&6; } -if test "x$ac_cv_lib_m_pow" = x""yes; then : +if test "x$ac_cv_lib_m_pow" = xyes; then : POW_LIB=-lm else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5 @@ -12531,7 +13407,7 @@ fi set dummy python; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PYTHON+set}" = set; then : +if ${ac_cv_path_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else case $PYTHON in @@ -12545,7 +13421,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12571,7 +13447,7 @@ fi set dummy sh; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_SH+set}" = set; then : +if ${ac_cv_path_SH+:} false; then : $as_echo_n "(cached) " >&6 else case $SH in @@ -12585,7 +13461,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12611,7 +13487,7 @@ fi set dummy perl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PERL+set}" = set; then : +if ${ac_cv_path_PERL+:} false; then : $as_echo_n "(cached) " >&6 else case $PERL in @@ -12625,7 +13501,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12651,7 +13527,7 @@ fi set dummy libgnutls-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_LIBGNUTLS_CONFIG+set}" = set; then : +if ${ac_cv_path_LIBGNUTLS_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $LIBGNUTLS_CONFIG in @@ -12665,7 +13541,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_LIBGNUTLS_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12691,7 +13567,7 @@ fi set dummy hostname; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_HOSTNAME+set}" = set; then : +if ${ac_cv_path_HOSTNAME+:} false; then : $as_echo_n "(cached) " >&6 else case $HOSTNAME in @@ -12705,7 +13581,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_HOSTNAME="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12731,7 +13607,7 @@ fi set dummy basename; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_BASENAME+set}" = set; then : +if ${ac_cv_path_BASENAME+:} false; then : $as_echo_n "(cached) " >&6 else case $BASENAME in @@ -12745,7 +13621,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12807,7 +13683,7 @@ OPENSSL_DIRS="/usr /usr/local /usr/slocal /usr/local/openssl /usr/local/ssl \ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ldce" >&5 $as_echo_n "checking for main in -ldce... " >&6; } -if test "${ac_cv_lib_dce_main+set}" = set; then : +if ${ac_cv_lib_dce_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12835,13 +13711,13 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dce_main" >&5 $as_echo "$ac_cv_lib_dce_main" >&6; } -if test "x$ac_cv_lib_dce_main" = x""yes; then : +if test "x$ac_cv_lib_dce_main" = xyes; then : SOCKETLIBS="$SOCKETLIBS -ldce" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl" >&5 $as_echo_n "checking for main in -lnsl... " >&6; } -if test "${ac_cv_lib_nsl_main+set}" = set; then : +if ${ac_cv_lib_nsl_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12869,13 +13745,13 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_main" >&5 $as_echo "$ac_cv_lib_nsl_main" >&6; } -if test "x$ac_cv_lib_nsl_main" = x""yes; then : +if test "x$ac_cv_lib_nsl_main" = xyes; then : SOCKETLIBS="$SOCKETLIBS -lnsl" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 $as_echo_n "checking for socket in -lsocket... " >&6; } -if test "${ac_cv_lib_socket_socket+set}" = set; then : +if ${ac_cv_lib_socket_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12909,13 +13785,13 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 $as_echo "$ac_cv_lib_socket_socket" >&6; } -if test "x$ac_cv_lib_socket_socket" = x""yes; then : +if test "x$ac_cv_lib_socket_socket" = xyes; then : SOCKETLIBS="$SOCKETLIBS -lsocket" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lresolv" >&5 $as_echo_n "checking for main in -lresolv... " >&6; } -if test "${ac_cv_lib_resolv_main+set}" = set; then : +if ${ac_cv_lib_resolv_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12943,7 +13819,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_main" >&5 $as_echo "$ac_cv_lib_resolv_main" >&6; } -if test "x$ac_cv_lib_resolv_main" = x""yes; then : +if test "x$ac_cv_lib_resolv_main" = xyes; then : SOCKETLIBS="$SOCKETLIBS -lresolv" fi @@ -12952,7 +13828,7 @@ fi for ac_header in math.h do : ac_fn_c_check_header_mongrel "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default" -if test "x$ac_cv_header_math_h" = x""yes; then : +if test "x$ac_cv_header_math_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MATH_H 1 _ACEOF @@ -12963,7 +13839,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for floor in -lm" >&5 $as_echo_n "checking for floor in -lm... " >&6; } -if test "${ac_cv_lib_m_floor+set}" = set; then : +if ${ac_cv_lib_m_floor+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12997,14 +13873,14 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_floor" >&5 $as_echo "$ac_cv_lib_m_floor" >&6; } -if test "x$ac_cv_lib_m_floor" = x""yes; then : +if test "x$ac_cv_lib_m_floor" = xyes; then : MATHLIBS="-lm" fi for ac_header in mp.h do : ac_fn_c_check_header_mongrel "$LINENO" "mp.h" "ac_cv_header_mp_h" "$ac_includes_default" -if test "x$ac_cv_header_mp_h" = x""yes; then : +if test "x$ac_cv_header_mp_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MP_H 1 _ACEOF @@ -13015,7 +13891,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lbsd" >&5 $as_echo_n "checking for pow in -lbsd... " >&6; } -if test "${ac_cv_lib_bsd_pow+set}" = set; then : +if ${ac_cv_lib_bsd_pow+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13049,7 +13925,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_pow" >&5 $as_echo "$ac_cv_lib_bsd_pow" >&6; } -if test "x$ac_cv_lib_bsd_pow" = x""yes; then : +if test "x$ac_cv_lib_bsd_pow" = xyes; then : MATHLIBS="$MATHLIBS -lbsd" fi @@ -13075,7 +13951,7 @@ fi if test "$enable_libtap" != "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for plan_tests in -ltap" >&5 $as_echo_n "checking for plan_tests in -ltap... " >&6; } -if test "${ac_cv_lib_tap_plan_tests+set}" = set; then : +if ${ac_cv_lib_tap_plan_tests+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13109,7 +13985,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tap_plan_tests" >&5 $as_echo "$ac_cv_lib_tap_plan_tests" >&6; } -if test "x$ac_cv_lib_tap_plan_tests" = x""yes; then : +if test "x$ac_cv_lib_tap_plan_tests" = xyes; then : enable_libtap="yes" fi @@ -13157,7 +14033,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcrypt" >&5 $as_echo_n "checking for main in -lcrypt... " >&6; } -if test "${ac_cv_lib_crypt_main+set}" = set; then : +if ${ac_cv_lib_crypt_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13185,7 +14061,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_main" >&5 $as_echo "$ac_cv_lib_crypt_main" >&6; } -if test "x$ac_cv_lib_crypt_main" = x""yes; then : +if test "x$ac_cv_lib_crypt_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCRYPT 1 _ACEOF @@ -13201,7 +14077,7 @@ if test "$ac_cv_lib_crypt_main" = "yes" -a "x$PGSQL" != "xno"; then fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsetdbLogin in -lpq" >&5 $as_echo_n "checking for PQsetdbLogin in -lpq... " >&6; } -if test "${ac_cv_lib_pq_PQsetdbLogin+set}" = set; then : +if ${ac_cv_lib_pq_PQsetdbLogin+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13235,7 +14111,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsetdbLogin" >&5 $as_echo "$ac_cv_lib_pq_PQsetdbLogin" >&6; } -if test "x$ac_cv_lib_pq_PQsetdbLogin" = x""yes; then : +if test "x$ac_cv_lib_pq_PQsetdbLogin" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPQ 1 _ACEOF @@ -13248,7 +14124,7 @@ fi for ac_header in pgsql/libpq-fe.h do : ac_fn_c_check_header_mongrel "$LINENO" "pgsql/libpq-fe.h" "ac_cv_header_pgsql_libpq_fe_h" "$ac_includes_default" -if test "x$ac_cv_header_pgsql_libpq_fe_h" = x""yes; then : +if test "x$ac_cv_header_pgsql_libpq_fe_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PGSQL_LIBPQ_FE_H 1 _ACEOF @@ -13260,7 +14136,7 @@ done for ac_header in postgresql/libpq-fe.h do : ac_fn_c_check_header_mongrel "$LINENO" "postgresql/libpq-fe.h" "ac_cv_header_postgresql_libpq_fe_h" "$ac_includes_default" -if test "x$ac_cv_header_postgresql_libpq_fe_h" = x""yes; then : +if test "x$ac_cv_header_postgresql_libpq_fe_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_POSTGRESQL_LIBPQ_FE_H 1 _ACEOF @@ -13272,7 +14148,7 @@ done for ac_header in libpq-fe.h do : ac_fn_c_check_header_mongrel "$LINENO" "libpq-fe.h" "ac_cv_header_libpq_fe_h" "$ac_includes_default" -if test "x$ac_cv_header_libpq_fe_h" = x""yes; then : +if test "x$ac_cv_header_libpq_fe_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPQ_FE_H 1 _ACEOF @@ -13321,10 +14197,87 @@ fi LIBS="$_SAVEDLIBS" CPPFLAGS="$_SAVEDCPPFLAGS" -_SAVEDLIBS="$LIBS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rc_read_config in -lradiusclient" >&5 + +# Check whether --with-dbi was given. +if test "${with_dbi+set}" = set; then : + withval=$with_dbi; +fi + +if test "x$with_dbi" != "xno"; then : + + _SAVEDLIBS="$LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbi_initialize in -ldbi" >&5 +$as_echo_n "checking for dbi_initialize in -ldbi... " >&6; } +if ${ac_cv_lib_dbi_dbi_initialize+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldbi $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dbi_initialize (); +int +main () +{ +return dbi_initialize (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dbi_dbi_initialize=yes +else + ac_cv_lib_dbi_dbi_initialize=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dbi_dbi_initialize" >&5 +$as_echo "$ac_cv_lib_dbi_dbi_initialize" >&6; } +if test "x$ac_cv_lib_dbi_dbi_initialize" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBDBI 1 +_ACEOF + + LIBS="-ldbi $LIBS" + +fi + + if test "$ac_cv_lib_dbi_dbi_initialize" = "yes"; then + EXTRAS="$EXTRAS check_dbi" + DBILIBS="-ldbi" + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Skipping dbi plugin" >&5 +$as_echo "$as_me: WARNING: Skipping dbi plugin" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: install DBI libs to compile this plugin (see REQUIREMENTS)." >&5 +$as_echo "$as_me: WARNING: install DBI libs to compile this plugin (see REQUIREMENTS)." >&2;} + fi + LIBS="$_SAVEDLIBS" + +fi + + +# Check whether --with-radius was given. +if test "${with_radius+set}" = set; then : + withval=$with_radius; +fi + + +if test "x$with_radius" != "xno"; then : + + _SAVEDLIBS="$LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rc_read_config in -lradiusclient" >&5 $as_echo_n "checking for rc_read_config in -lradiusclient... " >&6; } -if test "${ac_cv_lib_radiusclient_rc_read_config+set}" = set; then : +if ${ac_cv_lib_radiusclient_rc_read_config+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13358,7 +14311,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_radiusclient_rc_read_config" >&5 $as_echo "$ac_cv_lib_radiusclient_rc_read_config" >&6; } -if test "x$ac_cv_lib_radiusclient_rc_read_config" = x""yes; then : +if test "x$ac_cv_lib_radiusclient_rc_read_config" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBRADIUSCLIENT 1 _ACEOF @@ -13367,14 +14320,14 @@ _ACEOF fi -if test "$ac_cv_lib_radiusclient_rc_read_config" = "yes"; then - EXTRAS="$EXTRAS check_radius" - RADIUSLIBS="-lradiusclient" + if test "$ac_cv_lib_radiusclient_rc_read_config" = "yes"; then + EXTRAS="$EXTRAS check_radius" + RADIUSLIBS="-lradiusclient" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rc_read_config in -lradiusclient-ng" >&5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rc_read_config in -lradiusclient-ng" >&5 $as_echo_n "checking for rc_read_config in -lradiusclient-ng... " >&6; } -if test "${ac_cv_lib_radiusclient_ng_rc_read_config+set}" = set; then : +if ${ac_cv_lib_radiusclient_ng_rc_read_config+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13408,7 +14361,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_radiusclient_ng_rc_read_config" >&5 $as_echo "$ac_cv_lib_radiusclient_ng_rc_read_config" >&6; } -if test "x$ac_cv_lib_radiusclient_ng_rc_read_config" = x""yes; then : +if test "x$ac_cv_lib_radiusclient_ng_rc_read_config" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBRADIUSCLIENT_NG 1 _ACEOF @@ -13417,23 +14370,34 @@ _ACEOF fi - if test "$ac_cv_lib_radiusclient_ng_rc_read_config" = "yes"; then - EXTRAS="$EXTRAS check_radius" - RADIUSLIBS="-lradiusclient-ng" + if test "$ac_cv_lib_radiusclient_ng_rc_read_config" = "yes"; then + EXTRAS="$EXTRAS check_radius" + RADIUSLIBS="-lradiusclient-ng" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Skipping radius plugin" >&5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Skipping radius plugin" >&5 $as_echo "$as_me: WARNING: Skipping radius plugin" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: install radius libs to compile this plugin (see REQUIREMENTS)." >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: install radius libs to compile this plugin (see REQUIREMENTS)." >&5 $as_echo "$as_me: WARNING: install radius libs to compile this plugin (see REQUIREMENTS)." >&2;} + fi fi -fi -LIBS="$_SAVEDLIBS" + LIBS="$_SAVEDLIBS" -_SAVEDLIBS="$LIBS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lldap" >&5 +fi + + +# Check whether --with-ldap was given. +if test "${with_ldap+set}" = set; then : + withval=$with_ldap; +fi + + +if test "x$with_ldap" != "xno"; then : + + _SAVEDLIBS="$LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lldap" >&5 $as_echo_n "checking for main in -lldap... " >&6; } -if test "${ac_cv_lib_ldap_main+set}" = set; then : +if ${ac_cv_lib_ldap_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13461,7 +14425,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_main" >&5 $as_echo "$ac_cv_lib_ldap_main" >&6; } -if test "x$ac_cv_lib_ldap_main" = x""yes; then : +if test "x$ac_cv_lib_ldap_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBLDAP 1 _ACEOF @@ -13470,15 +14434,15 @@ _ACEOF fi -if test "$ac_cv_lib_ldap_main" = "yes"; then - LDAPLIBS="-lldap -llber"\ - LDAPINCLUDE="-I/usr/include/ldap" + if test "$ac_cv_lib_ldap_main" = "yes"; then + LDAPLIBS="-lldap -llber"\ + LDAPINCLUDE="-I/usr/include/ldap" - for ac_func in ldap_set_option + for ac_func in ldap_set_option do : ac_fn_c_check_func "$LINENO" "ldap_set_option" "ac_cv_func_ldap_set_option" -if test "x$ac_cv_func_ldap_set_option" = x""yes; then : +if test "x$ac_cv_func_ldap_set_option" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LDAP_SET_OPTION 1 _ACEOF @@ -13486,8 +14450,8 @@ _ACEOF fi done - EXTRAS="$EXTRAS check_ldap" - for ac_func in ldap_init ldap_set_option ldap_get_option ldap_start_tls_s + EXTRAS="$EXTRAS check_ldap" + for ac_func in ldap_init ldap_set_option ldap_get_option ldap_start_tls_s do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -13499,40 +14463,78 @@ _ACEOF fi done -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Skipping LDAP plugin" >&5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Skipping LDAP plugin" >&5 $as_echo "$as_me: WARNING: Skipping LDAP plugin" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: install LDAP libs to compile this plugin (see REQUIREMENTS)." >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: install LDAP libs to compile this plugin (see REQUIREMENTS)." >&5 $as_echo "$as_me: WARNING: install LDAP libs to compile this plugin (see REQUIREMENTS)." >&2;} -fi -LIBS="$_SAVEDLIBS" + fi + LIBS="$_SAVEDLIBS" -ac_fn_c_check_header_mongrel "$LINENO" "linux/hdreg.h" "ac_cv_header_linux_hdreg_h" "$ac_includes_default" -if test "x$ac_cv_header_linux_hdreg_h" = x""yes; then : +fi + +case $host in + *linux*) + ac_fn_c_check_header_mongrel "$LINENO" "linux/hdreg.h" "ac_cv_header_linux_hdreg_h" "$ac_includes_default" +if test "x$ac_cv_header_linux_hdreg_h" = xyes; then : FOUNDINCLUDE=yes else FOUNDINCLUDE=no fi -if test "$FOUNDINCLUDE" = "yes" ; then - ac_fn_c_check_header_mongrel "$LINENO" "linux/types.h" "ac_cv_header_linux_types_h" "$ac_includes_default" -if test "x$ac_cv_header_linux_types_h" = x""yes; then : + if test "$FOUNDINCLUDE" = "yes" ; then + ac_fn_c_check_header_mongrel "$LINENO" "linux/types.h" "ac_cv_header_linux_types_h" "$ac_includes_default" +if test "x$ac_cv_header_linux_types_h" = xyes; then : FOUNDINCLUDE=yes else FOUNDINCLUDE=no fi + fi + if test "$FOUNDINCLUDE" = "no" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Skipping check_ide_smart plugin." >&5 +$as_echo "$as_me: WARNING: Skipping check_ide_smart plugin." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: check_ide_smart requires linux/hdreg.h and linux/types.h." >&5 +$as_echo "$as_me: WARNING: check_ide_smart requires linux/hdreg.h and linux/types.h." >&2;} + fi + ;; + *netbsd*) + ac_fn_c_check_header_mongrel "$LINENO" "dev/ata/atareg.h" "ac_cv_header_dev_ata_atareg_h" "$ac_includes_default" +if test "x$ac_cv_header_dev_ata_atareg_h" = xyes; then : + FOUNDINCLUDE=yes +else + FOUNDINCLUDE=no fi + + if test "$FOUNDINCLUDE" = "yes" ; then + ac_fn_c_check_header_mongrel "$LINENO" "dev/ic/wdcreg.h" "ac_cv_header_dev_ic_wdcreg_h" "$ac_includes_default" +if test "x$ac_cv_header_dev_ic_wdcreg_h" = xyes; then : + FOUNDINCLUDE=yes +else + FOUNDINCLUDE=no +fi + + + fi + if test "$FOUNDINCLUDE" = "no" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Skipping check_ide_smart plugin." >&5 +$as_echo "$as_me: WARNING: Skipping check_ide_smart plugin." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: check_ide_smart requires dev/ata/atareg.h and dev/ic/wdcreg.h" >&5 +$as_echo "$as_me: WARNING: check_ide_smart requires dev/ata/atareg.h and dev/ic/wdcreg.h" >&2;} + fi + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Skipping check_ide_smart plugin." >&5 +$as_echo "$as_me: WARNING: Skipping check_ide_smart plugin." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: check_ide_smart works only on Linux and NetBSD" >&5 +$as_echo "$as_me: WARNING: check_ide_smart works only on Linux and NetBSD" >&2;} +esac + if test "$FOUNDINCLUDE" = "yes" ; then EXTRAS="$EXTRAS check_ide_smart" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Skipping check_ide_smart plugin." >&5 -$as_echo "$as_me: WARNING: Skipping check_ide_smart plugin." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: check_ide_smart is linux specific. It requires linux/hdreg.h and linux/types.h." >&5 -$as_echo "$as_me: WARNING: check_ide_smart is linux specific. It requires linux/hdreg.h and linux/types.h." >&2;} fi @@ -13551,7 +14553,7 @@ fi set dummy mysql_config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_np_mysql_config+set}" = set; then : +if ${ac_cv_path_np_mysql_config+:} false; then : $as_echo_n "(cached) " >&6 else case $np_mysql_config in @@ -13565,7 +14567,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_np_mysql_config="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -13614,7 +14616,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_init in -lmysqlclient" >&5 $as_echo_n "checking for mysql_init in -lmysqlclient... " >&6; } -if test "${ac_cv_lib_mysqlclient_mysql_init+set}" = set; then : +if ${ac_cv_lib_mysqlclient_mysql_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13648,7 +14650,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_mysql_init" >&5 $as_echo "$ac_cv_lib_mysqlclient_mysql_init" >&6; } -if test "x$ac_cv_lib_mysqlclient_mysql_init" = x""yes; then : +if test "x$ac_cv_lib_mysqlclient_mysql_init" = xyes; then : with_mysql=$np_mysql_config @@ -13677,6 +14679,84 @@ else +fi + +for ac_header in utmpx.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "utmpx.h" "ac_cv_header_utmpx_h" "$ac_includes_default" +if test "x$ac_cv_header_utmpx_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_UTMPX_H 1 +_ACEOF + +fi + +done + + if test "$ac_cv_header_utmpx_h" = "yes"; then + HAVE_UTMPX_TRUE= + HAVE_UTMPX_FALSE='#' +else + HAVE_UTMPX_TRUE='#' + HAVE_UTMPX_FALSE= +fi + + +if test "$ac_cv_header_utmpx_h" = "no" +then + # Extract the first word of "who", so it can be a program name with args. +set dummy who; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PATH_TO_WHO+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PATH_TO_WHO in + [\\/]* | ?:[\\/]*) + ac_cv_path_PATH_TO_WHO="$PATH_TO_WHO" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PATH_TO_WHO="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PATH_TO_WHO=$ac_cv_path_PATH_TO_WHO +if test -n "$PATH_TO_WHO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_TO_WHO" >&5 +$as_echo "$PATH_TO_WHO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + if $PATH_TO_WHO -q 2>/dev/null | egrep -i "^# users=[0-9]+$" >/dev/null + then + ac_cv_path_to_who="$PATH_TO_WHO -q" + else + ac_cv_path_to_who="$PATH_TO_WHO" + fi + + +cat >>confdefs.h <<_ACEOF +#define WHO_COMMAND "$ac_cv_path_to_who" +_ACEOF + fi @@ -13691,7 +14771,7 @@ fi if test "$with_ipv6" != "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 support" >&5 $as_echo_n "checking for IPv6 support... " >&6; } -if test "${np_cv_sys_ipv6+set}" = set; then : +if ${np_cv_sys_ipv6+:} false; then : $as_echo_n "(cached) " >&6 else @@ -13729,7 +14809,7 @@ $as_echo "$np_cv_sys_ipv6" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "--with-ipv6 was given, but test for IPv6 support failed -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi if test "$np_cv_sys_ipv6" = "yes"; then @@ -13743,7 +14823,7 @@ fi for ac_header in krb5.h do : ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default" -if test "x$ac_cv_header_krb5_h" = x""yes; then : +if test "x$ac_cv_header_krb5_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_KRB5_H 1 _ACEOF @@ -13761,7 +14841,7 @@ if test "$FOUNDINCLUDE" = "no"; then for ac_header in krb5.h do : ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default" -if test "x$ac_cv_header_krb5_h" = x""yes; then : +if test "x$ac_cv_header_krb5_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_KRB5_H 1 _ACEOF @@ -13781,7 +14861,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13815,7 +14895,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDL 1 _ACEOF @@ -13826,7 +14906,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldl" >&5 $as_echo_n "checking for shl_load in -ldl... " >&6; } -if test "${ac_cv_lib_dl_shl_load+set}" = set; then : +if ${ac_cv_lib_dl_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13860,7 +14940,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_shl_load" >&5 $as_echo "$ac_cv_lib_dl_shl_load" >&6; } -if test "x$ac_cv_lib_dl_shl_load" = x""yes; then : +if test "x$ac_cv_lib_dl_shl_load" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDL 1 _ACEOF @@ -13931,7 +15011,7 @@ done LIBS="-L${with_openssl}/lib" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_lock in -lcrypto" >&5 $as_echo_n "checking for CRYPTO_lock in -lcrypto... " >&6; } -if test "${ac_cv_lib_crypto_CRYPTO_lock+set}" = set; then : +if ${ac_cv_lib_crypto_CRYPTO_lock+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13965,7 +15045,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_lock" >&5 $as_echo "$ac_cv_lib_crypto_CRYPTO_lock" >&6; } -if test "x$ac_cv_lib_crypto_CRYPTO_lock" = x""yes; then : +if test "x$ac_cv_lib_crypto_CRYPTO_lock" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCRYPTO 1 _ACEOF @@ -13977,7 +15057,7 @@ fi if test "$ac_cv_lib_crypto_CRYPTO_lock" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lssl" >&5 $as_echo_n "checking for main in -lssl... " >&6; } -if test "${ac_cv_lib_ssl_main+set}" = set; then : +if ${ac_cv_lib_ssl_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -14005,7 +15085,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_main" >&5 $as_echo "$ac_cv_lib_ssl_main" >&6; } -if test "x$ac_cv_lib_ssl_main" = x""yes; then : +if test "x$ac_cv_lib_ssl_main" = xyes; then : SSLLIBS="-lssl -lcrypto" fi @@ -14031,7 +15111,7 @@ if test ! "$FOUNDOPENSSL" = "yes" && test ! "$with_gnutls" = "no"; then for ac_header in gnutls/openssl.h do : ac_fn_c_check_header_mongrel "$LINENO" "gnutls/openssl.h" "ac_cv_header_gnutls_openssl_h" "$ac_includes_default" -if test "x$ac_cv_header_gnutls_openssl_h" = x""yes; then : +if test "x$ac_cv_header_gnutls_openssl_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GNUTLS_OPENSSL_H 1 _ACEOF @@ -14043,7 +15123,7 @@ done if test "$FOUNDGNUTLS" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgnutls-openssl" >&5 $as_echo_n "checking for main in -lgnutls-openssl... " >&6; } -if test "${ac_cv_lib_gnutls_openssl_main+set}" = set; then : +if ${ac_cv_lib_gnutls_openssl_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -14071,7 +15151,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_openssl_main" >&5 $as_echo "$ac_cv_lib_gnutls_openssl_main" >&6; } -if test "x$ac_cv_lib_gnutls_openssl_main" = x""yes; then : +if test "x$ac_cv_lib_gnutls_openssl_main" = xyes; then : SSLLIBS="-lgnutls-openssl" fi @@ -14108,7 +15188,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if test "${ac_cv_header_time+set}" = set; then : +if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -14143,7 +15223,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } -if test "${ac_cv_header_sys_wait_h+set}" = set; then : +if ${ac_cv_header_sys_wait_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -14211,7 +15291,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then : +if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -14220,11 +15300,11 @@ else int main () { -/* FIXME: Include the comments suggested by Paul. */ + #ifndef __cplusplus - /* Ultrix mips cc rejects this. */ + /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; - const charset cs; + const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; @@ -14241,8 +15321,9 @@ main () ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; @@ -14258,10 +15339,10 @@ main () iptr p = 0; ++p; } - { /* AIX XL C 1.02.0.0 rejects this saying + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; @@ -14291,7 +15372,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } -if test "${ac_cv_struct_tm+set}" = set; then : +if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -14325,7 +15406,7 @@ $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" -if test "x$ac_cv_type_pid_t" = x""yes; then : +if test "x$ac_cv_type_pid_t" = xyes; then : else @@ -14336,7 +15417,7 @@ _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = x""yes; then : +if test "x$ac_cv_type_size_t" = xyes; then : else @@ -14348,7 +15429,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } -if test "${ac_cv_type_signal+set}" = set; then : +if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -14382,7 +15463,7 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5 $as_echo_n "checking for va_copy... " >&6; } -if test "${ac_cv_HAVE_VA_COPY+set}" = set; then : +if ${ac_cv_HAVE_VA_COPY+:} false; then : $as_echo_n "(cached) " >&6 else @@ -14415,7 +15496,7 @@ $as_echo "#define HAVE_VA_COPY 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __va_copy" >&5 $as_echo_n "checking for __va_copy... " >&6; } -if test "${ac_cv_HAVE___VA_COPY+set}" = set; then : +if ${ac_cv_HAVE___VA_COPY+:} false; then : $as_echo_n "(cached) " >&6 else @@ -14505,7 +15586,7 @@ done for ac_func in poll do : ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll" -if test "x$ac_cv_func_poll" = x""yes; then : +if test "x$ac_cv_func_poll" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_POLL 1 _ACEOF @@ -14552,7 +15633,7 @@ _ACEOF set dummy ps; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PATH_TO_PS+set}" = set; then : +if ${ac_cv_path_PATH_TO_PS+:} false; then : $as_echo_n "(cached) " >&6 else case $PATH_TO_PS in @@ -14566,7 +15647,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PATH_TO_PS="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -14665,7 +15746,7 @@ $as_echo "$as_me: using 32bit pst3" >&6;} { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -14708,7 +15789,7 @@ fi { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -14752,7 +15833,7 @@ fi { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -15055,7 +16136,7 @@ fi set dummy ping; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PATH_TO_PING+set}" = set; then : +if ${ac_cv_path_PATH_TO_PING+:} false; then : $as_echo_n "(cached) " >&6 else case $PATH_TO_PING in @@ -15069,7 +16150,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PATH_TO_PING="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -15095,7 +16176,7 @@ fi set dummy ping6; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PATH_TO_PING6+set}" = set; then : +if ${ac_cv_path_PATH_TO_PING6+:} false; then : $as_echo_n "(cached) " >&6 else case $PATH_TO_PING6 in @@ -15109,7 +16190,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PATH_TO_PING6="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -15479,7 +16560,7 @@ else set dummy nslookup; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PATH_TO_NSLOOKUP+set}" = set; then : +if ${ac_cv_path_PATH_TO_NSLOOKUP+:} false; then : $as_echo_n "(cached) " >&6 else case $PATH_TO_NSLOOKUP in @@ -15493,7 +16574,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PATH_TO_NSLOOKUP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -15546,8 +16627,34 @@ _ACEOF fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cpus" >&5 -$as_echo_n "checking for number of cpus... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of online cpus" >&5 +$as_echo_n "checking for number of online cpus... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +sysconf(_SC_NPROCESSORS_ONLN) > 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +$as_echo "#define HAVE_SYSCONF__SC_NPROCESSORS_ONLN 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: sysconf(_SC_NPROCESSORS_ONLN)" >&5 +$as_echo "sysconf(_SC_NPROCESSORS_ONLN)" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot calculate" >&5 +$as_echo "cannot calculate" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of available cpus" >&5 +$as_echo_n "checking for number of available cpus... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -15576,7 +16683,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext set dummy uptime; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PATH_TO_UPTIME+set}" = set; then : +if ${ac_cv_path_PATH_TO_UPTIME+:} false; then : $as_echo_n "(cached) " >&6 else case $PATH_TO_UPTIME in @@ -15590,7 +16697,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PATH_TO_UPTIME="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -15628,7 +16735,7 @@ _ACEOF set dummy rpcinfo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PATH_TO_RPCINFO+set}" = set; then : +if ${ac_cv_path_PATH_TO_RPCINFO+:} false; then : $as_echo_n "(cached) " >&6 else case $PATH_TO_RPCINFO in @@ -15642,7 +16749,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PATH_TO_RPCINFO="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -15680,7 +16787,7 @@ _ACEOF set dummy lmstat; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PATH_TO_LMSTAT+set}" = set; then : +if ${ac_cv_path_PATH_TO_LMSTAT+:} false; then : $as_echo_n "(cached) " >&6 else case $PATH_TO_LMSTAT in @@ -15694,7 +16801,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PATH_TO_LMSTAT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -15732,7 +16839,7 @@ fi set dummy smbclient; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PATH_TO_SMBCLIENT+set}" = set; then : +if ${ac_cv_path_PATH_TO_SMBCLIENT+:} false; then : $as_echo_n "(cached) " >&6 else case $PATH_TO_SMBCLIENT in @@ -15746,7 +16853,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PATH_TO_SMBCLIENT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -15786,66 +16893,11 @@ else $as_echo "$as_me: WARNING: Get smbclient from Samba.org to monitor SMB shares" >&2;} fi - -# Extract the first word of "who", so it can be a program name with args. -set dummy who; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PATH_TO_WHO+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $PATH_TO_WHO in - [\\/]* | ?:[\\/]*) - ac_cv_path_PATH_TO_WHO="$PATH_TO_WHO" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PATH_TO_WHO="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PATH_TO_WHO=$ac_cv_path_PATH_TO_WHO -if test -n "$PATH_TO_WHO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_TO_WHO" >&5 -$as_echo "$PATH_TO_WHO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - -if $PATH_TO_WHO -q 2>/dev/null | egrep -i "^# users=[0-9]+$" >/dev/null -then - ac_cv_path_to_who="$PATH_TO_WHO -q" -else - ac_cv_path_to_who="$PATH_TO_WHO" -fi - - -cat >>confdefs.h <<_ACEOF -#define WHO_COMMAND "$ac_cv_path_to_who" -_ACEOF - - # Extract the first word of "snmpget", so it can be a program name with args. set dummy snmpget; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PATH_TO_SNMPGET+set}" = set; then : +if ${ac_cv_path_PATH_TO_SNMPGET+:} false; then : $as_echo_n "(cached) " >&6 else case $PATH_TO_SNMPGET in @@ -15859,7 +16911,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PATH_TO_SNMPGET="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -15904,7 +16956,7 @@ fi set dummy snmpgetnext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PATH_TO_SNMPGETNEXT+set}" = set; then : +if ${ac_cv_path_PATH_TO_SNMPGETNEXT+:} false; then : $as_echo_n "(cached) " >&6 else case $PATH_TO_SNMPGETNEXT in @@ -15918,7 +16970,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PATH_TO_SNMPGETNEXT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -15970,7 +17022,7 @@ fi set dummy quakestat; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PATH_TO_QUAKESTAT+set}" = set; then : +if ${ac_cv_path_PATH_TO_QUAKESTAT+:} false; then : $as_echo_n "(cached) " >&6 else case $PATH_TO_QUAKESTAT in @@ -15984,7 +17036,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PATH_TO_QUAKESTAT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -16010,7 +17062,7 @@ fi set dummy qstat; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PATH_TO_QSTAT+set}" = set; then : +if ${ac_cv_path_PATH_TO_QSTAT+:} false; then : $as_echo_n "(cached) " >&6 else case $PATH_TO_QSTAT in @@ -16024,7 +17076,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PATH_TO_QSTAT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -16080,7 +17132,7 @@ fi set dummy fping; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PATH_TO_FPING+set}" = set; then : +if ${ac_cv_path_PATH_TO_FPING+:} false; then : $as_echo_n "(cached) " >&6 else case $PATH_TO_FPING in @@ -16094,7 +17146,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PATH_TO_FPING="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -16116,12 +17168,60 @@ $as_echo "no" >&6; } fi +# Extract the first word of "fping6", so it can be a program name with args. +set dummy fping6; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PATH_TO_FPING6+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PATH_TO_FPING6 in + [\\/]* | ?:[\\/]*) + ac_cv_path_PATH_TO_FPING6="$PATH_TO_FPING6" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PATH_TO_FPING6="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PATH_TO_FPING6=$ac_cv_path_PATH_TO_FPING6 +if test -n "$PATH_TO_FPING6"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_TO_FPING6" >&5 +$as_echo "$PATH_TO_FPING6" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + # Check whether --with-fping_command was given. if test "${with_fping_command+set}" = set; then : withval=$with_fping_command; PATH_TO_FPING=$withval fi + +# Check whether --with-fping6_command was given. +if test "${with_fping6_command+set}" = set; then : + withval=$with_fping6_command; PATH_TO_FPING6=$withval +fi + + if test -n "$PATH_TO_FPING" then @@ -16130,6 +17230,13 @@ cat >>confdefs.h <<_ACEOF _ACEOF EXTRAS="$EXTRAS check_fping" + if test x"$with_ipv6" != xno && test -n "$PATH_TO_FPING6"; then + +cat >>confdefs.h <<_ACEOF +#define PATH_TO_FPING6 "$PATH_TO_FPING6" +_ACEOF + + fi else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Get fping from http://www.fping.com in order to make check_fping plugin" >&5 $as_echo "$as_me: WARNING: Get fping from http://www.fping.com in order to make check_fping plugin" >&2;} @@ -16139,7 +17246,7 @@ fi set dummy ssh; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PATH_TO_SSH+set}" = set; then : +if ${ac_cv_path_PATH_TO_SSH+:} false; then : $as_echo_n "(cached) " >&6 else case $PATH_TO_SSH in @@ -16153,7 +17260,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PATH_TO_SSH="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -16199,7 +17306,7 @@ fi set dummy mailq; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PATH_TO_MAILQ+set}" = set; then : +if ${ac_cv_path_PATH_TO_MAILQ+:} false; then : $as_echo_n "(cached) " >&6 else case $PATH_TO_MAILQ in @@ -16213,7 +17320,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PATH_TO_MAILQ="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -16257,7 +17364,7 @@ fi set dummy qmail-qstat; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PATH_TO_QMAIL_QSTAT+set}" = set; then : +if ${ac_cv_path_PATH_TO_QMAIL_QSTAT+:} false; then : $as_echo_n "(cached) " >&6 else case $PATH_TO_QMAIL_QSTAT in @@ -16271,7 +17378,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PATH_TO_QMAIL_QSTAT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -16309,7 +17416,7 @@ fi set dummy swap; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PATH_TO_SWAP+set}" = set; then : +if ${ac_cv_path_PATH_TO_SWAP+:} false; then : $as_echo_n "(cached) " >&6 else case $PATH_TO_SWAP in @@ -16323,7 +17430,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PATH_TO_SWAP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -16379,7 +17486,7 @@ fi set dummy swapinfo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PATH_TO_SWAPINFO+set}" = set; then : +if ${ac_cv_path_PATH_TO_SWAPINFO+:} false; then : $as_echo_n "(cached) " >&6 else case $PATH_TO_SWAPINFO in @@ -16393,7 +17500,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PATH_TO_SWAPINFO="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -16447,7 +17554,7 @@ fi set dummy lsps; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PATH_TO_LSPS+set}" = set; then : +if ${ac_cv_path_PATH_TO_LSPS+:} false; then : $as_echo_n "(cached) " >&6 else case $PATH_TO_LSPS in @@ -16461,7 +17568,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PATH_TO_LSPS="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -16520,7 +17627,7 @@ do : #endif " -if test "x$ac_cv_header_sys_swap_h" = x""yes; then : +if test "x$ac_cv_header_sys_swap_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_SWAP_H 1 _ACEOF @@ -16537,7 +17644,7 @@ ac_fn_c_check_decl "$LINENO" "swapctl" "ac_cv_have_decl_swapctl" " #include " -if test "x$ac_cv_have_decl_swapctl" = x""yes; then : +if test "x$ac_cv_have_decl_swapctl" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -16554,7 +17661,7 @@ ac_fn_c_check_type "$LINENO" "swaptbl_t" "ac_cv_type_swaptbl_t" " #include " -if test "x$ac_cv_type_swaptbl_t" = x""yes; then : +if test "x$ac_cv_type_swaptbl_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SWAPTBL_T 1 @@ -16569,7 +17676,7 @@ ac_fn_c_check_type "$LINENO" "swapent_t" "ac_cv_type_swapent_t" " #include " -if test "x$ac_cv_type_swapent_t" = x""yes; then : +if test "x$ac_cv_type_swapent_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SWAPENT_T 1 @@ -16586,7 +17693,7 @@ ac_fn_c_check_member "$LINENO" "struct swapent" "se_nblks" "ac_cv_member_struct_ #include " -if test "x$ac_cv_member_struct_swapent_se_nblks" = x""yes; then : +if test "x$ac_cv_member_struct_swapent_se_nblks" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_SWAPENT_SE_NBLKS 1 @@ -16634,7 +17741,7 @@ $as_echo_n "checking for whether swapctl uses blocks or pages... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: page" >&5 $as_echo "page" >&6; } ac_fn_c_check_decl "$LINENO" "sysconf" "ac_cv_have_decl_sysconf" "$ac_includes_default" -if test "x$ac_cv_have_decl_sysconf" = x""yes; then : +if test "x$ac_cv_have_decl_sysconf" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -16731,7 +17838,7 @@ fi set dummy dig; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PATH_TO_DIG+set}" = set; then : +if ${ac_cv_path_PATH_TO_DIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PATH_TO_DIG in @@ -16745,7 +17852,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PATH_TO_DIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -16786,7 +17893,7 @@ fi set dummy apt-get; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PATH_TO_APTGET+set}" = set; then : +if ${ac_cv_path_PATH_TO_APTGET+:} false; then : $as_echo_n "(cached) " >&6 else case $PATH_TO_APTGET in @@ -16800,7 +17907,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PATH_TO_APTGET="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -16848,7 +17955,7 @@ fi for ac_header in sys/sockio.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/sockio.h" "ac_cv_header_sys_sockio_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_sockio_h" = x""yes; then : +if test "x$ac_cv_header_sys_sockio_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_SOCKIO_H 1 _ACEOF @@ -16910,15 +18017,14 @@ $as_echo "$USE_NLS" >&6; } # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + || PATH_SEPARATOR=';' + } fi # Find out how to test for executable files. Don't use a zero-byte file, @@ -16939,7 +18045,7 @@ rm -f conf$$.file set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MSGFMT+set}" = set; then : +if ${ac_cv_path_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGFMT" in @@ -16980,7 +18086,7 @@ fi set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GMSGFMT+set}" = set; then : +if ${ac_cv_path_GMSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in @@ -16994,7 +18100,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -17033,15 +18139,14 @@ fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + || PATH_SEPARATOR=';' + } fi # Find out how to test for executable files. Don't use a zero-byte file, @@ -17062,7 +18167,7 @@ rm -f conf$$.file set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_XGETTEXT+set}" = set; then : +if ${ac_cv_path_XGETTEXT+:} false; then : $as_echo_n "(cached) " >&6 else case "$XGETTEXT" in @@ -17111,15 +18216,14 @@ fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + || PATH_SEPARATOR=';' + } fi # Find out how to test for executable files. Don't use a zero-byte file, @@ -17140,7 +18244,7 @@ rm -f conf$$.file set dummy msgmerge; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MSGMERGE+set}" = set; then : +if ${ac_cv_path_MSGMERGE+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGMERGE" in @@ -17203,6 +18307,7 @@ fi prefix="$acl_save_prefix" + # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes @@ -17213,21 +18318,21 @@ fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + || PATH_SEPARATOR=';' + } fi + ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 -$as_echo_n "checking for ld used by GCC... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -17237,11 +18342,11 @@ $as_echo_n "checking for ld used by GCC... " >&6; } esac case $ac_prog in # Accept absolute paths. - [\\/]* | [A-Za-z]:[\\/]*) + [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + # Canonicalize the pathname of ld + ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` + while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" @@ -17262,27 +18367,30 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${acl_cv_path_LD+set}" = set; then : +if ${acl_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do + IFS="$acl_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. + # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in + case `"$acl_cv_path_LD" -v 2>&1 &5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${acl_cv_prog_gnu_ld+set}" = set; then : +if ${acl_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else - # I'd rather use --version here, but apparently some GNU ld's only accept -v. + # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 @@ -17319,7 +18429,7 @@ with_gnu_ld=$acl_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 $as_echo_n "checking for shared library run path origin... " >&6; } -if test "${acl_cv_rpath+set}" = set; then : +if ${acl_cv_rpath+:} false; then : $as_echo_n "(cached) " >&6 else @@ -17357,7 +18467,7 @@ fi solaris*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 $as_echo_n "checking for 64-bit host... " >&6; } -if test "${gl_cv_solaris_64bit+set}" = set; then : +if ${gl_cv_solaris_64bit+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17904,7 +19014,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } -if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then : +if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" @@ -17938,7 +19048,7 @@ $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } -if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then : +if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" @@ -18014,20 +19124,24 @@ typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 $as_echo_n "checking for GNU gettext in libc... " >&6; } -if eval "test \"\${$gt_func_gnugettext_libc+set}\"" = set; then : +if eval \${$gt_func_gnugettext_libc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings; + int main () { + bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings + ; return 0; } @@ -18077,7 +19191,7 @@ $as_echo "$ac_res" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 $as_echo_n "checking for iconv... " >&6; } -if test "${am_cv_func_iconv+set}" = set; then : +if ${am_cv_func_iconv+:} false; then : $as_echo_n "(cached) " >&6 else @@ -18085,14 +19199,16 @@ else am_cv_lib_iconv=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #include #include + int main () { iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); ; return 0; } @@ -18107,14 +19223,16 @@ rm -f core conftest.err conftest.$ac_objext \ LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #include #include + int main () { iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); ; return 0; } @@ -18134,19 +19252,21 @@ $as_echo "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 $as_echo_n "checking for working iconv... " >&6; } -if test "${am_cv_func_iconv_works+set}" = set; then : +if ${am_cv_func_iconv_works+:} false; then : $as_echo_n "(cached) " >&6 else - am_save_LIBS="$LIBS" + am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi if test "$cross_compiling" = yes; then : - case "$host_os" in + + case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18155,6 +19275,7 @@ else #include int main () { + int result = 0; /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { @@ -18171,7 +19292,8 @@ int main () (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) - return 1; + result |= 1; + iconv_close (cd_utf8_to_88591); } } /* Test against Solaris 10 bug: Failures are not distinguishable from @@ -18190,7 +19312,27 @@ int main () (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) - return 1; + result |= 2; + iconv_close (cd_ascii_to_88591); + } + } + /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static const char input[] = "\304"; + static char buf[2] = { (char)0xDE, (char)0xAD }; + const char *inptr = input; + size_t inbytesleft = 1; + char *outptr = buf; + size_t outbytesleft = 1; + size_t res = iconv (cd_88591_to_utf8, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) + result |= 4; + iconv_close (cd_88591_to_utf8); } } #if 0 /* This bug could be worked around by the caller. */ @@ -18209,7 +19351,8 @@ int main () (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) - return 1; + result |= 8; + iconv_close (cd_88591_to_utf8); } } #endif @@ -18223,8 +19366,8 @@ int main () && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) - return 1; - return 0; + result |= 16; + return result; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : @@ -18730,7 +19873,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 $as_echo_n "checking for GNU gettext in libintl... " >&6; } -if eval "test \"\${$gt_func_gnugettext_libintl+set}\"" = set; then : +if eval \${$gt_func_gnugettext_libintl+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_CPPFLAGS="$CPPFLAGS" @@ -18739,6 +19882,7 @@ else LIBS="$LIBS $LIBINTL" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #include $gt_revision_test_code extern int _nl_msg_cat_cntr; @@ -18747,11 +19891,14 @@ extern "C" #endif const char *_nl_expand_alias (const char *); + int main () { + bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") + ; return 0; } @@ -18767,6 +19914,7 @@ rm -f core conftest.err conftest.$ac_objext \ LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #include $gt_revision_test_code extern int _nl_msg_cat_cntr; @@ -18775,19 +19923,22 @@ extern "C" #endif const char *_nl_expand_alias (const char *); + int main () { + bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") + ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : LIBINTL="$LIBINTL $LIBICONV" - LTLIBINTL="$LTLIBINTL $LTLIBICONV" - eval "$gt_func_gnugettext_libintl=yes" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + eval "$gt_func_gnugettext_libintl=yes" fi rm -f core conftest.err conftest.$ac_objext \ @@ -18960,7 +20111,7 @@ case "$host" in *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpthread" >&5 $as_echo_n "checking for main in -lpthread... " >&6; } -if test "${ac_cv_lib_pthread_main+set}" = set; then : +if ${ac_cv_lib_pthread_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -18988,7 +20139,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_main" >&5 $as_echo "$ac_cv_lib_pthread_main" >&6; } -if test "x$ac_cv_lib_pthread_main" = x""yes; then : +if test "x$ac_cv_lib_pthread_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF @@ -19004,6 +20155,7 @@ esac + LIBC_FATAL_STDERR_=1 export LIBC_FATAL_STDERR_ @@ -19011,7 +20163,7 @@ esac # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } -if test "${ac_cv_working_alloca_h+set}" = set; then : +if ${ac_cv_working_alloca_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -19044,7 +20196,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } -if test "${ac_cv_func_alloca_works+set}" = set; then : +if ${ac_cv_func_alloca_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -19063,7 +20215,7 @@ else #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); +void *alloca (size_t); # endif # endif # endif @@ -19111,7 +20263,7 @@ $as_echo "#define C_ALLOCA 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -if test "${ac_cv_os_cray+set}" = set; then : +if ${ac_cv_os_cray+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -19152,7 +20304,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } -if test "${ac_cv_c_stack_direction+set}" = set; then : +if ${ac_cv_c_stack_direction+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -19162,23 +20314,20 @@ else /* end confdefs.h. */ $ac_includes_default int -find_stack_direction () +find_stack_direction (int *addr, int depth) { - static char *addr = 0; - auto char dummy; - if (addr == 0) - { - addr = &dummy; - return find_stack_direction (); - } - else - return (&dummy > addr) ? 1 : -1; + int dir, dummy = 0; + if (! addr) + addr = &dummy; + *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; + dir = depth ? find_stack_direction (addr, depth - 1) : 0; + return dir + dummy; } int -main () +main (int argc, char **argv) { - return find_stack_direction () < 0; + return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : @@ -19205,6 +20354,8 @@ fi GNULIB_INET_PTON=0; HAVE_DECL_INET_NTOP=1; HAVE_DECL_INET_PTON=1; + REPLACE_INET_NTOP=0; + REPLACE_INET_PTON=0; @@ -19231,7 +20382,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; } -if test "${gl_cv_have_include_next+set}" = set; then : +if ${gl_cv_have_include_next+:} false; then : $as_echo_n "(cached) " >&6 else rm -rf conftestd1a conftestd1b conftestd2 @@ -19309,52 +20460,61 @@ $as_echo "$gl_cv_have_include_next" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if test "${ac_cv_c_inline+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5 +$as_echo_n "checking whether system header files limit the line length... " >&6; } +if ${gl_cv_pragma_columns+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } + +#ifdef __TANDEM +choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_inline=$ac_kw +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "choke me" >/dev/null 2>&1; then : + gl_cv_pragma_columns=yes +else + gl_cv_pragma_columns=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done +rm -f conftest* + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5 +$as_echo "$gl_cv_pragma_columns" >&6; } + if test $gl_cv_pragma_columns = yes; then + PRAGMA_COLUMNS="#pragma COLUMNS 10000" + else + PRAGMA_COLUMNS= + fi + + + + + + + + + + : + + + + + + if test $ac_cv_header_features_h = yes; then + HAVE_FEATURES_H=1 + else + HAVE_FEATURES_H=0 + fi -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 $as_echo_n "checking for C/C++ restrict keyword... " >&6; } -if test "${ac_cv_c_restrict+set}" = set; then : +if ${ac_cv_c_restrict+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_restrict=no @@ -19410,6 +20570,34 @@ _ACEOF GNULIB_WCSRTOMBS=0; GNULIB_WCSNRTOMBS=0; GNULIB_WCWIDTH=0; + GNULIB_WMEMCHR=0; + GNULIB_WMEMCMP=0; + GNULIB_WMEMCPY=0; + GNULIB_WMEMMOVE=0; + GNULIB_WMEMSET=0; + GNULIB_WCSLEN=0; + GNULIB_WCSNLEN=0; + GNULIB_WCSCPY=0; + GNULIB_WCPCPY=0; + GNULIB_WCSNCPY=0; + GNULIB_WCPNCPY=0; + GNULIB_WCSCAT=0; + GNULIB_WCSNCAT=0; + GNULIB_WCSCMP=0; + GNULIB_WCSNCMP=0; + GNULIB_WCSCASECMP=0; + GNULIB_WCSNCASECMP=0; + GNULIB_WCSCOLL=0; + GNULIB_WCSXFRM=0; + GNULIB_WCSDUP=0; + GNULIB_WCSCHR=0; + GNULIB_WCSRCHR=0; + GNULIB_WCSCSPN=0; + GNULIB_WCSSPN=0; + GNULIB_WCSPBRK=0; + GNULIB_WCSSTR=0; + GNULIB_WCSTOK=0; + GNULIB_WCSWIDTH=0; HAVE_BTOWC=1; HAVE_MBSINIT=1; HAVE_MBRTOWC=1; @@ -19419,6 +20607,34 @@ _ACEOF HAVE_WCRTOMB=1; HAVE_WCSRTOMBS=1; HAVE_WCSNRTOMBS=1; + HAVE_WMEMCHR=1; + HAVE_WMEMCMP=1; + HAVE_WMEMCPY=1; + HAVE_WMEMMOVE=1; + HAVE_WMEMSET=1; + HAVE_WCSLEN=1; + HAVE_WCSNLEN=1; + HAVE_WCSCPY=1; + HAVE_WCPCPY=1; + HAVE_WCSNCPY=1; + HAVE_WCPNCPY=1; + HAVE_WCSCAT=1; + HAVE_WCSNCAT=1; + HAVE_WCSCMP=1; + HAVE_WCSNCMP=1; + HAVE_WCSCASECMP=1; + HAVE_WCSNCASECMP=1; + HAVE_WCSCOLL=1; + HAVE_WCSXFRM=1; + HAVE_WCSDUP=1; + HAVE_WCSCHR=1; + HAVE_WCSRCHR=1; + HAVE_WCSCSPN=1; + HAVE_WCSSPN=1; + HAVE_WCSPBRK=1; + HAVE_WCSSTR=1; + HAVE_WCSTOK=1; + HAVE_WCSWIDTH=1; HAVE_DECL_WCTOB=1; HAVE_DECL_WCWIDTH=1; REPLACE_MBSTATE_T=0; @@ -19433,11 +20649,12 @@ _ACEOF REPLACE_WCSRTOMBS=0; REPLACE_WCSNRTOMBS=0; REPLACE_WCWIDTH=0; + REPLACE_WCSWIDTH=0; { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether uses 'inline' correctly" >&5 $as_echo_n "checking whether uses 'inline' correctly... " >&6; } -if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then : +if ${gl_cv_header_wchar_h_correct_inline+:} false; then : $as_echo_n "(cached) " >&6 else gl_cv_header_wchar_h_correct_inline=yes @@ -19445,6 +20662,13 @@ else /* end confdefs.h. */ #define wcstod renamed_wcstod +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include #include extern int zero (void); int main () { return zero(); } @@ -19460,6 +20684,13 @@ _ACEOF /* end confdefs.h. */ #define wcstod renamed_wcstod +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include #include int zero (void) { return 0; } @@ -19517,7 +20748,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } -if test "${am_cv_langinfo_codeset+set}" = set; then : +if ${am_cv_langinfo_codeset+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -19553,7 +20784,7 @@ $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5 $as_echo_n "checking for a traditional french locale... " >&6; } -if test "${gt_cv_locale_fr+set}" = set; then : +if ${gt_cv_locale_fr+:} false; then : $as_echo_n "(cached) " >&6 else @@ -19571,17 +20802,30 @@ struct tm t; char buf[16]; int main () { /* Check whether the given locale name is recognized by the system. */ +#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ + /* On native Windows, setlocale(category, "") looks at the system settings, + not at the environment variables. Also, when an encoding suffix such + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE + category of the locale to "C". */ + if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL + || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) + return 1; +#else if (setlocale (LC_ALL, "") == NULL) return 1; +#endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. */ + some unit tests fail. + On MirBSD 10, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) + if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 + || strcmp (cs, "UTF-8") == 0) return 1; } #endif @@ -19596,10 +20840,12 @@ int main () { one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; +#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; +#endif return 0; } @@ -19609,37 +20855,56 @@ _ACEOF ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the usual locale name. - if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr=fr_FR - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr=fr_FR.ISO-8859-1 - else - # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. - if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr=fr_FR.ISO8859-1 + case "$host_os" in + # Handle native Windows specially, because there setlocale() interprets + # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", + # "fr" or "fra" as "French" or "French_France.1252", + # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", + # "ja" as "Japanese" or "Japanese_Japan.932", + # and similar. + mingw*) + # Test for the native Windows locale name. + if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr=French_France.1252 else - # Test for the HP-UX locale name. - if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr=fr_FR.iso88591 + # None found. + gt_cv_locale_fr=none + fi + ;; + *) + # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the + # configure script would override the LC_ALL setting. Likewise for + # LC_CTYPE, which is also set at the beginning of the configure script. + # Test for the usual locale name. + if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr=fr_FR + else + # Test for the locale name with explicit encoding suffix. + if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr=fr_FR.ISO-8859-1 else - # Test for the Solaris 7 locale name. - if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr=fr + # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. + if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr=fr_FR.ISO8859-1 else - # None found. - gt_cv_locale_fr=none + # Test for the HP-UX locale name. + if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr=fr_FR.iso88591 + else + # Test for the Solaris 7 locale name. + if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr=fr + else + # None found. + gt_cv_locale_fr=none + fi + fi fi fi fi - fi - fi + ;; + esac fi rm -fr conftest* @@ -19652,7 +20917,7 @@ $as_echo "$gt_cv_locale_fr" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if test "${ac_cv_c_bigendian+set}" = set; then : +if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown @@ -19871,111 +21136,15 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error $? "unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system is Windows or MSDOS" >&5 -$as_echo_n "checking whether system is Windows or MSDOS... " >&6; } -if test "${ac_cv_win_or_dos+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - -#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __CYGWIN__ -neither MSDOS nor Windows -#endif - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_win_or_dos=yes -else - ac_cv_win_or_dos=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_win_or_dos" >&5 -$as_echo "$ac_cv_win_or_dos" >&6; } - - if test x"$ac_cv_win_or_dos" = xyes; then - ac_fs_accepts_drive_letter_prefix=1 - ac_fs_backslash_is_file_name_separator=1 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether drive letter can start relative path" >&5 -$as_echo_n "checking whether drive letter can start relative path... " >&6; } -if test "${ac_cv_drive_letter_can_be_relative+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - -#if defined __CYGWIN__ -drive letters are always absolute -#endif - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_drive_letter_can_be_relative=yes -else - ac_cv_drive_letter_can_be_relative=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_drive_letter_can_be_relative" >&5 -$as_echo "$ac_cv_drive_letter_can_be_relative" >&6; } - if test x"$ac_cv_drive_letter_can_be_relative" = xyes; then - ac_fs_drive_letter_can_be_relative=1 - else - ac_fs_drive_letter_can_be_relative=0 - fi - else - ac_fs_accepts_drive_letter_prefix=0 - ac_fs_backslash_is_file_name_separator=0 - ac_fs_drive_letter_can_be_relative=0 - fi - - -cat >>confdefs.h <<_ACEOF -#define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX $ac_fs_accepts_drive_letter_prefix -_ACEOF - - - - - -cat >>confdefs.h <<_ACEOF -#define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR $ac_fs_backslash_is_file_name_separator -_ACEOF - - - -cat >>confdefs.h <<_ACEOF -#define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE $ac_fs_drive_letter_can_be_relative -_ACEOF - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5 $as_echo_n "checking whether // is distinct from /... " >&6; } -if test "${gl_cv_double_slash_root+set}" = set; then : +if ${gl_cv_double_slash_root+:} false; then : $as_echo_n "(cached) " >&6 else if test x"$cross_compiling" = xyes ; then @@ -20015,40 +21184,10 @@ $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h - - - - - gl_LIBOBJS="$gl_LIBOBJS basename-lgpl.$ac_objext" - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS dirname-lgpl.$ac_objext" - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS stripslash.$ac_objext" - - - - - - - + GNULIB_CHDIR=0; GNULIB_CHOWN=0; GNULIB_CLOSE=0; + GNULIB_DUP=0; GNULIB_DUP2=0; GNULIB_DUP3=0; GNULIB_ENVIRON=0; @@ -20056,6 +21195,7 @@ $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h GNULIB_FACCESSAT=0; GNULIB_FCHDIR=0; GNULIB_FCHOWNAT=0; + GNULIB_FDATASYNC=0; GNULIB_FSYNC=0; GNULIB_FTRUNCATE=0; GNULIB_GETCWD=0; @@ -20067,21 +21207,26 @@ $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h GNULIB_GETLOGIN_R=0; GNULIB_GETPAGESIZE=0; GNULIB_GETUSERSHELL=0; + GNULIB_GROUP_MEMBER=0; + GNULIB_ISATTY=0; GNULIB_LCHOWN=0; GNULIB_LINK=0; GNULIB_LINKAT=0; GNULIB_LSEEK=0; + GNULIB_PIPE=0; GNULIB_PIPE2=0; GNULIB_PREAD=0; GNULIB_PWRITE=0; + GNULIB_READ=0; GNULIB_READLINK=0; GNULIB_READLINKAT=0; GNULIB_RMDIR=0; + GNULIB_SETHOSTNAME=0; GNULIB_SLEEP=0; GNULIB_SYMLINK=0; GNULIB_SYMLINKAT=0; GNULIB_TTYNAME_R=0; - GNULIB_UNISTD_H_GETOPT=0; + GNULIB_UNISTD_H_NONBLOCKING=0; GNULIB_UNISTD_H_SIGPIPE=0; GNULIB_UNLINK=0; GNULIB_UNLINKAT=0; @@ -20094,32 +21239,39 @@ $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h HAVE_FACCESSAT=1; HAVE_FCHDIR=1; HAVE_FCHOWNAT=1; + HAVE_FDATASYNC=1; HAVE_FSYNC=1; HAVE_FTRUNCATE=1; - HAVE_GETDOMAINNAME=1; HAVE_GETDTABLESIZE=1; HAVE_GETGROUPS=1; HAVE_GETHOSTNAME=1; HAVE_GETLOGIN=1; HAVE_GETPAGESIZE=1; + HAVE_GROUP_MEMBER=1; HAVE_LCHOWN=1; HAVE_LINK=1; HAVE_LINKAT=1; + HAVE_PIPE=1; HAVE_PIPE2=1; HAVE_PREAD=1; HAVE_PWRITE=1; HAVE_READLINK=1; HAVE_READLINKAT=1; + HAVE_SETHOSTNAME=1; HAVE_SLEEP=1; HAVE_SYMLINK=1; HAVE_SYMLINKAT=1; - HAVE_TTYNAME_R=1; HAVE_UNLINKAT=1; HAVE_USLEEP=1; HAVE_DECL_ENVIRON=1; + HAVE_DECL_FCHDIR=1; + HAVE_DECL_FDATASYNC=1; + HAVE_DECL_GETDOMAINNAME=1; HAVE_DECL_GETLOGIN_R=1; HAVE_DECL_GETPAGESIZE=1; HAVE_DECL_GETUSERSHELL=1; + HAVE_DECL_SETHOSTNAME=1; + HAVE_DECL_TTYNAME_R=1; HAVE_OS_H=0; HAVE_SYS_PARAM_H=0; REPLACE_CHOWN=0; @@ -20127,15 +21279,20 @@ $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h REPLACE_DUP=0; REPLACE_DUP2=0; REPLACE_FCHOWNAT=0; + REPLACE_FTRUNCATE=0; REPLACE_GETCWD=0; + REPLACE_GETDOMAINNAME=0; + REPLACE_GETLOGIN_R=0; REPLACE_GETGROUPS=0; REPLACE_GETPAGESIZE=0; + REPLACE_ISATTY=0; REPLACE_LCHOWN=0; REPLACE_LINK=0; REPLACE_LINKAT=0; REPLACE_LSEEK=0; REPLACE_PREAD=0; REPLACE_PWRITE=0; + REPLACE_READ=0; REPLACE_READLINK=0; REPLACE_RMDIR=0; REPLACE_SLEEP=0; @@ -20159,16 +21316,29 @@ $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h + : + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5 $as_echo_n "checking if environ is properly declared... " >&6; } - if test "${gt_cv_var_environ_declaration+set}" = set; then : + if ${gt_cv_var_environ_declaration+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - extern struct { int foo; } environ; +#if HAVE_UNISTD_H + #include + #endif + /* mingw, BeOS, Haiku declare environ in , not in . */ + #include + + extern struct { int foo; } environ; int main () { @@ -20200,14 +21370,9 @@ $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5 $as_echo_n "checking for complete errno.h... " >&6; } -if test "${gl_cv_header_errno_h_complete+set}" = set; then : +if ${gl_cv_header_errno_h_complete+:} false; then : $as_echo_n "(cached) " >&6 else @@ -20215,6 +21380,9 @@ else /* end confdefs.h. */ #include +#if !defined ETXTBSY +booboo +#endif #if !defined ENOMSG booboo #endif @@ -20239,12 +21407,30 @@ booboo #if !defined ENOTSUP booboo #endif +#if !defined ENETRESET +booboo +#endif +#if !defined ECONNABORTED +booboo +#endif #if !defined ESTALE booboo #endif +#if !defined EDQUOT +booboo +#endif #if !defined ECANCELED booboo #endif +#if !defined EOWNERDEAD +booboo +#endif +#if !defined ENOTRECOVERABLE +booboo +#endif +#if !defined EILSEQ +booboo +#endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | @@ -20266,10 +21452,6 @@ $as_echo "$gl_cv_header_errno_h_complete" >&6; } - : - - - @@ -20279,30 +21461,41 @@ $as_echo "$gl_cv_header_errno_h_complete" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_errno_h+set}" = set; then : +if ${gl_cv_next_errno_h+:} false; then : $as_echo_n "(cached) " >&6 else - if test $ac_cv_header_errno_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/errno.h#{ - s#.*"\(.*/errno.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_errno_h='<'errno.h'>' - fi + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + + gl_header_literal_regex=`echo 'errno.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5 @@ -20321,14 +21514,23 @@ $as_echo "$gl_cv_next_errno_h" >&6; } + ERRNO_H='errno.h' fi + if test -n "$ERRNO_H"; then + GL_GENERATE_ERRNO_H_TRUE= + GL_GENERATE_ERRNO_H_FALSE='#' +else + GL_GENERATE_ERRNO_H_TRUE='#' + GL_GENERATE_ERRNO_H_FALSE= +fi + if test -n "$ERRNO_H"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5 $as_echo_n "checking for EMULTIHOP value... " >&6; } -if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then : +if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then : $as_echo_n "(cached) " >&6 else @@ -20399,7 +21601,7 @@ $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; } if test -n "$ERRNO_H"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5 $as_echo_n "checking for ENOLINK value... " >&6; } -if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then : +if ${gl_cv_header_errno_h_ENOLINK+:} false; then : $as_echo_n "(cached) " >&6 else @@ -20470,7 +21672,7 @@ $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; } if test -n "$ERRNO_H"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5 $as_echo_n "checking for EOVERFLOW value... " >&6; } -if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then : +if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then : $as_echo_n "(cached) " >&6 else @@ -20539,7 +21741,7 @@ $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; } ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" -if test "x$ac_cv_have_decl_strerror_r" = x""yes; then : +if test "x$ac_cv_have_decl_strerror_r" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -20552,7 +21754,7 @@ _ACEOF for ac_func in strerror_r do : ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r" -if test "x$ac_cv_func_strerror_r" = x""yes; then : +if test "x$ac_cv_func_strerror_r" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRERROR_R 1 _ACEOF @@ -20562,7 +21764,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5 $as_echo_n "checking whether strerror_r returns char *... " >&6; } -if test "${ac_cv_func_strerror_r_char_p+set}" = set; then : +if ${ac_cv_func_strerror_r_char_p+:} false; then : $as_echo_n "(cached) " >&6 else @@ -20634,229 +21836,191 @@ fi XGETTEXT_EXTRA_OPTIONS= - GNULIB_FCNTL=0; - GNULIB_OPEN=0; - GNULIB_OPENAT=0; - HAVE_FCNTL=1; - HAVE_OPENAT=1; - REPLACE_FCNTL=0; - REPLACE_OPEN=0; - REPLACE_OPENAT=0; - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5 -$as_echo_n "checking for working fcntl.h... " >&6; } -if test "${gl_cv_header_working_fcntl_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - gl_cv_header_working_fcntl_h=cross-compiling -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - #include - #include - #ifndef O_NOATIME - #define O_NOATIME 0 - #endif - #ifndef O_NOFOLLOW - #define O_NOFOLLOW 0 - #endif - static int const constants[] = - { - O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, - O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY - }; - -int -main () -{ - - int status = !constants; - { - static char const sym[] = "conftest.sym"; - if (symlink (".", sym) != 0 - || close (open (sym, O_RDONLY | O_NOFOLLOW)) == 0) - status |= 32; - unlink (sym); - } - { - static char const file[] = "confdefs.h"; - int fd = open (file, O_RDONLY | O_NOATIME); - char c; - struct stat st0, st1; - if (fd < 0 - || fstat (fd, &st0) != 0 - || sleep (1) != 0 - || read (fd, &c, 1) != 1 - || close (fd) != 0 - || stat (file, &st1) != 0 - || st0.st_atime != st1.st_atime) - status |= 64; - } - return status; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_header_working_fcntl_h=yes -else - case $? in #( - 32) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( - 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( - 96) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( - *) gl_cv_header_working_fcntl_h='no';; - esac -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5 -$as_echo "$gl_cv_header_working_fcntl_h" >&6; } - - case $gl_cv_header_working_fcntl_h in #( - *O_NOATIME* | no | cross-compiling) ac_val=0;; #( - *) ac_val=1;; - esac - -cat >>confdefs.h <<_ACEOF -#define HAVE_WORKING_O_NOATIME $ac_val -_ACEOF - - - case $gl_cv_header_working_fcntl_h in #( - *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( - *) ac_val=1;; - esac - -cat >>confdefs.h <<_ACEOF -#define HAVE_WORKING_O_NOFOLLOW $ac_val -_ACEOF - - - - - - - -ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" -if test "x$ac_cv_type_mode_t" = x""yes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define mode_t int -_ACEOF - -fi - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5 -$as_echo_n "checking for promoted mode_t type... " >&6; } -if test "${gl_cv_promoted_mode_t+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1]; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_promoted_mode_t='int' -else - gl_cv_promoted_mode_t='mode_t' -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5 -$as_echo "$gl_cv_promoted_mode_t" >&6; } - -cat >>confdefs.h <<_ACEOF -#define PROMOTED_MODE_T $gl_cv_promoted_mode_t -_ACEOF - - - - - + GNULIB_ACOSF=0; GNULIB_ACOSL=0; + GNULIB_ASINF=0; GNULIB_ASINL=0; + GNULIB_ATANF=0; GNULIB_ATANL=0; + GNULIB_ATAN2F=0; + GNULIB_CBRT=0; + GNULIB_CBRTF=0; + GNULIB_CBRTL=0; + GNULIB_CEIL=0; GNULIB_CEILF=0; GNULIB_CEILL=0; + GNULIB_COPYSIGN=0; + GNULIB_COPYSIGNF=0; + GNULIB_COPYSIGNL=0; + GNULIB_COSF=0; GNULIB_COSL=0; + GNULIB_COSHF=0; + GNULIB_EXPF=0; GNULIB_EXPL=0; + GNULIB_EXP2=0; + GNULIB_EXP2F=0; + GNULIB_EXP2L=0; + GNULIB_EXPM1=0; + GNULIB_EXPM1F=0; + GNULIB_EXPM1L=0; + GNULIB_FABSF=0; + GNULIB_FABSL=0; + GNULIB_FLOOR=0; GNULIB_FLOORF=0; GNULIB_FLOORL=0; + GNULIB_FMA=0; + GNULIB_FMAF=0; + GNULIB_FMAL=0; + GNULIB_FMOD=0; + GNULIB_FMODF=0; + GNULIB_FMODL=0; + GNULIB_FREXPF=0; GNULIB_FREXP=0; GNULIB_FREXPL=0; + GNULIB_HYPOT=0; + GNULIB_HYPOTF=0; + GNULIB_HYPOTL=0; + GNULIB_ILOGB=0; + GNULIB_ILOGBF=0; + GNULIB_ILOGBL=0; GNULIB_ISFINITE=0; GNULIB_ISINF=0; GNULIB_ISNAN=0; GNULIB_ISNANF=0; GNULIB_ISNAND=0; GNULIB_ISNANL=0; + GNULIB_LDEXPF=0; GNULIB_LDEXPL=0; - GNULIB_LOGB=0; + GNULIB_LOG=0; + GNULIB_LOGF=0; GNULIB_LOGL=0; + GNULIB_LOG10=0; + GNULIB_LOG10F=0; + GNULIB_LOG10L=0; + GNULIB_LOG1P=0; + GNULIB_LOG1PF=0; + GNULIB_LOG1PL=0; + GNULIB_LOG2=0; + GNULIB_LOG2F=0; + GNULIB_LOG2L=0; + GNULIB_LOGB=0; + GNULIB_LOGBF=0; + GNULIB_LOGBL=0; + GNULIB_MODF=0; + GNULIB_MODFF=0; + GNULIB_MODFL=0; + GNULIB_POWF=0; + GNULIB_REMAINDER=0; + GNULIB_REMAINDERF=0; + GNULIB_REMAINDERL=0; + GNULIB_RINT=0; + GNULIB_RINTF=0; + GNULIB_RINTL=0; GNULIB_ROUND=0; GNULIB_ROUNDF=0; GNULIB_ROUNDL=0; GNULIB_SIGNBIT=0; + GNULIB_SINF=0; GNULIB_SINL=0; + GNULIB_SINHF=0; + GNULIB_SQRTF=0; GNULIB_SQRTL=0; + GNULIB_TANF=0; GNULIB_TANL=0; + GNULIB_TANHF=0; GNULIB_TRUNC=0; GNULIB_TRUNCF=0; GNULIB_TRUNCL=0; - HAVE_ACOSL=1; + HAVE_ACOSF=1; + HAVE_ACOSL=1; + HAVE_ASINF=1; HAVE_ASINL=1; + HAVE_ATANF=1; HAVE_ATANL=1; + HAVE_ATAN2F=1; + HAVE_CBRT=1; + HAVE_CBRTF=1; + HAVE_CBRTL=1; + HAVE_COPYSIGN=1; + HAVE_COPYSIGNL=1; + HAVE_COSF=1; HAVE_COSL=1; + HAVE_COSHF=1; + HAVE_EXPF=1; HAVE_EXPL=1; + HAVE_EXPM1=1; + HAVE_EXPM1F=1; + HAVE_FABSF=1; + HAVE_FABSL=1; + HAVE_FMA=1; + HAVE_FMAF=1; + HAVE_FMAL=1; + HAVE_FMODF=1; + HAVE_FMODL=1; + HAVE_FREXPF=1; + HAVE_HYPOTF=1; + HAVE_HYPOTL=1; + HAVE_ILOGB=1; + HAVE_ILOGBF=1; + HAVE_ILOGBL=1; HAVE_ISNANF=1; HAVE_ISNAND=1; HAVE_ISNANL=1; + HAVE_LDEXPF=1; + HAVE_LOGF=1; HAVE_LOGL=1; + HAVE_LOG10F=1; + HAVE_LOG10L=1; + HAVE_LOG1P=1; + HAVE_LOG1PF=1; + HAVE_LOG1PL=1; + HAVE_LOGBF=1; + HAVE_LOGBL=1; + HAVE_MODFF=1; + HAVE_MODFL=1; + HAVE_POWF=1; + HAVE_REMAINDER=1; + HAVE_REMAINDERF=1; + HAVE_RINT=1; + HAVE_RINTL=1; + HAVE_SINF=1; HAVE_SINL=1; + HAVE_SINHF=1; + HAVE_SQRTF=1; HAVE_SQRTL=1; + HAVE_TANF=1; HAVE_TANL=1; + HAVE_TANHF=1; HAVE_DECL_ACOSL=1; HAVE_DECL_ASINL=1; HAVE_DECL_ATANL=1; + HAVE_DECL_CBRTF=1; + HAVE_DECL_CBRTL=1; HAVE_DECL_CEILF=1; HAVE_DECL_CEILL=1; + HAVE_DECL_COPYSIGNF=1; HAVE_DECL_COSL=1; HAVE_DECL_EXPL=1; + HAVE_DECL_EXP2=1; + HAVE_DECL_EXP2F=1; + HAVE_DECL_EXP2L=1; + HAVE_DECL_EXPM1L=1; HAVE_DECL_FLOORF=1; HAVE_DECL_FLOORL=1; HAVE_DECL_FREXPL=1; HAVE_DECL_LDEXPL=1; - HAVE_DECL_LOGB=1; HAVE_DECL_LOGL=1; + HAVE_DECL_LOG10L=1; + HAVE_DECL_LOG2=1; + HAVE_DECL_LOG2F=1; + HAVE_DECL_LOG2L=1; + HAVE_DECL_LOGB=1; + HAVE_DECL_REMAINDER=1; + HAVE_DECL_REMAINDERL=1; + HAVE_DECL_RINTF=1; HAVE_DECL_ROUND=1; HAVE_DECL_ROUNDF=1; HAVE_DECL_ROUNDL=1; @@ -20866,23 +22030,68 @@ _ACEOF HAVE_DECL_TRUNC=1; HAVE_DECL_TRUNCF=1; HAVE_DECL_TRUNCL=1; + REPLACE_CBRTF=0; + REPLACE_CBRTL=0; + REPLACE_CEIL=0; REPLACE_CEILF=0; REPLACE_CEILL=0; + REPLACE_EXPM1=0; + REPLACE_EXPM1F=0; + REPLACE_EXP2=0; + REPLACE_EXP2L=0; + REPLACE_FABSL=0; + REPLACE_FLOOR=0; REPLACE_FLOORF=0; REPLACE_FLOORL=0; + REPLACE_FMA=0; + REPLACE_FMAF=0; + REPLACE_FMAL=0; + REPLACE_FMOD=0; + REPLACE_FMODF=0; + REPLACE_FMODL=0; + REPLACE_FREXPF=0; REPLACE_FREXP=0; REPLACE_FREXPL=0; REPLACE_HUGE_VAL=0; + REPLACE_HYPOT=0; + REPLACE_HYPOTF=0; + REPLACE_HYPOTL=0; + REPLACE_ILOGB=0; + REPLACE_ILOGBF=0; REPLACE_ISFINITE=0; REPLACE_ISINF=0; REPLACE_ISNAN=0; REPLACE_LDEXPL=0; + REPLACE_LOG=0; + REPLACE_LOGF=0; + REPLACE_LOGL=0; + REPLACE_LOG10=0; + REPLACE_LOG10F=0; + REPLACE_LOG10L=0; + REPLACE_LOG1P=0; + REPLACE_LOG1PF=0; + REPLACE_LOG1PL=0; + REPLACE_LOG2=0; + REPLACE_LOG2F=0; + REPLACE_LOG2L=0; + REPLACE_LOGB=0; + REPLACE_LOGBF=0; + REPLACE_LOGBL=0; + REPLACE_MODF=0; + REPLACE_MODFF=0; + REPLACE_MODFL=0; REPLACE_NAN=0; + REPLACE_REMAINDER=0; + REPLACE_REMAINDERF=0; + REPLACE_REMAINDERL=0; REPLACE_ROUND=0; REPLACE_ROUNDF=0; REPLACE_ROUNDL=0; REPLACE_SIGNBIT=0; REPLACE_SIGNBIT_USING_GCC=0; + REPLACE_SQRTL=0; + REPLACE_TRUNC=0; + REPLACE_TRUNCF=0; REPLACE_TRUNCL=0; @@ -20917,6 +22126,8 @@ _ACEOF GNULIB_SHUTDOWN=0; GNULIB_ACCEPT4=0; HAVE_STRUCT_SOCKADDR_STORAGE=1; + HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1; + HAVE_SA_FAMILY_T=1; HAVE_ACCEPT4=1; @@ -20926,12 +22137,42 @@ _ACEOF + : + + + if test $ac_cv_header_sys_socket_h = no; then + for ac_header in ws2tcpip.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default" +if test "x$ac_cv_header_ws2tcpip_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WS2TCPIP_H 1 +_ACEOF + +fi + +done + + fi + + + + + + case "$host_os" in + osf*) + +$as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h + + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether is self-contained" >&5 $as_echo_n "checking whether is self-contained... " >&6; } -if test "${gl_cv_header_sys_socket_h_selfcontained+set}" = set; then : +if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then : $as_echo_n "(cached) " >&6 else @@ -20960,7 +22201,7 @@ $as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; } for ac_func in shutdown do : ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown" -if test "x$ac_cv_func_shutdown" = x""yes; then : +if test "x$ac_cv_func_shutdown" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SHUTDOWN 1 _ACEOF @@ -20971,7 +22212,7 @@ done if test $ac_cv_func_shutdown = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether defines the SHUT_* macros" >&5 $as_echo_n "checking whether defines the SHUT_* macros... " >&6; } -if test "${gl_cv_header_sys_socket_h_shut+set}" = set; then : +if ${gl_cv_header_sys_socket_h_shut+:} false; then : $as_echo_n "(cached) " >&6 else @@ -21007,6 +22248,9 @@ $as_echo "$gl_cv_header_sys_socket_h_shut" >&6; } + + + : @@ -21015,35 +22259,53 @@ $as_echo "$gl_cv_header_sys_socket_h_shut" >&6; } + if test $gl_cv_have_include_next = yes; then gl_cv_next_sys_socket_h='<'sys/socket.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_sys_socket_h+set}" = set; then : +if ${gl_cv_next_sys_socket_h+:} false; then : $as_echo_n "(cached) " >&6 else - if test $ac_cv_header_sys_socket_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test $ac_cv_header_sys_socket_h = yes; then + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_sys_socket_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/sys/socket.h#{ - s#.*"\(.*/sys/socket.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + + gl_header_literal_regex=`echo 'sys/socket.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + gl_cv_next_sys_socket_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' else - gl_cv_next_sys_socket_h='<'sys/socket.h'>' - fi + gl_cv_next_sys_socket_h='<'sys/socket.h'>' + fi + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5 @@ -21062,23 +22324,12 @@ $as_echo "$gl_cv_next_sys_socket_h" >&6; } + if test $ac_cv_header_sys_socket_h = yes; then HAVE_SYS_SOCKET_H=1 HAVE_WS2TCPIP_H=0 else HAVE_SYS_SOCKET_H=0 - for ac_header in ws2tcpip.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default" -if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_WS2TCPIP_H 1 -_ACEOF - -fi - -done - if test $ac_cv_header_ws2tcpip_h = yes; then HAVE_WS2TCPIP_H=1 else @@ -21101,7 +22352,7 @@ done #endif " -if test "x$ac_cv_type_struct_sockaddr_storage" = x""yes; then : +if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_SOCKADDR_STORAGE 1 @@ -21122,7 +22373,7 @@ ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" " #endif " -if test "x$ac_cv_type_sa_family_t" = x""yes; then : +if test "x$ac_cv_type_sa_family_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SA_FAMILY_T 1 @@ -21137,6 +22388,32 @@ fi if test $ac_cv_type_sa_family_t = no; then HAVE_SA_FAMILY_T=0 fi + if test $ac_cv_type_struct_sockaddr_storage != no; then + ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include + #ifdef HAVE_SYS_SOCKET_H + #include + #endif + #ifdef HAVE_WS2TCPIP_H + #include + #endif + +" +if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 +_ACEOF + + +else + HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0 +fi + + fi + if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \ + || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then + SYS_SOCKET_H='sys/socket.h' + fi @@ -21151,7 +22428,7 @@ fi for ac_header in winsock2.h do : ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" -if test "x$ac_cv_header_winsock2_h" = x""yes; then : +if test "x$ac_cv_header_winsock2_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_WINSOCK2_H 1 _ACEOF @@ -21176,7 +22453,7 @@ done as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : +if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21184,10 +22461,7 @@ else /* Some systems require prerequisite headers. */ #include -#if !defined __GLIBC__ && HAVE_SYS_TIME_H -# include -#endif -#include +#include int main () @@ -21208,7 +22482,7 @@ fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF @@ -21225,6 +22499,12 @@ fi HAVE_DECL_GAI_STRERROR=1; HAVE_DECL_GETADDRINFO=1; HAVE_DECL_GETNAMEINFO=1; + REPLACE_GAI_STRERROR=0; + + + + + @@ -21243,44 +22523,52 @@ fi - - : - - - - - - - if test $gl_cv_have_include_next = yes; then gl_cv_next_netdb_h='<'netdb.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_netdb_h+set}" = set; then : +if ${gl_cv_next_netdb_h+:} false; then : $as_echo_n "(cached) " >&6 else - if test $ac_cv_header_netdb_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test $ac_cv_header_netdb_h = yes; then + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_netdb_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/netdb.h#{ - s#.*"\(.*/netdb.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + + gl_header_literal_regex=`echo 'netdb.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + gl_cv_next_netdb_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' else - gl_cv_next_netdb_h='<'netdb.h'>' - fi + gl_cv_next_netdb_h='<'netdb.h'>' + fi + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netdb_h" >&5 @@ -21299,6 +22587,7 @@ $as_echo "$gl_cv_next_netdb_h" >&6; } + if test $ac_cv_header_netdb_h = yes; then HAVE_NETDB_H=1 else @@ -21311,7 +22600,7 @@ $as_echo "$gl_cv_next_netdb_h" >&6; } as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : +if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21336,7 +22625,7 @@ fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF @@ -21351,7 +22640,7 @@ fi gl_saved_libs="$LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 $as_echo_n "checking for library containing gethostbyname... " >&6; } -if test "${ac_cv_search_gethostbyname+set}" = set; then : +if ${ac_cv_search_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -21385,11 +22674,11 @@ for ac_lib in '' nsl network net; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_gethostbyname+set}" = set; then : + if ${ac_cv_search_gethostbyname+:} false; then : break fi done -if test "${ac_cv_search_gethostbyname+set}" = set; then : +if ${ac_cv_search_gethostbyname+:} false; then : else ac_cv_search_gethostbyname=no @@ -21412,7 +22701,7 @@ fi for ac_func in gethostbyname do : ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" -if test "x$ac_cv_func_gethostbyname" = x""yes; then : +if test "x$ac_cv_func_gethostbyname" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETHOSTBYNAME 1 _ACEOF @@ -21421,7 +22710,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in winsock2.h and -lws2_32" >&5 $as_echo_n "checking for gethostbyname in winsock2.h and -lws2_32... " >&6; } -if test "${gl_cv_w32_gethostbyname+set}" = set; then : +if ${gl_cv_w32_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else gl_cv_w32_gethostbyname=no @@ -21468,7 +22757,7 @@ done gl_saved_libs="$LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getservbyname" >&5 $as_echo_n "checking for library containing getservbyname... " >&6; } -if test "${ac_cv_search_getservbyname+set}" = set; then : +if ${ac_cv_search_getservbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -21502,11 +22791,11 @@ for ac_lib in '' socket network net; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_getservbyname+set}" = set; then : + if ${ac_cv_search_getservbyname+:} false; then : break fi done -if test "${ac_cv_search_getservbyname+set}" = set; then : +if ${ac_cv_search_getservbyname+:} false; then : else ac_cv_search_getservbyname=no @@ -21529,7 +22818,7 @@ fi for ac_func in getservbyname do : ac_fn_c_check_func "$LINENO" "getservbyname" "ac_cv_func_getservbyname" -if test "x$ac_cv_func_getservbyname" = x""yes; then : +if test "x$ac_cv_func_getservbyname" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETSERVBYNAME 1 _ACEOF @@ -21538,7 +22827,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getservbyname in winsock2.h and -lws2_32" >&5 $as_echo_n "checking for getservbyname in winsock2.h and -lws2_32... " >&6; } -if test "${gl_cv_w32_getservbyname+set}" = set; then : +if ${gl_cv_w32_getservbyname+:} false; then : $as_echo_n "(cached) " >&6 else gl_cv_w32_getservbyname=no @@ -21587,6 +22876,178 @@ done + HAVE_INET_NTOP=1 + INET_NTOP_LIB= + + + + + : + + + + + + if test $ac_cv_header_sys_socket_h != yes; then + for ac_header in winsock2.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" +if test "x$ac_cv_header_winsock2_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WINSOCK2_H 1 +_ACEOF + +fi + +done + + fi + if test "$ac_cv_header_winsock2_h" = yes; then + HAVE_WINSOCK2_H=1 + UNISTD_H_HAVE_WINSOCK2_H=1 + SYS_IOCTL_H_HAVE_WINSOCK2_H=1 + else + HAVE_WINSOCK2_H=0 + fi + + + if test $HAVE_WINSOCK2_H = 1; then + ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include +" +if test "x$ac_cv_have_decl_inet_ntop" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_INET_NTOP $ac_have_decl +_ACEOF + + if test $ac_cv_have_decl_inet_ntop = yes; then + REPLACE_INET_NTOP=1 + INET_NTOP_LIB="-lws2_32" + else + HAVE_DECL_INET_NTOP=0 + HAVE_INET_NTOP=0 + fi + else + gl_save_LIBS=$LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5 +$as_echo_n "checking for library containing inet_ntop... " >&6; } +if ${ac_cv_search_inet_ntop+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char inet_ntop (); +int +main () +{ +return inet_ntop (); + ; + return 0; +} +_ACEOF +for ac_lib in '' nsl resolv; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_inet_ntop=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_inet_ntop+:} false; then : + break +fi +done +if ${ac_cv_search_inet_ntop+:} false; then : + +else + ac_cv_search_inet_ntop=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5 +$as_echo "$ac_cv_search_inet_ntop" >&6; } +ac_res=$ac_cv_search_inet_ntop +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +else + for ac_func in inet_ntop +do : + ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop" +if test "x$ac_cv_func_inet_ntop" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_INET_NTOP 1 +_ACEOF + +fi +done + + if test $ac_cv_func_inet_ntop = no; then + HAVE_INET_NTOP=0 + fi + +fi + + LIBS=$gl_save_LIBS + + if test "$ac_cv_search_inet_ntop" != "no" \ + && test "$ac_cv_search_inet_ntop" != "none required"; then + INET_NTOP_LIB="$ac_cv_search_inet_ntop" + fi + + + : + + + + + + ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include + #if HAVE_NETDB_H + # include + #endif + +" +if test "x$ac_cv_have_decl_inet_ntop" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_INET_NTOP $ac_have_decl +_ACEOF + + if test $ac_cv_have_decl_inet_ntop = no; then + HAVE_DECL_INET_NTOP=0 + fi + fi + + + + + + + + + : @@ -21597,7 +23058,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5 $as_echo_n "checking for IPv4 sockets... " >&6; } - if test "${gl_cv_socket_ipv4+set}" = set; then : + if ${gl_cv_socket_ipv4+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21639,7 +23100,7 @@ $as_echo "#define HAVE_IPV4 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5 $as_echo_n "checking for IPv6 sockets... " >&6; } - if test "${gl_cv_socket_ipv6+set}" = set; then : + if ${gl_cv_socket_ipv6+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21683,128 +23144,7 @@ $as_echo "#define HAVE_IPV6 1" >>confdefs.h fi - - - - : - - - gl_save_LIBS=$LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5 -$as_echo_n "checking for library containing inet_ntop... " >&6; } -if test "${ac_cv_search_inet_ntop+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char inet_ntop (); -int -main () -{ -return inet_ntop (); - ; - return 0; -} -_ACEOF -for ac_lib in '' nsl; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_inet_ntop=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_inet_ntop+set}" = set; then : - break -fi -done -if test "${ac_cv_search_inet_ntop+set}" = set; then : - -else - ac_cv_search_inet_ntop=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5 -$as_echo "$ac_cv_search_inet_ntop" >&6; } -ac_res=$ac_cv_search_inet_ntop -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -else - - - - - - - - - for ac_func in inet_ntop -do : - ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop" -if test "x$ac_cv_func_inet_ntop" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_INET_NTOP 1 -_ACEOF - -else - - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" - -fi -done - - -fi - - LIBS=$gl_save_LIBS - INET_NTOP_LIB= - if test "$ac_cv_search_inet_ntop" != "no" && - test "$ac_cv_search_inet_ntop" != "none required"; then - INET_NTOP_LIB="$ac_cv_search_inet_ntop" - fi - - - - ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include -" -if test "x$ac_cv_have_decl_inet_ntop" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_INET_NTOP $ac_have_decl -_ACEOF - - if test $ac_cv_have_decl_inet_ntop = no; then - HAVE_DECL_INET_NTOP=0 - fi - - - - - - - - - - + GNULIB__EXIT=0; GNULIB_ATOLL=0; GNULIB_CALLOC_POSIX=0; GNULIB_CANONICALIZE_FILE_NAME=0; @@ -21812,55 +23152,76 @@ _ACEOF GNULIB_GETSUBOPT=0; GNULIB_GRANTPT=0; GNULIB_MALLOC_POSIX=0; + GNULIB_MBTOWC=0; GNULIB_MKDTEMP=0; GNULIB_MKOSTEMP=0; GNULIB_MKOSTEMPS=0; GNULIB_MKSTEMP=0; GNULIB_MKSTEMPS=0; + GNULIB_POSIX_OPENPT=0; GNULIB_PTSNAME=0; + GNULIB_PTSNAME_R=0; GNULIB_PUTENV=0; + GNULIB_RANDOM=0; GNULIB_RANDOM_R=0; GNULIB_REALLOC_POSIX=0; GNULIB_REALPATH=0; GNULIB_RPMATCH=0; + GNULIB_SECURE_GETENV=0; GNULIB_SETENV=0; GNULIB_STRTOD=0; GNULIB_STRTOLL=0; GNULIB_STRTOULL=0; + GNULIB_SYSTEM_POSIX=0; GNULIB_UNLOCKPT=0; GNULIB_UNSETENV=0; - HAVE_ATOLL=1; - HAVE_CALLOC_POSIX=1; + GNULIB_WCTOMB=0; + HAVE__EXIT=1; + HAVE_ATOLL=1; HAVE_CANONICALIZE_FILE_NAME=1; HAVE_DECL_GETLOADAVG=1; HAVE_GETSUBOPT=1; HAVE_GRANTPT=1; - HAVE_MALLOC_POSIX=1; HAVE_MKDTEMP=1; HAVE_MKOSTEMP=1; HAVE_MKOSTEMPS=1; HAVE_MKSTEMP=1; HAVE_MKSTEMPS=1; + HAVE_POSIX_OPENPT=1; HAVE_PTSNAME=1; + HAVE_PTSNAME_R=1; + HAVE_RANDOM=1; + HAVE_RANDOM_H=1; HAVE_RANDOM_R=1; - HAVE_REALLOC_POSIX=1; HAVE_REALPATH=1; HAVE_RPMATCH=1; + HAVE_SECURE_GETENV=1; HAVE_SETENV=1; + HAVE_DECL_SETENV=1; HAVE_STRTOD=1; HAVE_STRTOLL=1; HAVE_STRTOULL=1; HAVE_STRUCT_RANDOM_DATA=1; HAVE_SYS_LOADAVG_H=0; HAVE_UNLOCKPT=1; - HAVE_UNSETENV=1; + HAVE_DECL_UNSETENV=1; + REPLACE_CALLOC=0; REPLACE_CANONICALIZE_FILE_NAME=0; + REPLACE_MALLOC=0; + REPLACE_MBTOWC=0; REPLACE_MKSTEMP=0; + REPLACE_PTSNAME=0; + REPLACE_PTSNAME_R=0; REPLACE_PUTENV=0; + REPLACE_RANDOM_R=0; + REPLACE_REALLOC=0; REPLACE_REALPATH=0; REPLACE_SETENV=0; REPLACE_STRTOD=0; REPLACE_UNSETENV=0; + REPLACE_WCTOMB=0; + + @@ -21883,35 +23244,53 @@ _ACEOF + if test $gl_cv_have_include_next = yes; then gl_cv_next_getopt_h='<'getopt.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_getopt_h+set}" = set; then : +if ${gl_cv_next_getopt_h+:} false; then : $as_echo_n "(cached) " >&6 else - if test $ac_cv_header_getopt_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test $ac_cv_header_getopt_h = yes; then + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/getopt.h#{ - s#.*"\(.*/getopt.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + + gl_header_literal_regex=`echo 'getopt.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' else - gl_cv_next_getopt_h='<'getopt.h'>' - fi + gl_cv_next_getopt_h='<'getopt.h'>' + fi + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5 @@ -21931,12 +23310,6 @@ $as_echo "$gl_cv_next_getopt_h" >&6; } - : - - - - - if test $ac_cv_header_getopt_h = yes; then HAVE_GETOPT_H=1 else @@ -21950,7 +23323,7 @@ $as_echo "$gl_cv_next_getopt_h" >&6; } for ac_header in getopt.h do : ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" -if test "x$ac_cv_header_getopt_h" = x""yes; then : +if test "x$ac_cv_header_getopt_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETOPT_H 1 _ACEOF @@ -21967,7 +23340,7 @@ done for ac_func in getopt_long_only do : ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only" -if test "x$ac_cv_func_getopt_long_only" = x""yes; then : +if test "x$ac_cv_func_getopt_long_only" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETOPT_LONG_ONLY 1 _ACEOF @@ -21979,52 +23352,19 @@ done fi - if test -z "$gl_replace_getopt"; then - ac_fn_c_check_decl "$LINENO" "optreset" "ac_cv_have_decl_optreset" "#include -" -if test "x$ac_cv_have_decl_optreset" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_OPTRESET $ac_have_decl -_ACEOF -if test $ac_have_decl = 1; then : - -else - ac_fn_c_check_decl "$LINENO" "getopt_clip" "ac_cv_have_decl_getopt_clip" "#include -" -if test "x$ac_cv_have_decl_getopt_clip" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETOPT_CLIP $ac_have_decl -_ACEOF - - -fi - - fi - - if test -z "$gl_replace_getopt"; then + if test -z "$gl_replace_getopt"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; } -if test "${gl_cv_func_getopt_posix+set}" = set; then : +if ${gl_cv_func_getopt_posix+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : - case "$host_os" in - mingw*) gl_cv_func_getopt_posix="guessing no";; - darwin*) gl_cv_func_getopt_posix="guessing no";; - *) gl_cv_func_getopt_posix="guessing yes";; - esac - + if test $cross_compiling = no; then + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -22033,89 +23373,125 @@ else #include #include -#if !HAVE_DECL_OPTRESET && !HAVE_DECL_GETOPT_CLIP -# define OPTIND_MIN 0 -#else -# define OPTIND_MIN 1 -#endif +int +main () +{ + static char program[] = "program"; + static char a[] = "-a"; + static char foo[] = "foo"; + static char bar[] = "bar"; + char *argv[] = { program, a, foo, bar, NULL }; + int c; + + c = getopt (4, argv, "ab"); + if (!(c == 'a')) + return 1; + c = getopt (4, argv, "ab"); + if (!(c == -1)) + return 2; + if (!(optind == 2)) + return 3; + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_getopt_posix=maybe +else + gl_cv_func_getopt_posix=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + if test $gl_cv_func_getopt_posix = maybe; then + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include int main () { - { - int argc = 0; - char *argv[10]; - int c; + static char program[] = "program"; + static char donald[] = "donald"; + static char p[] = "-p"; + static char billy[] = "billy"; + static char duck[] = "duck"; + static char a[] = "-a"; + static char bar[] = "bar"; + char *argv[] = { program, donald, p, billy, duck, a, bar, NULL }; + int c; - argv[argc++] = "program"; - argv[argc++] = "-a"; - argv[argc++] = "foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = OPTIND_MIN; - opterr = 0; + c = getopt (7, argv, "+abp:q:"); + if (!(c == -1)) + return 4; + if (!(strcmp (argv[0], "program") == 0)) + return 5; + if (!(strcmp (argv[1], "donald") == 0)) + return 6; + if (!(strcmp (argv[2], "-p") == 0)) + return 7; + if (!(strcmp (argv[3], "billy") == 0)) + return 8; + if (!(strcmp (argv[4], "duck") == 0)) + return 9; + if (!(strcmp (argv[5], "-a") == 0)) + return 10; + if (!(strcmp (argv[6], "bar") == 0)) + return 11; + if (!(optind == 1)) + return 12; + return 0; +} - c = getopt (argc, argv, "ab"); - if (!(c == 'a')) - return 1; - c = getopt (argc, argv, "ab"); - if (!(c == -1)) - return 2; - if (!(optind == 2)) - return 3; - } - /* Some internal state exists at this point. */ - { - int argc = 0; - char *argv[10]; - int c; +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_getopt_posix=maybe +else + gl_cv_func_getopt_posix=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi - argv[argc++] = "program"; - argv[argc++] = "donald"; - argv[argc++] = "-p"; - argv[argc++] = "billy"; - argv[argc++] = "duck"; - argv[argc++] = "-a"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = OPTIND_MIN; - opterr = 0; + fi + if test $gl_cv_func_getopt_posix = maybe; then + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - c = getopt (argc, argv, "+abp:q:"); - if (!(c == -1)) - return 4; - if (!(strcmp (argv[0], "program") == 0)) - return 5; - if (!(strcmp (argv[1], "donald") == 0)) - return 6; - if (!(strcmp (argv[2], "-p") == 0)) - return 7; - if (!(strcmp (argv[3], "billy") == 0)) - return 8; - if (!(strcmp (argv[4], "duck") == 0)) - return 9; - if (!(strcmp (argv[5], "-a") == 0)) - return 10; - if (!(strcmp (argv[6], "bar") == 0)) - return 11; - if (!(optind == 1)) - return 12; - } - /* Detect MacOS 10.5 bug. */ - { - char *argv[3] = { "program", "-ab", NULL }; - optind = OPTIND_MIN; - opterr = 0; - if (getopt (2, argv, "ab:") != 'a') - return 13; - if (getopt (2, argv, "ab:") != '?') - return 14; - if (optopt != 'b') - return 15; - if (optind != 2) - return 16; - } +#include +#include +#include +int +main () +{ + static char program[] = "program"; + static char ab[] = "-ab"; + char *argv[3] = { program, ab, NULL }; + if (getopt (2, argv, "ab:") != 'a') + return 13; + if (getopt (2, argv, "ab:") != '?') + return 14; + if (optopt != 'b') + return 15; + if (optind != 2) + return 16; return 0; } @@ -22129,6 +23505,13 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi + else + case "$host_os" in + darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";; + *) gl_cv_func_getopt_posix="guessing yes";; + esac + fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5 @@ -22141,22 +23524,25 @@ $as_echo "$gl_cv_func_getopt_posix" >&6; } if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5 $as_echo_n "checking for working GNU getopt function... " >&6; } -if test "${gl_cv_func_getopt_gnu+set}" = set; then : +if ${gl_cv_func_getopt_gnu+:} false; then : $as_echo_n "(cached) " >&6 else # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the # optstring is necessary for programs like m4 that have POSIX-mandated # semantics for supporting options interspersed with files. # Also, since getopt_long is a GNU extension, we require optind=0. - gl_had_POSIXLY_CORRECT=${POSIXLY_CORRECT:+yes} + # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; + # so take care to revert to the correct (non-)export state. + gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' + case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" conftest.$ac_ext @@ -22165,57 +23551,193 @@ else #include #include +#include +#if defined __MACH__ && defined __APPLE__ +/* Avoid a crash on Mac OS X. */ +#include +#include +#include +#include +#include +#include +/* The exception port on which our thread listens. */ +static mach_port_t our_exception_port; +/* The main function of the thread listening for exceptions of type + EXC_BAD_ACCESS. */ +static void * +mach_exception_thread (void *arg) +{ + /* Buffer for a message to be received. */ + struct { + mach_msg_header_t head; + mach_msg_body_t msgh_body; + char data[1024]; + } msg; + mach_msg_return_t retval; + /* Wait for a message on the exception port. */ + retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg), + our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); + if (retval != MACH_MSG_SUCCESS) + abort (); + exit (1); +} +static void +nocrash_init (void) +{ + mach_port_t self = mach_task_self (); + /* Allocate a port on which the thread shall listen for exceptions. */ + if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) + == KERN_SUCCESS) { + /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ + if (mach_port_insert_right (self, our_exception_port, our_exception_port, + MACH_MSG_TYPE_MAKE_SEND) + == KERN_SUCCESS) { + /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting + for us. */ + exception_mask_t mask = EXC_MASK_BAD_ACCESS; + /* Create the thread listening on the exception port. */ + pthread_attr_t attr; + pthread_t thread; + if (pthread_attr_init (&attr) == 0 + && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0 + && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) { + pthread_attr_destroy (&attr); + /* Replace the exception port info for these exceptions with our own. + Note that we replace the exception port for the entire task, not only + for a particular thread. This has the effect that when our exception + port gets the message, the thread specific exception port has already + been asked, and we don't need to bother about it. + See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ + task_set_exception_ports (self, mask, our_exception_port, + EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); + } + } + } +} +#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +/* Avoid a crash on native Windows. */ +#define WIN32_LEAN_AND_MEAN +#include +#include +static LONG WINAPI +exception_filter (EXCEPTION_POINTERS *ExceptionInfo) +{ + switch (ExceptionInfo->ExceptionRecord->ExceptionCode) + { + case EXCEPTION_ACCESS_VIOLATION: + case EXCEPTION_IN_PAGE_ERROR: + case EXCEPTION_STACK_OVERFLOW: + case EXCEPTION_GUARD_PAGE: + case EXCEPTION_PRIV_INSTRUCTION: + case EXCEPTION_ILLEGAL_INSTRUCTION: + case EXCEPTION_DATATYPE_MISALIGNMENT: + case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: + case EXCEPTION_NONCONTINUABLE_EXCEPTION: + exit (1); + } + return EXCEPTION_CONTINUE_SEARCH; +} +static void +nocrash_init (void) +{ + SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter); +} +#else +/* Avoid a crash on POSIX systems. */ +#include +/* A POSIX signal handler. */ +static void +exception_handler (int sig) +{ + exit (1); +} +static void +nocrash_init (void) +{ +#ifdef SIGSEGV + signal (SIGSEGV, exception_handler); +#endif +#ifdef SIGBUS + signal (SIGBUS, exception_handler); +#endif +} +#endif + + int main () { + int result = 0; + + nocrash_init(); + /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, - and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, + and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10. */ { - char *myargv[3]; - myargv[0] = "conftest"; - myargv[1] = "-+"; - myargv[2] = 0; + static char conftest[] = "conftest"; + static char plus[] = "-+"; + char *argv[3] = { conftest, plus, NULL }; opterr = 0; - if (getopt (2, myargv, "+a") != '?') - return 1; + if (getopt (2, argv, "+a") != '?') + result |= 1; } /* This code succeeds on glibc 2.8, mingw, - and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, + and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ { - char *argv[] = { "program", "-p", "foo", "bar", NULL }; + static char program[] = "program"; + static char p[] = "-p"; + static char foo[] = "foo"; + static char bar[] = "bar"; + char *argv[] = { program, p, foo, bar, NULL }; optind = 1; if (getopt (4, argv, "p::") != 'p') - return 2; - if (optarg != NULL) - return 3; - if (getopt (4, argv, "p::") != -1) - return 4; - if (optind != 2) - return 5; + result |= 2; + else if (optarg != NULL) + result |= 4; + else if (getopt (4, argv, "p::") != -1) + result |= 6; + else if (optind != 2) + result |= 8; } /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ { - char *argv[] = { "program", "foo", "-p", NULL }; + static char program[] = "program"; + static char foo[] = "foo"; + static char p[] = "-p"; + char *argv[] = { program, foo, p, NULL }; optind = 0; if (getopt (3, argv, "-p") != 1) - return 6; - if (getopt (3, argv, "-p") != 'p') - return 7; + result |= 16; + else if (getopt (3, argv, "-p") != 'p') + result |= 16; } /* This code fails on glibc 2.11. */ { - char *argv[] = { "program", "-b", "-a", NULL }; + static char program[] = "program"; + static char b[] = "-b"; + static char a[] = "-a"; + char *argv[] = { program, b, a, NULL }; optind = opterr = 0; if (getopt (3, argv, "+:a:b") != 'b') - return 8; - if (getopt (3, argv, "+:a:b") != ':') - return 9; + result |= 32; + else if (getopt (3, argv, "+:a:b") != ':') + result |= 32; } - return 0; + /* This code dumps core on glibc 2.14. */ + { + static char program[] = "program"; + static char w[] = "-W"; + static char dummy[] = "dummy"; + char *argv[] = { program, w, dummy, NULL }; + optind = opterr = 1; + if (getopt (3, argv, "W;") != 'W') + result |= 64; + } + return result; ; return 0; @@ -22230,21 +23752,106 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - if test "$gl_had_POSIXLY_CORRECT" != yes; then - { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} - fi + case $gl_had_POSIXLY_CORRECT in + exported) ;; + yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;; + *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;; + esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5 $as_echo "$gl_cv_func_getopt_gnu" >&6; } - if test "$gl_cv_func_getopt_gnu" = "no"; then + if test "$gl_cv_func_getopt_gnu" != yes; then gl_replace_getopt=yes + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5 +$as_echo_n "checking for working GNU getopt_long function... " >&6; } +if ${gl_cv_func_getopt_long_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + case "$host_os" in + openbsd*) gl_cv_func_getopt_long_gnu="guessing no";; + *) gl_cv_func_getopt_long_gnu="guessing yes";; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + #include + +int +main () +{ +static const struct option long_options[] = + { + { "xtremely-",no_argument, NULL, 1003 }, + { "xtra", no_argument, NULL, 1001 }, + { "xtreme", no_argument, NULL, 1002 }, + { "xtremely", no_argument, NULL, 1003 }, + { NULL, 0, NULL, 0 } + }; + /* This code fails on OpenBSD 5.0. */ + { + static char program[] = "program"; + static char xtremel[] = "--xtremel"; + char *argv[] = { program, xtremel, NULL }; + int option_index; + optind = 1; opterr = 0; + if (getopt_long (2, argv, "", long_options, &option_index) != 1003) + return 1; + } + return 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_getopt_long_gnu=yes +else + gl_cv_func_getopt_long_gnu=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5 +$as_echo "$gl_cv_func_getopt_long_gnu" >&6; } + case "$gl_cv_func_getopt_long_gnu" in + *yes) ;; + *) gl_replace_getopt=yes ;; + esac fi fi + + + + + REPLACE_GETOPT=0 + if test -n "$gl_replace_getopt"; then + REPLACE_GETOPT=1 + fi + + if test $REPLACE_GETOPT = 1; then + + GETOPT_H=getopt.h + +$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h + + + + fi + + ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default" -if test "x$ac_cv_have_decl_getenv" = x""yes; then : +if test "x$ac_cv_have_decl_getenv" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -22256,56 +23863,6 @@ _ACEOF - - - - - if test -n "$gl_replace_getopt"; then : - - - - GETOPT_H=getopt.h - -$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h - - - - GNULIB_UNISTD_H_GETOPT=1 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" - - - - : - - - - - - - - -fi - - - GNULIB_NL_LANGINFO=0; HAVE_NL_LANGINFO=1; REPLACE_NL_LANGINFO=0; @@ -22316,8 +23873,216 @@ fi + + case "$host_os" in + mingw*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5 +$as_echo_n "checking for 64-bit off_t... " >&6; } +if ${gl_cv_type_off_t_64+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1]; + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_type_off_t_64=yes +else + gl_cv_type_off_t_64=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5 +$as_echo "$gl_cv_type_off_t_64" >&6; } + if test $gl_cv_type_off_t_64 = no; then + WINDOWS_64_BIT_OFF_T=1 + else + WINDOWS_64_BIT_OFF_T=0 + fi + WINDOWS_64_BIT_ST_SIZE=1 + ;; + *) + WINDOWS_64_BIT_OFF_T=0 + WINDOWS_64_BIT_ST_SIZE=0 + ;; + esac + + + + + + + + + + + : + + + + + + + : + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5 +$as_echo_n "checking for working fcntl.h... " >&6; } +if ${gl_cv_header_working_fcntl_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + gl_cv_header_working_fcntl_h=cross-compiling +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + #if HAVE_UNISTD_H + # include + #else /* on Windows with MSVC */ + # include + # include + # defined sleep(n) _sleep ((n) * 1000) + #endif + #include + #ifndef O_NOATIME + #define O_NOATIME 0 + #endif + #ifndef O_NOFOLLOW + #define O_NOFOLLOW 0 + #endif + static int const constants[] = + { + O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, + O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY + }; + +int +main () +{ + + int result = !constants; + #if HAVE_SYMLINK + { + static char const sym[] = "conftest.sym"; + if (symlink ("/dev/null", sym) != 0) + result |= 2; + else + { + int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0); + if (fd >= 0) + { + close (fd); + result |= 4; + } + } + if (unlink (sym) != 0 || symlink (".", sym) != 0) + result |= 2; + else + { + int fd = open (sym, O_RDONLY | O_NOFOLLOW); + if (fd >= 0) + { + close (fd); + result |= 4; + } + } + unlink (sym); + } + #endif + { + static char const file[] = "confdefs.h"; + int fd = open (file, O_RDONLY | O_NOATIME); + if (fd < 0) + result |= 8; + else + { + struct stat st0; + if (fstat (fd, &st0) != 0) + result |= 16; + else + { + char c; + sleep (1); + if (read (fd, &c, 1) != 1) + result |= 24; + else + { + if (close (fd) != 0) + result |= 32; + else + { + struct stat st1; + if (stat (file, &st1) != 0) + result |= 40; + else + if (st0.st_atime != st1.st_atime) + result |= 64; + } + } + } + } + } + return result; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_header_working_fcntl_h=yes +else + case $? in #( + 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( + 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( + 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( + *) gl_cv_header_working_fcntl_h='no';; + esac +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5 +$as_echo "$gl_cv_header_working_fcntl_h" >&6; } + + case $gl_cv_header_working_fcntl_h in #( + *O_NOATIME* | no | cross-compiling) ac_val=0;; #( + *) ac_val=1;; + esac + +cat >>confdefs.h <<_ACEOF +#define HAVE_WORKING_O_NOATIME $ac_val +_ACEOF + + + case $gl_cv_header_working_fcntl_h in #( + *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( + *) ac_val=1;; + esac + +cat >>confdefs.h <<_ACEOF +#define HAVE_WORKING_O_NOFOLLOW $ac_val +_ACEOF + + + ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" -if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then : +if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -22329,9 +24094,9 @@ _ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library 2.1 or newer" >&5 -$as_echo_n "checking whether we are using the GNU C Library 2.1 or newer... " >&6; } -if test "${ac_cv_gnu_library_2_1+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5 +$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; } +if ${ac_cv_gnu_library_2_1+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22343,10 +24108,13 @@ else Lucky GNU user #endif #endif +#ifdef __UCLIBC__ + Lucky user +#endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Lucky GNU user" >/dev/null 2>&1; then : + $EGREP "Lucky" >/dev/null 2>&1; then : ac_cv_gnu_library_2_1=yes else ac_cv_gnu_library_2_1=no @@ -22363,25 +24131,29 @@ $as_echo "$ac_cv_gnu_library_2_1" >&6; } + GNULIB_LOCALECONV=0; + GNULIB_SETLOCALE=0; GNULIB_DUPLOCALE=0; HAVE_DUPLOCALE=1; + REPLACE_LOCALECONV=0; + REPLACE_SETLOCALE=0; REPLACE_DUPLOCALE=0; + REPLACE_STRUCT_LCONV=0; REPLACE_NULL=0; HAVE_WCHAR_T=1; - STDDEF_H=''; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 $as_echo_n "checking for wchar_t... " >&6; } -if test "${gt_cv_c_wchar_t+set}" = set; then : +if ${gt_cv_c_wchar_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - wchar_t foo = (wchar_t)'\0'; + wchar_t foo = (wchar_t)'\0'; int main () { @@ -22408,18 +24180,14 @@ $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h - - - - - + STDDEF_H= if test $gt_cv_c_wchar_t = no; then HAVE_WCHAR_T=0 STDDEF_H=stddef.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } -if test "${gl_cv_decl_null_works+set}" = set; then : +if ${gl_cv_decl_null_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22448,15 +24216,20 @@ $as_echo "$gl_cv_decl_null_works" >&6; } REPLACE_NULL=1 STDDEF_H=stddef.h fi + + if test -n "$STDDEF_H"; then + GL_GENERATE_STDDEF_H_TRUE= + GL_GENERATE_STDDEF_H_FALSE='#' +else + GL_GENERATE_STDDEF_H_TRUE='#' + GL_GENERATE_STDDEF_H_FALSE= +fi + if test -n "$STDDEF_H"; then - : - - - @@ -22466,30 +24239,41 @@ $as_echo "$gl_cv_decl_null_works" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_stddef_h+set}" = set; then : +if ${gl_cv_next_stddef_h+:} false; then : $as_echo_n "(cached) " >&6 else - if test $ac_cv_header_stddef_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/stddef.h#{ - s#.*"\(.*/stddef.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_stddef_h='<'stddef.h'>' - fi + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + + gl_header_literal_regex=`echo 'stddef.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 @@ -22508,6 +24292,7 @@ $as_echo "$gl_cv_next_stddef_h" >&6; } + fi @@ -22517,13 +24302,913 @@ $as_echo "$gl_cv_next_stddef_h" >&6; } + gl_threads_api=none + LIBTHREAD= + LTLIBTHREAD= + LIBMULTITHREAD= + LTLIBMULTITHREAD= + if test "$gl_use_threads" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5 +$as_echo_n "checking whether imported symbols can be declared weak... " >&6; } +if ${gl_cv_have_weak+:} false; then : + $as_echo_n "(cached) " >&6 +else + gl_cv_have_weak=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern void xyzzy (); +#pragma weak xyzzy +int +main () +{ +xyzzy(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_have_weak=maybe +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test $gl_cv_have_weak = maybe; then + if test "$cross_compiling" = yes; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __ELF__ + Extensible Linking Format + #endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Extensible Linking Format" >/dev/null 2>&1; then : + gl_cv_have_weak="guessing yes" +else + gl_cv_have_weak="guessing no" +fi +rm -f conftest* + + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#pragma weak fputs +int main () +{ + return (fputs == NULL); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_have_weak=yes +else + gl_cv_have_weak=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5 +$as_echo "$gl_cv_have_weak" >&6; } + if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then + # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that + # it groks . It's added above, in gl_THREADLIB_EARLY_BODY. + ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" +if test "x$ac_cv_header_pthread_h" = xyes; then : + gl_have_pthread_h=yes +else + gl_have_pthread_h=no +fi + + + if test "$gl_have_pthread_h" = yes; then + # Other possible tests: + # -lpthreads (FSU threads, PCthreads) + # -lgthreads + gl_have_pthread= + # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist + # in libc. IRIX 6.5 has the first one in both libc and libpthread, but + # the second one only in libpthread, and lock.c needs it. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +pthread_mutex_lock((pthread_mutex_t*)0); + pthread_mutexattr_init((pthread_mutexattr_t*)0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_have_pthread=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # Test for libpthread by looking for pthread_kill. (Not pthread_self, + # since it is defined as a macro on OSF/1.) + if test -n "$gl_have_pthread"; then + # The program links fine without libpthread. But it may actually + # need to link with libpthread in order to create multiple threads. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 +$as_echo_n "checking for pthread_kill in -lpthread... " >&6; } +if ${ac_cv_lib_pthread_pthread_kill+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_kill (); +int +main () +{ +return pthread_kill (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pthread_pthread_kill=yes +else + ac_cv_lib_pthread_pthread_kill=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 +$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } +if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : + LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread + # On Solaris and HP-UX, most pthread functions exist also in libc. + # Therefore pthread_in_use() needs to actually try to create a + # thread: pthread_create from libc will fail, whereas + # pthread_create will actually create a thread. + case "$host_os" in + solaris* | hpux*) + +$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h + + esac + +fi + + else + # Some library is needed. Try libpthread and libc_r. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 +$as_echo_n "checking for pthread_kill in -lpthread... " >&6; } +if ${ac_cv_lib_pthread_pthread_kill+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_kill (); +int +main () +{ +return pthread_kill (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pthread_pthread_kill=yes +else + ac_cv_lib_pthread_pthread_kill=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 +$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } +if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : + gl_have_pthread=yes + LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread + LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread +fi + + if test -z "$gl_have_pthread"; then + # For FreeBSD 4. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5 +$as_echo_n "checking for pthread_kill in -lc_r... " >&6; } +if ${ac_cv_lib_c_r_pthread_kill+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lc_r $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_kill (); +int +main () +{ +return pthread_kill (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_c_r_pthread_kill=yes +else + ac_cv_lib_c_r_pthread_kill=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5 +$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; } +if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then : + gl_have_pthread=yes + LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r + LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r +fi + + fi + fi + if test -n "$gl_have_pthread"; then + gl_threads_api=posix + +$as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h + + if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then + +$as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h + + LIBTHREAD= + LTLIBTHREAD= + fi + fi + fi + fi + fi + if test -z "$gl_have_pthread"; then + if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then + gl_have_solaristhread= + gl_save_LIBS="$LIBS" + LIBS="$LIBS -lthread" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main () +{ +thr_self(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_have_solaristhread=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gl_save_LIBS" + if test -n "$gl_have_solaristhread"; then + gl_threads_api=solaris + LIBTHREAD=-lthread + LTLIBTHREAD=-lthread + LIBMULTITHREAD="$LIBTHREAD" + LTLIBMULTITHREAD="$LTLIBTHREAD" + +$as_echo "#define USE_SOLARIS_THREADS 1" >>confdefs.h + + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then + +$as_echo "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h + + LIBTHREAD= + LTLIBTHREAD= + fi + fi + fi + fi + if test "$gl_use_threads" = pth; then + gl_save_CPPFLAGS="$CPPFLAGS" + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5 +$as_echo_n "checking how to link with libpth... " >&6; } +if ${ac_cv_libpth_libs+:} false; then : + $as_echo_n "(cached) " >&6 +else + + + + + + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libpth-prefix was given. +if test "${with_libpth_prefix+set}" = set; then : + withval=$with_libpth_prefix; + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && ! test -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" + fi + fi + fi + +fi + + LIBPTH= + LTLIBPTH= + INCPTH= + LIBPTH_PREFIX= + HAVE_LIBPTH= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='pth ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBPTH; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no \ + || test "X$found_dir" = "X/usr/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$acl_hardcode_direct" = yes; then + LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBPTH; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" + else + LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a" + else + LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + if test "$name" = 'pth'; then + LIBPTH_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = 'pth'; then + LIBPTH_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCPTH; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBPTH; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBPTH; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBPTH="${LIBPTH}${LIBPTH:+ }$dep" + LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep" + ;; + esac + done + fi + else + LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name" + LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBPTH="${LIBPTH}${LIBPTH:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBPTH="${LIBPTH}${LIBPTH:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir" + done + fi + + + + + + + ac_cv_libpth_libs="$LIBPTH" + ac_cv_libpth_ltlibs="$LTLIBPTH" + ac_cv_libpth_cppflags="$INCPTH" + ac_cv_libpth_prefix="$LIBPTH_PREFIX" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5 +$as_echo "$ac_cv_libpth_libs" >&6; } + LIBPTH="$ac_cv_libpth_libs" + LTLIBPTH="$ac_cv_libpth_ltlibs" + INCPTH="$ac_cv_libpth_cppflags" + LIBPTH_PREFIX="$ac_cv_libpth_prefix" + + for element in $INCPTH; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done + + + + + HAVE_LIBPTH=yes + + + + gl_have_pth= + gl_save_LIBS="$LIBS" + LIBS="$LIBS $LIBPTH" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +pth_self(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_have_pth=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gl_save_LIBS" + if test -n "$gl_have_pth"; then + gl_threads_api=pth + LIBTHREAD="$LIBPTH" + LTLIBTHREAD="$LTLIBPTH" + LIBMULTITHREAD="$LIBTHREAD" + LTLIBMULTITHREAD="$LTLIBTHREAD" + +$as_echo "#define USE_PTH_THREADS 1" >>confdefs.h + + if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then + +$as_echo "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h + + LIBTHREAD= + LTLIBTHREAD= + fi + fi + else + CPPFLAGS="$gl_save_CPPFLAGS" + fi + fi + if test -z "$gl_have_pthread"; then + case "$gl_use_threads" in + yes | windows | win32) # The 'win32' is for backward compatibility. + if { case "$host_os" in + mingw*) true;; + *) false;; + esac + }; then + gl_threads_api=windows + +$as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h + + fi + ;; + esac + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5 +$as_echo_n "checking for multithread API to use... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5 +$as_echo "$gl_threads_api" >&6; } + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; } -if test "${gl_cv_func_malloc_posix+set}" = set; then : +if ${gl_cv_func_malloc_posix+:} false; then : $as_echo_n "(cached) " >&6 else @@ -22534,8 +25219,8 @@ int main () { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - choke me - #endif + choke me + #endif ; return 0; @@ -22553,10 +25238,11 @@ fi $as_echo "$gl_cv_func_malloc_posix" >&6; } - for ac_header in stdlib.h + + for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" -if test "x$ac_cv_header_stdlib_h" = x""yes; then : +if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF @@ -22565,21 +25251,29 @@ fi done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 $as_echo_n "checking for GNU libc compatible malloc... " >&6; } -if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then : +if ${ac_cv_func_malloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : - ac_cv_func_malloc_0_nonnull=no + case "$host_os" in + # Guess yes on platforms where we know the result. + *-gnu* | freebsd* | netbsd* | openbsd* \ + | hpux* | solaris* | cygwin* | mingw*) + ac_cv_func_malloc_0_nonnull=yes ;; + # If we don't know, assume the worst. + *) ac_cv_func_malloc_0_nonnull=no ;; + esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H -# include -#else -char *malloc (); -#endif + # include + #else + char *malloc (); + #endif int main () @@ -22588,6 +25282,7 @@ return ! malloc (0); ; return 0; } + _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_malloc_0_nonnull=yes @@ -22598,10 +25293,11 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } -if test $ac_cv_func_malloc_0_nonnull = yes; then : + if test $ac_cv_func_malloc_0_nonnull = yes; then : gl_cv_func_malloc_0_nonnull=1 else gl_cv_func_malloc_0_nonnull=0 @@ -22614,12 +25310,14 @@ _ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 -$as_echo_n "checking for long long int... " >&6; } -if test "${ac_cv_type_long_long_int+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 +$as_echo_n "checking for unsigned long long int... " >&6; } +if ${ac_cv_type_unsigned_long_long_int+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_cv_type_unsigned_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* For now, do not test the preprocessor; as of 2007 there are too many @@ -22652,37 +25350,64 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : - if test "$cross_compiling" = yes; then : + +else + ac_cv_type_unsigned_long_long_int=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 +$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } + if test $ac_cv_type_unsigned_long_long_int = yes; then + +$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h + + fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 +$as_echo_n "checking for long long int... " >&6; } +if ${ac_cv_type_long_long_int+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_cv_type_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int + if test $ac_cv_type_long_long_int = yes; then + if test "$cross_compiling" = yes; then : + : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - #ifndef LLONG_MAX - # define HALF \ - (1LL << (sizeof (long long int) * CHAR_BIT - 2)) - # define LLONG_MAX (HALF - 1 + HALF) - #endif + #ifndef LLONG_MAX + # define HALF \ + (1LL << (sizeof (long long int) * CHAR_BIT - 2)) + # define LLONG_MAX (HALF - 1 + HALF) + #endif int main () { long long int n = 1; - int i; - for (i = 0; ; i++) - { - long long int m = n << i; - if (m >> i != n) - return 1; - if (LLONG_MAX / 2 < m) - break; - } - return 0; + int i; + for (i = 0; ; i++) + { + long long int m = n << i; + if (m >> i != n) + return 1; + if (LLONG_MAX / 2 < m) + break; + } + return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - ac_cv_type_long_long_int=yes + else ac_cv_type_long_long_int=no fi @@ -22690,11 +25415,8 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi -else - ac_cv_type_long_long_int=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + fi + fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 $as_echo "$ac_cv_type_long_long_int" >&6; } @@ -22713,13 +25435,20 @@ $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 $as_echo_n "checking for mbstate_t... " >&6; } -if test "${ac_cv_type_mbstate_t+set}" = set; then : +if ${ac_cv_type_mbstate_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default -# include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include int main () { @@ -22762,7 +25491,7 @@ $as_echo "#define mbstate_t int" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5 $as_echo_n "checking for a traditional japanese locale... " >&6; } -if test "${gt_cv_locale_ja+set}" = set; then : +if ${gt_cv_locale_ja+:} false; then : $as_echo_n "(cached) " >&6 else @@ -22782,17 +25511,30 @@ int main () { const char *p; /* Check whether the given locale name is recognized by the system. */ +#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ + /* On native Windows, setlocale(category, "") looks at the system settings, + not at the environment variables. Also, when an encoding suffix such + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE + category of the locale to "C". */ + if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL + || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) + return 1; +#else if (setlocale (LC_ALL, "") == NULL) return 1; +#endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. */ + some unit tests fail. + On MirBSD 10, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) + if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 + || strcmp (cs, "UTF-8") == 0) return 1; } #endif @@ -22807,7 +25549,7 @@ int main () if (MB_CUR_MAX == 1) return 1; /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. - This excludes the UTF-8 encoding. */ + This excludes the UTF-8 encoding (except on MirBSD). */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) @@ -22822,42 +25564,58 @@ _ACEOF ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the AIX locale name. - if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.EUC-JP - else - # Test for the HP-UX, OSF/1, NetBSD locale name. - if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.eucJP + case "$host_os" in + # Handle native Windows specially, because there setlocale() interprets + # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", + # "fr" or "fra" as "French" or "French_France.1252", + # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", + # "ja" as "Japanese" or "Japanese_Japan.932", + # and similar. + mingw*) + # Note that on native Windows, the Japanese locale is + # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we + # cannot use it here. + gt_cv_locale_ja=none + ;; + *) + # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the + # configure script would override the LC_ALL setting. Likewise for + # LC_CTYPE, which is also set at the beginning of the configure script. + # Test for the AIX locale name. + if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_ja=ja_JP else - # Test for the IRIX, FreeBSD locale name. - if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.EUC + # Test for the locale name with explicit encoding suffix. + if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_ja=ja_JP.EUC-JP else - # Test for the Solaris 7 locale name. - if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja + # Test for the HP-UX, OSF/1, NetBSD locale name. + if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_ja=ja_JP.eucJP else - # Special test for NetBSD 1.6. - if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then - gt_cv_locale_ja=ja_JP.eucJP + # Test for the IRIX, FreeBSD locale name. + if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_ja=ja_JP.EUC else - # None found. - gt_cv_locale_ja=none + # Test for the Solaris 7 locale name. + if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_ja=ja + else + # Special test for NetBSD 1.6. + if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then + gt_cv_locale_ja=ja_JP.eucJP + else + # None found. + gt_cv_locale_ja=none + fi + fi fi fi fi fi - fi - fi + ;; + esac fi rm -fr conftest* @@ -22872,7 +25630,7 @@ $as_echo "$gt_cv_locale_ja" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5 $as_echo_n "checking for a transitional chinese locale... " >&6; } -if test "${gt_cv_locale_zh_CN+set}" = set; then : +if ${gt_cv_locale_zh_CN+:} false; then : $as_echo_n "(cached) " >&6 else @@ -22893,17 +25651,30 @@ int main () { const char *p; /* Check whether the given locale name is recognized by the system. */ +#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ + /* On native Windows, setlocale(category, "") looks at the system settings, + not at the environment variables. Also, when an encoding suffix such + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE + category of the locale to "C". */ + if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL + || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) + return 1; +#else if (setlocale (LC_ALL, "") == NULL) return 1; +#endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. */ + some unit tests fail. + On MirBSD 10, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) + if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 + || strcmp (cs, "UTF-8") == 0) return 1; } #endif @@ -22914,7 +25685,7 @@ int main () if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. - This excludes the UTF-8 encoding. */ + This excludes the UTF-8 encoding (except on MirBSD). */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) @@ -22933,22 +25704,47 @@ _ACEOF ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the locale name without encoding suffix. - if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=zh_CN - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=zh_CN.GB18030 - else - # None found. + case "$host_os" in + # Handle native Windows specially, because there setlocale() interprets + # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", + # "fr" or "fra" as "French" or "French_France.1252", + # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", + # "ja" as "Japanese" or "Japanese_Japan.932", + # and similar. + mingw*) + # Test for the hypothetical native Windows locale name. + if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_zh_CN=Chinese_China.54936 + else + # None found. + gt_cv_locale_zh_CN=none + fi + ;; + solaris2.8) + # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are + # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK. + # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core. gt_cv_locale_zh_CN=none - fi - fi + ;; + *) + # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the + # configure script would override the LC_ALL setting. Likewise for + # LC_CTYPE, which is also set at the beginning of the configure script. + # Test for the locale name without encoding suffix. + if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_zh_CN=zh_CN + else + # Test for the locale name with explicit encoding suffix. + if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_zh_CN=zh_CN.GB18030 + else + # None found. + gt_cv_locale_zh_CN=none + fi + fi + ;; + esac else # If there was a link error, due to mblen(), the system is so old that # it certainly doesn't have a chinese locale. @@ -22966,7 +25762,7 @@ $as_echo "$gt_cv_locale_zh_CN" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5 $as_echo_n "checking for a french Unicode locale... " >&6; } -if test "${gt_cv_locale_fr_utf8+set}" = set; then : +if ${gt_cv_locale_fr_utf8+:} false; then : $as_echo_n "(cached) " >&6 else @@ -22988,9 +25784,19 @@ int main () { variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ +# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ + /* On native Windows, setlocale(category, "") looks at the system settings, + not at the environment variables. Also, when an encoding suffix such + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE + category of the locale to "C". */ + if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL + || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) + return 1; +# else if (setlocale (LC_ALL, "") == NULL) return 1; +# endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, @@ -23016,10 +25822,12 @@ int main () { || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') return 1; #endif +#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; +#endif return 0; } @@ -23029,27 +25837,46 @@ _ACEOF ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the usual locale name. - if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=fr_FR - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=fr_FR.UTF-8 - else - # Test for the Solaris 7 locale name. - if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=fr.UTF-8 + case "$host_os" in + # Handle native Windows specially, because there setlocale() interprets + # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", + # "fr" or "fra" as "French" or "French_France.1252", + # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", + # "ja" as "Japanese" or "Japanese_Japan.932", + # and similar. + mingw*) + # Test for the hypothetical native Windows locale name. + if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr_utf8=French_France.65001 else # None found. gt_cv_locale_fr_utf8=none fi - fi - fi + ;; + *) + # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the + # configure script would override the LC_ALL setting. Likewise for + # LC_CTYPE, which is also set at the beginning of the configure script. + # Test for the usual locale name. + if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr_utf8=fr_FR + else + # Test for the locale name with explicit encoding suffix. + if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr_utf8=fr_FR.UTF-8 + else + # Test for the Solaris 7 locale name. + if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr_utf8=fr.UTF-8 + else + # None found. + gt_cv_locale_fr_utf8=none + fi + fi + fi + ;; + esac fi rm -fr conftest* @@ -23070,6 +25897,8 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; } + GNULIB_FFSL=0; + GNULIB_FFSLL=0; GNULIB_MEMCHR=0; GNULIB_MEMMEM=0; GNULIB_MEMPCPY=0; @@ -23102,10 +25931,13 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; } GNULIB_MBSSEP=0; GNULIB_MBSTOK_R=0; GNULIB_STRERROR=0; + GNULIB_STRERROR_R=0; GNULIB_STRSIGNAL=0; GNULIB_STRVERSCMP=0; HAVE_MBSLEN=0; - HAVE_MEMCHR=1; + HAVE_FFSL=1; + HAVE_FFSLL=1; + HAVE_MEMCHR=1; HAVE_DECL_MEMMEM=1; HAVE_MEMPCPY=1; HAVE_DECL_MEMRCHR=1; @@ -23120,6 +25952,7 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; } HAVE_STRSEP=1; HAVE_STRCASESTR=1; HAVE_DECL_STRTOK_R=1; + HAVE_DECL_STRERROR_R=1; HAVE_DECL_STRSIGNAL=1; HAVE_STRVERSCMP=1; REPLACE_MEMCHR=0; @@ -23128,7 +25961,9 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; } REPLACE_STRDUP=0; REPLACE_STRSTR=0; REPLACE_STRCASESTR=0; + REPLACE_STRCHRNUL=0; REPLACE_STRERROR=0; + REPLACE_STRERROR_R=0; REPLACE_STRNCAT=0; REPLACE_STRNDUP=0; REPLACE_STRNLEN=0; @@ -23140,19 +25975,11 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; } - - - - - - - - # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is # irrelevant for anonymous mappings. ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" -if test "x$ac_cv_func_mmap" = x""yes; then : +if test "x$ac_cv_func_mmap" = xyes; then : gl_have_mmap=yes else gl_have_mmap=no @@ -23169,12 +25996,12 @@ $as_echo_n "checking for MAP_ANONYMOUS... " >&6; } #include #ifdef MAP_ANONYMOUS - I cant identify this map. + I cannot identify this map #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "I cant identify this map." >/dev/null 2>&1; then : + $EGREP "I cannot identify this map" >/dev/null 2>&1; then : gl_have_mmap_anonymous=yes fi rm -f conftest* @@ -23185,12 +26012,12 @@ rm -f conftest* #include #ifdef MAP_ANON - I cant identify this map. + I cannot identify this map #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "I cant identify this map." >/dev/null 2>&1; then : + $EGREP "I cannot identify this map" >/dev/null 2>&1; then : $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h @@ -23225,13 +26052,7 @@ $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h - : - - - - - - if test $ac_cv_func_memchr = yes; then + if test $HAVE_MEMCHR = 1; then # Detect platform-specific bugs in some versions of glibc: # memchr should not dereference anything with length 0 # http://bugzilla.redhat.com/499689 @@ -23241,7 +26062,7 @@ $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h # Assume that memchr works on platforms that lack mprotect. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5 $as_echo_n "checking whether memchr works... " >&6; } -if test "${gl_cv_func_memchr_works+set}" = set; then : +if ${gl_cv_func_memchr_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -23265,6 +26086,7 @@ int main () { + int result = 0; char *fence = NULL; #if HAVE_SYS_MMAN_H && HAVE_MPROTECT # if HAVE_MAP_ANONYMOUS @@ -23288,12 +26110,14 @@ main () if (fence) { if (memchr (fence, 0, 0)) - return 1; + result |= 1; strcpy (fence - 9, "12345678"); if (memchr (fence - 9, 0, 79) != fence - 1) - return 2; + result |= 2; + if (memchr (fence - 1, 0, 3) != fence - 1) + result |= 4; } - return 0; + return result; ; return 0; @@ -23314,34 +26138,6 @@ $as_echo "$gl_cv_func_memchr_works" >&6; } if test "$gl_cv_func_memchr_works" != yes; then REPLACE_MEMCHR=1 fi - else - HAVE_MEMCHR=0 - fi - if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext" - - - for ac_header in bp-sym.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default" -if test "x$ac_cv_header_bp_sym_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_BP_SYM_H 1 -_ACEOF - -fi - -done - - fi @@ -23350,7 +26146,7 @@ done GNULIB_STRPTIME=0; GNULIB_TIMEGM=0; GNULIB_TIME_R=0; - HAVE_LOCALTIME_R=1; + HAVE_DECL_LOCALTIME_R=1; HAVE_NANOSLEEP=1; HAVE_STRPTIME=1; HAVE_TIMEGM=1; @@ -23360,13 +26156,16 @@ done REPLACE_TIMEGM=GNULIB_PORTCHECK; + ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default" +if test "x$ac_cv_have_decl_alarm" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi - - - - - - +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_ALARM $ac_have_decl +_ACEOF @@ -23405,9 +26204,6 @@ if ac_fn_c_try_compile "$LINENO"; then : fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $gl_cv_c_multiarch = yes; then - -$as_echo "#define AA_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h - APPLE_UNIVERSAL_BUILD=1 else APPLE_UNIVERSAL_BUILD=0 @@ -23429,6 +26225,48 @@ $as_echo "#define AA_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if ${ac_cv_c_inline+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_inline=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } + +case $ac_cv_c_inline in + inline | yes) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif +_ACEOF + ;; +esac + @@ -23447,7 +26285,7 @@ $as_echo "#define AA_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5 $as_echo_n "checking for ssize_t... " >&6; } -if test "${gt_cv_ssize_t+set}" = set; then : +if ${gt_cv_ssize_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23457,7 +26295,7 @@ int main () { int x = sizeof (ssize_t *) + sizeof (ssize_t); - return !x; + return !x; ; return 0; } @@ -23478,6 +26316,19 @@ $as_echo "#define ssize_t int" >>confdefs.h fi + ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default" +if test "x$ac_cv_have_decl_setenv" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SETENV $ac_have_decl +_ACEOF + + + @@ -23491,64 +26342,17 @@ $as_echo "#define ssize_t int" >>confdefs.h - if test $ac_cv_func_setenv = no; then - HAVE_SETENV=0 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5 -$as_echo_n "checking whether setenv validates arguments... " >&6; } -if test "${gl_cv_func_setenv_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - gl_cv_func_setenv_works="guessing no" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - #include - #include - -int -main () -{ - - if (setenv ("", "", 0) != -1) return 1; - if (errno != EINVAL) return 2; - if (setenv ("a", "=", 1) != 0) return 3; - if (strcmp (getenv ("a"), "=") != 0) return 4; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_setenv_works=yes -else - gl_cv_func_setenv_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5 -$as_echo "$gl_cv_func_setenv_works" >&6; } - if test "$gl_cv_func_setenv_works" != yes; then - REPLACE_SETENV=1 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext" - - fi + if test $ac_cv_have_decl_setenv = no; then + HAVE_DECL_SETENV=0 fi + : + + + + + + @@ -23561,7 +26365,7 @@ $as_echo "$gl_cv_func_setenv_works" >&6; } for ac_header in search.h do : ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default" -if test "x$ac_cv_header_search_h" = x""yes; then : +if test "x$ac_cv_header_search_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SEARCH_H 1 _ACEOF @@ -23573,7 +26377,7 @@ done for ac_func in tsearch do : ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch" -if test "x$ac_cv_func_tsearch" = x""yes; then : +if test "x$ac_cv_func_tsearch" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_TSEARCH 1 _ACEOF @@ -23586,23 +26390,31 @@ done GNULIB_DPRINTF=0; GNULIB_FCLOSE=0; + GNULIB_FDOPEN=0; GNULIB_FFLUSH=0; + GNULIB_FGETC=0; + GNULIB_FGETS=0; GNULIB_FOPEN=0; GNULIB_FPRINTF=0; GNULIB_FPRINTF_POSIX=0; GNULIB_FPURGE=0; GNULIB_FPUTC=0; GNULIB_FPUTS=0; + GNULIB_FREAD=0; GNULIB_FREOPEN=0; + GNULIB_FSCANF=0; GNULIB_FSEEK=0; GNULIB_FSEEKO=0; GNULIB_FTELL=0; GNULIB_FTELLO=0; GNULIB_FWRITE=0; + GNULIB_GETC=0; + GNULIB_GETCHAR=0; GNULIB_GETDELIM=0; GNULIB_GETLINE=0; GNULIB_OBSTACK_PRINTF=0; GNULIB_OBSTACK_PRINTF_POSIX=0; + GNULIB_PCLOSE=0; GNULIB_PERROR=0; GNULIB_POPEN=0; GNULIB_PRINTF=0; @@ -23613,11 +26425,15 @@ done GNULIB_REMOVE=0; GNULIB_RENAME=0; GNULIB_RENAMEAT=0; + GNULIB_SCANF=0; GNULIB_SNPRINTF=0; GNULIB_SPRINTF_POSIX=0; + GNULIB_STDIO_H_NONBLOCKING=0; GNULIB_STDIO_H_SIGPIPE=0; GNULIB_TMPFILE=0; GNULIB_VASPRINTF=0; + GNULIB_VFSCANF=0; + GNULIB_VSCANF=0; GNULIB_VDPRINTF=0; GNULIB_VFPRINTF=0; GNULIB_VFPRINTF_POSIX=0; @@ -23626,6 +26442,8 @@ done GNULIB_VSNPRINTF=0; GNULIB_VSPRINTF_POSIX=0; HAVE_DECL_FPURGE=1; + HAVE_DECL_FSEEKO=1; + HAVE_DECL_FTELLO=1; HAVE_DECL_GETDELIM=1; HAVE_DECL_GETLINE=1; HAVE_DECL_OBSTACK_PRINTF=1; @@ -23634,11 +26452,14 @@ done HAVE_DPRINTF=1; HAVE_FSEEKO=1; HAVE_FTELLO=1; + HAVE_PCLOSE=1; + HAVE_POPEN=1; HAVE_RENAMEAT=1; HAVE_VASPRINTF=1; HAVE_VDPRINTF=1; REPLACE_DPRINTF=0; REPLACE_FCLOSE=0; + REPLACE_FDOPEN=0; REPLACE_FFLUSH=0; REPLACE_FOPEN=0; REPLACE_FPRINTF=0; @@ -23659,6 +26480,7 @@ done REPLACE_RENAMEAT=0; REPLACE_SNPRINTF=0; REPLACE_SPRINTF=0; + REPLACE_STDIO_READ_FUNCS=0; REPLACE_STDIO_WRITE_FUNCS=0; REPLACE_TMPFILE=0; REPLACE_VASPRINTF=0; @@ -23669,8 +26491,109 @@ done REPLACE_VSPRINTF=0; + + + + + + + : + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5 +$as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; } +if ${gl_cv_func_snprintf_retval_c99+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test "$cross_compiling" = yes; then : + + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";; + # Guess yes on FreeBSD >= 5. + freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";; + freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; + # Guess yes on Mac OS X >= 10.3. + darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";; + darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";; + # Guess yes on OpenBSD >= 3.9. + openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) + gl_cv_func_snprintf_retval_c99="guessing no";; + openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; + # Guess yes on Solaris >= 2.10. + solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";; + solaris*) gl_cv_func_printf_sizes_c99="guessing no";; + # Guess yes on AIX >= 4. + aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";; + aix*) gl_cv_func_snprintf_retval_c99="guessing yes";; + # Guess yes on NetBSD >= 3. + netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) + gl_cv_func_snprintf_retval_c99="guessing no";; + netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; + # Guess yes on BeOS. + beos*) gl_cv_func_snprintf_retval_c99="guessing yes";; + # If we don't know, assume the worst. + *) gl_cv_func_snprintf_retval_c99="guessing no";; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#if HAVE_SNPRINTF +# define my_snprintf snprintf +#else +# include +static int my_snprintf (char *buf, int size, const char *format, ...) +{ + va_list args; + int ret; + va_start (args, format); + ret = vsnprintf (buf, size, format, args); + va_end (args); + return ret; +} +#endif +static char buf[100]; +int main () +{ + strcpy (buf, "ABCDEF"); + if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7) + return 1; + if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7) + return 2; + if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7) + return 3; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_snprintf_retval_c99=yes +else + gl_cv_func_snprintf_retval_c99=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5 +$as_echo "$gl_cv_func_snprintf_retval_c99" >&6; } + + ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" -if test "x$ac_cv_have_decl_snprintf" = x""yes; then : +if test "x$ac_cv_have_decl_snprintf" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -23681,118 +26604,68 @@ cat >>confdefs.h <<_ACEOF _ACEOF - - GNULIB_FCHMODAT=0; - GNULIB_FSTATAT=0; - GNULIB_FUTIMENS=0; - GNULIB_LCHMOD=0; - GNULIB_LSTAT=0; - GNULIB_MKDIRAT=0; - GNULIB_MKFIFO=0; - GNULIB_MKFIFOAT=0; - GNULIB_MKNOD=0; - GNULIB_MKNODAT=0; - GNULIB_STAT=0; - GNULIB_UTIMENSAT=0; - HAVE_FCHMODAT=1; - HAVE_FSTATAT=1; - HAVE_FUTIMENS=1; - HAVE_LCHMOD=1; - HAVE_LSTAT=1; - HAVE_MKDIRAT=1; - HAVE_MKFIFO=1; - HAVE_MKFIFOAT=1; - HAVE_MKNOD=1; - HAVE_MKNODAT=1; - HAVE_UTIMENSAT=1; - REPLACE_FSTAT=0; - REPLACE_FSTATAT=0; - REPLACE_FUTIMENS=0; - REPLACE_LSTAT=0; - REPLACE_MKDIR=0; - REPLACE_MKFIFO=0; - REPLACE_MKNOD=0; - REPLACE_STAT=0; - REPLACE_UTIMENSAT=0; - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } -if test "${ac_cv_header_stdbool_h+set}" = set; then : +if ${ac_cv_header_stdbool_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #ifndef bool - "error: bool is not defined" - #endif - #ifndef false - "error: false is not defined" - #endif - #if false - "error: false is not 0" - #endif - #ifndef true - "error: true is not defined" - #endif - #if true != 1 - "error: true is not 1" - #endif - #ifndef __bool_true_false_are_defined - "error: __bool_true_false_are_defined is not defined" - #endif + #include + #ifndef bool + "error: bool is not defined" + #endif + #ifndef false + "error: false is not defined" + #endif + #if false + "error: false is not 0" + #endif + #ifndef true + "error: true is not defined" + #endif + #if true != 1 + "error: true is not 1" + #endif + #ifndef __bool_true_false_are_defined + "error: __bool_true_false_are_defined is not defined" + #endif - struct s { _Bool s: 1; _Bool t; } s; + struct s { _Bool s: 1; _Bool t; } s; - char a[true == 1 ? 1 : -1]; - char b[false == 0 ? 1 : -1]; - char c[__bool_true_false_are_defined == 1 ? 1 : -1]; - char d[(bool) 0.5 == true ? 1 : -1]; - bool e = &s; - char f[(_Bool) 0.0 == false ? 1 : -1]; - char g[true]; - char h[sizeof (_Bool)]; - char i[sizeof s.t]; - enum { j = false, k = true, l = false * true, m = true * 256 }; - _Bool n[m]; - char o[sizeof n == m * sizeof n[0] ? 1 : -1]; - char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; - #if defined __xlc__ || defined __GNUC__ - /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0 - reported by James Lemley on 2005-10-05; see - http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html - This test is not quite right, since xlc is allowed to - reject this program, as the initializer for xlcbug is - not one of the forms that C requires support for. - However, doing the test right would require a run-time - test, and that would make cross-compilation harder. - Let us hope that IBM fixes the xlc bug, and also adds - support for this kind of constant expression. In the - meantime, this test will reject xlc, which is OK, since - our stdbool.h substitute should suffice. We also test - this with GCC, where it should work, to detect more - quickly whether someone messes up the test in the - future. */ - char digs[] = "0123456789"; - int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1); - #endif - /* Catch a bug in an HP-UX C compiler. See - http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html - */ - _Bool q = true; - _Bool *pq = &q; + char a[true == 1 ? 1 : -1]; + char b[false == 0 ? 1 : -1]; + char c[__bool_true_false_are_defined == 1 ? 1 : -1]; + char d[(bool) 0.5 == true ? 1 : -1]; + /* See body of main program for 'e'. */ + char f[(_Bool) 0.0 == false ? 1 : -1]; + char g[true]; + char h[sizeof (_Bool)]; + char i[sizeof s.t]; + enum { j = false, k = true, l = false * true, m = true * 256 }; + /* The following fails for + HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ + _Bool n[m]; + char o[sizeof n == m * sizeof n[0] ? 1 : -1]; + char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; + /* Catch a bug in an HP-UX C compiler. See + http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html + http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html + */ + _Bool q = true; + _Bool *pq = &q; int main () { - *pq |= q; - *pq |= ! q; - /* Refer to every declared value, to avoid compiler optimizations. */ - return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l - + !m + !n + !o + !p + !q + !pq); + bool e = &s; + *pq |= q; + *pq |= ! q; + /* Refer to every declared value, to avoid compiler optimizations. */ + return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + + !m + !n + !o + !p + !q + !pq); ; return 0; @@ -23808,7 +26681,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" -if test "x$ac_cv_type__Bool" = x""yes; then : +if test "x$ac_cv_type__Bool" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 @@ -23817,64 +26690,6 @@ _ACEOF fi - if test $ac_cv_header_stdbool_h = yes; then - -$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h - - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 -$as_echo_n "checking for unsigned long long int... " >&6; } -if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - /* For now, do not test the preprocessor; as of 2007 there are too many - implementations with broken preprocessors. Perhaps this can - be revisited in 2012. In the meantime, code should not expect - #if to work with literals wider than 32 bits. */ - /* Test literals. */ - long long int ll = 9223372036854775807ll; - long long int nll = -9223372036854775807LL; - unsigned long long int ull = 18446744073709551615ULL; - /* Test constant expressions. */ - typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) - ? 1 : -1)]; - typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 - ? 1 : -1)]; - int i = 63; -int -main () -{ -/* Test availability of runtime routines for shift and division. */ - long long int llmax = 9223372036854775807ll; - unsigned long long int ullmax = 18446744073709551615ull; - return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) - | (llmax / ll) | (llmax % ll) - | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) - | (ullmax / ull) | (ullmax % ull)); - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_type_unsigned_long_long_int=yes -else - ac_cv_type_unsigned_long_long_int=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 -$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } - if test $ac_cv_type_unsigned_long_long_int = yes; then - -$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h - - fi @@ -23887,45 +26702,48 @@ $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C symbols are prefixed with underscore at the linker level" >&5 -$as_echo_n "checking whether C symbols are prefixed with underscore at the linker level... " >&6; } -if test "${gl_cv_prog_as_underscore+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.c <&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } >/dev/null 2>&1 - if grep _foo conftest.s >/dev/null ; then - gl_cv_prog_as_underscore=yes - else - gl_cv_prog_as_underscore=no - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_as_underscore" >&5 -$as_echo "$gl_cv_prog_as_underscore" >&6; } - if test $gl_cv_prog_as_underscore = yes; then - USER_LABEL_PREFIX=_ + + if test $ac_cv_type_long_long_int = yes; then + HAVE_LONG_LONG_INT=1 else - USER_LABEL_PREFIX= + HAVE_LONG_LONG_INT=0 fi -cat >>confdefs.h <<_ACEOF -#define USER_LABEL_PREFIX $USER_LABEL_PREFIX -_ACEOF - ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"' + if test $ac_cv_type_unsigned_long_long_int = yes; then + HAVE_UNSIGNED_LONG_LONG_INT=1 + else + HAVE_UNSIGNED_LONG_LONG_INT=0 + fi + + + + : + + + + + + if test $ac_cv_header_wchar_h = yes; then + HAVE_WCHAR_H=1 + else + HAVE_WCHAR_H=0 + fi + + + if test $ac_cv_header_inttypes_h = yes; then + HAVE_INTTYPES_H=1 + else + HAVE_INTTYPES_H=0 + fi + + + if test $ac_cv_header_sys_types_h = yes; then + HAVE_SYS_TYPES_H=1 + else + HAVE_SYS_TYPES_H=0 + fi @@ -23934,6 +26752,7 @@ _ACEOF + : @@ -23942,66 +26761,330 @@ _ACEOF - - - ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default" -if test "x$ac_cv_have_decl_strdup" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRDUP $ac_have_decl -_ACEOF - - - - - - if test -z "$ERRNO_H"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5 -$as_echo_n "checking for working strerror function... " >&6; } -if test "${gl_cv_func_working_strerror+set}" = set; then : + if test $gl_cv_have_include_next = yes; then + gl_cv_next_stdint_h='<'stdint.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_stdint_h+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + if test $ac_cv_header_stdint_h = yes; then + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include + +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + + gl_header_literal_regex=`echo 'stdint.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' + else + gl_cv_next_stdint_h='<'stdint.h'>' + fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5 +$as_echo "$gl_cv_next_stdint_h" >&6; } + fi + NEXT_STDINT_H=$gl_cv_next_stdint_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'stdint.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_stdint_h + fi + NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive + + + + + if test $ac_cv_header_stdint_h = yes; then + HAVE_STDINT_H=1 + else + HAVE_STDINT_H=0 + fi + + + if test $ac_cv_header_stdint_h = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5 +$as_echo_n "checking whether stdint.h conforms to C99... " >&6; } +if ${gl_cv_header_working_stdint_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + gl_cv_header_working_stdint_h=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ +#include +/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ +#if !(defined WCHAR_MIN && defined WCHAR_MAX) +#error "WCHAR_MIN, WCHAR_MAX not defined in " +#endif + + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + + +#ifdef INT8_MAX +int8_t a1 = INT8_MAX; +int8_t a1min = INT8_MIN; +#endif +#ifdef INT16_MAX +int16_t a2 = INT16_MAX; +int16_t a2min = INT16_MIN; +#endif +#ifdef INT32_MAX +int32_t a3 = INT32_MAX; +int32_t a3min = INT32_MIN; +#endif +#ifdef INT64_MAX +int64_t a4 = INT64_MAX; +int64_t a4min = INT64_MIN; +#endif +#ifdef UINT8_MAX +uint8_t b1 = UINT8_MAX; +#else +typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; +#endif +#ifdef UINT16_MAX +uint16_t b2 = UINT16_MAX; +#endif +#ifdef UINT32_MAX +uint32_t b3 = UINT32_MAX; +#endif +#ifdef UINT64_MAX +uint64_t b4 = UINT64_MAX; +#endif +int_least8_t c1 = INT8_C (0x7f); +int_least8_t c1max = INT_LEAST8_MAX; +int_least8_t c1min = INT_LEAST8_MIN; +int_least16_t c2 = INT16_C (0x7fff); +int_least16_t c2max = INT_LEAST16_MAX; +int_least16_t c2min = INT_LEAST16_MIN; +int_least32_t c3 = INT32_C (0x7fffffff); +int_least32_t c3max = INT_LEAST32_MAX; +int_least32_t c3min = INT_LEAST32_MIN; +int_least64_t c4 = INT64_C (0x7fffffffffffffff); +int_least64_t c4max = INT_LEAST64_MAX; +int_least64_t c4min = INT_LEAST64_MIN; +uint_least8_t d1 = UINT8_C (0xff); +uint_least8_t d1max = UINT_LEAST8_MAX; +uint_least16_t d2 = UINT16_C (0xffff); +uint_least16_t d2max = UINT_LEAST16_MAX; +uint_least32_t d3 = UINT32_C (0xffffffff); +uint_least32_t d3max = UINT_LEAST32_MAX; +uint_least64_t d4 = UINT64_C (0xffffffffffffffff); +uint_least64_t d4max = UINT_LEAST64_MAX; +int_fast8_t e1 = INT_FAST8_MAX; +int_fast8_t e1min = INT_FAST8_MIN; +int_fast16_t e2 = INT_FAST16_MAX; +int_fast16_t e2min = INT_FAST16_MIN; +int_fast32_t e3 = INT_FAST32_MAX; +int_fast32_t e3min = INT_FAST32_MIN; +int_fast64_t e4 = INT_FAST64_MAX; +int_fast64_t e4min = INT_FAST64_MIN; +uint_fast8_t f1 = UINT_FAST8_MAX; +uint_fast16_t f2 = UINT_FAST16_MAX; +uint_fast32_t f3 = UINT_FAST32_MAX; +uint_fast64_t f4 = UINT_FAST64_MAX; +#ifdef INTPTR_MAX +intptr_t g = INTPTR_MAX; +intptr_t gmin = INTPTR_MIN; +#endif +#ifdef UINTPTR_MAX +uintptr_t h = UINTPTR_MAX; +#endif +intmax_t i = INTMAX_MAX; +uintmax_t j = UINTMAX_MAX; + +#include /* for CHAR_BIT */ +#define TYPE_MINIMUM(t) \ + ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) +#define TYPE_MAXIMUM(t) \ + ((t) ((t) 0 < (t) -1 \ + ? (t) -1 \ + : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) +struct s { + int check_PTRDIFF: + PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) + && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) + ? 1 : -1; + /* Detect bug in FreeBSD 6.0 / ia64. */ + int check_SIG_ATOMIC: + SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) + && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) + ? 1 : -1; + int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; + int check_WCHAR: + WCHAR_MIN == TYPE_MINIMUM (wchar_t) + && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) + ? 1 : -1; + /* Detect bug in mingw. */ + int check_WINT: + WINT_MIN == TYPE_MINIMUM (wint_t) + && WINT_MAX == TYPE_MAXIMUM (wint_t) + ? 1 : -1; + + /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ + int check_UINT8_C: + (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; + int check_UINT16_C: + (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; + + /* Detect bugs in OpenBSD 3.9 stdint.h. */ +#ifdef UINT8_MAX + int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; +#endif +#ifdef UINT16_MAX + int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; +#endif +#ifdef UINT32_MAX + int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; +#endif +#ifdef UINT64_MAX + int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; +#endif + int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; + int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; + int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; + int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; + int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; + int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; + int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; + int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; + int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; + int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; + int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; +}; int main () { -return !*strerror (-2); + ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_func_working_strerror=yes -else - gl_cv_func_working_strerror=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test "$cross_compiling" = yes; then : + gl_cv_header_working_stdint_h=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + + +#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ +#include + + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + + +#include #include +#define MVAL(macro) MVAL1(macro) +#define MVAL1(expression) #expression +static const char *macro_values[] = + { +#ifdef INT8_MAX + MVAL (INT8_MAX), +#endif +#ifdef INT16_MAX + MVAL (INT16_MAX), +#endif +#ifdef INT32_MAX + MVAL (INT32_MAX), +#endif +#ifdef INT64_MAX + MVAL (INT64_MAX), +#endif +#ifdef UINT8_MAX + MVAL (UINT8_MAX), +#endif +#ifdef UINT16_MAX + MVAL (UINT16_MAX), +#endif +#ifdef UINT32_MAX + MVAL (UINT32_MAX), +#endif +#ifdef UINT64_MAX + MVAL (UINT64_MAX), +#endif + NULL + }; int main () { -return !*strerror (-2); + + const char **mv; + for (mv = macro_values; *mv != NULL; mv++) + { + const char *value = *mv; + /* Test whether it looks like a cast expression. */ + if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 + || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 + || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 + || strncmp (value, "((int)"/*)*/, 6) == 0 + || strncmp (value, "((signed short)"/*)*/, 15) == 0 + || strncmp (value, "((signed char)"/*)*/, 14) == 0) + return mv - macro_values + 1; + } + return 0; + ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_working_strerror=yes -else - gl_cv_func_working_strerror=no + gl_cv_header_working_stdint_h=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -24009,52 +27092,411 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5 -$as_echo "$gl_cv_func_working_strerror" >&6; } - if test $gl_cv_func_working_strerror = no; then - REPLACE_STRERROR=1 - fi - else - REPLACE_STRERROR=1 - fi - if test $REPLACE_STRERROR = 1; then +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default" -if test "x$ac_cv_have_decl_strerror" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRERROR $ac_have_decl -_ACEOF - - - : - - - - - - if test $ac_cv_header_sys_socket_h != yes; then - for ac_header in winsock2.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5 +$as_echo "$gl_cv_header_working_stdint_h" >&6; } + fi + if test "$gl_cv_header_working_stdint_h" = yes; then + STDINT_H= + else + for ac_header in sys/inttypes.h sys/bitypes.h do : - ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" -if test "x$ac_cv_header_winsock2_h" = x""yes; then : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define HAVE_WINSOCK2_H 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done - fi + if test $ac_cv_header_sys_inttypes_h = yes; then + HAVE_SYS_INTTYPES_H=1 + else + HAVE_SYS_INTTYPES_H=0 + fi + + if test $ac_cv_header_sys_bitypes_h = yes; then + HAVE_SYS_BITYPES_H=1 + else + HAVE_SYS_BITYPES_H=0 + fi + + + + + if test $APPLE_UNIVERSAL_BUILD = 0; then + + + for gltype in ptrdiff_t size_t ; do + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 +$as_echo_n "checking for bit size of $gltype... " >&6; } +if eval \${gl_cv_bitsizeof_${gltype}+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + +#include "; then : + +else + result=unknown +fi + + eval gl_cv_bitsizeof_${gltype}=\$result + +fi +eval ac_res=\$gl_cv_bitsizeof_${gltype} + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval result=\$gl_cv_bitsizeof_${gltype} + if test $result = unknown; then + result=0 + fi + GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` + cat >>confdefs.h <<_ACEOF +#define BITSIZEOF_${GLTYPE} $result +_ACEOF + + eval BITSIZEOF_${GLTYPE}=\$result + done + fi + for gltype in sig_atomic_t wchar_t wint_t ; do + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 +$as_echo_n "checking for bit size of $gltype... " >&6; } +if eval \${gl_cv_bitsizeof_${gltype}+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + +#include "; then : + +else + result=unknown +fi + + eval gl_cv_bitsizeof_${gltype}=\$result + +fi +eval ac_res=\$gl_cv_bitsizeof_${gltype} + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval result=\$gl_cv_bitsizeof_${gltype} + if test $result = unknown; then + result=0 + fi + GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` + cat >>confdefs.h <<_ACEOF +#define BITSIZEOF_${GLTYPE} $result +_ACEOF + + eval BITSIZEOF_${GLTYPE}=\$result + done + + + + + for gltype in sig_atomic_t wchar_t wint_t ; do + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 +$as_echo_n "checking whether $gltype is signed... " >&6; } +if eval \${gl_cv_type_${gltype}_signed+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + + int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + result=yes +else + result=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + eval gl_cv_type_${gltype}_signed=\$result + +fi +eval ac_res=\$gl_cv_type_${gltype}_signed + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval result=\$gl_cv_type_${gltype}_signed + GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` + if test "$result" = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_SIGNED_${GLTYPE} 1 +_ACEOF + + eval HAVE_SIGNED_${GLTYPE}=1 + else + eval HAVE_SIGNED_${GLTYPE}=0 + fi + done + + + gl_cv_type_ptrdiff_t_signed=yes + gl_cv_type_size_t_signed=no + if test $APPLE_UNIVERSAL_BUILD = 0; then + + + for gltype in ptrdiff_t size_t ; do + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 +$as_echo_n "checking for $gltype integer literal suffix... " >&6; } +if eval \${gl_cv_type_${gltype}_suffix+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval gl_cv_type_${gltype}_suffix=no + eval result=\$gl_cv_type_${gltype}_signed + if test "$result" = yes; then + glsufu= + else + glsufu=u + fi + for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do + case $glsuf in + '') gltype1='int';; + l) gltype1='long int';; + ll) gltype1='long long int';; + i64) gltype1='__int64';; + u) gltype1='unsigned int';; + ul) gltype1='unsigned long int';; + ull) gltype1='unsigned long long int';; + ui64)gltype1='unsigned __int64';; + esac + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + + extern $gltype foo; + extern $gltype1 foo; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval gl_cv_type_${gltype}_suffix=\$glsuf +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + eval result=\$gl_cv_type_${gltype}_suffix + test "$result" != no && break + done +fi +eval ac_res=\$gl_cv_type_${gltype}_suffix + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` + eval result=\$gl_cv_type_${gltype}_suffix + test "$result" = no && result= + eval ${GLTYPE}_SUFFIX=\$result + cat >>confdefs.h <<_ACEOF +#define ${GLTYPE}_SUFFIX $result +_ACEOF + + done + + + fi + + + for gltype in sig_atomic_t wchar_t wint_t ; do + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 +$as_echo_n "checking for $gltype integer literal suffix... " >&6; } +if eval \${gl_cv_type_${gltype}_suffix+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval gl_cv_type_${gltype}_suffix=no + eval result=\$gl_cv_type_${gltype}_signed + if test "$result" = yes; then + glsufu= + else + glsufu=u + fi + for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do + case $glsuf in + '') gltype1='int';; + l) gltype1='long int';; + ll) gltype1='long long int';; + i64) gltype1='__int64';; + u) gltype1='unsigned int';; + ul) gltype1='unsigned long int';; + ull) gltype1='unsigned long long int';; + ui64)gltype1='unsigned __int64';; + esac + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + + extern $gltype foo; + extern $gltype1 foo; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval gl_cv_type_${gltype}_suffix=\$glsuf +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + eval result=\$gl_cv_type_${gltype}_suffix + test "$result" != no && break + done +fi +eval ac_res=\$gl_cv_type_${gltype}_suffix + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` + eval result=\$gl_cv_type_${gltype}_suffix + test "$result" = no && result= + eval ${GLTYPE}_SUFFIX=\$result + cat >>confdefs.h <<_ACEOF +#define ${GLTYPE}_SUFFIX $result +_ACEOF + + done + + + + if test $BITSIZEOF_WINT_T -lt 32; then + BITSIZEOF_WINT_T=32 + fi + + STDINT_H=stdint.h + fi + + if test -n "$STDINT_H"; then + GL_GENERATE_STDINT_H_TRUE= + GL_GENERATE_STDINT_H_FALSE='#' +else + GL_GENERATE_STDINT_H_TRUE='#' + GL_GENERATE_STDINT_H_FALSE= +fi + + + + REPLACE_STRERROR_0=0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5 +$as_echo_n "checking whether strerror(0) succeeds... " >&6; } +if ${gl_cv_func_strerror_0_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_strerror_0_works="guessing no" ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +int result = 0; + char *str; + errno = 0; + str = strerror (0); + if (!*str) result |= 1; + if (errno) result |= 2; + if (strstr (str, "nknown") || strstr (str, "ndefined")) + result |= 4; + return result; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_strerror_0_works=yes +else + gl_cv_func_strerror_0_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5 +$as_echo "$gl_cv_func_strerror_0_works" >&6; } + case "$gl_cv_func_strerror_0_works" in + *yes) ;; + *) + REPLACE_STRERROR_0=1 + +$as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h + + ;; + esac @@ -24066,43 +27508,47 @@ done - : - - - - - - if test $gl_cv_have_include_next = yes; then gl_cv_next_string_h='<'string.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_string_h+set}" = set; then : +if ${gl_cv_next_string_h+:} false; then : $as_echo_n "(cached) " >&6 else - if test $ac_cv_header_string_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/string.h#{ - s#.*"\(.*/string.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_string_h='<'string.h'>' - fi + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + + gl_header_literal_regex=`echo 'string.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5 @@ -24123,11 +27569,12 @@ $as_echo "$gl_cv_next_string_h" >&6; } - for gl_func in memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strsignal strverscmp; do + + for gl_func in ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r strsignal strverscmp; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : +if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24153,7 +27600,7 @@ fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF @@ -24165,7 +27612,7 @@ fi ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default" -if test "x$ac_cv_have_decl_strndup" = x""yes; then : +if test "x$ac_cv_have_decl_strndup" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -24183,7 +27630,7 @@ _ACEOF ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default" -if test "x$ac_cv_have_decl_strnlen" = x""yes; then : +if test "x$ac_cv_have_decl_strnlen" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -24194,47 +27641,97 @@ cat >>confdefs.h <<_ACEOF _ACEOF -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 -$as_echo_n "checking whether stat file-mode macros are broken... " >&6; } -if test "${ac_cv_header_stat_broken+set}" = set; then : + + +ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" +if test "x$ac_cv_type_mode_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define mode_t int +_ACEOF + +fi + + + + + + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_sys_types_h='<'sys/types.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_sys_types_h+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include -#include - -#if defined S_ISBLK && defined S_IFDIR -extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; -#endif - -#if defined S_ISBLK && defined S_IFCHR -extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; -#endif - -#if defined S_ISLNK && defined S_IFREG -extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; -#endif - -#if defined S_ISSOCK && defined S_IFREG -extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; -#endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stat_broken=no -else - ac_cv_header_stat_broken=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 -$as_echo "$ac_cv_header_stat_broken" >&6; } -if test $ac_cv_header_stat_broken = yes; then + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + + gl_header_literal_regex=`echo 'sys/types.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + gl_cv_next_sys_types_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' -$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5 +$as_echo "$gl_cv_next_sys_types_h" >&6; } + fi + NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'sys/types.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_sys_types_h + fi + NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive + + + + + + + @@ -24261,7 +27758,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 $as_echo_n "checking for struct timespec in ... " >&6; } -if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then : +if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24294,7 +27791,7 @@ $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 $as_echo_n "checking for struct timespec in ... " >&6; } -if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then : +if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24323,7 +27820,7 @@ $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 $as_echo_n "checking for struct timespec in ... " >&6; } -if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then : +if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24363,10 +27860,6 @@ $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } - : - - - @@ -24376,30 +27869,41 @@ $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_time_h+set}" = set; then : +if ${gl_cv_next_time_h+:} false; then : $as_echo_n "(cached) " >&6 else - if test $ac_cv_header_time_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/time.h#{ - s#.*"\(.*/time.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_time_h='<'time.h'>' - fi + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + + gl_header_literal_regex=`echo 'time.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5 @@ -24432,7 +27936,16 @@ $as_echo "$gl_cv_next_time_h" >&6; } + ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default" +if test "x$ac_cv_have_decl_unsetenv" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_UNSETENV $ac_have_decl +_ACEOF @@ -24443,7 +27956,7 @@ $as_echo "$gl_cv_next_time_h" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 $as_echo_n "checking for wint_t... " >&6; } -if test "${gt_cv_c_wint_t+set}" = set; then : +if ${gt_cv_c_wint_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24457,7 +27970,7 @@ else #include #include #include - wint_t foo = (wchar_t)'\0'; + wint_t foo = (wchar_t)'\0'; int main () { @@ -24484,13 +27997,15 @@ $as_echo "#define HAVE_WINT_T 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5 $as_echo_n "checking for inttypes.h... " >&6; } -if test "${gl_cv_header_inttypes_h+set}" = set; then : +if ${gl_cv_header_inttypes_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #include #include + int main () { @@ -24519,13 +28034,13 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5 $as_echo_n "checking for stdint.h... " >&6; } -if test "${gl_cv_header_stdint_h+set}" = set; then : +if ${gl_cv_header_stdint_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include -#include + #include int main () { @@ -24556,7 +28071,7 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5 $as_echo_n "checking for intmax_t... " >&6; } -if test "${gt_cv_c_intmax_t+set}" = set; then : +if ${gt_cv_c_intmax_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24605,74 +28120,351 @@ _ACEOF fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5 -$as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; } -if test "${gl_cv_func_snprintf_retval_c99+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5 +$as_echo_n "checking where to find the exponent in a 'double'... " >&6; } +if ${gl_cv_cc_double_expbit0+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # Guess yes on FreeBSD >= 5. - freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";; - freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # Guess yes on MacOS X >= 10.3. - darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";; - darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # Guess yes on OpenBSD >= 3.9. - openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) - gl_cv_func_snprintf_retval_c99="guessing no";; - openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # Guess yes on Solaris >= 2.6. - solaris2.[0-5]*) gl_cv_func_snprintf_retval_c99="guessing no";; - solaris*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # Guess yes on AIX >= 4. - aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";; - aix*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # Guess yes on NetBSD >= 3. - netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) - gl_cv_func_snprintf_retval_c99="guessing no";; - netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # Guess yes on BeOS. - beos*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_snprintf_retval_c99="guessing no";; - esac + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined arm || defined __arm || defined __arm__ + mixed_endianness +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "mixed_endianness" >/dev/null 2>&1; then : + gl_cv_cc_double_expbit0="unknown" +else + + : +if ${ac_cv_c_bigendian+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef _BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then : + # Try to guess by grepping values from an object file. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; + +int +main () +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#include -#include -static char buf[100]; -int main () +$ac_includes_default +int +main () { - strcpy (buf, "ABCDEF"); - if (snprintf (buf, 3, "%d %d", 4567, 89) != 7) - return 1; + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_snprintf_retval_c99=yes + ac_cv_c_bigendian=no else - gl_cv_func_snprintf_retval_c99=no + ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi +fi +: + case $ac_cv_c_bigendian in #( + yes) + gl_cv_cc_double_expbit0="word 0 bit 20";; #( + no) + gl_cv_cc_double_expbit0="word 1 bit 20" ;; #( + universal) + +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h + + ;; #( + *) + gl_cv_cc_double_expbit0="unknown" ;; + esac + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5 -$as_echo "$gl_cv_func_snprintf_retval_c99" >&6; } +rm -f conftest* +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include +#include +#define NWORDS \ + ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { double value; unsigned int word[NWORDS]; } memory_double; +static unsigned int ored_words[NWORDS]; +static unsigned int anded_words[NWORDS]; +static void add_to_ored_words (double x) +{ + memory_double m; + size_t i; + /* Clear it first, in case sizeof (double) < sizeof (memory_double). */ + memset (&m, 0, sizeof (memory_double)); + m.value = x; + for (i = 0; i < NWORDS; i++) + { + ored_words[i] |= m.word[i]; + anded_words[i] &= m.word[i]; + } +} +int main () +{ + size_t j; + FILE *fp = fopen ("conftest.out", "w"); + if (fp == NULL) + return 1; + for (j = 0; j < NWORDS; j++) + anded_words[j] = ~ (unsigned int) 0; + add_to_ored_words (0.25); + add_to_ored_words (0.5); + add_to_ored_words (1.0); + add_to_ored_words (2.0); + add_to_ored_words (4.0); + /* Remove bits that are common (e.g. if representation of the first mantissa + bit is explicit). */ + for (j = 0; j < NWORDS; j++) + ored_words[j] &= ~anded_words[j]; + /* Now find the nonzero word. */ + for (j = 0; j < NWORDS; j++) + if (ored_words[j] != 0) + break; + if (j < NWORDS) + { + size_t i; + for (i = j + 1; i < NWORDS; i++) + if (ored_words[i] != 0) + { + fprintf (fp, "unknown"); + return (fclose (fp) != 0); + } + for (i = 0; ; i++) + if ((ored_words[j] >> i) & 1) + { + fprintf (fp, "word %d bit %d", (int) j, (int) i); + return (fclose (fp) != 0); + } + } + fprintf (fp, "unknown"); + return (fclose (fp) != 0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_cc_double_expbit0=`cat conftest.out` +else + gl_cv_cc_double_expbit0="unknown" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + rm -f conftest.out + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5 +$as_echo "$gl_cv_cc_double_expbit0" >&6; } + case "$gl_cv_cc_double_expbit0" in + word*bit*) + word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` + bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'` + +cat >>confdefs.h <<_ACEOF +#define DBL_EXPBIT0_WORD $word +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define DBL_EXPBIT0_BIT $bit +_ACEOF + + ;; + esac + @@ -24692,7 +28484,7 @@ done ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include " -if test "x$ac_cv_have_decl__snprintf" = x""yes; then : +if test "x$ac_cv_have_decl__snprintf" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -24703,6 +28495,7 @@ cat >>confdefs.h <<_ACEOF _ACEOF + case "$gl_cv_func_snprintf_retval_c99" in *yes) @@ -24713,7 +28506,7 @@ $as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" -if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then : +if test "x$ac_cv_have_decl_vsnprintf" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -24730,9 +28523,15 @@ _ACEOF - - - + GNULIB_ISWBLANK=0; + GNULIB_WCTYPE=0; + GNULIB_ISWCTYPE=0; + GNULIB_WCTRANS=0; + GNULIB_TOWCTRANS=0; + HAVE_ISWBLANK=1; + HAVE_WCTYPE_T=1; + HAVE_WCTRANS_T=1; + REPLACE_ISWBLANK=0; @@ -24767,11 +28566,6 @@ fi gl_source_base='gl' - # Code from module alignof: - # Code from module alloca-opt: - - - if test $ac_cv_func_alloca_works = no; then @@ -24782,7 +28576,7 @@ fi if test $ac_cv_working_alloca_h = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5 $as_echo_n "checking for alloca as a compiler built-in... " >&6; } -if test "${gl_cv_rpl_alloca+set}" = set; then : +if ${gl_cv_rpl_alloca+:} false; then : $as_echo_n "(cached) " >&6 else @@ -24818,9 +28612,15 @@ $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h ALLOCA_H=alloca.h fi + if test -n "$ALLOCA_H"; then + GL_GENERATE_ALLOCA_H_TRUE= + GL_GENERATE_ALLOCA_H_FALSE='#' +else + GL_GENERATE_ALLOCA_H_TRUE='#' + GL_GENERATE_ALLOCA_H_FALSE= +fi + - # Code from module arg-nonnull: - # Code from module arpa_inet: @@ -24841,6 +28641,8 @@ $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h + + : @@ -24849,35 +28651,53 @@ $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h + if test $gl_cv_have_include_next = yes; then gl_cv_next_arpa_inet_h='<'arpa/inet.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_arpa_inet_h+set}" = set; then : +if ${gl_cv_next_arpa_inet_h+:} false; then : $as_echo_n "(cached) " >&6 else - if test $ac_cv_header_arpa_inet_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test $ac_cv_header_arpa_inet_h = yes; then + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_arpa_inet_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/arpa/inet.h#{ - s#.*"\(.*/arpa/inet.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + + gl_header_literal_regex=`echo 'arpa/inet.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + gl_cv_next_arpa_inet_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' else - gl_cv_next_arpa_inet_h='<'arpa/inet.h'>' - fi + gl_cv_next_arpa_inet_h='<'arpa/inet.h'>' + fi + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5 @@ -24898,20 +28718,26 @@ $as_echo "$gl_cv_next_arpa_inet_h" >&6; } + + + for gl_func in inet_ntop inet_pton; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : +if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* On some systems, this header is not self-consistent. */ -#ifndef __GLIBC__ +#if !(defined __GLIBC__ || defined __UCLIBC__) # include #endif +#ifdef __TANDEM +# include +#endif #include int @@ -24933,7 +28759,7 @@ fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF @@ -24944,15 +28770,12 @@ fi - # Code from module base64: - # Code from module btowc: - @@ -24973,7 +28796,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5 $as_echo_n "checking whether btowc(0) is correct... " >&6; } -if test "${gl_cv_func_btowc_nul+set}" = set; then : +if ${gl_cv_func_btowc_nul+:} false; then : $as_echo_n "(cached) " >&6 else @@ -24990,8 +28813,14 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include #include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include #include int main () { @@ -25016,7 +28845,7 @@ $as_echo "$gl_cv_func_btowc_nul" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5 $as_echo_n "checking whether btowc(EOF) is correct... " >&6; } -if test "${gl_cv_func_btowc_eof+set}" = set; then : +if ${gl_cv_func_btowc_eof+:} false; then : $as_echo_n "(cached) " >&6 else @@ -25034,8 +28863,14 @@ else /* end confdefs.h. */ #include -#include #include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include #include int main () { @@ -25071,11 +28906,9 @@ $as_echo "$gl_cv_func_btowc_eof" >&6; } *) REPLACE_BTOWC=1 ;; esac fi + if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then - : - - @@ -25093,7 +28926,10 @@ $as_echo "$gl_cv_func_btowc_eof" >&6; } - GNULIB_BTOWC=1 + + GNULIB_BTOWC=1 + + @@ -25101,136 +28937,66 @@ $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h - # Code from module c++defs: - # Code from module c-strtod: + if test "x$datarootdir" = x; then + datarootdir='${datadir}' + fi + if test "x$docdir" = x; then + docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' + fi + if test "x$htmldir" = x; then + htmldir='${docdir}' + fi + if test "x$dvidir" = x; then + dvidir='${docdir}' + fi + if test "x$pdfdir" = x; then + pdfdir='${docdir}' + fi + if test "x$psdir" = x; then + psdir='${docdir}' + fi + if test "x$lispdir" = x; then + lispdir='${datarootdir}/emacs/site-lisp' + fi + if test "x$localedir" = x; then + localedir='${datarootdir}/locale' - gl_LIBOBJS="$gl_LIBOBJS c-strtod.$ac_objext" + fi + pkglibexecdir='${libexecdir}/${PACKAGE}' : - # Code from module cloexec: - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS cloexec.$ac_objext" - - - - -$as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h - - - # Code from module close-hook: - # Code from module configmake: - # Code from module crypto/sha1: - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS sha1.$ac_objext" - - - - - : - - # Code from module dirname: - - - - - - gl_LIBOBJS="$gl_LIBOBJS basename.$ac_objext" - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS dirname.$ac_objext" - - - - cat >>confdefs.h <<_ACEOF #define GNULIB_DIRNAME 1 _ACEOF - # Code from module dirname-lgpl: - - - - gl_LIBOBJS="$gl_LIBOBJS basename-lgpl.$ac_objext" - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS dirname-lgpl.$ac_objext" - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS stripslash.$ac_objext" - - - - - - - # Code from module double-slash-root: - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5 $as_echo_n "checking whether // is distinct from /... " >&6; } -if test "${gl_cv_double_slash_root+set}" = set; then : +if ${gl_cv_double_slash_root+:} false; then : $as_echo_n "(cached) " >&6 else if test x"$cross_compiling" = xyes ; then @@ -25265,122 +29031,15 @@ $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h fi - # Code from module dup2: - - - - - : - - - - - - if test $ac_cv_func_dup2 = no; then - HAVE_DUP2=0 + GNULIB_ENVIRON=1 - gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext" - - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5 -$as_echo_n "checking whether dup2 works... " >&6; } -if test "${gl_cv_func_dup2_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - case "$host_os" in - mingw*) # on this platform, dup2 always returns 0 for success - gl_cv_func_dup2_works=no;; - cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 - gl_cv_func_dup2_works=no;; - linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a - # closed fd may yield -EBADF instead of -1 / errno=EBADF. - gl_cv_func_dup2_works=no;; - freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF. - gl_cv_func_dup2_works=no;; - *) gl_cv_func_dup2_works=yes;; - esac -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include -#include -int -main () -{ -if (dup2 (1, 1) == 0) - return 1; - close (0); - if (dup2 (0, 0) != -1) - return 2; - /* Many gnulib modules require POSIX conformance of EBADF. */ - if (dup2 (1, 1000000) == -1 && errno != EBADF) - return 3; - return 0; - - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_dup2_works=yes -else - gl_cv_func_dup2_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5 -$as_echo "$gl_cv_func_dup2_works" >&6; } - if test "$gl_cv_func_dup2_works" = no; then - - - if test $ac_cv_func_dup2 = yes; then - REPLACE_DUP2=1 - fi - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext" - - - fi - fi - - - - - GNULIB_DUP2=1 - - - -$as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h - - - - # Code from module environ: - - - - - GNULIB_ENVIRON=1 @@ -25388,25 +29047,11 @@ $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h - # Code from module errno: - - # Code from module error: - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5 $as_echo_n "checking for error_at_line... " >&6; } -if test "${ac_cv_lib_error_at_line+set}" = set; then : +if ${ac_cv_lib_error_at_line+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25430,7 +29075,8 @@ rm -f core conftest.err conftest.$ac_objext \ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5 $as_echo "$ac_cv_lib_error_at_line" >&6; } -if test $ac_cv_lib_error_at_line = no; then + + if test $ac_cv_lib_error_at_line = no; then @@ -25441,14 +29087,11 @@ if test $ac_cv_lib_error_at_line = no; then gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext" -fi - - : - + fi XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format" @@ -25457,363 +29100,125 @@ fi XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format" - # Code from module exitfail: - # Code from module extensions: - # Code from module fcntl: + FLOAT_H= + REPLACE_FLOAT_LDBL=0 + case "$host_os" in + aix* | beos* | openbsd* | mirbsd* | irix*) + FLOAT_H=float.h + ;; + freebsd*) + case "$host_cpu" in + i[34567]86 ) + FLOAT_H=float.h + ;; + x86_64 ) + # On x86_64 systems, the C compiler may still be generating + # 32-bit code. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __LP64__ || defined __x86_64__ || defined __amd64__ + yes + #endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : - : +else + FLOAT_H=float.h +fi +rm -f conftest* + ;; + esac + ;; + linux*) + case "$host_cpu" in + powerpc*) + FLOAT_H=float.h + ;; + esac + ;; + esac + case "$host_os" in + aix* | freebsd* | linux*) + if test -n "$FLOAT_H"; then + REPLACE_FLOAT_LDBL=1 + fi + ;; + esac - - - - if test $ac_cv_func_fcntl = no; then - - - - : - - - - - - if test $ac_cv_func_fcntl = no; then - HAVE_FCNTL=0 - else - REPLACE_FCNTL=1 - fi - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext" - - - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5 -$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; } -if test "${gl_cv_func_fcntl_f_dupfd_works+set}" = set; then : + REPLACE_ITOLD=0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5 +$as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; } +if ${gl_cv_func_itold_works+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : - # Guess that it works on glibc systems - case $host_os in #(( - *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";; - *) gl_cv_func_fcntl_f_dupfd_works="guessing no";; - esac + + if test "$cross_compiling" = yes; then : + case "$host" in + sparc*-*-linux*) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __LP64__ || defined __arch64__ + yes + #endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + gl_cv_func_itold_works="guessing no" +else + gl_cv_func_itold_works="guessing yes" +fi +rm -f conftest* + + ;; + *) gl_cv_func_itold_works="guessing yes" ;; + esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - -int -main () +int i = -1; +volatile long double ld; +int main () { -return fcntl (0, F_DUPFD, -1) != -1; - - ; + ld += i * 1.0L; + if (ld > 0) + return 1; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_fcntl_f_dupfd_works=yes + gl_cv_func_itold_works=yes else - gl_cv_func_fcntl_f_dupfd_works=no + gl_cv_func_itold_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5 -$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; } - case $gl_cv_func_fcntl_f_dupfd_works in - *yes) ;; - *) - - - : - - - - - - if test $ac_cv_func_fcntl = no; then - HAVE_FCNTL=0 - else - REPLACE_FCNTL=1 - fi - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext" - - - -$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h - ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5 -$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; } -if test "${gl_cv_func_fcntl_f_dupfd_cloexec+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifndef F_DUPFD_CLOEXEC -choke me -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef __linux__ -/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace - it to support the semantics on older kernels that failed with EINVAL. */ -choke me -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_func_fcntl_f_dupfd_cloexec=yes -else - gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - gl_cv_func_fcntl_f_dupfd_cloexec=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5 -$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; } - if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then - - - - : - - - - - - if test $ac_cv_func_fcntl = no; then - HAVE_FCNTL=0 - else - REPLACE_FCNTL=1 - fi - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext" - - - fi - fi - - - - - GNULIB_FCNTL=1 - - - -$as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h - - - - # Code from module fcntl-h: - - - - - - - - : - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_fcntl_h='<'fcntl.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_fcntl_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - if test $ac_cv_header_fcntl_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/fcntl.h#{ - s#.*"\(.*/fcntl.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_fcntl_h='<'fcntl.h'>' - fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5 -$as_echo "$gl_cv_next_fcntl_h" >&6; } - fi - NEXT_FCNTL_H=$gl_cv_next_fcntl_h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5 +$as_echo "$gl_cv_func_itold_works" >&6; } + case "$gl_cv_func_itold_works" in + *no) + REPLACE_ITOLD=1 + FLOAT_H=float.h + ;; + esac - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'fcntl.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_fcntl_h - fi - NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive + if test -n "$FLOAT_H"; then - for gl_func in fcntl openat; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - - eval ac_cv_have_decl_$gl_func=yes -fi - done - - - # Code from module fcntl-safer: - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS open-safer.$ac_objext" - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS creat-safer.$ac_objext" - - # Prerequisites of lib/open-safer.c. - - - - -cat >>confdefs.h <<_ACEOF -#define GNULIB_FCNTL_SAFER 1 -_ACEOF - - - # Code from module float: - - - - FLOAT_H= - case "$host_os" in - beos* | openbsd*) - FLOAT_H=float.h - - - - - : - - - - @@ -25822,30 +29227,41 @@ _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_float_h+set}" = set; then : +if ${gl_cv_next_float_h+:} false; then : $as_echo_n "(cached) " >&6 else - if test $ac_cv_header_float_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/float.h#{ - s#.*"\(.*/float.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_float_h='<'float.h'>' - fi + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + + gl_header_literal_regex=`echo 'float.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5 @@ -25864,17 +29280,50 @@ $as_echo "$gl_cv_next_float_h" >&6; } - ;; - esac + + fi + + if test -n "$FLOAT_H"; then + GL_GENERATE_FLOAT_H_TRUE= + GL_GENERATE_FLOAT_H_FALSE='#' +else + GL_GENERATE_FLOAT_H_TRUE='#' + GL_GENERATE_FLOAT_H_FALSE= +fi - # Code from module floorf: + + if test $REPLACE_FLOAT_LDBL = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext" + + fi + if test $REPLACE_ITOLD = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext" + + fi + ac_fn_c_check_decl "$LINENO" "floorf" "ac_cv_have_decl_floorf" "#include " -if test "x$ac_cv_have_decl_floorf" = x""yes; then : +if test "x$ac_cv_have_decl_floorf" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -25889,23 +29338,23 @@ _ACEOF saved_as_echo_n="$as_echo_n" as_echo_n=':' - if test "${gl_cv_func_floorf_libm+set}" = set; then : + if ${gl_cv_func_floorf_libm+:} false; then : $as_echo_n "(cached) " >&6 else gl_cv_func_floorf_libm=? cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - - #ifndef __NO_MATH_INLINES - # define __NO_MATH_INLINES 1 /* for glibc */ - #endif - #include - float x; +#ifndef __NO_MATH_INLINES + # define __NO_MATH_INLINES 1 /* for glibc */ + #endif + #include + float (*funcptr) (float) = floorf; + float x; int main () { -x = floorf(x); +x = funcptr(x) + floorf(x); ; return 0; } @@ -25920,16 +29369,16 @@ rm -f core conftest.err conftest.$ac_objext \ LIBS="$LIBS -lm" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - - #ifndef __NO_MATH_INLINES - # define __NO_MATH_INLINES 1 /* for glibc */ - #endif - #include - float x; +#ifndef __NO_MATH_INLINES + # define __NO_MATH_INLINES 1 /* for glibc */ + #endif + #include + float (*funcptr) (float) = floorf; + float x; int main () { -x = floorf(x); +x = funcptr(x) + floorf(x); ; return 0; } @@ -25951,10 +29400,16 @@ fi if test "$FLOORF_LIBM" = "?"; then REPLACE_FLOORF=1 fi + else HAVE_DECL_FLOORF=0 fi if test $HAVE_DECL_FLOORF = 0 || test $REPLACE_FLOORF = 1; then + FLOORF_LIBM= + fi + + + if test $HAVE_DECL_FLOORF = 0 || test $REPLACE_FLOORF = 1; then @@ -25965,14 +29420,15 @@ fi gl_LIBOBJS="$gl_LIBOBJS floorf.$ac_objext" - FLOORF_LIBM= fi - GNULIB_FLOORF=1 + GNULIB_FLOORF=1 + + @@ -25980,7 +29436,6 @@ $as_echo "#define GNULIB_TEST_FLOORF 1" >>confdefs.h - # Code from module fsusage: : @@ -26006,7 +29461,7 @@ do : #include #endif " -if test "x$ac_cv_header_sys_mount_h" = x""yes; then : +if test "x$ac_cv_header_sys_mount_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_MOUNT_H 1 _ACEOF @@ -26017,6 +29472,7 @@ done + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get file system space usage" >&5 $as_echo "$as_me: checking how to get file system space usage" >&6;} ac_fsusage_space=no @@ -26024,36 +29480,42 @@ ac_fsusage_space=no # Perform only the link test since it seems there are no variants of the # statvfs function. This check is more than just AC_CHECK_FUNCS([statvfs]) # because that got a false positive on SCO OSR5. Adding the declaration -# of a `struct statvfs' causes this test to fail (as it should) on such +# of a 'struct statvfs' causes this test to fail (as it should) on such # systems. That system is reported to work fine with STAT_STATFS4 which # is what it gets when this test fails. if test $ac_fsusage_space = no; then - # SVR4 + # glibc/{Hurd,kFreeBSD}, FreeBSD >= 5.0, NetBSD >= 3.0, + # OpenBSD >= 4.4, AIX, HP-UX, IRIX, Solaris, Cygwin, Interix, BeOS. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for statvfs function (SVR4)" >&5 $as_echo_n "checking for statvfs function (SVR4)... " >&6; } -if test "${fu_cv_sys_stat_statvfs+set}" = set; then : +if ${fu_cv_sys_stat_statvfs+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include -#if defined __GLIBC__ && defined __linux__ -Do not use statvfs on systems with GNU libc on Linux, because that function -stats all preceding entries in /proc/mounts, and that makes df hang if even -one of the corresponding file systems is hard-mounted, but not available. -statvfs in GNU libc on Hurd, BeOS, Haiku operates differently: it only makes -a system call. -#endif - #ifdef __osf__ "Do not use Tru64's statvfs implementation" #endif #include + +struct statvfs fsd; + +#if defined __APPLE__ && defined __MACH__ +#include +/* On Mac OS X >= 10.5, f_blocks in 'struct statvfs' is a 32-bit quantity; + that commonly limits file systems to 4 TiB. Whereas f_blocks in + 'struct statfs' is a 64-bit type, thanks to the large-file support + that was enabled above. In this case, don't use statvfs(); use statfs() + instead. */ +int check_f_blocks_size[sizeof fsd.f_blocks * CHAR_BIT <= 32 ? -1 : 1]; +#endif + int main () { -struct statvfs fsd; statvfs (0, &fsd); +statvfs (0, &fsd); ; return 0; } @@ -26070,17 +29532,110 @@ fi $as_echo "$fu_cv_sys_stat_statvfs" >&6; } if test $fu_cv_sys_stat_statvfs = yes; then ac_fsusage_space=yes + # AIX >= 5.2 has statvfs64 that has a wider f_blocks field than statvfs. + # glibc, HP-UX, IRIX, Solaris have statvfs64 as well, but on these systems + # statvfs with large-file support is already equivalent to statvfs64. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use statvfs64" >&5 +$as_echo_n "checking whether to use statvfs64... " >&6; } +if ${fu_cv_sys_stat_statvfs64+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + struct statvfs64 fsd; + int check_f_blocks_larger_in_statvfs64 + [sizeof (((struct statvfs64 *) 0)->f_blocks) + > sizeof (((struct statvfs *) 0)->f_blocks) + ? 1 : -1]; + +int +main () +{ +statvfs64 (0, &fsd); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + fu_cv_sys_stat_statvfs64=yes +else + fu_cv_sys_stat_statvfs64=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_stat_statvfs64" >&5 +$as_echo "$fu_cv_sys_stat_statvfs64" >&6; } + if test $fu_cv_sys_stat_statvfs64 = yes; then + +$as_echo "#define STAT_STATVFS64 1" >>confdefs.h + + else $as_echo "#define STAT_STATVFS 1" >>confdefs.h + fi fi fi +# Check for this unconditionally so we have a +# good fallback on glibc/Linux > 2.6 < 2.6.36 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for two-argument statfs with statfs.f_frsize member" >&5 +$as_echo_n "checking for two-argument statfs with statfs.f_frsize member... " >&6; } +if ${fu_cv_sys_stat_statfs2_frsize+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + fu_cv_sys_stat_statfs2_frsize=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_MOUNT_H +#include +#endif +#ifdef HAVE_SYS_VFS_H +#include +#endif + int + main () + { + struct statfs fsd; + fsd.f_frsize = 0; + return statfs (".", &fsd) != 0; + } +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + fu_cv_sys_stat_statfs2_frsize=yes +else + fu_cv_sys_stat_statfs2_frsize=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_stat_statfs2_frsize" >&5 +$as_echo "$fu_cv_sys_stat_statfs2_frsize" >&6; } +if test $fu_cv_sys_stat_statfs2_frsize = yes; then + ac_fsusage_space=yes + +$as_echo "#define STAT_STATFS2_FRSIZE 1" >>confdefs.h + +fi + if test $ac_fsusage_space = no; then # DEC Alpha running OSF/1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 3-argument statfs function (DEC OSF/1)" >&5 $as_echo_n "checking for 3-argument statfs function (DEC OSF/1)... " >&6; } - if test "${fu_cv_sys_stat_statfs3_osf1+set}" = set; then : + if ${fu_cv_sys_stat_statfs3_osf1+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -26122,10 +29677,15 @@ $as_echo "#define STAT_STATFS3_OSF1 1" >>confdefs.h fi if test $ac_fsusage_space = no; then -# AIX - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 -$as_echo_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)... " >&6; } - if test "${fu_cv_sys_stat_statfs2_bsize+set}" = set; then : + # glibc/Linux, Mac OS X, FreeBSD < 5.0, NetBSD < 3.0, OpenBSD < 4.4. + # (glibc/{Hurd,kFreeBSD}, FreeBSD >= 5.0, NetBSD >= 3.0, + # OpenBSD >= 4.4, AIX, HP-UX, OSF/1, Cygwin already handled above.) + # (On IRIX you need to include , not only and + # .) + # (On Solaris, statfs has 4 arguments.) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for two-argument statfs with statfs.f_bsize member (AIX, 4.3BSD)" >&5 +$as_echo_n "checking for two-argument statfs with statfs.f_bsize member (AIX, 4.3BSD)... " >&6; } + if ${fu_cv_sys_stat_statfs2_bsize+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -26173,10 +29733,11 @@ $as_echo "#define STAT_STATFS2_BSIZE 1" >>confdefs.h fi if test $ac_fsusage_space = no; then -# SVR3 + # SVR3 + # (Solaris already handled above.) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 $as_echo_n "checking for four-argument statfs (AIX-3.2.5, SVR3)... " >&6; } - if test "${fu_cv_sys_stat_statfs4+set}" = set; then : + if ${fu_cv_sys_stat_statfs4+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -26216,10 +29777,14 @@ $as_echo "#define STAT_STATFS4 1" >>confdefs.h fi if test $ac_fsusage_space = no; then -# 4.4BSD and NetBSD - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 -$as_echo_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)... " >&6; } - if test "${fu_cv_sys_stat_statfs2_fsize+set}" = set; then : + # 4.4BSD and older NetBSD + # (OSF/1 already handled above.) + # (On AIX, you need to include , not only .) + # (On Solaris, statfs has 4 arguments and 'struct statfs' is not declared in + # .) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for two-argument statfs with statfs.f_fsize member (4.4BSD and NetBSD)" >&5 +$as_echo_n "checking for two-argument statfs with statfs.f_fsize member (4.4BSD and NetBSD)... " >&6; } + if ${fu_cv_sys_stat_statfs2_fsize+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -26268,7 +29833,7 @@ if test $ac_fsusage_space = no; then # Ultrix { $as_echo "$as_me:${as_lineno-$LINENO}: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 $as_echo_n "checking for two-argument statfs with struct fs_data (Ultrix)... " >&6; } - if test "${fu_cv_sys_stat_fs_data+set}" = set; then : + if ${fu_cv_sys_stat_fs_data+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -26319,6 +29884,7 @@ fi if test $ac_fsusage_space = no; then # SVR2 + # (AIX, HP-UX, OSF/1 already handled above.) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -26340,6 +29906,7 @@ else fi + if test $gl_cv_fs_space = yes; then @@ -26368,7 +29935,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for statfs that truncates block counts" >&5 $as_echo_n "checking for statfs that truncates block counts... " >&6; } - if test "${fu_cv_sys_truncating_statfs+set}" = set; then : + if ${fu_cv_sys_truncating_statfs+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26407,10 +29974,6 @@ $as_echo "$fu_cv_sys_truncating_statfs" >&6; } fi - # Code from module full-read: - # Code from module full-write: - # Code from module getaddrinfo: - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to do getaddrinfo, freeaddrinfo and getnameinfo" >&5 $as_echo "$as_me: checking how to do getaddrinfo, freeaddrinfo and getnameinfo" >&6;} GETADDRINFO_LIB= @@ -26418,7 +29981,7 @@ $as_echo "$as_me: checking how to do getaddrinfo, freeaddrinfo and getnameinfo" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getaddrinfo" >&5 $as_echo_n "checking for library containing getaddrinfo... " >&6; } -if test "${ac_cv_search_getaddrinfo+set}" = set; then : +if ${ac_cv_search_getaddrinfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -26452,11 +30015,11 @@ for ac_lib in '' socket network net; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_getaddrinfo+set}" = set; then : + if ${ac_cv_search_getaddrinfo+:} false; then : break fi done -if test "${ac_cv_search_getaddrinfo+set}" = set; then : +if ${ac_cv_search_getaddrinfo+:} false; then : else ac_cv_search_getaddrinfo=no @@ -26476,9 +30039,10 @@ fi LIBS="$gai_saved_LIBS $GETADDRINFO_LIB" + HAVE_GETADDRINFO=1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5 $as_echo_n "checking for getaddrinfo... " >&6; } -if test "${gl_cv_func_getaddrinfo+set}" = set; then : +if ${gl_cv_func_getaddrinfo+:} false; then : $as_echo_n "(cached) " >&6 else @@ -26515,7 +30079,7 @@ $as_echo "$gl_cv_func_getaddrinfo" >&6; } if test $gl_cv_func_getaddrinfo = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in ws2tcpip.h and -lws2_32" >&5 $as_echo_n "checking for getaddrinfo in ws2tcpip.h and -lws2_32... " >&6; } -if test "${gl_cv_w32_getaddrinfo+set}" = set; then : +if ${gl_cv_w32_getaddrinfo+:} false; then : $as_echo_n "(cached) " >&6 else @@ -26552,25 +30116,65 @@ $as_echo "$gl_cv_w32_getaddrinfo" >&6; } GETADDRINFO_LIB="-lws2_32" LIBS="$gai_saved_LIBS $GETADDRINFO_LIB" else - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS getaddrinfo.$ac_objext" - + HAVE_GETADDRINFO=0 fi fi # We can't use AC_REPLACE_FUNCS here because gai_strerror may be an # inline function declared in ws2tcpip.h, so we need to get that # header included somehow. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gai_strerror (possibly via ws2tcpip.h)" >&5 -$as_echo_n "checking for gai_strerror (possibly via ws2tcpip.h)... " >&6; } -if test "${gl_cv_func_gai_strerror+set}" = set; then : + ac_fn_c_check_decl "$LINENO" "gai_strerror" "ac_cv_have_decl_gai_strerror" " +#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETDB_H +#include +#endif +#ifdef HAVE_WS2TCPIP_H +#include +#endif +#include + +" +if test "x$ac_cv_have_decl_gai_strerror" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GAI_STRERROR $ac_have_decl +_ACEOF + + if test $ac_cv_have_decl_gai_strerror = yes; then + ac_fn_c_check_decl "$LINENO" "gai_strerrorA" "ac_cv_have_decl_gai_strerrorA" " +#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETDB_H +#include +#endif +#ifdef HAVE_WS2TCPIP_H +#include +#endif +#include + +" +if test "x$ac_cv_have_decl_gai_strerrorA" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GAI_STRERRORA $ac_have_decl +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gai_strerror with POSIX signature" >&5 +$as_echo_n "checking for gai_strerror with POSIX signature... " >&6; } +if ${gl_cv_func_gai_strerror_posix_signature+:} false; then : $as_echo_n "(cached) " >&6 else @@ -26588,36 +30192,24 @@ else #include #endif #include - -int -main () -{ -gai_strerror (NULL); - ; - return 0; -} +extern +#ifdef __cplusplus +"C" +#endif +const char *gai_strerror(int); _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gl_cv_func_gai_strerror=yes +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_func_gai_strerror_posix_signature=yes else - gl_cv_func_gai_strerror=no + gl_cv_func_gai_strerror_posix_signature=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gai_strerror" >&5 -$as_echo "$gl_cv_func_gai_strerror" >&6; } - if test $gl_cv_func_gai_strerror = no; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS gai_strerror.$ac_objext" - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gai_strerror_posix_signature" >&5 +$as_echo "$gl_cv_func_gai_strerror_posix_signature" >&6; } + if test $gl_cv_func_gai_strerror_posix_signature = no; then + REPLACE_GAI_STRERROR=1 + fi fi LIBS="$gai_saved_LIBS" @@ -26629,10 +30221,12 @@ $as_echo "$gl_cv_func_gai_strerror" >&6; } + ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" " +#include +#include - ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include " -if test "x$ac_cv_member_struct_sockaddr_sa_len" = x""yes; then : +if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_SOCKADDR_SA_LEN 1 @@ -26666,7 +30260,7 @@ fi #endif " -if test "x$ac_cv_have_decl_getaddrinfo" = x""yes; then : +if test "x$ac_cv_have_decl_getaddrinfo" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -26691,7 +30285,7 @@ ac_fn_c_check_decl "$LINENO" "freeaddrinfo" "ac_cv_have_decl_freeaddrinfo" " #endif " -if test "x$ac_cv_have_decl_freeaddrinfo" = x""yes; then : +if test "x$ac_cv_have_decl_freeaddrinfo" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -26700,31 +30294,6 @@ fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FREEADDRINFO $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "gai_strerror" "ac_cv_have_decl_gai_strerror" " - /* sys/types.h is not needed according to POSIX, but the - sys/socket.h in i386-unknown-freebsd4.10 and - powerpc-apple-darwin5.5 required it. */ -#include -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif - -" -if test "x$ac_cv_have_decl_gai_strerror" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GAI_STRERROR $ac_have_decl -_ACEOF ac_fn_c_check_decl "$LINENO" "getnameinfo" "ac_cv_have_decl_getnameinfo" " /* sys/types.h is not needed according to POSIX, but the sys/socket.h in i386-unknown-freebsd4.10 and @@ -26741,7 +30310,7 @@ ac_fn_c_check_decl "$LINENO" "getnameinfo" "ac_cv_have_decl_getnameinfo" " #endif " -if test "x$ac_cv_have_decl_getnameinfo" = x""yes; then : +if test "x$ac_cv_have_decl_getnameinfo" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -26777,7 +30346,7 @@ _ACEOF #endif " -if test "x$ac_cv_type_struct_addrinfo" = x""yes; then : +if test "x$ac_cv_type_struct_addrinfo" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_ADDRINFO 1 @@ -26808,24 +30377,7 @@ fi - - - - GNULIB_GETADDRINFO=1 - - - # Code from module getdtablesize: - - - - : - - - - - - if test $ac_cv_func_getdtablesize != yes; then - HAVE_GETDTABLESIZE=0 + if test $HAVE_GETADDRINFO = 0; then @@ -26834,22 +30386,36 @@ fi - gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS getaddrinfo.$ac_objext" + + fi + if test $HAVE_DECL_GAI_STRERROR = 0 || test $REPLACE_GAI_STRERROR = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS gai_strerror.$ac_objext" fi - GNULIB_GETDTABLESIZE=1 + + GNULIB_GETADDRINFO=1 -$as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h + + +$as_echo "#define GNULIB_TEST_GETADDRINFO 1" >>confdefs.h - # Code from module gethostname: @@ -26866,7 +30432,7 @@ $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h for ac_header in winsock2.h do : ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" -if test "x$ac_cv_header_winsock2_h" = x""yes; then : +if test "x$ac_cv_header_winsock2_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_WINSOCK2_H 1 _ACEOF @@ -26890,7 +30456,7 @@ done for ac_func in gethostname do : ac_fn_c_check_func "$LINENO" "gethostname" "ac_cv_func_gethostname" -if test "x$ac_cv_func_gethostname" = x""yes; then : +if test "x$ac_cv_func_gethostname" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETHOSTNAME 1 _ACEOF @@ -26899,7 +30465,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostname in winsock2.h and -lws2_32" >&5 $as_echo_n "checking for gethostname in winsock2.h and -lws2_32... " >&6; } -if test "${gl_cv_w32_gethostname+set}" = set; then : +if ${gl_cv_w32_gethostname+:} false; then : $as_echo_n "(cached) " >&6 else gl_cv_w32_gethostname=no @@ -26941,33 +30507,9 @@ done if test "$ac_cv_func_gethostname" = no; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS gethostname.$ac_objext" - HAVE_GETHOSTNAME=0 - - if test "$gl_cv_w32_gethostname" != "yes"; then - for ac_func in uname -do : - ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname" -if test "x$ac_cv_func_uname" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_UNAME 1 -_ACEOF - -fi -done - fi - fi : @@ -26992,7 +30534,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HOST_NAME_MAX" >&5 $as_echo_n "checking for HOST_NAME_MAX... " >&6; } -if test "${gl_cv_decl_HOST_NAME_MAX+set}" = set; then : +if ${gl_cv_decl_HOST_NAME_MAX+:} false; then : $as_echo_n "(cached) " >&6 else @@ -27029,6 +30571,9 @@ rm -f conftest* #endif "; then : +else + gl_cv_decl_HOST_NAME_MAX=256 + fi @@ -27047,9 +30592,41 @@ _ACEOF fi + if test $HAVE_GETHOSTNAME = 0; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS gethostname.$ac_objext" + + + if test "$gl_cv_w32_gethostname" != "yes"; then + for ac_func in uname +do : + ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname" +if test "x$ac_cv_func_uname" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_UNAME 1 +_ACEOF + +fi +done + + fi + + fi + + + + + + GNULIB_GETHOSTNAME=1 - GNULIB_GETHOSTNAME=1 @@ -27057,146 +30634,31 @@ $as_echo "#define GNULIB_TEST_GETHOSTNAME 1" >>confdefs.h - # Code from module getloadavg: # Persuade glibc to declare getloadavg(). -gl_have_func=no # yes means we've found a way to get the load average. - -# Make sure getloadavg.c is where it belongs, at configure-time. -test -f "$srcdir/$gl_source_base/getloadavg.c" || - as_fn_error $? "$srcdir/$gl_source_base/getloadavg.c is missing" "$LINENO" 5 - gl_save_LIBS=$LIBS -# Check for getloadavg, but be sure not to touch the cache variable. -(ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg" -if test "x$ac_cv_func_getloadavg" = x""yes; then : - exit 0 +# getloadvg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0, +# NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7. +HAVE_GETLOADAVG=1 +ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg" +if test "x$ac_cv_func_getloadavg" = xyes; then : + else - exit 1 -fi -) && gl_have_func=yes + gl_func_getloadavg_done=no -# On HPUX9, an unprivileged user can get load averages through this function. -for ac_func in pstat_getdynamic -do : - ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic" -if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PSTAT_GETDYNAMIC 1 -_ACEOF - -fi -done - - -# Solaris has libkstat which does not require root. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5 -$as_echo_n "checking for kstat_open in -lkstat... " >&6; } -if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lkstat $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char kstat_open (); -int -main () -{ -return kstat_open (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_kstat_kstat_open=yes -else - ac_cv_lib_kstat_kstat_open=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5 -$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; } -if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBKSTAT 1 -_ACEOF - - LIBS="-lkstat $LIBS" - -fi - -test $ac_cv_lib_kstat_kstat_open = yes && gl_have_func=yes - -# AIX has libperfstat which does not require root -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5 -$as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; } -if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lperfstat $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char perfstat_cpu_total (); -int -main () -{ -return perfstat_cpu_total (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_perfstat_perfstat_cpu_total=yes -else - ac_cv_lib_perfstat_perfstat_cpu_total=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5 -$as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; } -if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBPERFSTAT 1 -_ACEOF - - LIBS="-lperfstat $LIBS" - -fi - -test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_have_func=yes - -# Some systems with -lutil have (and need) -lkvm as well, some do not. -# On Solaris, -lkvm requires nlist from -lelf, so check that first -# to get the right answer into the cache. -# For kstat on solaris, we need libelf to force the definition of SVR4 below. -if test $gl_have_func = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5 + # Some systems with -lutil have (and need) -lkvm as well, some do not. + # On Solaris, -lkvm requires nlist from -lelf, so check that first + # to get the right answer into the cache. + # For kstat on solaris, we need to test for libelf and libkvm to force the + # definition of SVR4 below. + if test $gl_func_getloadavg_done = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5 $as_echo_n "checking for elf_begin in -lelf... " >&6; } -if test "${ac_cv_lib_elf_elf_begin+set}" = set; then : +if ${ac_cv_lib_elf_elf_begin+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -27230,15 +30692,13 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5 $as_echo "$ac_cv_lib_elf_elf_begin" >&6; } -if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then : +if test "x$ac_cv_lib_elf_elf_begin" = xyes; then : LIBS="-lelf $LIBS" fi -fi -if test $gl_have_func = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5 $as_echo_n "checking for kvm_open in -lkvm... " >&6; } -if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then : +if ${ac_cv_lib_kvm_kvm_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -27272,14 +30732,14 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5 $as_echo "$ac_cv_lib_kvm_kvm_open" >&6; } -if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then : +if test "x$ac_cv_lib_kvm_kvm_open" = xyes; then : LIBS="-lkvm $LIBS" fi - # Check for the 4.4BSD definition of getloadavg. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5 + # Check for the 4.4BSD definition of getloadavg. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5 $as_echo_n "checking for getloadavg in -lutil... " >&6; } -if test "${ac_cv_lib_util_getloadavg+set}" = set; then : +if ${ac_cv_lib_util_getloadavg+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -27313,20 +30773,20 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5 $as_echo "$ac_cv_lib_util_getloadavg" >&6; } -if test "x$ac_cv_lib_util_getloadavg" = x""yes; then : - LIBS="-lutil $LIBS" gl_have_func=yes gl_cv_func_getloadavg_setgid=yes +if test "x$ac_cv_lib_util_getloadavg" = xyes; then : + LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes fi -fi + fi -if test $gl_have_func = no; then - # There is a commonly available library for RS/6000 AIX. - # Since it is not a standard part of AIX, it might be installed locally. - gl_getloadavg_LIBS=$LIBS - LIBS="-L/usr/local/lib $LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5 + if test $gl_func_getloadavg_done = no; then + # There is a commonly available library for RS/6000 AIX. + # Since it is not a standard part of AIX, it might be installed locally. + gl_getloadavg_LIBS=$LIBS + LIBS="-L/usr/local/lib $LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5 $as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; } -if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then : +if ${ac_cv_lib_getloadavg_getloadavg+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -27360,49 +30820,126 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5 $as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; } -if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then : - LIBS="-lgetloadavg $LIBS" +if test "x$ac_cv_lib_getloadavg_getloadavg" = xyes; then : + LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes else LIBS=$gl_getloadavg_LIBS fi -fi + fi -# Make sure it is really in the library, if we think we found it, -# otherwise set up the replacement function. -for ac_func in getloadavg -do : - ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg" -if test "x$ac_cv_func_getloadavg" = x""yes; then : + # Set up the replacement function if necessary. + if test $gl_func_getloadavg_done = no; then + HAVE_GETLOADAVG=0 + + # Solaris has libkstat which does not require root. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5 +$as_echo_n "checking for kstat_open in -lkstat... " >&6; } +if ${ac_cv_lib_kstat_kstat_open+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lkstat $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char kstat_open (); +int +main () +{ +return kstat_open (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_kstat_kstat_open=yes +else + ac_cv_lib_kstat_kstat_open=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5 +$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; } +if test "x$ac_cv_lib_kstat_kstat_open" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_GETLOADAVG 1 +#define HAVE_LIBKSTAT 1 _ACEOF + LIBS="-lkstat $LIBS" + +fi + + test $ac_cv_lib_kstat_kstat_open = yes && gl_func_getloadavg_done=yes + + # AIX has libperfstat which does not require root + if test $gl_func_getloadavg_done = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5 +$as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; } +if ${ac_cv_lib_perfstat_perfstat_cpu_total+:} false; then : + $as_echo_n "(cached) " >&6 else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lperfstat $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char perfstat_cpu_total (); +int +main () +{ +return perfstat_cpu_total (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_perfstat_perfstat_cpu_total=yes +else + ac_cv_lib_perfstat_perfstat_cpu_total=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5 +$as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; } +if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPERFSTAT 1 +_ACEOF + LIBS="-lperfstat $LIBS" +fi + test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_func_getloadavg_done=yes + fi - - - - gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext" - - -$as_echo "#define C_GETLOADAVG 1" >>confdefs.h - -# Figure out what our getloadavg.c needs. -gl_have_func=no -ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then : - gl_have_func=yes + if test $gl_func_getloadavg_done = no; then + ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_dg_sys_info_h" = xyes; then : + gl_func_getloadavg_done=yes $as_echo "#define DGUX 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5 $as_echo_n "checking for dg_sys_info in -ldgc... " >&6; } -if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then : +if ${ac_cv_lib_dgc_dg_sys_info+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -27436,7 +30973,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5 $as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; } -if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then : +if test "x$ac_cv_lib_dgc_dg_sys_info" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDGC 1 _ACEOF @@ -27448,21 +30985,102 @@ fi fi + fi + fi +fi + + +if test "x$gl_save_LIBS" = x; then + GETLOADAVG_LIBS=$LIBS +else + GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"` +fi +LIBS=$gl_save_LIBS + + +# Test whether the system declares getloadavg. Solaris has the function +# but declares it in , not . +for ac_header in sys/loadavg.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_loadavg_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_LOADAVG_H 1 +_ACEOF + +fi + +done + +if test $ac_cv_header_sys_loadavg_h = yes; then + HAVE_SYS_LOADAVG_H=1 +else + HAVE_SYS_LOADAVG_H=0 +fi +ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H + # include + #endif + #include +" +if test "x$ac_cv_have_decl_getloadavg" = xyes; then : + +else + HAVE_DECL_GETLOADAVG=0 +fi + + + if test $HAVE_GETLOADAVG = 0; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext" + + +# Figure out what our getloadavg.c needs. + + + : + + + + + + +# On HPUX9, an unprivileged user can get load averages this way. +if test $gl_func_getloadavg_done = no; then + for ac_func in pstat_getdynamic +do : + ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic" +if test "x$ac_cv_func_pstat_getdynamic" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PSTAT_GETDYNAMIC 1 +_ACEOF + gl_func_getloadavg_done=yes +fi +done + +fi # We cannot check for , because Solaris 2 does not use dwarf (it # uses stabs), but it is still SVR4. We cannot check for because # Irix 4.0.5F has the header but not the library. -if test $gl_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then - gl_have_func=yes +if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \ + && test "$ac_cv_lib_kvm_kvm_open" = yes; then + gl_func_getloadavg_done=yes $as_echo "#define SVR4 1" >>confdefs.h fi -if test $gl_have_func = no; then +if test $gl_func_getloadavg_done = no; then ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default" -if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then : - gl_have_func=yes +if test "x$ac_cv_header_inq_stats_cpustats_h" = xyes; then : + gl_func_getloadavg_done=yes $as_echo "#define UMAX 1" >>confdefs.h @@ -27474,21 +31092,21 @@ fi fi -if test $gl_have_func = no; then +if test $gl_func_getloadavg_done = no; then ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then : - gl_have_func=yes; $as_echo "#define UMAX 1" >>confdefs.h +if test "x$ac_cv_header_sys_cpustats_h" = xyes; then : + gl_func_getloadavg_done=yes; $as_echo "#define UMAX 1" >>confdefs.h fi fi -if test $gl_have_func = no; then +if test $gl_func_getloadavg_done = no; then for ac_header in mach/mach.h do : ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default" -if test "x$ac_cv_header_mach_mach_h" = x""yes; then : +if test "x$ac_cv_header_mach_mach_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MACH_MACH_H 1 _ACEOF @@ -27502,21 +31120,19 @@ fi for ac_header in nlist.h do : ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default" -if test "x$ac_cv_header_nlist_h" = x""yes; then : +if test "x$ac_cv_header_nlist_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NLIST_H 1 _ACEOF ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include " -if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then : +if test "x$ac_cv_member_struct_nlist_n_un_n_name" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_NLIST_N_UN_N_NAME 1 _ACEOF -$as_echo "#define NLIST_NAME_UNION 1" >>confdefs.h - fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -27547,108 +31163,15 @@ fi done -fi -done - - -# Some definitions of getloadavg require that the program be installed setgid. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getloadavg requires setgid" >&5 -$as_echo_n "checking whether getloadavg requires setgid... " >&6; } -if test "${gl_cv_func_getloadavg_setgid+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define CONFIGURING_GETLOADAVG -#include "$srcdir/$gl_source_base/getloadavg.c" -#ifdef LDAV_PRIVILEGED -Yowza Am I SETGID yet -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then : - gl_cv_func_getloadavg_setgid=yes -else - gl_cv_func_getloadavg_setgid=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getloadavg_setgid" >&5 -$as_echo "$gl_cv_func_getloadavg_setgid" >&6; } -if test $gl_cv_func_getloadavg_setgid = yes; then - NEED_SETGID=true - -$as_echo "#define GETLOADAVG_PRIVILEGED 1" >>confdefs.h - -else - NEED_SETGID=false -fi - -if test $gl_cv_func_getloadavg_setgid = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking group of /dev/kmem" >&5 -$as_echo_n "checking group of /dev/kmem... " >&6; } -if test "${gl_cv_group_kmem+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # On Solaris, /dev/kmem is a symlink. Get info on the real file. - ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null` - # If we got an error (system does not support symlinks), try without -L. - test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem` - gl_cv_group_kmem=`echo $ac_ls_output \ - | sed -ne 's/[ ][ ]*/ /g - s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/ - / /s/.* //;p'` - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_group_kmem" >&5 -$as_echo "$gl_cv_group_kmem" >&6; } - KMEM_GROUP=$gl_cv_group_kmem -fi -if test "x$gl_save_LIBS" = x; then - GETLOADAVG_LIBS=$LIBS -else - GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"` -fi -LIBS=$gl_save_LIBS - - -# Test whether the system declares getloadavg. Solaris has the function -# but declares it in , not . -for ac_header in sys/loadavg.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_LOADAVG_H 1 -_ACEOF - -fi - -done - -if test $ac_cv_header_sys_loadavg_h = yes; then - HAVE_SYS_LOADAVG_H=1 -else - HAVE_SYS_LOADAVG_H=0 -fi -ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H - # include - #endif - #include -" -if test "x$ac_cv_have_decl_getloadavg" = x""yes; then : - -else - HAVE_DECL_GETLOADAVG=0 -fi + fi - GNULIB_GETLOADAVG=1 + GNULIB_GETLOADAVG=1 + + @@ -27656,35 +31179,12 @@ $as_echo "#define GNULIB_TEST_GETLOADAVG 1" >>confdefs.h - # Code from module getopt: - # Code from module getopt-gnu: - - -$as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h - - - # Code from module getopt-posix: - - - - - - if test -n "$gl_replace_getopt"; then : - - - - GETOPT_H=getopt.h - -$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h - - - - GNULIB_UNISTD_H_GETOPT=1 + if test $REPLACE_GETOPT = 1; then @@ -27714,24 +31214,76 @@ $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h + GNULIB_GL_UNISTD_H_GETOPT=1 + fi -fi + +$as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h + + + + + + + + REPLACE_GETOPT=0 + if test -n "$gl_replace_getopt"; then + REPLACE_GETOPT=1 + fi + + if test $REPLACE_GETOPT = 1; then + + GETOPT_H=getopt.h + +$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h + + + + fi + + if test $REPLACE_GETOPT = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" + + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" + + + + : + + + + + + + GNULIB_GL_UNISTD_H_GETOPT=1 + fi - # Code from module gettext: - - # Code from module gettext-h: - # Code from module havelib: - # Code from module hostent: HOSTENT_LIB= gl_saved_libs="$LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 $as_echo_n "checking for library containing gethostbyname... " >&6; } -if test "${ac_cv_search_gethostbyname+set}" = set; then : +if ${ac_cv_search_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -27765,11 +31317,11 @@ for ac_lib in '' nsl network net; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_gethostbyname+set}" = set; then : + if ${ac_cv_search_gethostbyname+:} false; then : break fi done -if test "${ac_cv_search_gethostbyname+set}" = set; then : +if ${ac_cv_search_gethostbyname+:} false; then : else ac_cv_search_gethostbyname=no @@ -27792,7 +31344,7 @@ fi for ac_func in gethostbyname do : ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" -if test "x$ac_cv_func_gethostbyname" = x""yes; then : +if test "x$ac_cv_func_gethostbyname" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETHOSTBYNAME 1 _ACEOF @@ -27801,7 +31353,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in winsock2.h and -lws2_32" >&5 $as_echo_n "checking for gethostbyname in winsock2.h and -lws2_32... " >&6; } -if test "${gl_cv_w32_gethostbyname+set}" = set; then : +if ${gl_cv_w32_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else gl_cv_w32_gethostbyname=no @@ -27843,19 +31395,73 @@ done fi - # Code from module include_next: - # Code from module inet_ntop: - : - gl_save_LIBS=$LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5 + + HAVE_INET_NTOP=1 + INET_NTOP_LIB= + + + + + : + + + + + + if test $ac_cv_header_sys_socket_h != yes; then + for ac_header in winsock2.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" +if test "x$ac_cv_header_winsock2_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WINSOCK2_H 1 +_ACEOF + +fi + +done + + fi + if test "$ac_cv_header_winsock2_h" = yes; then + HAVE_WINSOCK2_H=1 + UNISTD_H_HAVE_WINSOCK2_H=1 + SYS_IOCTL_H_HAVE_WINSOCK2_H=1 + else + HAVE_WINSOCK2_H=0 + fi + + + if test $HAVE_WINSOCK2_H = 1; then + ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include +" +if test "x$ac_cv_have_decl_inet_ntop" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_INET_NTOP $ac_have_decl +_ACEOF + + if test $ac_cv_have_decl_inet_ntop = yes; then + REPLACE_INET_NTOP=1 + INET_NTOP_LIB="-lws2_32" + else + HAVE_DECL_INET_NTOP=0 + HAVE_INET_NTOP=0 + fi + else + gl_save_LIBS=$LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5 $as_echo_n "checking for library containing inet_ntop... " >&6; } -if test "${ac_cv_search_inet_ntop+set}" = set; then : +if ${ac_cv_search_inet_ntop+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -27877,7 +31483,7 @@ return inet_ntop (); return 0; } _ACEOF -for ac_lib in '' nsl; do +for ac_lib in '' nsl resolv; do if test -z "$ac_lib"; then ac_res="none required" else @@ -27889,11 +31495,11 @@ for ac_lib in '' nsl; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_inet_ntop+set}" = set; then : + if ${ac_cv_search_inet_ntop+:} false; then : break fi done -if test "${ac_cv_search_inet_ntop+set}" = set; then : +if ${ac_cv_search_inet_ntop+:} false; then : else ac_cv_search_inet_ntop=no @@ -27908,44 +31514,44 @@ if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else - - - - - - - - for ac_func in inet_ntop do : ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop" -if test "x$ac_cv_func_inet_ntop" = x""yes; then : +if test "x$ac_cv_func_inet_ntop" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_INET_NTOP 1 _ACEOF -else - - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" - fi done + if test $ac_cv_func_inet_ntop = no; then + HAVE_INET_NTOP=0 + fi fi - LIBS=$gl_save_LIBS - INET_NTOP_LIB= - if test "$ac_cv_search_inet_ntop" != "no" && - test "$ac_cv_search_inet_ntop" != "none required"; then - INET_NTOP_LIB="$ac_cv_search_inet_ntop" - fi + LIBS=$gl_save_LIBS + + if test "$ac_cv_search_inet_ntop" != "no" \ + && test "$ac_cv_search_inet_ntop" != "none required"; then + INET_NTOP_LIB="$ac_cv_search_inet_ntop" + fi + + + : - ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include + + + ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include + #if HAVE_NETDB_H + # include + #endif + " -if test "x$ac_cv_have_decl_inet_ntop" = x""yes; then : +if test "x$ac_cv_have_decl_inet_ntop" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -27955,62 +31561,39 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_INET_NTOP $ac_have_decl _ACEOF - if test $ac_cv_have_decl_inet_ntop = no; then - HAVE_DECL_INET_NTOP=0 + if test $ac_cv_have_decl_inet_ntop = no; then + HAVE_DECL_INET_NTOP=0 + fi + fi + + + if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS inet_ntop.$ac_objext" + + + + fi + GNULIB_INET_NTOP=1 - GNULIB_INET_NTOP=1 - # Code from module inline: - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5 -$as_echo_n "checking whether the compiler generally respects inline... " >&6; } -if test "${gl_cv_c_inline_effective+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test $ac_cv_c_inline = no; then - gl_cv_c_inline_effective=no - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifdef __NO_INLINE__ - #error "inline is not effective" - #endif - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_c_inline_effective=yes -else - gl_cv_c_inline_effective=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5 -$as_echo "$gl_cv_c_inline_effective" >&6; } - if test $gl_cv_c_inline_effective = yes; then - -$as_echo "#define HAVE_INLINE 1" >>confdefs.h - - fi - - # Code from module intprops: - # Code from module langinfo: @@ -28028,35 +31611,53 @@ $as_echo "#define HAVE_INLINE 1" >>confdefs.h + if test $gl_cv_have_include_next = yes; then gl_cv_next_langinfo_h='<'langinfo.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_langinfo_h+set}" = set; then : +if ${gl_cv_next_langinfo_h+:} false; then : $as_echo_n "(cached) " >&6 else - if test $ac_cv_header_langinfo_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test $ac_cv_header_langinfo_h = yes; then + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_langinfo_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/langinfo.h#{ - s#.*"\(.*/langinfo.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + + gl_header_literal_regex=`echo 'langinfo.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + gl_cv_next_langinfo_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' else - gl_cv_next_langinfo_h='<'langinfo.h'>' - fi + gl_cv_next_langinfo_h='<'langinfo.h'>' + fi + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5 @@ -28076,8 +31677,11 @@ $as_echo "$gl_cv_next_langinfo_h" >&6; } + HAVE_LANGINFO_CODESET=0 + HAVE_LANGINFO_T_FMT_AMPM=0 HAVE_LANGINFO_ERA=0 + HAVE_LANGINFO_YESEXPR=0 : @@ -28089,7 +31693,7 @@ $as_echo "$gl_cv_next_langinfo_h" >&6; } HAVE_LANGINFO_H=1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5 $as_echo_n "checking whether langinfo.h defines CODESET... " >&6; } -if test "${gl_cv_header_langinfo_codeset+set}" = set; then : +if ${gl_cv_header_langinfo_codeset+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -28118,9 +31722,40 @@ $as_echo "$gl_cv_header_langinfo_codeset" >&6; } if test $gl_cv_header_langinfo_codeset = yes; then HAVE_LANGINFO_CODESET=1 fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5 +$as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; } +if ${gl_cv_header_langinfo_t_fmt_ampm+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int a = T_FMT_AMPM; + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_header_langinfo_t_fmt_ampm=yes +else + gl_cv_header_langinfo_t_fmt_ampm=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5 +$as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; } + if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then + HAVE_LANGINFO_T_FMT_AMPM=1 + fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5 $as_echo_n "checking whether langinfo.h defines ERA... " >&6; } -if test "${gl_cv_header_langinfo_era+set}" = set; then : +if ${gl_cv_header_langinfo_era+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -28149,6 +31784,37 @@ $as_echo "$gl_cv_header_langinfo_era" >&6; } if test $gl_cv_header_langinfo_era = yes; then HAVE_LANGINFO_ERA=1 fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5 +$as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; } +if ${gl_cv_header_langinfo_yesexpr+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int a = YESEXPR; + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_header_langinfo_yesexpr=yes +else + gl_cv_header_langinfo_yesexpr=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5 +$as_echo "$gl_cv_header_langinfo_yesexpr" >&6; } + if test $gl_cv_header_langinfo_yesexpr = yes; then + HAVE_LANGINFO_YESEXPR=1 + fi else HAVE_LANGINFO_H=0 fi @@ -28157,11 +31823,13 @@ $as_echo "$gl_cv_header_langinfo_era" >&6; } + + for gl_func in nl_langinfo; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : +if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -28187,7 +31855,7 @@ fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF @@ -28197,7 +31865,7 @@ fi done - # Code from module localcharset: + @@ -28212,9 +31880,7 @@ fi - LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\"" - - # Code from module locale: + LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\"" @@ -28222,15 +31888,26 @@ fi + + + case "$host_os" in + solaris*) + +$as_echo "#define _LCONV_C99 1" >>confdefs.h + + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5 $as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; } -if test "${gl_cv_header_locale_h_posix2001+set}" = set; then : +if ${gl_cv_header_locale_h_posix2001+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include -int x = LC_MESSAGES; + int x = LC_MESSAGES; + int y = sizeof (((struct lconv *) 0)->decimal_point); int main () { @@ -28260,13 +31937,13 @@ $as_echo "$gl_cv_header_locale_h_posix2001" >&6; } HAVE_XLOCALE_H=1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5 $as_echo_n "checking whether locale.h defines locale_t... " >&6; } -if test "${gl_cv_header_locale_has_locale_t+set}" = set; then : +if ${gl_cv_header_locale_has_locale_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include -locale_t x; + locale_t x; int main () { @@ -28296,13 +31973,42 @@ $as_echo "$gl_cv_header_locale_has_locale_t" >&6; } fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5 +$as_echo_n "checking whether struct lconv is properly defined... " >&6; } +if ${gl_cv_sys_struct_lconv_ok+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + struct lconv l; + int x = sizeof (l.decimal_point); + int y = sizeof (l.int_p_cs_precedes); +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_sys_struct_lconv_ok=yes +else + gl_cv_sys_struct_lconv_ok=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5 +$as_echo "$gl_cv_sys_struct_lconv_ok" >&6; } + if test $gl_cv_sys_struct_lconv_ok = no; then + REPLACE_STRUCT_LCONV=1 + fi - : - - @@ -28313,30 +32019,41 @@ $as_echo "$gl_cv_header_locale_has_locale_t" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_locale_h+set}" = set; then : +if ${gl_cv_next_locale_h+:} false; then : $as_echo_n "(cached) " >&6 else - if test $ac_cv_header_locale_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_locale_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/locale.h#{ - s#.*"\(.*/locale.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_locale_h='<'locale.h'>' - fi + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + + gl_header_literal_regex=`echo 'locale.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + gl_cv_next_locale_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5 @@ -28356,20 +32073,13 @@ $as_echo "$gl_cv_next_locale_h" >&6; } - if test -n "$STDDEF_H" \ - || test $gl_cv_header_locale_h_posix2001 = no \ - || test $gl_cv_header_locale_h_needs_xlocale_h = yes; then - - : - - fi - for gl_func in duplocale; do + for gl_func in setlocale duplocale; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : +if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -28399,7 +32109,7 @@ fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF @@ -28409,11 +32119,113 @@ fi done - # Code from module malloc: - for ac_header in stdlib.h + + + + + if test $REPLACE_STRUCT_LCONV = 1; then + REPLACE_LOCALECONV=1 + fi + + if test $REPLACE_LOCALECONV = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS localeconv.$ac_objext" + + + ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include +" +if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1 +_ACEOF + + +fi + + + fi + + + + + + GNULIB_LOCALECONV=1 + + + + + +$as_echo "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h + + + + + + if test "$gl_threads_api" = posix; then + # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the + # pthread_rwlock_* functions. + ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include +" +if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then : + +$as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h + +fi + + # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include +int +main () +{ + +#if __FreeBSD__ == 4 +error "No, in FreeBSD 4.0 recursive mutexes actually don't work." +#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \ + && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) +error "No, in Mac OS X < 10.7 recursive mutexes actually don't work." +#else +int x = (int)PTHREAD_MUTEX_RECURSIVE; +return !x; +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +$as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + : + + + +cat >>confdefs.h <<_ACEOF +#define GNULIB_LOCK 1 +_ACEOF + + + + + + for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" -if test "x$ac_cv_header_stdlib_h" = x""yes; then : +if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF @@ -28422,21 +32234,29 @@ fi done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 $as_echo_n "checking for GNU libc compatible malloc... " >&6; } -if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then : +if ${ac_cv_func_malloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : - ac_cv_func_malloc_0_nonnull=no + case "$host_os" in + # Guess yes on platforms where we know the result. + *-gnu* | freebsd* | netbsd* | openbsd* \ + | hpux* | solaris* | cygwin* | mingw*) + ac_cv_func_malloc_0_nonnull=yes ;; + # If we don't know, assume the worst. + *) ac_cv_func_malloc_0_nonnull=no ;; + esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H -# include -#else -char *malloc (); -#endif + # include + #else + char *malloc (); + #endif int main () @@ -28445,6 +32265,7 @@ return ! malloc (0); ; return 0; } + _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_malloc_0_nonnull=yes @@ -28455,16 +32276,23 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } -if test $ac_cv_func_malloc_0_nonnull = yes; then : + if test $ac_cv_func_malloc_0_nonnull = yes; then : -$as_echo "#define HAVE_MALLOC 1" >>confdefs.h +$as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h else - $as_echo "#define HAVE_MALLOC 0" >>confdefs.h + $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h + REPLACE_MALLOC=1 + +fi + + + if test $REPLACE_MALLOC = 1; then @@ -28475,24 +32303,26 @@ else gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" + fi -$as_echo "#define malloc rpl_malloc" >>confdefs.h -fi +cat >>confdefs.h <<_ACEOF +#define GNULIB_MALLOC_GNU 1 +_ACEOF -$as_echo "#define GNULIB_MALLOC_GNU 1" >>confdefs.h - - # Code from module malloc-posix: if test $gl_cv_func_malloc_posix = yes; then - HAVE_MALLOC_POSIX=1 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h else + REPLACE_MALLOC=1 + fi + + if test $REPLACE_MALLOC = 1; then @@ -28503,14 +32333,15 @@ $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" - HAVE_MALLOC_POSIX=0 fi - GNULIB_MALLOC_POSIX=1 + GNULIB_MALLOC_POSIX=1 + + @@ -28518,12 +32349,12 @@ $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h - # Code from module malloca: - # Code from module math: + + @@ -28538,35 +32369,53 @@ $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h + if test $gl_cv_have_include_next = yes; then gl_cv_next_math_h='<'math.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_math_h+set}" = set; then : +if ${gl_cv_next_math_h+:} false; then : $as_echo_n "(cached) " >&6 else - if test $ac_cv_header_math_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test $ac_cv_header_math_h = yes; then + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_math_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/math.h#{ - s#.*"\(.*/math.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + + gl_header_literal_regex=`echo 'math.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + gl_cv_next_math_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' else - gl_cv_next_math_h='<'math.h'>' - fi + gl_cv_next_math_h='<'math.h'>' + fi + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5 @@ -28589,7 +32438,7 @@ $as_echo "$gl_cv_next_math_h" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5 $as_echo_n "checking whether NAN macro works... " >&6; } -if test "${gl_cv_header_math_nan_works+set}" = set; then : +if ${gl_cv_header_math_nan_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -28624,7 +32473,7 @@ $as_echo "$gl_cv_header_math_nan_works" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5 $as_echo_n "checking whether HUGE_VAL works... " >&6; } -if test "${gl_cv_header_math_huge_val_works+set}" = set; then : +if ${gl_cv_header_math_huge_val_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -28654,17 +32503,16 @@ $as_echo "$gl_cv_header_math_huge_val_works" >&6; } fi - for gl_func in acosl asinl atanl ceilf ceill cosl expl floorf floorl frexpl ldexpl logb logl round roundf roundl sinl sqrtl tanl trunc truncf truncl; do + for gl_func in acosf acosl asinf asinl atanf atanl cbrt cbrtf cbrtl ceilf ceill copysign copysignf copysignl cosf cosl coshf expf expl exp2 exp2f exp2l expm1 expm1f expm1l fabsf fabsl floorf floorl fma fmaf fmal fmod fmodf fmodl frexpf frexpl hypotf hypotl ilogb ilogbf ilogbl ldexpf ldexpl log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f log2l logb logbf logbl modf modff modfl powf remainder remainderf remainderl rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl tanf tanl tanhf trunc truncf truncl; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : +if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - int main () { @@ -28684,7 +32532,7 @@ fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF @@ -28694,7 +32542,6 @@ fi done - # Code from module mbrtowc: @@ -28723,15 +32570,15 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } -if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then : +if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then : $as_echo_n "(cached) " >&6 else case "$host_os" in - # Guess no on AIX and OSF/1. - osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; + # Guess no on AIX and OSF/1. + aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; esac if test $LOCALE_JA != none; then if test "$cross_compiling" = yes; then : @@ -28742,6 +32589,13 @@ else #include #include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include #include int main () { @@ -28779,7 +32633,7 @@ $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } -if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then : +if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then : $as_echo_n "(cached) " >&6 else @@ -28799,6 +32653,13 @@ else #include #include #include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include #include int main () { @@ -28846,11 +32707,6 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } else REPLACE_MBSTATE_T=1 fi - if test $REPLACE_MBSTATE_T = 1; then - - : - - fi @@ -28862,6 +32718,30 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } if test $ac_cv_func_mbrtowc = no; then HAVE_MBRTOWC=0 + ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" " +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include + +" +if test "x$ac_cv_have_decl_mbrtowc" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_MBRTOWC $ac_have_decl +_ACEOF + + if test $ac_cv_have_decl_mbrtowc = yes; then + REPLACE_MBRTOWC=1 + fi else if test $REPLACE_MBSTATE_T = 1; then REPLACE_MBRTOWC=1 @@ -28869,17 +32749,94 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5 +$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; } +if ${gl_cv_func_mbrtowc_null_arg1+:} false; then : + $as_echo_n "(cached) " >&6 +else + + case "$host_os" in + # Guess no on Solaris. + solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;; + esac + if test $LOCALE_FR_UTF8 != none; then + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + int result = 0; + + if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) + { + char input[] = "\303\237er"; + mbstate_t state; + wchar_t wc; + size_t ret; + + memset (&state, '\0', sizeof (mbstate_t)); + wc = (wchar_t) 0xBADFACE; + ret = mbrtowc (&wc, input, 5, &state); + if (ret != 2) + result |= 1; + if (!mbsinit (&state)) + result |= 2; + + memset (&state, '\0', sizeof (mbstate_t)); + ret = mbrtowc (NULL, input, 5, &state); + if (ret != 2) /* Solaris 7 fails here: ret is -1. */ + result |= 4; + if (!mbsinit (&state)) + result |= 8; + } + return result; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_mbrtowc_null_arg1=yes +else + gl_cv_func_mbrtowc_null_arg1=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5 +$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; } + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; } -if test "${gl_cv_func_mbrtowc_null_arg+set}" = set; then : +if ${gl_cv_func_mbrtowc_null_arg2+:} false; then : $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on OSF/1. - osf*) gl_cv_func_mbrtowc_null_arg="guessing no" ;; + osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;; # Guess yes otherwise. - *) gl_cv_func_mbrtowc_null_arg="guessing yes" ;; + *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;; esac if test $LOCALE_FR_UTF8 != none; then if test "$cross_compiling" = yes; then : @@ -28890,6 +32847,13 @@ else #include #include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include #include int main () { @@ -28910,9 +32874,9 @@ int main () } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_mbrtowc_null_arg=yes + gl_cv_func_mbrtowc_null_arg2=yes else - gl_cv_func_mbrtowc_null_arg=no + gl_cv_func_mbrtowc_null_arg2=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -28921,26 +32885,28 @@ fi fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg" >&5 -$as_echo "$gl_cv_func_mbrtowc_null_arg" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5 +$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; } -if test "${gl_cv_func_mbrtowc_retval+set}" = set; then : +if ${gl_cv_func_mbrtowc_retval+:} false; then : $as_echo_n "(cached) " >&6 else case "$host_os" in - # Guess no on HP-UX and Solaris. - hpux* | solaris*) gl_cv_func_mbrtowc_retval="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_retval="guessing yes" ;; + # Guess no on HP-UX, Solaris, native Windows. + hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_retval="guessing yes" ;; esac - if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none; then + if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \ + || { case "$host_os" in mingw*) true;; *) false;; esac; }; then if test "$cross_compiling" = yes; then : : else @@ -28949,9 +32915,18 @@ else #include #include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include #include int main () { + int result = 0; + int found_some_locale = 0; /* This fails on Solaris. */ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) { @@ -28964,8 +32939,9 @@ int main () { input[1] = '\0'; if (mbrtowc (&wc, input + 2, 5, &state) != 1) - return 1; + result |= 1; } + found_some_locale = 1; } /* This fails on HP-UX 11.11. */ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) @@ -28979,16 +32955,66 @@ int main () { input[1] = '\0'; if (mbrtowc (&wc, input + 2, 5, &state) != 2) - return 1; + result |= 2; } + found_some_locale = 1; } - return 0; + /* This fails on native Windows. */ + if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL) + { + char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */ + mbstate_t state; + wchar_t wc; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) + { + input[3] = '\0'; + if (mbrtowc (&wc, input + 4, 4, &state) != 1) + result |= 4; + } + found_some_locale = 1; + } + if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL) + { + char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */ + mbstate_t state; + wchar_t wc; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) + { + input[3] = '\0'; + if (mbrtowc (&wc, input + 4, 4, &state) != 1) + result |= 8; + } + found_some_locale = 1; + } + if (setlocale (LC_ALL, "Chinese_China.936") != NULL) + { + char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */ + mbstate_t state; + wchar_t wc; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) + { + input[3] = '\0'; + if (mbrtowc (&wc, input + 4, 4, &state) != 1) + result |= 16; + } + found_some_locale = 1; + } + return (found_some_locale ? result : 77); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_mbrtowc_retval=yes else - gl_cv_func_mbrtowc_retval=no + if test $? != 77; then + gl_cv_func_mbrtowc_retval=no + fi + fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -29005,7 +33031,7 @@ $as_echo "$gl_cv_func_mbrtowc_retval" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; } -if test "${gl_cv_func_mbrtowc_nul_retval+set}" = set; then : +if ${gl_cv_func_mbrtowc_nul_retval+:} false; then : $as_echo_n "(cached) " >&6 else @@ -29024,6 +33050,13 @@ else #include #include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include #include int main () { @@ -29055,10 +33088,18 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; } - case "$gl_cv_func_mbrtowc_null_arg" in + case "$gl_cv_func_mbrtowc_null_arg1" in *yes) ;; *) -$as_echo "#define MBRTOWC_NULL_ARG_BUG 1" >>confdefs.h +$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h + + REPLACE_MBRTOWC=1 + ;; + esac + case "$gl_cv_func_mbrtowc_null_arg2" in + *yes) ;; + *) +$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h REPLACE_MBRTOWC=1 ;; @@ -29081,11 +33122,9 @@ $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h esac fi fi + if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then - : - - @@ -29103,7 +33142,10 @@ $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h - GNULIB_MBRTOWC=1 + + GNULIB_MBRTOWC=1 + + @@ -29111,7 +33153,7 @@ $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h - # Code from module mbsinit: + @@ -29140,15 +33182,15 @@ $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } -if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then : +if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then : $as_echo_n "(cached) " >&6 else case "$host_os" in - # Guess no on AIX and OSF/1. - osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; + # Guess no on AIX and OSF/1. + aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; esac if test $LOCALE_JA != none; then if test "$cross_compiling" = yes; then : @@ -29159,6 +33201,13 @@ else #include #include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include #include int main () { @@ -29196,7 +33245,7 @@ $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } -if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then : +if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then : $as_echo_n "(cached) " >&6 else @@ -29216,6 +33265,13 @@ else #include #include #include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include #include int main () { @@ -29263,11 +33319,6 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } else REPLACE_MBSTATE_T=1 fi - if test $REPLACE_MBSTATE_T = 1; then - - : - - fi @@ -29279,16 +33330,42 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } if test $ac_cv_func_mbsinit = no; then HAVE_MBSINIT=0 + ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" " +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include + +" +if test "x$ac_cv_have_decl_mbsinit" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_MBSINIT $ac_have_decl +_ACEOF + + if test $ac_cv_have_decl_mbsinit = yes; then + REPLACE_MBSINIT=1 + fi else if test $REPLACE_MBSTATE_T = 1; then REPLACE_MBSINIT=1 + else + case "$host_os" in + mingw*) REPLACE_MBSINIT=1 ;; + esac fi fi + if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then - : - - @@ -29306,7 +33383,10 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } - GNULIB_MBSINIT=1 + + GNULIB_MBSINIT=1 + + @@ -29314,12 +33394,78 @@ $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h - # Code from module memchr: + + + + if false; then + REPLACE_MBTOWC=1 + fi + + if test $REPLACE_MBTOWC = 1; then - GNULIB_MEMCHR=1 + + + + + gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext" + + + : + + fi + + + + + + GNULIB_MBTOWC=1 + + + + + +$as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h + + + + + if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext" + + + for ac_header in bp-sym.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default" +if test "x$ac_cv_header_bp_sym_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_BP_SYM_H 1 +_ACEOF + +fi + +done + + + fi + + + + + + GNULIB_MEMCHR=1 + + @@ -29327,7 +33473,7 @@ $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h - # Code from module mktime: + @@ -29345,19 +33491,19 @@ $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h -if test $APPLE_UNIVERSAL_BUILD = 1; then - # A universal build on Apple MacOS X platforms. - # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode. - # But we need a configuration result that is valid in both modes. - ac_cv_func_working_mktime=no -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 + if test $APPLE_UNIVERSAL_BUILD = 1; then + # A universal build on Apple Mac OS X platforms. + # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode. + # But we need a configuration result that is valid in both modes. + gl_cv_func_working_mktime=no + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 $as_echo_n "checking for working mktime... " >&6; } -if test "${ac_cv_func_working_mktime+set}" = set; then : +if ${gl_cv_func_working_mktime+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : - ac_cv_func_working_mktime=no + gl_cv_func_working_mktime=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -29370,8 +33516,8 @@ else # include #endif -#ifndef HAVE_ALARM -# define alarm(X) /* empty */ +#if HAVE_DECL_ALARM +# include #endif /* Work around redefinition to rpl_putenv by other config tests. */ @@ -29501,22 +33647,29 @@ year_2050_test () int main () { + int result = 0; time_t t, delta; int i, j; + int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1; + int time_t_signed = ! ((time_t) 0 < (time_t) -1); +#if HAVE_DECL_ALARM /* This test makes some buggy mktime implementations loop. Give up after 60 seconds; a mktime slower than that isn't worth using anyway. */ + signal (SIGALRM, SIG_DFL); alarm (60); +#endif - for (;;) - { - t = (time_t_max << 1) + 1; - if (t <= time_t_max) - break; - time_t_max = t; - } - time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max; + time_t_max = (! time_t_signed + ? (time_t) -1 + : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1) + * 2 + 1)); + time_t_min = (! time_t_signed + ? (time_t) 0 + : time_t_signed_magnitude + ? ~ (time_t) 0 + : ~ time_t_max); delta = time_t_max / 997; /* a suitable prime number */ for (i = 0; i < N_STRINGS; i++) @@ -29524,38 +33677,55 @@ main () if (tz_strings[i]) putenv (tz_strings[i]); - for (t = 0; t <= time_t_max - delta; t += delta) + for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta) if (! mktime_test (t)) - return 1; - if (! (mktime_test ((time_t) 1) - && mktime_test ((time_t) (60 * 60)) - && mktime_test ((time_t) (60 * 60 * 24)))) - return 1; + result |= 1; + if ((result & 2) == 0 + && ! (mktime_test ((time_t) 1) + && mktime_test ((time_t) (60 * 60)) + && mktime_test ((time_t) (60 * 60 * 24)))) + result |= 2; - for (j = 1; ; j <<= 1) - if (! bigtime_test (j)) - return 1; - else if (INT_MAX / 2 < j) - break; - if (! bigtime_test (INT_MAX)) - return 1; + for (j = 1; (result & 4) == 0; j <<= 1) + { + if (! bigtime_test (j)) + result |= 4; + if (INT_MAX / 2 < j) + break; + } + if ((result & 8) == 0 && ! bigtime_test (INT_MAX)) + result |= 8; } - return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ()); + if (! irix_6_4_bug ()) + result |= 16; + if (! spring_forward_gap ()) + result |= 32; + if (! year_2050_test ()) + result |= 64; + return result; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_working_mktime=yes + gl_cv_func_working_mktime=yes else - ac_cv_func_working_mktime=no + gl_cv_func_working_mktime=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5 -$as_echo "$ac_cv_func_working_mktime" >&6; } -if test $ac_cv_func_working_mktime = no; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5 +$as_echo "$gl_cv_func_working_mktime" >&6; } + + if test $gl_cv_func_working_mktime = no; then + REPLACE_MKTIME=1 + else + REPLACE_MKTIME=0 + fi + + if test $REPLACE_MKTIME = 1; then @@ -29566,21 +33736,16 @@ if test $ac_cv_func_working_mktime = no; then gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext" -fi - - if test $ac_cv_func_working_mktime = no; then - REPLACE_MKTIME=1 - - - - else - REPLACE_MKTIME=0 + : fi - GNULIB_MKTIME=1 + + GNULIB_MKTIME=1 + + @@ -29588,7 +33753,35 @@ $as_echo "#define GNULIB_TEST_MKTIME 1" >>confdefs.h - # Code from module mountlist: + + + if test $REPLACE_MKTIME = 0; then + ac_fn_c_check_func "$LINENO" "__mktime_internal" "ac_cv_func___mktime_internal" +if test "x$ac_cv_func___mktime_internal" = xyes; then : + +$as_echo "#define mktime_internal __mktime_internal" >>confdefs.h + + +else + REPLACE_MKTIME=1 + +fi + + fi + + if test $REPLACE_MKTIME = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext" + + : + fi for ac_func in listmntent getmntinfo @@ -29620,7 +33813,7 @@ for ac_header in sys/ucred.h do : ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "#include " -if test "x$ac_cv_header_sys_ucred_h" = x""yes; then : +if test "x$ac_cv_header_sys_ucred_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_UCRED_H 1 _ACEOF @@ -29637,7 +33830,7 @@ do : #include #endif " -if test "x$ac_cv_header_sys_mount_h" = x""yes; then : +if test "x$ac_cv_header_sys_mount_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_MOUNT_H 1 _ACEOF @@ -29678,7 +33871,7 @@ $ac_includes_default " ac_fn_c_check_member "$LINENO" "struct fsstat" "f_fstypename" "ac_cv_member_struct_fsstat_f_fstypename" "$getfsstat_includes " -if test "x$ac_cv_member_struct_fsstat_f_fstypename" = x""yes; then : +if test "x$ac_cv_member_struct_fsstat_f_fstypename" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_FSSTAT_F_FSTYPENAME 1 @@ -29697,7 +33890,7 @@ ac_list_mounted_fs= # -lseq on Dynix/PTX, -lgen on Unixware. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getmntent" >&5 $as_echo_n "checking for library containing getmntent... " >&6; } -if test "${ac_cv_search_getmntent+set}" = set; then : +if ${ac_cv_search_getmntent+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -29731,11 +33924,11 @@ for ac_lib in '' sun seq gen; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_getmntent+set}" = set; then : + if ${ac_cv_search_getmntent+:} false; then : break fi done -if test "${ac_cv_search_getmntent+set}" = set; then : +if ${ac_cv_search_getmntent+:} false; then : else ac_cv_search_getmntent=no @@ -29754,7 +33947,7 @@ fi for ac_func in getmntent do : ac_fn_c_check_func "$LINENO" "getmntent" "ac_cv_func_getmntent" -if test "x$ac_cv_func_getmntent" = x""yes; then : +if test "x$ac_cv_func_getmntent" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETMNTENT 1 _ACEOF @@ -29769,7 +33962,7 @@ done # with other getmntent implementations. # NOTE: Normally, I wouldn't use a check for system type as I've done for -# `CRAY' below since that goes against the whole autoconf philosophy. But +# 'CRAY' below since that goes against the whole autoconf philosophy. But # I think there is too great a chance that some non-Cray system has a # function named listmntent to risk the false positive. @@ -29777,7 +33970,7 @@ if test -z "$ac_list_mounted_fs"; then # Cray UNICOS 9 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for listmntent of Cray/Unicos-9" >&5 $as_echo_n "checking for listmntent of Cray/Unicos-9... " >&6; } - if test "${fu_cv_sys_mounted_cray_listmntent+set}" = set; then : + if ${fu_cv_sys_mounted_cray_listmntent+:} false; then : $as_echo_n "(cached) " >&6 else fu_cv_sys_mounted_cray_listmntent=no @@ -29814,7 +34007,7 @@ if test -z "$ac_list_mounted_fs"; then # AIX. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mntctl function and struct vmount" >&5 $as_echo_n "checking for mntctl function and struct vmount... " >&6; } - if test "${fu_cv_sys_mounted_vmount+set}" = set; then : + if ${fu_cv_sys_mounted_vmount+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -29848,7 +34041,7 @@ if test $ac_cv_func_getmntent = yes; then # 4.3BSD, SunOS, HP-UX, Dynix, Irix { $as_echo "$as_me:${as_lineno-$LINENO}: checking for one-argument getmntent function" >&5 $as_echo_n "checking for one-argument getmntent function... " >&6; } - if test "${fu_cv_sys_mounted_getmntent1+set}" = set; then : + if ${fu_cv_sys_mounted_getmntent1+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -29901,7 +34094,7 @@ $as_echo "#define MOUNTED_GETMNTENT1 1" >>confdefs.h # SVR4 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for two-argument getmntent function" >&5 $as_echo_n "checking for two-argument getmntent function... " >&6; } - if test "${fu_cv_sys_mounted_getmntent2+set}" = set; then : + if ${fu_cv_sys_mounted_getmntent2+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -29929,7 +34122,7 @@ $as_echo "#define MOUNTED_GETMNTENT2 1" >>confdefs.h for ac_func in hasmntopt do : ac_fn_c_check_func "$LINENO" "hasmntopt" "ac_cv_func_hasmntopt" -if test "x$ac_cv_func_hasmntopt" = x""yes; then : +if test "x$ac_cv_func_hasmntopt" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_HASMNTOPT 1 _ACEOF @@ -29948,7 +34141,7 @@ if test -z "$ac_list_mounted_fs"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getfsstat function" >&5 $as_echo_n "checking for getfsstat function... " >&6; } - if test "${fu_cv_sys_mounted_getfsstat+set}" = set; then : + if ${fu_cv_sys_mounted_getfsstat+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -29995,7 +34188,7 @@ if test -z "$ac_list_mounted_fs"; then # SVR3 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIXME existence of three headers" >&5 $as_echo_n "checking for FIXME existence of three headers... " >&6; } - if test "${fu_cv_sys_mounted_fread_fstyp+set}" = set; then : + if ${fu_cv_sys_mounted_fread_fstyp+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -30027,7 +34220,7 @@ if test -z "$ac_list_mounted_fs"; then # 4.4BSD and DEC OSF/1. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getmntinfo function" >&5 $as_echo_n "checking for getmntinfo function... " >&6; } - if test "${fu_cv_sys_mounted_getmntinfo+set}" = set; then : + if ${fu_cv_sys_mounted_getmntinfo+:} false; then : $as_echo_n "(cached) " >&6 else @@ -30042,7 +34235,7 @@ $as_echo "$fu_cv_sys_mounted_getmntinfo" >&6; } if test $fu_cv_sys_mounted_getmntinfo = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getmntinfo returns statvfs structures" >&5 $as_echo_n "checking whether getmntinfo returns statvfs structures... " >&6; } - if test "${fu_cv_sys_mounted_getmntinfo2+set}" = set; then : + if ${fu_cv_sys_mounted_getmntinfo2+:} false; then : $as_echo_n "(cached) " >&6 else @@ -30059,7 +34252,11 @@ else #if HAVE_SYS_STATVFS_H # include #endif -extern int getmntinfo (struct statfs **, int); +extern +#ifdef __cplusplus +"C" +#endif +int getmntinfo (struct statfs **, int); int main () @@ -30098,7 +34295,7 @@ if test -z "$ac_list_mounted_fs"; then # Ultrix { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getmnt function" >&5 $as_echo_n "checking for getmnt function... " >&6; } - if test "${fu_cv_sys_mounted_getmnt+set}" = set; then : + if ${fu_cv_sys_mounted_getmnt+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -30142,7 +34339,7 @@ done for ac_header in fs_info.h do : ac_fn_c_check_header_mongrel "$LINENO" "fs_info.h" "ac_cv_header_fs_info_h" "$ac_includes_default" -if test "x$ac_cv_header_fs_info_h" = x""yes; then : +if test "x$ac_cv_header_fs_info_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_FS_INFO_H 1 _ACEOF @@ -30174,7 +34371,7 @@ if test -z "$ac_list_mounted_fs"; then # SVR2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to resort to fread on /etc/mnttab" >&5 $as_echo_n "checking whether it is possible to resort to fread on /etc/mnttab... " >&6; } - if test "${fu_cv_sys_mounted_fread+set}" = set; then : + if ${fu_cv_sys_mounted_fread+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -30199,6 +34396,32 @@ $as_echo "#define MOUNTED_FREAD 1" >>confdefs.h fi fi +if test -z "$ac_list_mounted_fs"; then + # Interix / BSD alike statvfs + # the code is really interix specific, so make sure, we're on it. + case "$host" in + *-interix*) + for ac_func in statvfs +do : + ac_fn_c_check_func "$LINENO" "statvfs" "ac_cv_func_statvfs" +if test "x$ac_cv_func_statvfs" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STATVFS 1 +_ACEOF + +fi +done + + if test $ac_cv_func_statvfs = yes; then + ac_list_mounted_fs=found + +$as_echo "#define MOUNTED_INTERIX_STATVFS 1" >>confdefs.h + + fi + ;; + esac +fi + if test -z "$ac_list_mounted_fs"; then as_fn_error $? "could not determine how to read list of mounted file systems" "$LINENO" 5 # FIXME -- no need to abort building the whole package @@ -30212,6 +34435,7 @@ else fi + if test $gl_cv_list_mounted_fs = yes; then @@ -30227,7 +34451,7 @@ fi for ac_header in sys/mntent.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/mntent.h" "ac_cv_header_sys_mntent_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_mntent_h" = x""yes; then : +if test "x$ac_cv_header_sys_mntent_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_MNTENT_H 1 _ACEOF @@ -30243,7 +34467,7 @@ done #include " -if test "x$ac_cv_member_struct_statfs_f_fstypename" = x""yes; then : +if test "x$ac_cv_member_struct_statfs_f_fstypename" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STATFS_F_FSTYPENAME 1 @@ -30256,11 +34480,6 @@ fi fi - # Code from module multiarch: - - # Code from module netdb: - - : @@ -30268,6 +34487,48 @@ fi + if test $ac_cv_func__set_invalid_parameter_handler = yes; then + HAVE_MSVC_INVALID_PARAMETER_HANDLER=1 + +$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h + + else + HAVE_MSVC_INVALID_PARAMETER_HANDLER=0 + fi + + + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext" + + fi + + + + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext" + + fi + + + + + @@ -30280,35 +34541,53 @@ fi + if test $gl_cv_have_include_next = yes; then gl_cv_next_netdb_h='<'netdb.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_netdb_h+set}" = set; then : +if ${gl_cv_next_netdb_h+:} false; then : $as_echo_n "(cached) " >&6 else - if test $ac_cv_header_netdb_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test $ac_cv_header_netdb_h = yes; then + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_netdb_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/netdb.h#{ - s#.*"\(.*/netdb.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + + gl_header_literal_regex=`echo 'netdb.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + gl_cv_next_netdb_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' else - gl_cv_next_netdb_h='<'netdb.h'>' - fi + gl_cv_next_netdb_h='<'netdb.h'>' + fi + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netdb_h" >&5 @@ -30327,6 +34606,7 @@ $as_echo "$gl_cv_next_netdb_h" >&6; } + if test $ac_cv_header_netdb_h = yes; then HAVE_NETDB_H=1 else @@ -30339,7 +34619,7 @@ $as_echo "$gl_cv_next_netdb_h" >&6; } as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : +if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -30364,7 +34644,7 @@ fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF @@ -30374,11 +34654,10 @@ fi done - # Code from module netinet_in: { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether is self-contained" >&5 $as_echo_n "checking whether is self-contained... " >&6; } -if test "${gl_cv_header_netinet_in_h_selfcontained+set}" = set; then : +if ${gl_cv_header_netinet_in_h_selfcontained+:} false; then : $as_echo_n "(cached) " >&6 else @@ -30410,7 +34689,7 @@ $as_echo "$gl_cv_header_netinet_in_h_selfcontained" >&6; } for ac_header in netinet/in.h do : ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" -if test "x$ac_cv_header_netinet_in_h" = x""yes; then : +if test "x$ac_cv_header_netinet_in_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NETINET_IN_H 1 _ACEOF @@ -30423,6 +34702,8 @@ done + + : @@ -30431,35 +34712,53 @@ done + if test $gl_cv_have_include_next = yes; then gl_cv_next_netinet_in_h='<'netinet/in.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_netinet_in_h+set}" = set; then : +if ${gl_cv_next_netinet_in_h+:} false; then : $as_echo_n "(cached) " >&6 else - if test $ac_cv_header_netinet_in_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test $ac_cv_header_netinet_in_h = yes; then + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_netinet_in_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/netinet/in.h#{ - s#.*"\(.*/netinet/in.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + + gl_header_literal_regex=`echo 'netinet/in.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + gl_cv_next_netinet_in_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' else - gl_cv_next_netinet_in_h='<'netinet/in.h'>' - fi + gl_cv_next_netinet_in_h='<'netinet/in.h'>' + fi + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5 @@ -30478,6 +34777,7 @@ $as_echo "$gl_cv_next_netinet_in_h" >&6; } + if test $ac_cv_header_netinet_in_h = yes; then HAVE_NETINET_IN_H=1 else @@ -30486,9 +34786,16 @@ $as_echo "$gl_cv_next_netinet_in_h" >&6; } fi + if test -n "$NETINET_IN_H"; then + GL_GENERATE_NETINET_IN_H_TRUE= + GL_GENERATE_NETINET_IN_H_FALSE='#' +else + GL_GENERATE_NETINET_IN_H_TRUE='#' + GL_GENERATE_NETINET_IN_H_FALSE= +fi + - # Code from module nl_langinfo: @@ -30499,27 +34806,72 @@ $as_echo "$gl_cv_next_netinet_in_h" >&6; } - if test $ac_cv_func_nl_langinfo = yes; then - if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1; then + if test $ac_cv_func_nl_langinfo = yes; then + # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5 +$as_echo_n "checking whether YESEXPR works... " >&6; } +if ${gl_cv_func_nl_langinfo_yesexpr_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + + case "$host_os" in + # Guess no on irix systems. + irix*) gl_cv_func_nl_langinfo_yesexpr_works="guessing no";; + # Guess yes elsewhere. + *) gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +return !*nl_langinfo(YESEXPR); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_nl_langinfo_yesexpr_works=yes +else + gl_cv_func_nl_langinfo_yesexpr_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5 +$as_echo "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; } + case $gl_cv_func_nl_langinfo_yesexpr_works in + *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;; + *) FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;; + esac + +cat >>confdefs.h <<_ACEOF +#define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS +_ACEOF + + if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \ + && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then : else REPLACE_NL_LANGINFO=1 $as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext" - fi else HAVE_NL_LANGINFO=0 + fi + + if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then @@ -30535,7 +34887,10 @@ $as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h - GNULIB_NL_LANGINFO=1 + + GNULIB_NL_LANGINFO=1 + + @@ -30543,14 +34898,15 @@ $as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h - # Code from module open: - case "$host_os" in - mingw* | pw*) + + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + REPLACE_READ=1 + fi - REPLACE_OPEN=1 + if test $REPLACE_READ = 1; then @@ -30559,118 +34915,22 @@ $as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h - gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS read.$ac_objext" - - - - : - - - ;; - *) - - : + : + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5 -$as_echo_n "checking whether open recognizes a trailing slash... " >&6; } -if test "${gl_cv_func_open_slash+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # Assume that if we have lstat, we can also check symlinks. - if test $ac_cv_func_lstat = yes; then - touch conftest.tmp - ln -s conftest.tmp conftest.lnk - fi - if test "$cross_compiling" = yes; then : - - case "$host_os" in - freebsd*) gl_cv_func_open_slash="guessing no" ;; - solaris2.[0-9]*) gl_cv_func_open_slash="guessing no" ;; - hpux*) gl_cv_func_open_slash="guessing no" ;; - *) gl_cv_func_open_slash="guessing yes" ;; - esac - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#if HAVE_UNISTD_H -# include -#endif -int main () -{ -#if HAVE_LSTAT - if (open ("conftest.lnk/", O_RDONLY) != -1) return 2; -#endif - return open ("conftest.sl/", O_CREAT, 0600) >= 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_open_slash=yes -else - gl_cv_func_open_slash=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - rm -f conftest.sl conftest.tmp conftest.lnk - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5 -$as_echo "$gl_cv_func_open_slash" >&6; } - case "$gl_cv_func_open_slash" in - *no) - -$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h - - - - REPLACE_OPEN=1 + GNULIB_READ=1 - - - - gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext" - - - - - : - - - ;; - esac - ;; - esac - - - - - GNULIB_OPEN=1 - - - -$as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h - - - - # Code from module regex: - - - : - - +$as_echo "#define GNULIB_TEST_READ 1" >>confdefs.h @@ -30690,9 +34950,16 @@ fi # following run test, then default to *not* using the included regex.c. # If cross compiling, assume the test would fail and use the included # regex.c. + + : + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5 $as_echo_n "checking for working re_compile_pattern... " >&6; } -if test "${gl_cv_func_re_compile_pattern_working+set}" = set; then : +if ${gl_cv_func_re_compile_pattern_working+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -30700,30 +34967,39 @@ else else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default - #if HAVE_LOCALE_H +#include + #include - #endif - #include - #include + #include + #include + #if HAVE_DECL_ALARM + # include + # include + #endif int main () { -static struct re_pattern_buffer regex; +int result = 0; + static struct re_pattern_buffer regex; unsigned char folded_chars[UCHAR_MAX + 1]; int i; const char *s; struct re_registers regs; - #if HAVE_LOCALE_H - /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html - This test needs valgrind to catch the bug on Debian - GNU/Linux 3.1 x86, but it might catch the bug better - on other platforms and it shouldn't hurt to try the - test here. */ - if (setlocale (LC_ALL, "en_US.UTF-8")) +#if HAVE_DECL_ALARM + /* Some builds of glibc go into an infinite loop on this test. */ + signal (SIGALRM, SIG_DFL); + alarm (2); +#endif + if (setlocale (LC_ALL, "en_US.UTF-8")) + { { + /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html + This test needs valgrind to catch the bug on Debian + GNU/Linux 3.1 x86, but it might catch the bug better + on other platforms and it shouldn't hurt to try the + test here. */ static char const pat[] = "insert into"; static char const data[] = "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK"; @@ -30732,26 +35008,57 @@ static struct re_pattern_buffer regex; memset (®ex, 0, sizeof regex); s = re_compile_pattern (pat, sizeof pat - 1, ®ex); if (s) - return 1; - if (re_search (®ex, data, sizeof data - 1, - 0, sizeof data - 1, ®s) - != -1) - return 1; - if (! setlocale (LC_ALL, "C")) - return 1; + result |= 1; + else if (re_search (®ex, data, sizeof data - 1, + 0, sizeof data - 1, ®s) + != -1) + result |= 1; } - #endif + + { + /* This test is from glibc bug 15078. + The test case is from Andreas Schwab in + . + */ + static char const pat[] = "[^x]x"; + static char const data[] = + /* */ + "\xe1\x80\x80" + "\xe1\x80\xbb" + "\xe1\x80\xbd" + "\xe1\x80\x94" + "\xe1\x80\xba" + "\xe1\x80\xaf" + "\xe1\x80\x95" + "\xe1\x80\xba" + "x"; + re_set_syntax (0); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern (pat, sizeof pat - 1, ®ex); + if (s) + result |= 1; + else + { + i = re_search (®ex, data, sizeof data - 1, + 0, sizeof data - 1, 0); + if (i != 0 && i != 21) + result |= 1; + } + } + + if (! setlocale (LC_ALL, "C")) + return 1; + } /* This test is from glibc bug 3957, reported by Andrew Mackey. */ re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE); memset (®ex, 0, sizeof regex); s = re_compile_pattern ("a[^x]b", 6, ®ex); if (s) - return 1; - + result |= 2; /* This should fail, but succeeds for glibc-2.5. */ - if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1) - return 1; + else if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1) + result |= 2; /* This regular expression is from Spencer ere test number 75 in grep-2.3. */ @@ -30763,7 +35070,7 @@ static struct re_pattern_buffer regex; s = re_compile_pattern ("a[[:]:]]b\n", 11, ®ex); /* This should fail with _Invalid character class name_ error. */ if (!s) - return 1; + result |= 4; /* Ensure that [b-a] is diagnosed as invalid, when using RE_NO_EMPTY_RANGES. */ @@ -30771,34 +35078,31 @@ static struct re_pattern_buffer regex; memset (®ex, 0, sizeof regex); s = re_compile_pattern ("a[b-a]", 6, ®ex); if (s == 0) - return 1; + result |= 8; /* This should succeed, but does not for glibc-2.1.3. */ memset (®ex, 0, sizeof regex); s = re_compile_pattern ("{1", 2, ®ex); - if (s) - return 1; + result |= 8; /* The following example is derived from a problem report against gawk from Jorge Stolfi . */ memset (®ex, 0, sizeof regex); s = re_compile_pattern ("[an\371]*n", 7, ®ex); if (s) - return 1; - + result |= 8; /* This should match, but does not for glibc-2.2.1. */ - if (re_match (®ex, "an", 2, 0, ®s) != 2) - return 1; + else if (re_match (®ex, "an", 2, 0, ®s) != 2) + result |= 8; memset (®ex, 0, sizeof regex); s = re_compile_pattern ("x", 1, ®ex); if (s) - return 1; - + result |= 8; /* glibc-2.2.93 does not work with a negative RANGE argument. */ - if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1) - return 1; + else if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1) + result |= 8; /* The version of regex.c in older versions of gnulib ignored RE_ICASE. Detect that problem too. */ @@ -30806,10 +35110,9 @@ static struct re_pattern_buffer regex; memset (®ex, 0, sizeof regex); s = re_compile_pattern ("x", 1, ®ex); if (s) - return 1; - - if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0) - return 1; + result |= 16; + else if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0) + result |= 16; /* Catch a bug reported by Vin Shelton in http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html @@ -30820,21 +35123,27 @@ static struct re_pattern_buffer regex; memset (®ex, 0, sizeof regex); s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, ®ex); if (s) - return 1; + result |= 32; /* REG_STARTEND was added to glibc on 2004-01-15. Reject older versions. */ if (! REG_STARTEND) - return 1; + result |= 64; - /* Reject hosts whose regoff_t values are too narrow. - These include glibc 2.3.5 on hosts with 64-bit ptrdiff_t - and 32-bit int. */ +#if 0 + /* It would be nice to reject hosts whose regoff_t values are too + narrow (including glibc on hosts with 64-bit ptrdiff_t and + 32-bit int), but we should wait until glibc implements this + feature. Otherwise, support for equivalence classes and + multibyte collation symbols would always be broken except + when compiling --without-included-regex. */ if (sizeof (regoff_t) < sizeof (ptrdiff_t) || sizeof (regoff_t) < sizeof (ssize_t)) - return 1; + result |= 64; +#endif + + return result; - return 0; ; return 0; } @@ -30862,6 +35171,9 @@ $as_echo "$gl_cv_func_re_compile_pattern_working" >&6; } if test $ac_use_included_regex = yes; then +$as_echo "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h + + $as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h @@ -30909,6 +35221,9 @@ $as_echo "#define regerror rpl_regerror" >>confdefs.h $as_echo "#define regfree rpl_regfree" >>confdefs.h + fi + + if test $ac_use_included_regex = yes; then @@ -30924,10 +35239,12 @@ $as_echo "#define regfree rpl_regfree" >>confdefs.h + + for ac_header in libintl.h do : ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default" -if test "x$ac_cv_header_libintl_h" = x""yes; then : +if test "x$ac_cv_header_libintl_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBINTL_H 1 _ACEOF @@ -30951,7 +35268,7 @@ done ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include " -if test "x$ac_cv_have_decl_isblank" = x""yes; then : +if test "x$ac_cv_have_decl_isblank" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -30964,49 +35281,14 @@ _ACEOF fi - # Code from module safe-read: - - - - - - - gl_LIBOBJS="$gl_LIBOBJS safe-read.$ac_objext" - - - - - - - # Code from module safe-write: - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS safe-write.$ac_objext" - - - - - - - - - # Code from module servent: - SERVENT_LIB= gl_saved_libs="$LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getservbyname" >&5 $as_echo_n "checking for library containing getservbyname... " >&6; } -if test "${ac_cv_search_getservbyname+set}" = set; then : +if ${ac_cv_search_getservbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -31040,11 +35322,11 @@ for ac_lib in '' socket network net; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_getservbyname+set}" = set; then : + if ${ac_cv_search_getservbyname+:} false; then : break fi done -if test "${ac_cv_search_getservbyname+set}" = set; then : +if ${ac_cv_search_getservbyname+:} false; then : else ac_cv_search_getservbyname=no @@ -31067,7 +35349,7 @@ fi for ac_func in getservbyname do : ac_fn_c_check_func "$LINENO" "getservbyname" "ac_cv_func_getservbyname" -if test "x$ac_cv_func_getservbyname" = x""yes; then : +if test "x$ac_cv_func_getservbyname" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETSERVBYNAME 1 _ACEOF @@ -31076,7 +35358,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getservbyname in winsock2.h and -lws2_32" >&5 $as_echo_n "checking for getservbyname in winsock2.h and -lws2_32... " >&6; } -if test "${gl_cv_w32_getservbyname+set}" = set; then : +if ${gl_cv_w32_getservbyname+:} false; then : $as_echo_n "(cached) " >&6 else gl_cv_w32_getservbyname=no @@ -31118,10 +35400,76 @@ done fi - # Code from module setenv: - if test $HAVE_SETENV$REPLACE_SETENV != 10; then + if test $ac_cv_func_setenv = no; then + HAVE_SETENV=0 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5 +$as_echo_n "checking whether setenv validates arguments... " >&6; } +if ${gl_cv_func_setenv_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_setenv_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_setenv_works="guessing no" ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #include + #include + +int +main () +{ + + int result = 0; + { + if (setenv ("", "", 0) != -1) + result |= 1; + else if (errno != EINVAL) + result |= 2; + } + { + if (setenv ("a", "=", 1) != 0) + result |= 4; + else if (strcmp (getenv ("a"), "=") != 0) + result |= 8; + } + return result; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_setenv_works=yes +else + gl_cv_func_setenv_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5 +$as_echo "$gl_cv_func_setenv_works" >&6; } + case "$gl_cv_func_setenv_works" in + *yes) ;; + *) + REPLACE_SETENV=1 + ;; + esac + fi + + if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then @@ -31137,7 +35485,10 @@ done - GNULIB_SETENV=1 + + GNULIB_SETENV=1 + + @@ -31145,12 +35496,11 @@ $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h - # Code from module size_max: for ac_header in stdint.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" -if test "x$ac_cv_header_stdint_h" = x""yes; then : +if test "x$ac_cv_header_stdint_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDINT_H 1 _ACEOF @@ -31161,7 +35511,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5 $as_echo_n "checking for SIZE_MAX... " >&6; } -if test "${gl_cv_size_max+set}" = set; then : +if ${gl_cv_size_max+:} false; then : $as_echo_n "(cached) " >&6 else @@ -31203,8 +35553,8 @@ fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - extern size_t foo; - extern unsigned long foo; + extern size_t foo; + extern unsigned long foo; int main () @@ -31241,14 +35591,13 @@ _ACEOF fi - # Code from module snprintf: gl_cv_func_snprintf_usable=no for ac_func in snprintf do : ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" -if test "x$ac_cv_func_snprintf" = x""yes; then : +if test "x$ac_cv_func_snprintf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SNPRINTF 1 _ACEOF @@ -31259,9 +35608,10 @@ done if test $ac_cv_func_snprintf = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; } -if test "${gl_cv_func_snprintf_size1+set}" = set; then : +if ${gl_cv_func_snprintf_size1+:} false; then : $as_echo_n "(cached) " >&6 else @@ -31272,10 +35622,24 @@ else /* end confdefs.h. */ #include +#if HAVE_SNPRINTF +# define my_snprintf snprintf +#else +# include +static int my_snprintf (char *buf, int size, const char *format, ...) +{ + va_list args; + int ret; + va_start (args, format); + ret = vsnprintf (buf, size, format, args); + va_end (args); + return ret; +} +#endif int main() { static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; - snprintf (buf, 1, "%d", 12345); + my_snprintf (buf, 1, "%d", 12345); return buf[1] != 'E'; } _ACEOF @@ -31295,7 +35659,64 @@ $as_echo "$gl_cv_func_snprintf_size1" >&6; } case "$gl_cv_func_snprintf_size1" in *yes) - gl_cv_func_snprintf_usable=yes + + case "$gl_cv_func_snprintf_retval_c99" in + *yes) + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5 +$as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; } +if ${gl_cv_func_printf_positions+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test "$cross_compiling" = yes; then : + + case "$host_os" in + netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*) + gl_cv_func_printf_positions="guessing no";; + beos*) gl_cv_func_printf_positions="guessing no";; + mingw* | pw*) gl_cv_func_printf_positions="guessing no";; + *) gl_cv_func_printf_positions="guessing yes";; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +/* The string "%2$d %1$d", with dollar characters protected from the shell's + dollar expansion (possibly an autoconf bug). */ +static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; +static char buf[100]; +int main () +{ + sprintf (buf, format, 33, 55); + return (strcmp (buf, "55 33") != 0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_printf_positions=yes +else + gl_cv_func_printf_positions=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5 +$as_echo "$gl_cv_func_printf_positions" >&6; } + + case "$gl_cv_func_printf_positions" in + *yes) + gl_cv_func_snprintf_usable=yes + ;; + esac + ;; + esac ;; esac fi @@ -31332,7 +35753,11 @@ $as_echo "$gl_cv_func_snprintf_size1" >&6; } - GNULIB_SNPRINTF=1 + + + GNULIB_SNPRINTF=1 + + @@ -31340,7 +35765,11 @@ $as_echo "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h - # Code from module sockets: + + +cat >>confdefs.h <<_ACEOF +#define GNULIB_SNPRINTF 1 +_ACEOF @@ -31358,7 +35787,7 @@ $as_echo "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h for ac_header in winsock2.h do : ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" -if test "x$ac_cv_header_winsock2_h" = x""yes; then : +if test "x$ac_cv_header_winsock2_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_WINSOCK2_H 1 _ACEOF @@ -31380,7 +35809,7 @@ done if test $HAVE_WINSOCK2_H = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to call WSAStartup in winsock2.h and -lws2_32" >&5 $as_echo_n "checking if we need to call WSAStartup in winsock2.h and -lws2_32... " >&6; } -if test "${gl_cv_func_wsastartup+set}" = set; then : +if ${gl_cv_func_wsastartup+:} false; then : $as_echo_n "(cached) " >&6 else @@ -31425,7 +35854,7 @@ $as_echo "#define WINDOWS_SOCKETS 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5 $as_echo_n "checking for library containing setsockopt... " >&6; } -if test "${gl_cv_lib_socket+set}" = set; then : +if ${gl_cv_lib_socket+:} false; then : $as_echo_n "(cached) " >&6 else @@ -31534,23 +35963,31 @@ $as_echo "$gl_cv_lib_socket" >&6; } fi + + + + : - # Code from module socklen: - ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include - #if HAVE_SYS_SOCKET_H - # include - #elif HAVE_WS2TCPIP_H - # include - #endif + ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " +/* is not needed according to POSIX, but the + in i386-unknown-freebsd4.10 and + powerpc-apple-darwin5.5 required it. */ +#include +#if HAVE_SYS_SOCKET_H +# include +#elif HAVE_WS2TCPIP_H +# include +#endif + " -if test "x$ac_cv_type_socklen_t" = x""yes; then : +if test "x$ac_cv_type_socklen_t" = xyes; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5 $as_echo_n "checking for socklen_t equivalent... " >&6; } - if test "${gl_cv_socklen_t_equiv+set}" = set; then : + if ${gl_cv_socklen_t_equiv+:} false; then : $as_echo_n "(cached) " >&6 else # Systems have either "struct sockaddr *" or @@ -31596,11 +36033,10 @@ _ACEOF fi - # Code from module ssize_t: { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5 $as_echo_n "checking for ssize_t... " >&6; } -if test "${gt_cv_ssize_t+set}" = set; then : +if ${gt_cv_ssize_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -31610,7 +36046,7 @@ int main () { int x = sizeof (ssize_t *) + sizeof (ssize_t); - return !x; + return !x; ; return 0; } @@ -31630,133 +36066,74 @@ $as_echo "#define ssize_t int" >>confdefs.h fi - # Code from module stat: - - - - : - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5 -$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; } -if test "${gl_cv_func_stat_dir_slash+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5 +$as_echo_n "checking for working stdalign.h... " >&6; } +if ${gl_cv_header_working_stdalign_h+:} false; then : $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - case $host_os in - mingw*) gl_cv_func_stat_dir_slash="guessing no";; - *) gl_cv_func_stat_dir_slash="guessing yes";; - esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include + #include + + /* Test that alignof yields a result consistent with offsetof. + This catches GCC bug 52023 + . */ + #ifdef __cplusplus + template struct alignof_helper { char a; t b; }; + # define ao(type) offsetof (alignof_helper, b) + #else + # define ao(type) offsetof (struct { char a; type b; }, b) + #endif + char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1]; + char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1]; + char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1]; + + /* Test _Alignas only on platforms where gnulib can help. */ + #if \ + ((defined __cplusplus && 201103 <= __cplusplus) \ + || __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC \ + || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER) + struct alignas_test { char c; char alignas (8) alignas_8; }; + char test_alignas[offsetof (struct alignas_test, alignas_8) == 8 + ? 1 : -1]; + #endif int main () { -struct stat st; return stat (".", &st) != stat ("./", &st); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_stat_dir_slash=yes -else - gl_cv_func_stat_dir_slash=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5 -$as_echo "$gl_cv_func_stat_dir_slash" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5 -$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; } -if test "${gl_cv_func_stat_file_slash+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - touch conftest.tmp - # Assume that if we have lstat, we can also check symlinks. - if test $ac_cv_func_lstat = yes; then - ln -s conftest.tmp conftest.lnk - fi - if test "$cross_compiling" = yes; then : - gl_cv_func_stat_file_slash="guessing no" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -struct stat st; - if (!stat ("conftest.tmp/", &st)) return 1; -#if HAVE_LSTAT - if (!stat ("conftest.lnk/", &st)) return 2; -#endif ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_stat_file_slash=yes +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_header_working_stdalign_h=yes else - gl_cv_func_stat_file_slash=no + gl_cv_header_working_stdalign_h=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5 +$as_echo "$gl_cv_header_working_stdalign_h" >&6; } - rm -f conftest.tmp conftest.lnk -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5 -$as_echo "$gl_cv_func_stat_file_slash" >&6; } - case $gl_cv_func_stat_dir_slash in - *no) REPLACE_STAT=1 - -$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h -;; - esac - case $gl_cv_func_stat_file_slash in - *no) REPLACE_STAT=1 - -$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h -;; - esac - if test $REPLACE_STAT = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext" - - + if test $gl_cv_header_working_stdalign_h = yes; then + STDALIGN_H='' + else + STDALIGN_H='stdalign.h' fi + if test -n "$STDALIGN_H"; then + GL_GENERATE_STDALIGN_H_TRUE= + GL_GENERATE_STDALIGN_H_FALSE='#' +else + GL_GENERATE_STDALIGN_H_TRUE='#' + GL_GENERATE_STDALIGN_H_FALSE= +fi - GNULIB_STAT=1 - - - -$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h - - - - # Code from module stdbool: @@ -31768,6 +36145,14 @@ $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h STDBOOL_H='stdbool.h' fi + if test -n "$STDBOOL_H"; then + GL_GENERATE_STDBOOL_H_TRUE= + GL_GENERATE_STDBOOL_H_FALSE='#' +else + GL_GENERATE_STDBOOL_H_TRUE='#' + GL_GENERATE_STDBOOL_H_FALSE= +fi + if test "$ac_cv_type__Bool" = yes; then HAVE__BOOL=1 @@ -31776,17 +36161,17 @@ $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h fi - # Code from module stddef: + STDDEF_H= if test $gt_cv_c_wchar_t = no; then HAVE_WCHAR_T=0 STDDEF_H=stddef.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } -if test "${gl_cv_decl_null_works+set}" = set; then : +if ${gl_cv_decl_null_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -31815,15 +36200,20 @@ $as_echo "$gl_cv_decl_null_works" >&6; } REPLACE_NULL=1 STDDEF_H=stddef.h fi + + if test -n "$STDDEF_H"; then + GL_GENERATE_STDDEF_H_TRUE= + GL_GENERATE_STDDEF_H_FALSE='#' +else + GL_GENERATE_STDDEF_H_TRUE='#' + GL_GENERATE_STDDEF_H_FALSE= +fi + if test -n "$STDDEF_H"; then - : - - - @@ -31833,30 +36223,41 @@ $as_echo "$gl_cv_decl_null_works" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_stddef_h+set}" = set; then : +if ${gl_cv_next_stddef_h+:} false; then : $as_echo_n "(cached) " >&6 else - if test $ac_cv_header_stddef_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/stddef.h#{ - s#.*"\(.*/stddef.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_stddef_h='<'stddef.h'>' - fi + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + + gl_header_literal_regex=`echo 'stddef.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 @@ -31875,37 +36276,7 @@ $as_echo "$gl_cv_next_stddef_h" >&6; } - fi - # Code from module stdint: - - - - if test $ac_cv_type_long_long_int = yes; then - HAVE_LONG_LONG_INT=1 - else - HAVE_LONG_LONG_INT=0 - fi - - - if test $ac_cv_type_unsigned_long_long_int = yes; then - HAVE_UNSIGNED_LONG_LONG_INT=1 - else - HAVE_UNSIGNED_LONG_LONG_INT=0 - fi - - - if test $ac_cv_header_inttypes_h = yes; then - HAVE_INTTYPES_H=1 - else - HAVE_INTTYPES_H=0 - fi - - - if test $ac_cv_header_sys_types_h = yes; then - HAVE_SYS_TYPES_H=1 - else - HAVE_SYS_TYPES_H=0 fi @@ -31913,682 +36284,6 @@ $as_echo "$gl_cv_next_stddef_h" >&6; } - : - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_stdint_h='<'stdint.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_stdint_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - if test $ac_cv_header_stdint_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/stdint.h#{ - s#.*"\(.*/stdint.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_stdint_h='<'stdint.h'>' - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5 -$as_echo "$gl_cv_next_stdint_h" >&6; } - fi - NEXT_STDINT_H=$gl_cv_next_stdint_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'stdint.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_stdint_h - fi - NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive - - - - if test $ac_cv_header_stdint_h = yes; then - HAVE_STDINT_H=1 - else - HAVE_STDINT_H=0 - fi - - - if test $ac_cv_header_stdint_h = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5 -$as_echo_n "checking whether stdint.h conforms to C99... " >&6; } -if test "${gl_cv_header_working_stdint_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - gl_cv_header_working_stdint_h=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ -#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ -#include -/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ -#if !(defined WCHAR_MIN && defined WCHAR_MAX) -#error "WCHAR_MIN, WCHAR_MAX not defined in " -#endif - - - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif - - -#ifdef INT8_MAX -int8_t a1 = INT8_MAX; -int8_t a1min = INT8_MIN; -#endif -#ifdef INT16_MAX -int16_t a2 = INT16_MAX; -int16_t a2min = INT16_MIN; -#endif -#ifdef INT32_MAX -int32_t a3 = INT32_MAX; -int32_t a3min = INT32_MIN; -#endif -#ifdef INT64_MAX -int64_t a4 = INT64_MAX; -int64_t a4min = INT64_MIN; -#endif -#ifdef UINT8_MAX -uint8_t b1 = UINT8_MAX; -#else -typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; -#endif -#ifdef UINT16_MAX -uint16_t b2 = UINT16_MAX; -#endif -#ifdef UINT32_MAX -uint32_t b3 = UINT32_MAX; -#endif -#ifdef UINT64_MAX -uint64_t b4 = UINT64_MAX; -#endif -int_least8_t c1 = INT8_C (0x7f); -int_least8_t c1max = INT_LEAST8_MAX; -int_least8_t c1min = INT_LEAST8_MIN; -int_least16_t c2 = INT16_C (0x7fff); -int_least16_t c2max = INT_LEAST16_MAX; -int_least16_t c2min = INT_LEAST16_MIN; -int_least32_t c3 = INT32_C (0x7fffffff); -int_least32_t c3max = INT_LEAST32_MAX; -int_least32_t c3min = INT_LEAST32_MIN; -int_least64_t c4 = INT64_C (0x7fffffffffffffff); -int_least64_t c4max = INT_LEAST64_MAX; -int_least64_t c4min = INT_LEAST64_MIN; -uint_least8_t d1 = UINT8_C (0xff); -uint_least8_t d1max = UINT_LEAST8_MAX; -uint_least16_t d2 = UINT16_C (0xffff); -uint_least16_t d2max = UINT_LEAST16_MAX; -uint_least32_t d3 = UINT32_C (0xffffffff); -uint_least32_t d3max = UINT_LEAST32_MAX; -uint_least64_t d4 = UINT64_C (0xffffffffffffffff); -uint_least64_t d4max = UINT_LEAST64_MAX; -int_fast8_t e1 = INT_FAST8_MAX; -int_fast8_t e1min = INT_FAST8_MIN; -int_fast16_t e2 = INT_FAST16_MAX; -int_fast16_t e2min = INT_FAST16_MIN; -int_fast32_t e3 = INT_FAST32_MAX; -int_fast32_t e3min = INT_FAST32_MIN; -int_fast64_t e4 = INT_FAST64_MAX; -int_fast64_t e4min = INT_FAST64_MIN; -uint_fast8_t f1 = UINT_FAST8_MAX; -uint_fast16_t f2 = UINT_FAST16_MAX; -uint_fast32_t f3 = UINT_FAST32_MAX; -uint_fast64_t f4 = UINT_FAST64_MAX; -#ifdef INTPTR_MAX -intptr_t g = INTPTR_MAX; -intptr_t gmin = INTPTR_MIN; -#endif -#ifdef UINTPTR_MAX -uintptr_t h = UINTPTR_MAX; -#endif -intmax_t i = INTMAX_MAX; -uintmax_t j = UINTMAX_MAX; - -#include /* for CHAR_BIT */ -#define TYPE_MINIMUM(t) \ - ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))) -#define TYPE_MAXIMUM(t) \ - ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) -struct s { - int check_PTRDIFF: - PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) - && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) - ? 1 : -1; - /* Detect bug in FreeBSD 6.0 / ia64. */ - int check_SIG_ATOMIC: - SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) - && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) - ? 1 : -1; - int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; - int check_WCHAR: - WCHAR_MIN == TYPE_MINIMUM (wchar_t) - && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) - ? 1 : -1; - /* Detect bug in mingw. */ - int check_WINT: - WINT_MIN == TYPE_MINIMUM (wint_t) - && WINT_MAX == TYPE_MAXIMUM (wint_t) - ? 1 : -1; - - /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ - int check_UINT8_C: - (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; - int check_UINT16_C: - (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; - - /* Detect bugs in OpenBSD 3.9 stdint.h. */ -#ifdef UINT8_MAX - int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; -#endif -#ifdef UINT16_MAX - int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; -#endif -#ifdef UINT32_MAX - int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; -#endif -#ifdef UINT64_MAX - int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; -#endif - int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; - int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; - int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; - int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; - int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; - int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; - int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; - int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; - int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; - int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; - int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; -}; - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - if test "$cross_compiling" = yes; then : - gl_cv_header_working_stdint_h=yes - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ -#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ -#include - - - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif - - -#include -#include -#define MVAL(macro) MVAL1(macro) -#define MVAL1(expression) #expression -static const char *macro_values[] = - { -#ifdef INT8_MAX - MVAL (INT8_MAX), -#endif -#ifdef INT16_MAX - MVAL (INT16_MAX), -#endif -#ifdef INT32_MAX - MVAL (INT32_MAX), -#endif -#ifdef INT64_MAX - MVAL (INT64_MAX), -#endif -#ifdef UINT8_MAX - MVAL (UINT8_MAX), -#endif -#ifdef UINT16_MAX - MVAL (UINT16_MAX), -#endif -#ifdef UINT32_MAX - MVAL (UINT32_MAX), -#endif -#ifdef UINT64_MAX - MVAL (UINT64_MAX), -#endif - NULL - }; - -int -main () -{ - - const char **mv; - for (mv = macro_values; *mv != NULL; mv++) - { - const char *value = *mv; - /* Test whether it looks like a cast expression. */ - if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 - || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 - || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 - || strncmp (value, "((int)"/*)*/, 6) == 0 - || strncmp (value, "((signed short)"/*)*/, 15) == 0 - || strncmp (value, "((signed char)"/*)*/, 14) == 0) - return 1; - } - return 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_header_working_stdint_h=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5 -$as_echo "$gl_cv_header_working_stdint_h" >&6; } - fi - if test "$gl_cv_header_working_stdint_h" = yes; then - STDINT_H= - else - for ac_header in sys/inttypes.h sys/bitypes.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - if test $ac_cv_header_sys_inttypes_h = yes; then - HAVE_SYS_INTTYPES_H=1 - else - HAVE_SYS_INTTYPES_H=0 - fi - - if test $ac_cv_header_sys_bitypes_h = yes; then - HAVE_SYS_BITYPES_H=1 - else - HAVE_SYS_BITYPES_H=0 - fi - - - - : - - - - - - - - - if test $APPLE_UNIVERSAL_BUILD = 0; then - - - for gltype in ptrdiff_t size_t ; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 -$as_echo_n "checking for bit size of $gltype... " >&6; } -if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif - -#include "; then : - -else - result=unknown -fi - - eval gl_cv_bitsizeof_${gltype}=\$result - -fi -eval ac_res=\$gl_cv_bitsizeof_${gltype} - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval result=\$gl_cv_bitsizeof_${gltype} - if test $result = unknown; then - result=0 - fi - GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - cat >>confdefs.h <<_ACEOF -#define BITSIZEOF_${GLTYPE} $result -_ACEOF - - eval BITSIZEOF_${GLTYPE}=\$result - done - - - fi - - - for gltype in sig_atomic_t wchar_t wint_t ; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 -$as_echo_n "checking for bit size of $gltype... " >&6; } -if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif - -#include "; then : - -else - result=unknown -fi - - eval gl_cv_bitsizeof_${gltype}=\$result - -fi -eval ac_res=\$gl_cv_bitsizeof_${gltype} - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval result=\$gl_cv_bitsizeof_${gltype} - if test $result = unknown; then - result=0 - fi - GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - cat >>confdefs.h <<_ACEOF -#define BITSIZEOF_${GLTYPE} $result -_ACEOF - - eval BITSIZEOF_${GLTYPE}=\$result - done - - - - - for gltype in sig_atomic_t wchar_t wint_t ; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 -$as_echo_n "checking whether $gltype is signed... " >&6; } -if eval "test \"\${gl_cv_type_${gltype}_signed+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif - - int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - result=yes -else - result=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - eval gl_cv_type_${gltype}_signed=\$result - -fi -eval ac_res=\$gl_cv_type_${gltype}_signed - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval result=\$gl_cv_type_${gltype}_signed - GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - if test "$result" = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_SIGNED_${GLTYPE} 1 -_ACEOF - - eval HAVE_SIGNED_${GLTYPE}=1 - else - eval HAVE_SIGNED_${GLTYPE}=0 - fi - done - - - gl_cv_type_ptrdiff_t_signed=yes - gl_cv_type_size_t_signed=no - if test $APPLE_UNIVERSAL_BUILD = 0; then - - - for gltype in ptrdiff_t size_t ; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 -$as_echo_n "checking for $gltype integer literal suffix... " >&6; } -if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - eval gl_cv_type_${gltype}_suffix=no - eval result=\$gl_cv_type_${gltype}_signed - if test "$result" = yes; then - glsufu= - else - glsufu=u - fi - for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do - case $glsuf in - '') gltype1='int';; - l) gltype1='long int';; - ll) gltype1='long long int';; - i64) gltype1='__int64';; - u) gltype1='unsigned int';; - ul) gltype1='unsigned long int';; - ull) gltype1='unsigned long long int';; - ui64)gltype1='unsigned __int64';; - esac - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif - - extern $gltype foo; - extern $gltype1 foo; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval gl_cv_type_${gltype}_suffix=\$glsuf -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" != no && break - done -fi -eval ac_res=\$gl_cv_type_${gltype}_suffix - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" = no && result= - eval ${GLTYPE}_SUFFIX=\$result - cat >>confdefs.h <<_ACEOF -#define ${GLTYPE}_SUFFIX $result -_ACEOF - - done - - - fi - - - for gltype in sig_atomic_t wchar_t wint_t ; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 -$as_echo_n "checking for $gltype integer literal suffix... " >&6; } -if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - eval gl_cv_type_${gltype}_suffix=no - eval result=\$gl_cv_type_${gltype}_signed - if test "$result" = yes; then - glsufu= - else - glsufu=u - fi - for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do - case $glsuf in - '') gltype1='int';; - l) gltype1='long int';; - ll) gltype1='long long int';; - i64) gltype1='__int64';; - u) gltype1='unsigned int';; - ul) gltype1='unsigned long int';; - ull) gltype1='unsigned long long int';; - ui64)gltype1='unsigned __int64';; - esac - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif - - extern $gltype foo; - extern $gltype1 foo; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval gl_cv_type_${gltype}_suffix=\$glsuf -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" != no && break - done -fi -eval ac_res=\$gl_cv_type_${gltype}_suffix - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" = no && result= - eval ${GLTYPE}_SUFFIX=\$result - cat >>confdefs.h <<_ACEOF -#define ${GLTYPE}_SUFFIX $result -_ACEOF - - done - - - - STDINT_H=stdint.h - fi - - - # Code from module stdio: - - - - - - - - - : - @@ -32600,30 +36295,41 @@ _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_stdio_h+set}" = set; then : +if ${gl_cv_next_stdio_h+:} false; then : $as_echo_n "(cached) " >&6 else - if test $ac_cv_header_stdio_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/stdio.h#{ - s#.*"\(.*/stdio.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_stdio_h='<'stdio.h'>' - fi + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + + gl_header_literal_regex=`echo 'stdio.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5 @@ -32642,6 +36348,31 @@ $as_echo "$gl_cv_next_stdio_h" >&6; } + + + GNULIB_FSCANF=1 + + +cat >>confdefs.h <<_ACEOF +#define GNULIB_FSCANF 1 +_ACEOF + + + GNULIB_SCANF=1 + + +cat >>confdefs.h <<_ACEOF +#define GNULIB_SCANF 1 +_ACEOF + + + GNULIB_FGETC=1 + GNULIB_GETC=1 + GNULIB_GETCHAR=1 + GNULIB_FGETS=1 + GNULIB_FREAD=1 + + GNULIB_FPRINTF=1 GNULIB_PRINTF=1 GNULIB_VFPRINTF=1 @@ -32655,11 +36386,12 @@ $as_echo "$gl_cv_next_stdio_h" >&6; } - for gl_func in dprintf fpurge fseeko ftello getdelim getline popen renameat snprintf tmpfile vdprintf vsnprintf; do + + for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : +if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -32685,7 +36417,7 @@ fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF @@ -32695,17 +36427,12 @@ fi done - # Code from module stdlib: - : - - - @@ -32715,30 +36442,41 @@ fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_stdlib_h+set}" = set; then : +if ${gl_cv_next_stdlib_h+:} false; then : $as_echo_n "(cached) " >&6 else - if test $ac_cv_header_stdlib_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/stdlib.h#{ - s#.*"\(.*/stdlib.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_stdlib_h='<'stdlib.h'>' - fi + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + + gl_header_literal_regex=`echo 'stdlib.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5 @@ -32757,49 +36495,14 @@ $as_echo "$gl_cv_next_stdlib_h" >&6; } - for ac_header in random.h -do : - ac_fn_c_check_header_compile "$LINENO" "random.h" "ac_cv_header_random_h" "$ac_includes_default -" -if test "x$ac_cv_header_random_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_RANDOM_H 1 -_ACEOF - -fi - -done - - if test $ac_cv_header_random_h = yes; then - HAVE_RANDOM_H=1 - else - HAVE_RANDOM_H=0 - fi - - ac_fn_c_check_type "$LINENO" "struct random_data" "ac_cv_type_struct_random_data" "#include - #if HAVE_RANDOM_H - # include - #endif - -" -if test "x$ac_cv_type_struct_random_data" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_RANDOM_DATA 1 -_ACEOF - - -else - HAVE_STRUCT_RANDOM_DATA=0 -fi - for gl_func in atoll canonicalize_file_name getloadavg getsubopt grantpt mkdtemp mkostemp mkostemps mkstemp mkstemps ptsname random_r initstat_r srandom_r setstate_r realpath rpmatch setenv strtod strtoll strtoull unlockpt unsetenv; do + for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt ptsname ptsname_r random random_r realpath rpmatch secure_getenv setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : +if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -32831,7 +36534,7 @@ fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF @@ -32841,71 +36544,62 @@ fi done - # Code from module strdup-posix: - - - - - : - if test $ac_cv_func_strdup = yes; then - if test $gl_cv_func_malloc_posix != yes; then - REPLACE_STRDUP=1 + if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5 +$as_echo_n "checking for working strerror function... " >&6; } +if ${gl_cv_func_working_strerror+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_working_strerror="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_working_strerror="guessing no" ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +if (!*strerror (-2)) return 1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_working_strerror=yes +else + gl_cv_func_working_strerror=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5 +$as_echo "$gl_cv_func_working_strerror" >&6; } + case "$gl_cv_func_working_strerror" in + *yes) ;; + *) + REPLACE_STRERROR=1 + ;; + esac - - - - - - gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext" - - : - fi else - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext" - - : + REPLACE_STRERROR=1 fi - : - - - - - - if test $ac_cv_have_decl_strdup = no; then - HAVE_DECL_STRDUP=0 - fi - - - - - GNULIB_STRDUP=1 - - - -$as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h - - - - # Code from module streq: - # Code from module strerror: - - if test $REPLACE_STRERROR = 1; then @@ -32917,17 +36611,22 @@ $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext" - -cat >>confdefs.h <<_ACEOF -#define REPLACE_STRERROR $REPLACE_STRERROR -_ACEOF - fi +cat >>confdefs.h <<_ACEOF +#define GNULIB_STRERROR 1 +_ACEOF + + + + + + + + GNULIB_STRERROR=1 - GNULIB_STRERROR=1 @@ -32935,11 +36634,56 @@ $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h - # Code from module string: + + + if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext" + + + + + + : + + + + + + if test $ac_cv_header_sys_socket_h != yes; then + for ac_header in winsock2.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" +if test "x$ac_cv_header_winsock2_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WINSOCK2_H 1 +_ACEOF + +fi + +done + + fi + if test "$ac_cv_header_winsock2_h" = yes; then + HAVE_WINSOCK2_H=1 + UNISTD_H_HAVE_WINSOCK2_H=1 + SYS_IOCTL_H_HAVE_WINSOCK2_H=1 + else + HAVE_WINSOCK2_H=0 + fi + + + fi - # Code from module strndup: @@ -32963,17 +36707,20 @@ $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h fi if test $ac_cv_func_strndup = yes; then + HAVE_STRNDUP=1 # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5 $as_echo_n "checking for working strndup... " >&6; } -if test "${gl_cv_func_strndup_works+set}" = set; then : +if ${gl_cv_func_strndup_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : - case $host_os in - aix*) gl_cv_func_strndup_works="guessing no";; - *) gl_cv_func_strndup_works="guessing yes";; + + case $host_os in + aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";; + *) gl_cv_func_strndup_works="guessing yes";; esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -32984,8 +36731,12 @@ int main () { -#ifndef HAVE_DECL_STRNDUP - extern char *strndup (const char *, size_t); +#if !HAVE_DECL_STRNDUP + extern + #ifdef __cplusplus + "C" + #endif + char *strndup (const char *, size_t); #endif char *s; s = strndup ("some longer string", 15); @@ -33009,21 +36760,13 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5 $as_echo "$gl_cv_func_strndup_works" >&6; } case $gl_cv_func_strndup_works in - *no) - REPLACE_STRNDUP=1 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext" - - ;; + *no) REPLACE_STRNDUP=1 ;; esac else + HAVE_STRNDUP=0 + fi + + if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then @@ -33039,7 +36782,10 @@ $as_echo "$gl_cv_func_strndup_works" >&6; } - GNULIB_STRNDUP=1 + + GNULIB_STRNDUP=1 + + @@ -33047,7 +36793,6 @@ $as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h - # Code from module strnlen: @@ -33063,13 +36808,18 @@ $as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h if test $ac_cv_have_decl_strnlen = no; then HAVE_DECL_STRNLEN=0 else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5 $as_echo_n "checking for working strnlen... " >&6; } -if test "${ac_cv_func_strnlen_working+set}" = set; then : +if ${ac_cv_func_strnlen_working+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : - ac_cv_func_strnlen_working=no + # Guess no on AIX systems, yes otherwise. + case "$host_os" in + aix*) ac_cv_func_strnlen_working=no;; + *) ac_cv_func_strnlen_working=yes;; + esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -33109,21 +36859,14 @@ fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5 $as_echo "$ac_cv_func_strnlen_working" >&6; } -test $ac_cv_func_strnlen_working = no && +test $ac_cv_func_strnlen_working = no && : - - - - - - gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext" - - - if test $ac_cv_func_strnlen_working = no; then + if test $ac_cv_func_strnlen_working = no; then REPLACE_STRNLEN=1 fi fi + if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then @@ -33141,7 +36884,10 @@ test $ac_cv_func_strnlen_working = no && - GNULIB_STRNLEN=1 + + GNULIB_STRNLEN=1 + + @@ -33149,15 +36895,6 @@ $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h - # Code from module strsep: - - - - - - - - @@ -33167,28 +36904,39 @@ $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h for ac_func in strsep do : ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep" -if test "x$ac_cv_func_strsep" = x""yes; then : +if test "x$ac_cv_func_strsep" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRSEP 1 _ACEOF -else - - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" - fi done - if test $ac_cv_func_strsep = no; then HAVE_STRSEP=0 + fi + + if test $HAVE_STRSEP = 0; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS strsep.$ac_objext" + : fi - GNULIB_STRSEP=1 + + GNULIB_STRSEP=1 + + @@ -33196,12 +36944,86 @@ $as_echo "#define GNULIB_TEST_STRSEP 1" >>confdefs.h - # Code from module strstr-simple: if test "$gl_cv_func_memchr_works" != yes; then REPLACE_STRSTR=1 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5 +$as_echo_n "checking whether strstr works... " >&6; } +if ${gl_cv_func_strstr_works_always+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef __GNU_LIBRARY__ + #include + #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ + || defined __UCLIBC__ + Lucky user + #endif +#elif defined __CYGWIN__ + #include + #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) + Lucky user + #endif +#else + Lucky user +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Lucky user" >/dev/null 2>&1; then : + gl_cv_func_strstr_works_always="guessing yes" +else + gl_cv_func_strstr_works_always="guessing no" +fi +rm -f conftest* + + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include /* for strstr */ +#define P "_EF_BF_BD" +#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P +#define NEEDLE P P P P P + +int +main () +{ +return !!strstr (HAYSTACK, NEEDLE); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_strstr_works_always=yes +else + gl_cv_func_strstr_works_always=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5 +$as_echo "$gl_cv_func_strstr_works_always" >&6; } + case "$gl_cv_func_strstr_works_always" in + *yes) ;; + *) + REPLACE_STRSTR=1 + ;; + esac + fi + + if test $REPLACE_STRSTR = 1; then @@ -33217,7 +37039,10 @@ $as_echo "#define GNULIB_TEST_STRSEP 1" >>confdefs.h - GNULIB_STRSTR=1 + + GNULIB_STRSTR=1 + + @@ -33225,14 +37050,21 @@ $as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h - # Code from module sys_socket: + case "$host_os" in + osf*) + +$as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h + + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether is self-contained" >&5 $as_echo_n "checking whether is self-contained... " >&6; } -if test "${gl_cv_header_sys_socket_h_selfcontained+set}" = set; then : +if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then : $as_echo_n "(cached) " >&6 else @@ -33261,7 +37093,7 @@ $as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; } for ac_func in shutdown do : ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown" -if test "x$ac_cv_func_shutdown" = x""yes; then : +if test "x$ac_cv_func_shutdown" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SHUTDOWN 1 _ACEOF @@ -33272,7 +37104,7 @@ done if test $ac_cv_func_shutdown = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether defines the SHUT_* macros" >&5 $as_echo_n "checking whether defines the SHUT_* macros... " >&6; } -if test "${gl_cv_header_sys_socket_h_shut+set}" = set; then : +if ${gl_cv_header_sys_socket_h_shut+:} false; then : $as_echo_n "(cached) " >&6 else @@ -33308,6 +37140,9 @@ $as_echo "$gl_cv_header_sys_socket_h_shut" >&6; } + + + : @@ -33316,35 +37151,53 @@ $as_echo "$gl_cv_header_sys_socket_h_shut" >&6; } + if test $gl_cv_have_include_next = yes; then gl_cv_next_sys_socket_h='<'sys/socket.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_sys_socket_h+set}" = set; then : +if ${gl_cv_next_sys_socket_h+:} false; then : $as_echo_n "(cached) " >&6 else - if test $ac_cv_header_sys_socket_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test $ac_cv_header_sys_socket_h = yes; then + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_sys_socket_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/sys/socket.h#{ - s#.*"\(.*/sys/socket.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + + gl_header_literal_regex=`echo 'sys/socket.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + gl_cv_next_sys_socket_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' else - gl_cv_next_sys_socket_h='<'sys/socket.h'>' - fi + gl_cv_next_sys_socket_h='<'sys/socket.h'>' + fi + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5 @@ -33363,23 +37216,12 @@ $as_echo "$gl_cv_next_sys_socket_h" >&6; } + if test $ac_cv_header_sys_socket_h = yes; then HAVE_SYS_SOCKET_H=1 HAVE_WS2TCPIP_H=0 else HAVE_SYS_SOCKET_H=0 - for ac_header in ws2tcpip.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default" -if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_WS2TCPIP_H 1 -_ACEOF - -fi - -done - if test $ac_cv_header_ws2tcpip_h = yes; then HAVE_WS2TCPIP_H=1 else @@ -33402,7 +37244,7 @@ done #endif " -if test "x$ac_cv_type_struct_sockaddr_storage" = x""yes; then : +if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_SOCKADDR_STORAGE 1 @@ -33423,7 +37265,7 @@ ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" " #endif " -if test "x$ac_cv_type_sa_family_t" = x""yes; then : +if test "x$ac_cv_type_sa_family_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SA_FAMILY_T 1 @@ -33438,6 +37280,32 @@ fi if test $ac_cv_type_sa_family_t = no; then HAVE_SA_FAMILY_T=0 fi + if test $ac_cv_type_struct_sockaddr_storage != no; then + ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include + #ifdef HAVE_SYS_SOCKET_H + #include + #endif + #ifdef HAVE_WS2TCPIP_H + #include + #endif + +" +if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 +_ACEOF + + +else + HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0 +fi + + fi + if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \ + || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then + SYS_SOCKET_H='sys/socket.h' + fi @@ -33452,7 +37320,7 @@ fi for ac_header in winsock2.h do : ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" -if test "x$ac_cv_header_winsock2_h" = x""yes; then : +if test "x$ac_cv_header_winsock2_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_WINSOCK2_H 1 _ACEOF @@ -33477,7 +37345,7 @@ done as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : +if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -33485,10 +37353,7 @@ else /* Some systems require prerequisite headers. */ #include -#if !defined __GLIBC__ && HAVE_SYS_TIME_H -# include -#endif -#include +#include int main () @@ -33509,7 +37374,7 @@ fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF @@ -33520,8 +37385,6 @@ fi - # Code from module sys_stat: - @@ -33540,118 +37403,108 @@ fi + if test $gl_cv_have_include_next = yes; then - gl_cv_next_sys_stat_h='<'sys/stat.h'>' + gl_cv_next_sys_uio_h='<'sys/uio.h'>' else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_sys_stat_h+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_sys_uio_h+:} false; then : $as_echo_n "(cached) " >&6 else - if test $ac_cv_header_sys_stat_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test $ac_cv_header_sys_uio_h = yes; then + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/sys/stat.h#{ - s#.*"\(.*/sys/stat.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + + gl_header_literal_regex=`echo 'sys/uio.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + gl_cv_next_sys_uio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' else - gl_cv_next_sys_stat_h='<'sys/stat.h'>' - fi + gl_cv_next_sys_uio_h='<'sys/uio.h'>' + fi + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5 -$as_echo "$gl_cv_next_sys_stat_h" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5 +$as_echo "$gl_cv_next_sys_uio_h" >&6; } fi - NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h + NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'sys/stat.h'>' + gl_next_as_first_directive='<'sys/uio.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_sys_stat_h + gl_next_as_first_directive=$gl_cv_next_sys_uio_h fi - NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive + NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive - ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include - #include + if test $ac_cv_header_sys_uio_h = yes; then + HAVE_SYS_UIO_H=1 + else + HAVE_SYS_UIO_H=0 + fi + + + + + + + + + + + + + + + + + ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include " -if test "x$ac_cv_type_nlink_t" = x""yes; then : - +if test "x$ac_cv_have_decl_localtime_r" = xyes; then : + ac_have_decl=1 else - -$as_echo "#define nlink_t int" >>confdefs.h - + ac_have_decl=0 fi - - - for gl_func in fchmodat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_LOCALTIME_R $ac_have_decl _ACEOF - eval ac_cv_have_decl_$gl_func=yes -fi - done - - - - # Code from module time: - - - - # Code from module time_r: - - - - - + if test $ac_cv_have_decl_localtime_r = no; then + HAVE_DECL_LOCALTIME_R=0 + fi : @@ -33661,9 +37514,10 @@ fi if test $ac_cv_func_localtime_r = yes; then + HAVE_LOCALTIME_R=1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; } -if test "${gl_cv_time_r_posix+set}" = set; then : +if ${gl_cv_time_r_posix+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -33703,6 +37557,7 @@ $as_echo "$gl_cv_time_r_posix" >&6; } else HAVE_LOCALTIME_R=0 fi + if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then @@ -33722,7 +37577,10 @@ $as_echo "$gl_cv_time_r_posix" >&6; } - GNULIB_TIME_R=1 + + GNULIB_TIME_R=1 + + @@ -33730,7 +37588,6 @@ $as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h - # Code from module timegm: @@ -33743,13 +37600,14 @@ $as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h if test $ac_cv_func_timegm = yes; then - if test $ac_cv_func_working_mktime = no; then + if test $gl_cv_func_working_mktime = no; then # Assume that timegm is buggy if mktime is. REPLACE_TIMEGM=1 fi else HAVE_TIMEGM=0 fi + if test $HAVE_TIMEGM = 0 || test $REPLACE_TIMEGM = 1; then @@ -33762,41 +37620,17 @@ $as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h gl_LIBOBJS="$gl_LIBOBJS timegm.$ac_objext" - - - if test $ac_cv_func_working_mktime = yes; then - ac_fn_c_check_func "$LINENO" "__mktime_internal" "ac_cv_func___mktime_internal" -if test "x$ac_cv_func___mktime_internal" = x""yes; then : - -else - # mktime works but it doesn't export __mktime_internal, - # so we need to substitute our own mktime implementation. - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext" - - -$as_echo "#define mktime rpl_mktime" >>confdefs.h - - - - -fi + : fi - fi - GNULIB_TIMEGM=1 + GNULIB_TIMEGM=1 + + @@ -33804,7 +37638,7 @@ $as_echo "#define GNULIB_TEST_TIMEGM 1" >>confdefs.h - # Code from module unistd: + @@ -33821,35 +37655,53 @@ $as_echo "#define GNULIB_TEST_TIMEGM 1" >>confdefs.h + if test $gl_cv_have_include_next = yes; then gl_cv_next_unistd_h='<'unistd.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_unistd_h+set}" = set; then : +if ${gl_cv_next_unistd_h+:} false; then : $as_echo_n "(cached) " >&6 else - if test $ac_cv_header_unistd_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test $ac_cv_header_unistd_h = yes; then + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/unistd.h#{ - s#.*"\(.*/unistd.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + + gl_header_literal_regex=`echo 'unistd.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' else - gl_cv_next_unistd_h='<'unistd.h'>' - fi + gl_cv_next_unistd_h='<'unistd.h'>' + fi + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5 @@ -33869,13 +37721,6 @@ $as_echo "$gl_cv_next_unistd_h" >&6; } - - : - - - - - if test $ac_cv_header_unistd_h = yes; then HAVE_UNISTD_H=1 else @@ -33884,18 +37729,25 @@ $as_echo "$gl_cv_next_unistd_h" >&6; } - for gl_func in chown dup2 dup3 environ euidaccess faccessat fchdir fchownat fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell lchown link linkat lseek pipe2 pread pwrite readlink readlinkat rmdir sleep symlink symlinkat ttyname_r unlink unlinkat usleep; do + + + + + for gl_func in chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r unlink unlinkat usleep; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : +if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + +#if HAVE_UNISTD_H +# include +#endif /* Some systems declare various items in the wrong headers. */ -#ifndef __GLIBC__ +#if !(defined __GLIBC__ && !defined __UCLIBC__) # include # include # include @@ -33923,7 +37775,7 @@ fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF @@ -33933,7 +37785,7 @@ fi done - # Code from module unistd-safer: + : @@ -33942,44 +37794,13 @@ fi - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS dup-safer.$ac_objext" - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS fd-safer.$ac_objext" - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS pipe-safer.$ac_objext" - - - # Code from module unsetenv: - - + if test $ac_cv_have_decl_unsetenv = no; then + HAVE_DECL_UNSETENV=0 + fi for ac_func in unsetenv do : ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv" -if test "x$ac_cv_func_unsetenv" = x""yes; then : +if test "x$ac_cv_func_unsetenv" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UNSETENV 1 _ACEOF @@ -33989,44 +37810,24 @@ done if test $ac_cv_func_unsetenv = no; then HAVE_UNSETENV=0 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext" - - - - - : - - - - - - else + HAVE_UNSETENV=1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5 $as_echo_n "checking for unsetenv() return type... " >&6; } -if test "${gt_cv_func_unsetenv_ret+set}" = set; then : +if ${gt_cv_func_unsetenv_ret+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + +#undef _BSD +#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 */ #include extern #ifdef __cplusplus "C" #endif -#if defined(__STDC__) || defined(__cplusplus) int unsetenv (const char *name); -#else -int unsetenv(); -#endif int main () @@ -34050,41 +37851,48 @@ $as_echo "$gt_cv_func_unsetenv_ret" >&6; } $as_echo "#define VOID_UNSETENV 1" >>confdefs.h REPLACE_UNSETENV=1 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv works on duplicates" >&5 -$as_echo_n "checking whether unsetenv works on duplicates... " >&6; } -if test "${gl_cv_func_unsetenv_works+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5 +$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; } +if ${gl_cv_func_unsetenv_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : - gl_cv_func_unsetenv_works="guessing no" + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_unsetenv_works="guessing no" ;; + esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include + #include + extern char **environ; int main () { - char entry[] = "b=2"; + char entry1[] = "a=1"; + char entry2[] = "b=2"; + char *env[] = { entry1, entry2, NULL }; if (putenv ((char *) "a=1")) return 1; - if (putenv (entry)) return 2; - entry[0] = 'a'; + if (putenv (entry2)) return 2; + entry2[0] = 'a'; unsetenv ("a"); if (getenv ("a")) return 3; + if (!unsetenv ("") || errno != EINVAL) return 4; + entry2[0] = 'b'; + environ = env; + if (!getenv ("a")) return 5; + entry2[0] = 'a'; + unsetenv ("a"); + if (getenv ("a")) return 6; ; return 0; @@ -34102,8 +37910,15 @@ fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5 $as_echo "$gl_cv_func_unsetenv_works" >&6; } - if test "$gl_cv_func_unsetenv_works" != yes; then - REPLACE_UNSETENV=1 + case "$gl_cv_func_unsetenv_works" in + *yes) ;; + *) + REPLACE_UNSETENV=1 + ;; + esac + fi + + if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then @@ -34114,13 +37929,25 @@ $as_echo "$gl_cv_func_unsetenv_works" >&6; } gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext" - fi + + + + : + + + + + + fi - GNULIB_UNSETENV=1 + + GNULIB_UNSETENV=1 + + @@ -34128,7 +37955,6 @@ $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h - # Code from module vasnprintf: : @@ -34201,8 +38027,9 @@ $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h + ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" -if test "x$ac_cv_type_ptrdiff_t" = x""yes; then : +if test "x$ac_cv_type_ptrdiff_t" = xyes; then : else @@ -34219,12 +38046,11 @@ fi fi - # Code from module vasprintf: for ac_func in vasprintf do : ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf" -if test "x$ac_cv_func_vasprintf" = x""yes; then : +if test "x$ac_cv_func_vasprintf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VASPRINTF 1 _ACEOF @@ -34273,7 +38099,11 @@ done - GNULIB_VASPRINTF=1 + + + GNULIB_VASPRINTF=1 + + @@ -34289,15 +38119,13 @@ $as_echo "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format" - # Code from module verify: - # Code from module vsnprintf: gl_cv_func_vsnprintf_usable=no for ac_func in vsnprintf do : ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf" -if test "x$ac_cv_func_vsnprintf" = x""yes; then : +if test "x$ac_cv_func_vsnprintf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VSNPRINTF 1 _ACEOF @@ -34308,9 +38136,10 @@ done if test $ac_cv_func_vsnprintf = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; } -if test "${gl_cv_func_snprintf_size1+set}" = set; then : +if ${gl_cv_func_snprintf_size1+:} false; then : $as_echo_n "(cached) " >&6 else @@ -34321,10 +38150,24 @@ else /* end confdefs.h. */ #include +#if HAVE_SNPRINTF +# define my_snprintf snprintf +#else +# include +static int my_snprintf (char *buf, int size, const char *format, ...) +{ + va_list args; + int ret; + va_start (args, format); + ret = vsnprintf (buf, size, format, args); + va_end (args); + return ret; +} +#endif int main() { static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; - snprintf (buf, 1, "%d", 12345); + my_snprintf (buf, 1, "%d", 12345); return buf[1] != 'E'; } _ACEOF @@ -34344,7 +38187,64 @@ $as_echo "$gl_cv_func_snprintf_size1" >&6; } case "$gl_cv_func_snprintf_size1" in *yes) - gl_cv_func_vsnprintf_usable=yes + + case "$gl_cv_func_snprintf_retval_c99" in + *yes) + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5 +$as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; } +if ${gl_cv_func_printf_positions+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test "$cross_compiling" = yes; then : + + case "$host_os" in + netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*) + gl_cv_func_printf_positions="guessing no";; + beos*) gl_cv_func_printf_positions="guessing no";; + mingw* | pw*) gl_cv_func_printf_positions="guessing no";; + *) gl_cv_func_printf_positions="guessing yes";; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +/* The string "%2$d %1$d", with dollar characters protected from the shell's + dollar expansion (possibly an autoconf bug). */ +static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; +static char buf[100]; +int main () +{ + sprintf (buf, format, 33, 55); + return (strcmp (buf, "55 33") != 0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_printf_positions=yes +else + gl_cv_func_printf_positions=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5 +$as_echo "$gl_cv_func_printf_positions" >&6; } + + case "$gl_cv_func_printf_positions" in + *yes) + gl_cv_func_vsnprintf_usable=yes + ;; + esac + ;; + esac ;; esac fi @@ -34381,7 +38281,11 @@ $as_echo "$gl_cv_func_snprintf_size1" >&6; } - GNULIB_VSNPRINTF=1 + + + GNULIB_VSNPRINTF=1 + + @@ -34389,13 +38293,6 @@ $as_echo "#define GNULIB_TEST_VSNPRINTF 1" >>confdefs.h - # Code from module warn-on-use: - # Code from module wchar: - - - - - : @@ -34413,35 +38310,53 @@ $as_echo "#define GNULIB_TEST_VSNPRINTF 1" >>confdefs.h + if test $gl_cv_have_include_next = yes; then gl_cv_next_wchar_h='<'wchar.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_wchar_h+set}" = set; then : +if ${gl_cv_next_wchar_h+:} false; then : $as_echo_n "(cached) " >&6 else - if test $ac_cv_header_wchar_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test $ac_cv_header_wchar_h = yes; then + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/wchar.h#{ - s#.*"\(.*/wchar.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + + gl_header_literal_regex=`echo 'wchar.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' else - gl_cv_next_wchar_h='<'wchar.h'>' - fi + gl_cv_next_wchar_h='<'wchar.h'>' + fi + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5 @@ -34460,6 +38375,7 @@ $as_echo "$gl_cv_next_wchar_h" >&6; } + if test $ac_cv_header_wchar_h = yes; then HAVE_WCHAR_H=1 else @@ -34468,6 +38384,8 @@ $as_echo "$gl_cv_next_wchar_h" >&6; } + + if test $gt_cv_c_wint_t = yes; then HAVE_WINT_T=1 else @@ -34476,18 +38394,21 @@ $as_echo "$gl_cv_next_wchar_h" >&6; } - for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth; do + for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth ; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : +if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Some systems require additional headers. */ -#ifndef __GLIBC__ +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#if !(defined __GLIBC__ && !defined __UCLIBC__) # include # include # include @@ -34513,7 +38434,7 @@ fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF @@ -34523,7 +38444,6 @@ fi done - # Code from module wcrtomb: @@ -34552,15 +38472,15 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } -if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then : +if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then : $as_echo_n "(cached) " >&6 else case "$host_os" in - # Guess no on AIX and OSF/1. - osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; + # Guess no on AIX and OSF/1. + aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; esac if test $LOCALE_JA != none; then if test "$cross_compiling" = yes; then : @@ -34571,6 +38491,13 @@ else #include #include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include #include int main () { @@ -34608,7 +38535,7 @@ $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } -if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then : +if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then : $as_echo_n "(cached) " >&6 else @@ -34628,6 +38555,13 @@ else #include #include #include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include #include int main () { @@ -34675,11 +38609,6 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } else REPLACE_MBSTATE_T=1 fi - if test $REPLACE_MBSTATE_T = 1; then - - : - - fi @@ -34691,6 +38620,30 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } if test $ac_cv_func_wcrtomb = no; then HAVE_WCRTOMB=0 + ac_fn_c_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" " +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include + +" +if test "x$ac_cv_have_decl_wcrtomb" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_WCRTOMB $ac_have_decl +_ACEOF + + if test $ac_cv_have_decl_wcrtomb = yes; then + REPLACE_WCRTOMB=1 + fi else if test $REPLACE_MBSTATE_T = 1; then REPLACE_WCRTOMB=1 @@ -34702,7 +38655,7 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5 $as_echo_n "checking whether wcrtomb return value is correct... " >&6; } -if test "${gl_cv_func_wcrtomb_retval+set}" = set; then : +if ${gl_cv_func_wcrtomb_retval+:} false; then : $as_echo_n "(cached) " >&6 else @@ -34720,32 +38673,39 @@ else /* end confdefs.h. */ #include -#include #include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include #include int main () { + int result = 0; if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) - return 1; + result |= 1; } if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) - return 1; + result |= 2; } if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) - return 1; + result |= 4; } if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) - return 1; + result |= 8; } - return 0; + return result; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : @@ -34768,11 +38728,9 @@ $as_echo "$gl_cv_func_wcrtomb_retval" >&6; } esac fi fi + if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then - : - - @@ -34790,7 +38748,10 @@ $as_echo "$gl_cv_func_wcrtomb_retval" >&6; } - GNULIB_WCRTOMB=1 + + GNULIB_WCRTOMB=1 + + @@ -34798,7 +38759,7 @@ $as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h - # Code from module wctype: + @@ -34816,27 +38777,6 @@ $as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h fi - : - - - - - - if test $ac_cv_func_iswblank = yes; then - HAVE_ISWBLANK=1 - else - HAVE_ISWBLANK=0 - fi - - - : - - - - - - - if test $gt_cv_c_wint_t = yes; then HAVE_WINT_T=1 @@ -34845,11 +38785,91 @@ $as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h fi + + + + + + + : + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_wctype_h='<'wctype.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_wctype_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test $ac_cv_header_wctype_h = yes; then + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + + gl_header_literal_regex=`echo 'wctype.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' + else + gl_cv_next_wctype_h='<'wctype.h'>' + fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5 +$as_echo "$gl_cv_next_wctype_h" >&6; } + fi + NEXT_WCTYPE_H=$gl_cv_next_wctype_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'wctype.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_wctype_h + fi + NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive + + + + if test $ac_cv_header_wctype_h = yes; then if test $ac_cv_func_iswcntrl = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5 $as_echo_n "checking whether iswcntrl works... " >&6; } -if test "${gl_cv_func_iswcntrl_works+set}" = set; then : +if ${gl_cv_func_iswcntrl_works+:} false; then : $as_echo_n "(cached) " >&6 else @@ -34869,9 +38889,9 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_func_iswcntrl_works=yes + gl_cv_func_iswcntrl_works="guessing yes" else - gl_cv_func_iswcntrl_works=no + gl_cv_func_iswcntrl_works="guessing no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -34879,12 +38899,17 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #include - #include - #include - #include - int main () { return iswprint ('x') == 0; } + /* Tru64 with Desktop Toolkit C has a bug: must be + included before . + BSD/OS 4.0.1 has a bug: , and + must be included before . */ + #include + #include + #include + #include + #include + int main () { return iswprint ('x') == 0; } + _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_iswcntrl_works=yes @@ -34900,124 +38925,216 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5 $as_echo "$gl_cv_func_iswcntrl_works" >&6; } fi - - - - - : - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_wctype_h='<'wctype.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_wctype_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - if test $ac_cv_header_wctype_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/wctype.h#{ - s#.*"\(.*/wctype.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_wctype_h='<'wctype.h'>' - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5 -$as_echo "$gl_cv_next_wctype_h" >&6; } - fi - NEXT_WCTYPE_H=$gl_cv_next_wctype_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'wctype.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_wctype_h - fi - NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive - - - HAVE_WCTYPE_H=1 else HAVE_WCTYPE_H=0 fi - if test "$gl_cv_func_iswcntrl_works" = no; then - REPLACE_ISWCNTRL=1 + case "$gl_cv_func_iswcntrl_works" in + *yes) REPLACE_ISWCNTRL=0 ;; + *) REPLACE_ISWCNTRL=1 ;; + esac + + + if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then + : + fi + + if test $REPLACE_ISWCNTRL = 1; then + REPLACE_TOWLOWER=1 else - REPLACE_ISWCNTRL=0 + for ac_func in towlower +do : + ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower" +if test "x$ac_cv_func_towlower" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_TOWLOWER 1 +_ACEOF + +fi +done + + if test $ac_cv_func_towlower = yes; then + REPLACE_TOWLOWER=0 + else + ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: must be + included before . + BSD/OS 4.0.1 has a bug: , and + must be included before . */ + #include + #include + #include + #include + #if HAVE_WCTYPE_H + # include + #endif + +" +if test "x$ac_cv_have_decl_towlower" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TOWLOWER $ac_have_decl +_ACEOF + + if test $ac_cv_have_decl_towlower = yes; then + REPLACE_TOWLOWER=1 + else + REPLACE_TOWLOWER=0 + fi + fi fi - # Code from module write: + if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then + : + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5 +$as_echo_n "checking for wctype_t... " >&6; } +if ${gl_cv_type_wctype_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Tru64 with Desktop Toolkit C has a bug: must be + included before . + BSD/OS 4.0.1 has a bug: , and + must be included before . */ + #include + #include + #include + #include + #if HAVE_WCTYPE_H + # include + #endif + wctype_t a; + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_type_wctype_t=yes +else + gl_cv_type_wctype_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5 +$as_echo "$gl_cv_type_wctype_t" >&6; } + if test $gl_cv_type_wctype_t = no; then + HAVE_WCTYPE_T=0 + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5 +$as_echo_n "checking for wctrans_t... " >&6; } +if ${gl_cv_type_wctrans_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Tru64 with Desktop Toolkit C has a bug: must be + included before . + BSD/OS 4.0.1 has a bug: , and + must be included before . */ + #include + #include + #include + #include + #include + wctrans_t a; + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_type_wctrans_t=yes +else + gl_cv_type_wctrans_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5 +$as_echo "$gl_cv_type_wctrans_t" >&6; } + if test $gl_cv_type_wctrans_t = no; then + HAVE_WCTRANS_T=0 + fi + for gl_func in wctype iswctype wctrans towctrans ; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#if !(defined __GLIBC__ && !defined __UCLIBC__) +# include +# include +# include +# include +#endif +#include +int +main () +{ +#undef $gl_func + (void) $gl_func; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_gl_Symbol=yes" +else + eval "$as_gl_Symbol=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$as_gl_Symbol + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +_ACEOF - - - GNULIB_WRITE=1 - - - -$as_echo "#define GNULIB_TEST_WRITE 1" >>confdefs.h - - - - # Code from module xalloc: - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS xmalloc.$ac_objext" - - + eval ac_cv_have_decl_$gl_func=yes +fi + done : - : - - - # Code from module xalloc-die: - # Code from module xsize: - - - for ac_header in stdint.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" -if test "x$ac_cv_header_stdint_h" = x""yes; then : +if test "x$ac_cv_header_stdint_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDINT_H 1 _ACEOF @@ -35027,7 +39144,6 @@ fi done - # Code from module xstrndup: : @@ -35077,7 +39193,7 @@ if test "$ac_cv_uname_s" = 'SunOS' -a \( "x$ac_cv_prog_ac_ct_AR" = "x" -o "$ac_c as_fn_error $? "No ar found for Solaris - is /usr/ccs/bin in PATH?" "$LINENO" 5 fi -ac_config_files="$ac_config_files Makefile tap/Makefile lib/Makefile plugins/Makefile lib/tests/Makefile plugins-root/Makefile plugins-scripts/Makefile plugins-scripts/subst plugins-scripts/utils.pm plugins-scripts/utils.sh perlmods/Makefile command.cfg test.pl pkg/solaris/pkginfo po/Makefile.in" +ac_config_files="$ac_config_files Makefile tap/Makefile lib/Makefile plugins/Makefile lib/tests/Makefile plugins-root/Makefile plugins-scripts/Makefile plugins-scripts/subst plugins-scripts/utils.pm plugins-scripts/utils.sh test.pl pkg/solaris/pkginfo po/Makefile.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -35143,10 +39259,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && + if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} @@ -35162,7 +39289,6 @@ DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= -U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -35177,6 +39303,14 @@ LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' @@ -35205,9 +39339,50 @@ if test -z "${USE_PARSE_INI_TRUE}" && test -z "${USE_PARSE_INI_FALSE}"; then as_fn_error $? "conditional \"USE_PARSE_INI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_UTMPX_TRUE}" && test -z "${HAVE_UTMPX_FALSE}"; then + as_fn_error $? "conditional \"HAVE_UTMPX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then + as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then + as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then + as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then + as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then + as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then + as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then + as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then + as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then + as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi @@ -35243,7 +39418,7 @@ fi -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" @@ -35344,6 +39519,7 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -35539,16 +39715,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -35608,28 +39784,16 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -35651,7 +39815,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by nagios-plugins $as_me 1.4.16, which was -generated by GNU Autoconf 2.67. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -35717,10 +39881,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ nagios-plugins config.status 1.4.16 -configured by $0, generated by GNU Autoconf 2.67, +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -35811,7 +39975,7 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -36123,13 +40287,11 @@ do "plugins-scripts/subst") CONFIG_FILES="$CONFIG_FILES plugins-scripts/subst" ;; "plugins-scripts/utils.pm") CONFIG_FILES="$CONFIG_FILES plugins-scripts/utils.pm" ;; "plugins-scripts/utils.sh") CONFIG_FILES="$CONFIG_FILES plugins-scripts/utils.sh" ;; - "perlmods/Makefile") CONFIG_FILES="$CONFIG_FILES perlmods/Makefile" ;; - "command.cfg") CONFIG_FILES="$CONFIG_FILES command.cfg" ;; "test.pl") CONFIG_FILES="$CONFIG_FILES test.pl" ;; "pkg/solaris/pkginfo") CONFIG_FILES="$CONFIG_FILES pkg/solaris/pkginfo" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -36152,9 +40314,10 @@ fi # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } @@ -36162,12 +40325,13 @@ $debug || { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -36189,7 +40353,7 @@ else ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF @@ -36217,7 +40381,7 @@ done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -36265,7 +40429,7 @@ t delim rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" @@ -36297,7 +40461,7 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF @@ -36331,7 +40495,7 @@ fi # test -n "$CONFIG_FILES" # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || +cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF @@ -36343,8 +40507,8 @@ _ACEOF # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 @@ -36445,7 +40609,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -36464,7 +40628,7 @@ do for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -36473,7 +40637,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -36499,8 +40663,8 @@ $as_echo "$as_me: creating $ac_file" >&6;} esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -36636,21 +40800,22 @@ s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$tmp/stdin" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; @@ -36661,20 +40826,20 @@ which seems to be undefined. Please make sure it is defined" >&2;} if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ + mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. @@ -36721,7 +40886,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in @@ -36734,7 +40899,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but + # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. @@ -36768,21 +40933,19 @@ $as_echo X"$mf" | continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. + # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || @@ -37460,7 +41623,7 @@ _LT_EOF case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` - ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. @@ -37476,7 +41639,8 @@ _LT_EOF if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" - cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + gt_tab=`printf '\t'` + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration @@ -37487,12 +41651,12 @@ _LT_EOF test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` - # Hide the ALL_LINGUAS assigment from automake < 1.5. + # Hide the ALL_LINGUAS assignment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. - # Hide the ALL_LINGUAS assigment from automake < 1.5. + # Hide the ALL_LINGUAS assignment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES diff --git a/configure.in b/configure.in index bf66109..4479c2d 100644 --- a/configure.in +++ b/configure.in @@ -255,54 +255,96 @@ fi LIBS="$_SAVEDLIBS" CPPFLAGS="$_SAVEDCPPFLAGS" +AC_ARG_WITH([dbi], [AS_HELP_STRING([--without-dbi], [Skips the dbi plugin])]) +dnl Check for DBI libraries +AS_IF([test "x$with_dbi" != "xno"], [ + _SAVEDLIBS="$LIBS" + AC_CHECK_LIB(dbi,dbi_initialize) + if test "$ac_cv_lib_dbi_dbi_initialize" = "yes"; then + EXTRAS="$EXTRAS check_dbi" + DBILIBS="-ldbi" + AC_SUBST(DBILIBS) + else + AC_MSG_WARN([Skipping dbi plugin]) + AC_MSG_WARN([install DBI libs to compile this plugin (see REQUIREMENTS).]) + fi + LIBS="$_SAVEDLIBS" +]) + +AC_ARG_WITH([radius], [AS_HELP_STRING([--without-radius], [Skips the radius plugin])]) + dnl Check for radius libraries -_SAVEDLIBS="$LIBS" -AC_CHECK_LIB(radiusclient,rc_read_config) -if test "$ac_cv_lib_radiusclient_rc_read_config" = "yes"; then - EXTRAS="$EXTRAS check_radius" - RADIUSLIBS="-lradiusclient" - AC_SUBST(RADIUSLIBS) -else - AC_CHECK_LIB(radiusclient-ng,rc_read_config) - if test "$ac_cv_lib_radiusclient_ng_rc_read_config" = "yes"; then +AS_IF([test "x$with_radius" != "xno"], [ + _SAVEDLIBS="$LIBS" + AC_CHECK_LIB(radiusclient,rc_read_config) + if test "$ac_cv_lib_radiusclient_rc_read_config" = "yes"; then EXTRAS="$EXTRAS check_radius" - RADIUSLIBS="-lradiusclient-ng" + RADIUSLIBS="-lradiusclient" AC_SUBST(RADIUSLIBS) else - AC_MSG_WARN([Skipping radius plugin]) - AC_MSG_WARN([install radius libs to compile this plugin (see REQUIREMENTS).]) + AC_CHECK_LIB(radiusclient-ng,rc_read_config) + if test "$ac_cv_lib_radiusclient_ng_rc_read_config" = "yes"; then + EXTRAS="$EXTRAS check_radius" + RADIUSLIBS="-lradiusclient-ng" + AC_SUBST(RADIUSLIBS) + else + AC_MSG_WARN([Skipping radius plugin]) + AC_MSG_WARN([install radius libs to compile this plugin (see REQUIREMENTS).]) + fi fi -fi -LIBS="$_SAVEDLIBS" + LIBS="$_SAVEDLIBS" +]) + +AC_ARG_WITH([ldap], [AS_HELP_STRING([--without-ldap], [Skips the LDAP plugin])]) dnl Check for LDAP libraries -_SAVEDLIBS="$LIBS" -AC_CHECK_LIB(ldap,main,,,-llber) -if test "$ac_cv_lib_ldap_main" = "yes"; then - LDAPLIBS="-lldap -llber"\ - LDAPINCLUDE="-I/usr/include/ldap" - AC_SUBST(LDAPLIBS) - AC_SUBST(LDAPINCLUDE) - AC_CHECK_FUNCS(ldap_set_option) - EXTRAS="$EXTRAS check_ldap" - AC_CHECK_FUNCS(ldap_init ldap_set_option ldap_get_option ldap_start_tls_s) -else - AC_MSG_WARN([Skipping LDAP plugin]) - AC_MSG_WARN([install LDAP libs to compile this plugin (see REQUIREMENTS).]) -fi -LIBS="$_SAVEDLIBS" +AS_IF([test "x$with_ldap" != "xno"], [ + _SAVEDLIBS="$LIBS" + AC_CHECK_LIB(ldap,main,,,-llber) + if test "$ac_cv_lib_ldap_main" = "yes"; then + LDAPLIBS="-lldap -llber"\ + LDAPINCLUDE="-I/usr/include/ldap" + AC_SUBST(LDAPLIBS) + AC_SUBST(LDAPINCLUDE) + AC_CHECK_FUNCS(ldap_set_option) + EXTRAS="$EXTRAS check_ldap" + AC_CHECK_FUNCS(ldap_init ldap_set_option ldap_get_option ldap_start_tls_s) + else + AC_MSG_WARN([Skipping LDAP plugin]) + AC_MSG_WARN([install LDAP libs to compile this plugin (see REQUIREMENTS).]) + fi + LIBS="$_SAVEDLIBS" +]) dnl Check for headers used by check_ide_smart -AC_CHECK_HEADER(linux/hdreg.h, FOUNDINCLUDE=yes, FOUNDINCLUDE=no) -if test "$FOUNDINCLUDE" = "yes" ; then - AC_CHECK_HEADER(linux/types.h, FOUNDINCLUDE=yes, FOUNDINCLUDE=no) -fi +case $host in + *linux*) + AC_CHECK_HEADER(linux/hdreg.h, FOUNDINCLUDE=yes, FOUNDINCLUDE=no) + if test "$FOUNDINCLUDE" = "yes" ; then + AC_CHECK_HEADER(linux/types.h, FOUNDINCLUDE=yes, FOUNDINCLUDE=no) + fi + if test "$FOUNDINCLUDE" = "no" ; then + AC_MSG_WARN([Skipping check_ide_smart plugin.]) + AC_MSG_WARN([check_ide_smart requires linux/hdreg.h and linux/types.h.]) + fi + ;; + *netbsd*) + AC_CHECK_HEADER(dev/ata/atareg.h, FOUNDINCLUDE=yes, FOUNDINCLUDE=no) + if test "$FOUNDINCLUDE" = "yes" ; then + AC_CHECK_HEADER(dev/ic/wdcreg.h, FOUNDINCLUDE=yes, FOUNDINCLUDE=no) + fi + if test "$FOUNDINCLUDE" = "no" ; then + AC_MSG_WARN([Skipping check_ide_smart plugin.]) + AC_MSG_WARN([check_ide_smart requires dev/ata/atareg.h and dev/ic/wdcreg.h]) + fi + ;; + *) + AC_MSG_WARN([Skipping check_ide_smart plugin.]) + AC_MSG_WARN([check_ide_smart works only on Linux and NetBSD]) +esac if test "$FOUNDINCLUDE" = "yes" ; then EXTRAS="$EXTRAS check_ide_smart" -else - AC_MSG_WARN([Skipping check_ide_smart plugin.]) - AC_MSG_WARN([check_ide_smart is linux specific. It requires linux/hdreg.h and linux/types.h.]) fi dnl Check for mysql libraries @@ -320,6 +362,26 @@ else AC_SUBST(MYSQLCFLAGS) fi +dnl Check for headers used by check_users +AC_CHECK_HEADERS(utmpx.h) +AM_CONDITIONAL([HAVE_UTMPX], [test "$ac_cv_header_utmpx_h" = "yes"]) + +dnl Fallback to who(1) if the system doesn't provide an utmpx(5) interface +if test "$ac_cv_header_utmpx_h" = "no" +then + AC_PATH_PROG(PATH_TO_WHO,who) + + if [$PATH_TO_WHO -q 2>/dev/null | egrep -i "^# users=[0-9]+$" >/dev/null] + then + ac_cv_path_to_who="$PATH_TO_WHO -q" + else + ac_cv_path_to_who="$PATH_TO_WHO" + fi + + AC_DEFINE_UNQUOTED(WHO_COMMAND,"$ac_cv_path_to_who", + [path and arguments for invoking 'who']) +fi + AC_ARG_WITH([ipv6], [AS_HELP_STRING([--with-ipv6], [support IPv6 @<:@default=check@:>@])], [], [with_ipv6=check]) @@ -1244,10 +1306,18 @@ if test -n "$ac_cv_nslookup_command"; then AC_DEFINE_UNQUOTED(NSLOOKUP_COMMAND,"$ac_cv_nslookup_command", [path and args for nslookup]) fi -AC_MSG_CHECKING([for number of cpus]) +AC_MSG_CHECKING([for number of online cpus]) +AC_TRY_COMPILE([#include ], + [sysconf(_SC_NPROCESSORS_ONLN) > 0;], + AC_DEFINE(HAVE_SYSCONF__SC_NPROCESSORS_ONLN,1,[Define if sysconf returns number of online cpus]) + AC_MSG_RESULT([sysconf(_SC_NPROCESSORS_ONLN)]), + AC_MSG_RESULT([cannot calculate]) + ) + +AC_MSG_CHECKING([for number of available cpus]) AC_TRY_COMPILE([#include ], [sysconf(_SC_NPROCESSORS_CONF) > 0;], - AC_DEFINE(HAVE_SYSCONF__SC_NPROCESSORS_CONF,1,[Define if sysconf returns number of cpus]) + AC_DEFINE(HAVE_SYSCONF__SC_NPROCESSORS_CONF,1,[Define if sysconf returns number of available cpus]) AC_MSG_RESULT([sysconf(_SC_NPROCESSORS_CONF)]), AC_MSG_RESULT([cannot calculate]) ) @@ -1284,19 +1354,6 @@ else AC_MSG_WARN([Get smbclient from Samba.org to monitor SMB shares]) fi - -AC_PATH_PROG(PATH_TO_WHO,who) - -if [$PATH_TO_WHO -q 2>/dev/null | egrep -i "^# users=[0-9]+$" >/dev/null] -then - ac_cv_path_to_who="$PATH_TO_WHO -q" -else - ac_cv_path_to_who="$PATH_TO_WHO" -fi - -AC_DEFINE_UNQUOTED(WHO_COMMAND,"$ac_cv_path_to_who", - [path and arguments for invoking 'who']) - AC_PATH_PROG(PATH_TO_SNMPGET,snmpget) AC_ARG_WITH(snmpget_command, ACX_HELP_STRING([--with-snmpget-command=PATH], @@ -1354,13 +1411,22 @@ then fi AC_PATH_PROG(PATH_TO_FPING,fping) +AC_PATH_PROG(PATH_TO_FPING6,fping6) + AC_ARG_WITH(fping_command, ACX_HELP_STRING([--with-fping-command=PATH], [Path to fping command]), PATH_TO_FPING=$withval) +AC_ARG_WITH(fping6_command, + ACX_HELP_STRING([--with-fping6-command=PATH], + [Path to fping6 command]), PATH_TO_FPING6=$withval) + if test -n "$PATH_TO_FPING" then AC_DEFINE_UNQUOTED(PATH_TO_FPING,"$PATH_TO_FPING",[path to fping]) EXTRAS="$EXTRAS check_fping" + if test x"$with_ipv6" != xno && test -n "$PATH_TO_FPING6"; then + AC_DEFINE_UNQUOTED(PATH_TO_FPING6,"$PATH_TO_FPING6",[path to fping6]) + fi else AC_MSG_WARN([Get fping from http://www.fping.com in order to make check_fping plugin]) fi @@ -1721,7 +1787,6 @@ AC_OUTPUT( plugins-scripts/utils.pm plugins-scripts/utils.sh perlmods/Makefile - command.cfg test.pl pkg/solaris/pkginfo po/Makefile.in diff --git a/contrib/README.TXT b/contrib/README.TXT deleted file mode 100644 index bd9df3c..0000000 --- a/contrib/README.TXT +++ /dev/null @@ -1,56 +0,0 @@ -Contrib Plugins README ----------------------- - -This directory contains plugins which have been contributed by various people, but that -have not yet been incorporated into the core plugins distribution. - -Most Perl plugins should work without modification. Some of the C plugins may require -a few tweaks to compile. - -If you have questions regarding the use of these plugins, try contacting the author(s) -or post a message to the nagiosplug-help mailing list (nagiosplug-help@lists.sourceforge.net) -requesting assistance. - - - -Contrib Tarballs ----------------- - -In addition to the plugins located in this directory, there are some additional tarballs -containing plugins in the tarballs/ subdirectory. They have not yet been organized. -A brief description of their contents follows. - - -berger-ping.tar.gz - Perl script version of the check_ping plugin and a corresponding - CGI (mtr.cgi) that uses mtr to traceroute a path to a host. - (Gary Berger) - -bowen-langley_plugins.tar.gz - - Several C plugins including check_inode, check_boot, etc. - (Adam Bown & Thomas Langley) - - -check_bgp-1.0.tar.gz - Perl script intended for monitoring BGP sessions on Cisco routers. - Uses Net::Telnet to telnet into a cisco router and - run "sh ip bgp" - -check_memory.tgz - C plugin to check available system memory - -check_radius.tar.gz - C program to check RADIUS authentication. This is a hacked version of - the Cistron Radiusd program radtest that acts as a plugin for Nagios. - The vast majority of the code was written by someone at Livingston - Enterprises and Cistron. NOTE: Due to the copyright restrictions in - this code, it cannot be distributed under the GPL license, and thus - will not appear in the core plugin distribution! - (Adam Jacob) - -radius.tar.gz - Code modifications necessary to make the radexample app - supplied with the radiusclient code work as a RADIUS plugin - for Nagios (Nick Shore) - -fetchlog-0.94.tar.gz - C program: The fetchlog utility displays the last new messages of a - logfile. It is similar like tail(1) but offers some extra functionality - for output formatting. fetchlog can be used standalone or as a Nagios - plugin to monitor local logfiles or together with Net-SNMP to monitor - remote logfiles. The README shows how to setup fetchlog for Nagios. - (Alexander Haderer) diff --git a/contrib/aix/check_failed b/contrib/aix/check_failed deleted file mode 100644 index 50cdf7e..0000000 --- a/contrib/aix/check_failed +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/perl -#====================== -# Created May 25, 2000 -#====================== - -# This scripts is for checking for failed root login attempts on -# any machine running AIX which has a failedlogin file in /etc/security -# The purpose is to thwart (good word) any unauthorised people from -# even trying to log in as root. This plugin has been developed for Nagios -# running on AIX. -# Lonny Selinger SpEnTBoY lonny@abyss.za.org -# May - - -my $server = $ARGV[0]; - -if (!$ARGV[0]) { - print "You must specify a server to check\n"; - print "usage: ./check_failed \n"; - exit (-1); - } else { - open (DATE, "/bin/date '+%b %d' |"); - while () { - $dline = $_; - @dresults = $dline; - chop $dresults[0]; - } - open (SULOG, "rsh $server -l root who /etc/security/failedlogin | grep root |"); - while () { - $line = $_; - @results = split (/\s+/,$line); - if ($line =~ /^root/) { - if (join(' ', @results[2,3]) eq $dresults[0]) { - print "FAILED root login on $dresults[0], node: $ARGV[0] from $results[5]\n"; - exit(2); - } - } - } -} -if (join(' ', @results[2,3]) ne $dresults[0]) { - print "No Failed Root Logins on This Node\n"; - exit(0); -} -exit(0); -close(SULOG); -close(DATE); - - diff --git a/contrib/aix/check_io b/contrib/aix/check_io deleted file mode 100644 index 58b25f6..0000000 --- a/contrib/aix/check_io +++ /dev/null @@ -1,69 +0,0 @@ -#! /bin/sh - -#================================================================= -# -# I/O Checker (KBPS) -# This Script uses iostat to monitor disk io -# Useful for notifications of disk thrashing. -# -# Authors: TheRocker -# SpEnTBoY -# -# Email: therocker@pawprints.2y.net -# lonny@abyss.za.org -# -#================================================================ - -NUMBER1=`rsh $1 -l root iostat -d | grep -e "hdisk" | tr -s ' ' | cut -d' ' -f2 | sort -2 -r | cut -c1 | line` -NUMBER2=`rsh $1 -l root iostat -d | grep -e "hdisk" | tr -s ' ' | cut -d' ' -f2 | sort -2 -r | cut -c2 | line` -TMPFILE=/tmp/iotest.hndl -TMPTOO=/tmp/iotwo.hndl - -#=========================================================== -# -# We do an evaluation on $NUMBER1 and $NUMBER2 to see if -# disk io is exceeding 40%. -# -#=========================================================== - -if [ "$NUMBER1" -gt 4 ] && [ "$NUMBER2" -gt 0 ] -then - - `rsh $1 -l root iostat -d | grep -v cd0 | tr -s ' '| cut -d' ' -f1,2 | grep -e "4[0-9]." >> $TMPFILE` - -#==================================================================== -# -# Of course, there may be more than one hard disk on the node -# so we use this bit of code to report on more than one instance -# of excessive disk IO. -# -#==================================================================== - - LINES=`wc -l /tmp/iotest.hndl | cut -c8` - LINESCTL=`wc -l /tmp/iotest.hndl | cut -c8 ` - echo "WARNING!!! Disk I/O Exceeding 40% on --> \c" - - while [ $LINESCTL != 0 ] - do - - cat $TMPFILE | tail -$LINESCTL > $TMPTOO - cat $TMPTOO > $TMPFILE - LINESCTL=$(( $LINESCTL -1 )) - LINES=$(( $LINES -1 )) - DATA=`head -1 /tmp/iotest.hndl` - echo "( $DATA ) " - - - done - echo "\n" - - rm -f $TMPFILE - rm -f $TMPTOO - exit 1 - -else - - print "No Disk I/O Exceeding 40%...OK" - exit 0 - -fi diff --git a/contrib/aix/check_kerberos b/contrib/aix/check_kerberos deleted file mode 100644 index 443ab10..0000000 --- a/contrib/aix/check_kerberos +++ /dev/null @@ -1,49 +0,0 @@ -#! /bin/sh - -#========================================================================= -# Kerberos Ticket Checker -# -# This script is handy if you allow kerberos tickets to expire -# on your nodes. The script will simply warn you when a node has -# kerberos tickets expiring on the current date. This will allow to -# re-initialize the tickets if you wish to do so. -# -# Nothing fancy here, all Nagios will show is the number of tickets -# that are going to (or already have) expired. -# -# An item of note: -# -# We made no provisions for the weekend. If tickets expire on the -# weekend and nobody is around, you won't see a warning on the -# Nagios console because we look for expired on the current day -# only. It's a good idea to have this warning emailed to the -# appropriate admin and if there is something critical that relies -# on Kerberos, you might want to send a page. -# -# Authors: TheRocker -# SpEnTBoY -# -# Email: therocker@pawprints.2y.net -# lonny@abyss.za.org -#========================================================================= - -TMPFILE=/tmp/kerbtmp.hndl -DATE=`date +%b' '%d` - -rsh $1 -l root /usr/lpp/ssp/kerberos/bin/klist | tr -s ' ' | cut -d' ' -f4,5,6 | grep -e "$DATE" > $TMPFILE - - -if [ -s $TMPFILE ] -then - - LINES=`wc -l /tmp/kerbtmp.hndl | cut -c7-8` - echo "Kerberos Tickets set to expire --> \c" - echo "$LINES \c" - echo "\n" - - rm -f $TMPFILE - exit 1 - -fi - echo "Kerberos Tickets are valid" - exit 0 diff --git a/contrib/aix/check_queue b/contrib/aix/check_queue deleted file mode 100644 index 9f709c5..0000000 --- a/contrib/aix/check_queue +++ /dev/null @@ -1,67 +0,0 @@ -#! /bin/sh - -#=============================================================== -# Print Queue Checker -# -# The print queue checker simply looks for an occurance of a -# DOWN queue. A note of warning, if you use remote queues in -# AIX to redirect print jobs from the AIX queue to an NT print -# server that print through DLC rather than IP, it will be very -# s - l - o - w. But it will work. -# -# Author: TheRocker -# Email: therocker@pawprints.2y.net -#=============================================================== - -TMPFILE=/tmp/qtmp.hndl -TMPTOO=/tmp/qtwo.hndl - -#======================================================================= -# -# This script will also work on AIX 4.2.1 BUT you have to change -# the following line. AIX 4.2.1 does not support the -W option -# with lpstat. For AIX 4.2.1 just remove the -W option and it should -# work just fine. -# -#======================================================================= - -`rsh $1 -l root lpstat -W | grep -e "DOWN" | tr -s ' ' | cut -d' ' -f1,3 > /tmp/qtmp.hndl 2> /tmp/q_err` - -if [ -s $TMPFILE ] -then - -#======================================================= -# -# If you've seen the other AIX scripts I wrote you may -# notice that I use this bit of code a lot. Well it -# works and appears to be all purpose. -# -#======================================================= - - LINES=`wc -l /tmp/qtmp.hndl | cut -c8` - LINESCTL=`wc -l /tmp/qtmp.hndl | cut -c8` - - echo "Print Queue DOWN --> \c" - - while [ $LINESCTL != 0 ] - do - - cat $TMPFILE | tail -$LINESCTL > $TMPTOO - cat $TMPTOO > $TMPFILE - LINESCTL=$(( $LINESCTL -1 )) - LINES=$(( $LINES -1 )) - DATA=`head -1 /tmp/qtmp.hndl` - echo "( $DATA ) \c" - - - done - - echo "\n" - - rm -f $TMPFILE - rm -f $TMPTOO - exit 2 - -fi - echo "Print Queues Running... OK" - exit 0 diff --git a/contrib/aix/pg_stat b/contrib/aix/pg_stat deleted file mode 100644 index e0603ec..0000000 --- a/contrib/aix/pg_stat +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/ksh - -#============================================================================== -# Script was originally created to collect stats and dump then to a log file -# every five minutes. But we like this better (the log file thing is still -# good if you want to track availability). -# -# Authors: SpEnTBoY -# TheRocker -# -# Email: lonny@abyss.za.org -# therocker@pawprints.2y.net -#============================================================================== - -#========================================================================================= -# -# The best way to do this is to use Kerberos but we use rsh here because our monitoring -# workstation doesn't have Kerberos installed. In order for this to work, the remote -# host ($1) must have a .rhosts file that contains a line like: -# -# monitorhost nagiosuser -# -#========================================================================================= - -PAGING2=`rsh $1 -l root lsps -a -s | grep -v Paging | tr -s ' '| cut -d' ' -f3 | cut -d'%' -f1` - - -if [ "$PAGING2" -gt "35" ] && [ "$PAGING2" -lt "50" ] -then - echo "Paging Space is over 35% ("$PAGING2")%" -exit 1 -fi - -if [ "$PAGING2" -gt "49" ] -then - echo "WARNING! Paging Space is over 50% ("$PAGING2")%" -exit 2 -fi - -if [ "$PAGING2" -lt "34" ] -then - echo "Paging Space is less than 34% ("$PAGING2")%" -exit 0 -fi - diff --git a/contrib/check_adptraid.sh b/contrib/check_adptraid.sh deleted file mode 100644 index e3c47be..0000000 --- a/contrib/check_adptraid.sh +++ /dev/null @@ -1,75 +0,0 @@ -#! /bin/sh -# -# Modified check_sensors to check the alarm status of an Adaptec 3200S RAID -# controller. -# -# Scott Lambert -- lambert@lambertfam.org -# -# Tested on FreeBSD 4.7 with the adptfbsd_323.tgz package installed. This -# package installs all it's programs into /usr/dpt. -# - -PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin - -PROGNAME=`basename $0` -PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'` -REVISION=`echo '$Revision: 302 $' | sed -e 's/[^0-9.]//g'` - -. $PROGPATH/utils.sh - -RAIDUTIL_CMD="/usr/dpt/raidutil -A ?" - -print_usage() { - echo "Usage: $PROGNAME" -} - -print_help() { - print_revision $PROGNAME $REVISION - echo "" - print_usage - echo "" - echo "This plugin checks alarm status of Adaptec 3200S RAID controller." - echo "" - support - exit 0 -} - -case "$1" in - --help) - print_help - exit 0 - ;; - -h) - print_help - exit 0 - ;; - --version) - print_revision $PROGNAME $REVISION - exit 0 - ;; - -V) - print_revision $PROGNAME $REVISION - exit 0 - ;; - *) - raidutiloutput=`$RAIDUTIL_CMD 2>&1` - status=$? - if test "$1" = "-v" -o "$1" = "--verbose"; then - echo ${raidutiloutput} - fi - if test ${status} -eq 127; then - echo "RAIDUTIL UNKNOWN - command not found (did you install raidutil?)" - exit -1 - elif test ${status} -ne 0 ; then - echo "WARNING - raidutil returned state $status" - exit 1 - fi - if echo ${raidutiloutput} | egrep On > /dev/null; then - echo RAID CRITICAL - RAID alarm detected! - exit 2 - else - echo raid ok - exit 0 - fi - ;; -esac diff --git a/contrib/check_apache.pl b/contrib/check_apache.pl deleted file mode 100644 index b9e69a0..0000000 --- a/contrib/check_apache.pl +++ /dev/null @@ -1,283 +0,0 @@ -#!/usr/bin/perl -# -# (c)2001 Sebastian Hetze, Linux Information Systems AG -# send bug reports to -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty -# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# you should have received a copy of the GNU General Public License -# along with this program (or with Nagios); if not, write to the -# Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA -# -# -# Check apache status information provided by mod_status to find -# out about the load (number of servers working) and the -# performance (average response time for recent requests). -# -# Usage: -# check_apache -H [-lhV] [-w ] [-c ] [-u ] -# -# check_apache (if you cannot avoid it) -# - -use LWP::UserAgent; -use URI::URL; -use Getopt::Long; -Getopt::Long::Configure('bundling'); - -$version=0.01; - -my %ERRORS = ('UNKNOWN' , '-1', - 'OK' , '0', - 'WARNING', '1', - 'CRITICAL', '2'); - - -# -# some default values -# -$perf_w=500; -$perf_c=1000; -$load_w=20; -$load_c=30; -$TIMEOUT=15; - -# -# get command line options the regular way -# -GetOptions - ("V" => \$opt_V, "version" => \$opt_V, - "h" => \$opt_h, "help" => \$opt_h, - "l" => \$opt_l, "load" => \$opt_l, - "v" => \$verbose, "verbose" => \$verbose, - "w=s" => \$opt_w, "warning=s" => \$opt_w, - "c=s" => \$opt_c, "critical=s" => \$opt_c, - "H=s" => \$opt_H, "hostname=s" => \$opt_H, - "u=s" => \$opt_u, "url=s" => \$opt_u); - -# -# handle the verbose stuff first -# -if ($opt_V) { - print "\n"; - print "check_apache nagios plugin version $version\n"; - print "\n"; - print "The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute\n"; - print "copies of the plugins under the terms of the GNU General Public License.\n"; - print "For more information about these matters, see the file named COPYING.\n"; - print "\n"; - print "Copyright (c) 2001 Sebastian Hetze Linux Information Systems AG\n"; - print "\n"; - print "\n"; - exit $ERRORS{'UNKNOWN'}; -} - -if ($opt_h) { - print_help(); - exit $ERRORS{'UNKNOWN'}; -} - -# -# now get options the weired way and set the defaults -# if nothing else is provided -# -$opt_H = shift unless ($opt_H); -print_usage() unless ($opt_H); - -if($opt_l) { - $autostring="?auto"; - ($opt_w) || ($opt_w = shift) || ($opt_w = $load_w); - $warn = $1 if ($opt_w =~ /([0-9]+)/); - ($opt_c) || ($opt_c = shift) || ($opt_c = $load_c); - $alert = $1 if ($opt_c =~ /([0-9]+)/); -} else { - $autostring=""; - ($opt_w) || ($opt_w = shift) || ($opt_w = $perf_w); - $warn = $1 if ($opt_w =~ /([0-9]+)/); - ($opt_c) || ($opt_c = shift) || ($opt_c = $perf_c); - $alert = $1 if ($opt_c =~ /([0-9]+)/); -} - -($opt_u) || ($opt_u = shift) || ($opt_u = "/server-status"); - - -# -# dont let us wait forever... -# -$SIG{'ALRM'} = sub { - print ("ERROR: No response from HTTP server (alarm)\n"); - exit $ERRORS{"UNKNOWN"}; -}; -alarm($TIMEOUT); - - -# -# now we set things up for the real work -# and fire up the request -# -$ua = new LWP::UserAgent; -$ua->agent("Nagios/0.1 " . $ua->agent); - - -$urlstring = "http://" . $opt_H . $opt_u . $autostring; -$url = url($urlstring); - -my $req = new HTTP::Request 'GET', $url; -my $res = $ua->request($req); - -# -# hopefully we´ve got something usefull -# -if ($res->is_success) { - if($opt_l) { - foreach $_ (split /^/m, $res->content) { - next if /^\s*$/; -# -# this is the load checking section -# we parse the whole content, just in case someone -# wants to use this some day in the future -# - if (/^Total Accesses:\s+([0-9.]+)/) { $accesses = $1; next; } - if (/^Total kBytes:\s+([0-9.]+)/) { $kbytes = $1; next; } - if (/^CPULoad:\s+([0-9.]+)\s+/) { $load = $1; next; } - if (/^Uptime:\s+([0-9.]+)\s+/) { $uptime = $1; next; } - if (/^ReqPerSec:\s+([0-9.]+)\s+/) { $rps = $1; next; } - if (/^BytesPerSec:\s+([0-9.]+)\s+/) { $bps = $1; next; } - if (/^BytesPerReq:\s+([0-9.]+)\s+/) { $bpr = $1; next; } - if (/^BusyServers:\s+([0-9.]+)\s+/) { $busy = $1; next; } - if (/^IdleServers:\s+([0-9.]+)\s+/) { $idle = $1; next; } - if (/^Scoreboard:\s+([SRWKDLG_.]+)\s+/) { $score = $1; next; } - print "Unknown Status\n"; - exit $ERRORS{"UNKNOWN"}; - } -# -# now we even parse the whole scoreboard, just for fun -# - foreach $scorepoint (split //m, $score) { - if($scorepoint eq '.') { $scores{'.'}+=1; next; } # Unused - if($scorepoint eq '_') { $scores{'_'}+=1; next; } # Waiting - if($scorepoint eq 'S') { $scores{'S'}+=1; next; } # Starting - if($scorepoint eq 'R') { $scores{'R'}+=1; next; } # Reading - if($scorepoint eq 'W') { $scores{'W'}+=1; next; } # Writing - if($scorepoint eq 'K') { $scores{'K'}+=1; next; } # Keepalive - if($scorepoint eq 'D') { $scores{'D'}+=1; next; } # DNS Lookup - if($scorepoint eq 'L') { $scores{'L'}+=1; next; } # Logging - if($scorepoint eq 'G') { $scores{'G'}+=1; next; } # Going - } - - if($busy>$alert) { - printf "HTTPD CRITICAL: %.0f servers running\n", $busy; - exit $ERRORS{"CRITICAL"}; - } - if($busy>$warn) { - printf "HTTPD WARNING: %.0f servers running\n", $busy; - exit $ERRORS{"WARNING"}; - } - printf "HTTPD ok: %.0f servers running, %d idle\n", $busy, $idle; - exit $ERRORS{"OK"}; - - } else { -# -# this is the performance check section -# We are a bit lazy here, no parsing of the initial data -# block and the scoreboard. -# However, you have the whole set of per server -# information to play with ;-) -# The actual performance is measured by adding up the -# milliseconds required to process the most recent -# requests of all instances and then taking the average. -# - foreach $tablerow (split //m, $res->content) { - ($empty,$Srv,$PID,$Acc,$M,$CPU,$SS,$Req,$Conn,$Child,$Slot,$Client,$VHost,$Request) - = split //, $tablerow; - if($Req) { - $lines+=1; - $req_sum+=$Req; - } - undef $Req; - } - $average=$req_sum/$lines; - if($average>$alert) { - printf "HTTPD CRITICAL: average response time %.0f - milliseconds\n", $average; - exit $ERRORS{"CRITICAL"}; - } - if($average>$warn) { - printf "HTTPD WARNING: average response time %.0f - milliseconds\n", $average; - exit $ERRORS{"WARNING"}; - } - if($average>0) { - printf "HTTPD ok: average response time %.0f milliseconds\n", - $average; - exit $ERRORS{"OK"}; - } - print "Unknown Status\n"; - exit $ERRORS{"UNKNOWN"}; - } -} else { - print "HTTP request failed\n"; - exit $ERRORS{"CRITICAL"}; -} - - -# -# ok, now we are almost through -# These last subroutines do the things for those that do not -# read source code. -# -sub print_usage () { - print "Usage: $0 -H [-lhV] [-w ] [-c ] [-u ]\n"; } - -sub print_help () { - print "\n"; - print "\n"; - print "check_apache nagios plugin version $version\n"; - print "\n"; - print "The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute\n"; - print "copies of the plugins under the terms of the GNU General Public License.\n"; - print "For more information about these matters, see the file named COPYING.\n"; - print "\n"; - print "Copyright (c) 2001 Sebastian Hetze Linux Information Systems AG\n"; - print "\n"; - print "\n"; - print "This plugin checks the apache HTTP service on the specified host.\n"; - print "It uses the mod_status facilities provided by the apache server.\n"; - print "The monitoring server must be authorized in httpd.conf.\n"; - print "\n"; - print "\n"; - print_usage(); - print "\n"; - print "Options:\n"; - print " -H, --hostname=ADDRESS\n"; - print " host name argument for server.\n"; - print " -l, --load\n"; - print " check load instead of performance.\n"; - print " -h, --help\n"; - print " print detailed help screen.\n"; - print " -V, --version\n"; - print " print version information.\n"; - print " -w, --warning=INTEGER\n"; - print " load / performance level at which a warning message will be gererated.\n"; - print " -c, --critical=INTEGER\n"; - print " load / performance level at which a critical message will be gererated.\n"; - print " -u, --url=PATH\n"; - print " location to call mod_status.\n"; - print "\n"; - print " Defaults for performance checking are $perf_w/$perf_c msec.\n"; - print " Defaults for load checking are $load_w/$load_c servers running.\n"; - print "\n"; - print "\n"; -} -# -# the end -# diff --git a/contrib/check_apc_ups.pl b/contrib/check_apc_ups.pl deleted file mode 100644 index 6bf1766..0000000 --- a/contrib/check_apc_ups.pl +++ /dev/null @@ -1,307 +0,0 @@ -#! /usr/bin/perl -wT -# -# Check_apc_ups - Check APC UPS status via SNMP -# Shamelessly copied from check_breeze.pl -# -# To do: -# - Send SNMP queries directly, instead of forking `snmpget`. -# - Make the status less verbose. Maybe we can send an "onLine, time -# remaining: hh:mm:ss" if all is well, and a list of specific problems -# if something is broken. - -use strict; -use Getopt::Long; -use vars qw($opt_V $opt_h $opt_H $opt_T $opt_t $opt_R $opt_r - $opt_L $opt_l $PROGNAME); -use lib "/usr/local/nagios/libexec"; -use utils qw(%ERRORS &print_revision &support &usage); - -sub print_help (); -sub print_usage (); -sub get_snmp_int_val ($); -sub escalate_exitval ($); - -$ENV{'PATH'}=''; -$ENV{'BASH_ENV'}=''; -$ENV{'ENV'}=''; - -Getopt::Long::Configure('bundling'); -GetOptions - ("V" => \$opt_V, "version" => \$opt_V, - "h" => \$opt_h, "help" => \$opt_h, - "T=s" => \$opt_T, "temp-critical" => \$opt_T, - "t=s" => \$opt_t, "temp-warning" => \$opt_t, - "R=s" => \$opt_R, "runtime-critical" => \$opt_R, - "r=s" => \$opt_r, "runtime-warning" => \$opt_r, - "L=s" => \$opt_L, "load-critical" => \$opt_L, - "l=s" => \$opt_l, "load-warning" => \$opt_l, - "H=s" => \$opt_H, "hostname=s" => \$opt_H); - -if ($opt_V) { - print_revision($PROGNAME,'$Revision: 1771 $'); - exit $ERRORS{'OK'}; -} - -if ($opt_h) {print_help(); exit $ERRORS{'OK'};} - -($opt_H) || ($opt_H = shift) || usage("Host name/address not specified\n"); -my $host = $1 if ($opt_H =~ /([-.A-Za-z0-9]+)/); -($host) || usage("Invalid host: $opt_H\n"); - -# Defaults - -$opt_R *= 60 * 100 if (defined $opt_R); # Convert minutes to secs/100 -$opt_r *= 60 * 100 if (defined $opt_R); - -my $tempcrit = $opt_T || 60; -my $tempwarn = $opt_t || 40; -my $runtimecrit = $opt_R || 30 * 60 * 100; # Secs / 100 -my $runtimewarn = $opt_r || 60 * 60 * 100; -my $loadcrit = $opt_L || 85; -my $loadwarn = $opt_l || 50; - -if ($tempcrit !~ /\d+/) { usage ("Invalid critical temperature threshold.\n"); } -if ($tempwarn !~ /\d+/) { usage ("Invalid critical temperature threshold.\n"); } - -if ($runtimecrit !~ /\d+/) { - usage ("Invalid critical run time threshold.\n"); -} -if ($runtimewarn !~ /\d+/) { - usage ("Invalid warning run time threshold.\n"); -} - -if ($loadcrit !~ /\d+/ || $loadcrit < 0 || $loadcrit > 100) { - usage ("Invalid critical load threshold.\n"); -} -if ($loadwarn !~ /\d+/ || $loadwarn < 0 || $loadwarn > 100) { - usage ("Invalid warning load threshold.\n"); -} - - -# APC UPS OIDs -# APC MIBs are available at ftp://ftp.apcftp.com/software/pnetmib/mib -my $upsBasicOutputStatus = ".1.3.6.1.4.1.318.1.1.1.4.1.1.0"; -my $upsBasicBatteryStatus = ".1.3.6.1.4.1.318.1.1.1.2.1.1.0"; -my $upsAdvInputLineFailCause = ".1.3.6.1.4.1.318.1.1.1.3.2.5.0"; -my $upsAdvBatteryTemperature = ".1.3.6.1.4.1.318.1.1.1.2.2.2.0"; -my $upsAdvBatteryRunTimeRemaining = ".1.3.6.1.4.1.318.1.1.1.2.2.3.0"; -my $upsAdvBatteryReplaceIndicator = ".1.3.6.1.4.1.318.1.1.1.2.2.4.0"; -my $upsAdvOutputLoad = ".1.3.6.1.4.1.318.1.1.1.4.2.3.0"; -my $upsAdvTestDiagnosticsResults = ".1.3.6.1.4.1.318.1.1.1.7.2.3.0"; - -my @outputStatVals = ( - [ undef, undef ], # pad 0 - [ undef, undef ], # pad 1 - [ "onLine", $ERRORS{'OK'} ], # 2 - [ "onBattery", $ERRORS{'WARNING'} ], # 3 - [ "onSmartBoost", $ERRORS{'WARNING'} ], # 4 - [ "timedSleeping", $ERRORS{'WARNING'} ], # 5 - [ "softwareBypass", $ERRORS{'WARNING'} ], # 6 - [ "off", $ERRORS{'CRITICAL'} ], # 7 - [ "rebooting", $ERRORS{'WARNING'} ], # 8 - [ "switchedBypass", $ERRORS{'WARNING'} ], # 9 - [ "hardwareFailureBypass", $ERRORS{'CRITICAL'} ], # 10 - [ "sleepingUntilPowerReturn", $ERRORS{'CRITICAL'} ], # 11 - [ "onSmartTrim", $ERRORS{'WARNING'} ], # 12 -); - -my @failCauseVals = ( - undef, - "noTransfer", - "highLineVoltage", - "brownout", - "blackout", - "smallMomentarySag", - "deepMomentarySag", - "smallMomentarySpike", - "largeMomentarySpike", - "selfTest", - "rateOfVoltageChnage", -); - -my @battStatVals = ( - [ undef, undef ], # pad 0 - [ undef, undef ], # pad 1 - [ "batteryNormal", $ERRORS{'OK'} ], # 2 - [ "batteryLow", $ERRORS{'CRITICAL'} ], # 3 -); - -my @battReplVals = ( - [ undef, undef ], # pad 0 - [ "noBatteryNeedsReplacing", $ERRORS{'OK'} ], # 1 - [ "batteryNeedsReplacing", $ERRORS{'CRITICAL'} ], # 2 -); - -my @diagnosticsResultsVals = ( - [ undef, undef ], # pad 0 - [ "OK", $ERRORS{'OK'} ], # 1 - [ "failed", $ERRORS{'CRITICAL'} ], # 2 - [ "invalidTest", $ERRORS{'CRITICAL'} ], # 3 - [ "testInProgress", $ERRORS{'OK'} ], # 4 -); - -my $exitval = $ERRORS{'UNKNOWN'}; -my $data; -my $onbattery = 3; - -$data = get_snmp_int_val( $upsBasicOutputStatus ); - -print "Output status: "; -if (defined ($data) && defined ($outputStatVals[$data][0])) { - print "$outputStatVals[$data][0] | "; - escalate_exitval($outputStatVals[$data][1]); -} else { - print "unknown | "; -} - -$data = get_snmp_int_val( $upsAdvBatteryRunTimeRemaining ); - -print "Rem time: "; -if (defined ($data)) { - my $hrs = int($data / (60 * 60 * 100)); # Data is hundredths of a second - my $mins = int($data / (60 * 100)) % 60; - my $secs = ($data % 100) / 100; - printf "%d:%02d:%05.2f | ", $hrs, $mins, $secs; - if ($data <= $runtimecrit) { - escalate_exitval($ERRORS{'CRITICAL'}); - } elsif ($data <= $runtimewarn) { - escalate_exitval($ERRORS{'WARNING'}); - } else { - escalate_exitval($ERRORS{'OK'}); - } -} else { - print "unknown | "; -} - -$data = get_snmp_int_val( $upsBasicBatteryStatus ); - -print "Battery status: "; -if (defined ($data) && defined ($battStatVals[$data][0])) { - my $failcause = "unknown"; - my $fc = get_snmp_int_val( $upsAdvInputLineFailCause ); - if ($data == $onbattery) { - if (defined ($failCauseVals[$fc])) { $failcause = $failCauseVals[$fc]; } - print "$battStatVals[$data][0] ($failcause) | "; - } else { - print "$battStatVals[$data][0] | "; - } - escalate_exitval($battStatVals[$data][1]); -} else { - print "unknown | "; -} - -$data = get_snmp_int_val( $upsAdvBatteryTemperature ); - -print "Battery temp(C): "; -if (defined ($data)) { - print "$data | "; - if ($data >= $tempcrit) { - escalate_exitval($ERRORS{'CRITICAL'}); - } elsif ($data >= $tempwarn) { - escalate_exitval($ERRORS{'WARNING'}); - } else { - escalate_exitval($ERRORS{'OK'}); - } -} else { - print "unknown | "; -} - -$data = get_snmp_int_val( $upsAdvBatteryReplaceIndicator ); - -print "Battery repl: "; -if (defined ($data) && defined ($battReplVals[$data][0])) { - print "$battReplVals[$data][0] | "; - escalate_exitval($battReplVals[$data][1]); -} else { - print "unknown | "; -} - -$data = get_snmp_int_val( $upsAdvOutputLoad ); - -print "Output load (%): "; -if (defined ($data)) { - print "$data | "; - if ($data >= $loadcrit) { - escalate_exitval($ERRORS{'CRITICAL'}); - } elsif ($data >= $loadwarn) { - escalate_exitval($ERRORS{'WARNING'}); - } else { - escalate_exitval($ERRORS{'OK'}); - } -} else { - print "unknown | "; -} - -$data = get_snmp_int_val( $upsAdvTestDiagnosticsResults ); - -print "Diag result: "; -if (defined ($data) && defined ($diagnosticsResultsVals[$data][0])) { - print "$diagnosticsResultsVals[$data][0]\n"; - escalate_exitval($diagnosticsResultsVals[$data][1]); -} else { - print "unknown\n"; -} - - -exit $exitval; - - -sub print_usage () { - print "Usage: $PROGNAME -H -T temp -t temp -R minutes -r minutes\n"; - print " -L percent -l percent\n"; -} - -sub print_help () { - print_revision($PROGNAME,'$Revision: 1771 $'); - print "Copyright (c) 2001 Gerald Combs/Jeffrey Blank/Karl DeBisschop - -This plugin reports the status of an APC UPS equipped with an SNMP management -module. - -"; - print_usage(); - print " --H, --hostname=HOST - Name or IP address of host to check --T --temp-critical - Battery degrees C above which a CRITICAL status will result (default: 60) --t --temp-warning - Battery degrees C above which a WARNING status will result (default: 40) --R --runtime-critical - Minutes remaining below which a CRITICAL status will result (default: 30) --r --runtime-warning - Minutes remaining below which a WARNING status will result (default: 60) --L --load-critical - Output load pct above which a CRITICAL status will result (default: 85 --l --load-warning - Output load pct above which a WARNING status will result (default: 50 - -"; - support(); -} - -sub get_snmp_int_val ($) { - my $val=0; - my $oid = shift(@_); - - $val = `/usr/bin/snmpget $host public $oid 2> /dev/null`; - my @test = split(/ /,$val,3); - - return undef unless (defined ($test[2])); - - if ($test[2] =~ /\(\d+\)/) { # Later versions of UCD SNMP - ($val) = ($test[2] =~ /\((\d+)\)/); - } elsif ($test[2] =~ /: \d+/) { - ($val) = ($test[2] =~ /: (\d+)/); - } else { - $val = $test[2]; - } - - return $val; -} - -sub escalate_exitval ($) { - my $newval = shift(@_); - - if ($newval > $exitval) { $exitval = $newval; } -} diff --git a/contrib/check_appletalk.pl b/contrib/check_appletalk.pl deleted file mode 100644 index 9277686..0000000 --- a/contrib/check_appletalk.pl +++ /dev/null @@ -1,210 +0,0 @@ -#! /usr/bin/perl -wT -# -# check_atalk_ping plugin for nagios -# -# usage: -# check_atalk_ping atalkaddress -# -# Checks if an atalkhost responds to an atalk echo -# using "aecho" -# -# initial version: 23 October 2002 by Stefan Beck, IT Software Solutions -# current status: $Revision: 1771 $ -# -# Copyright Notice: GPL -# -BEGIN { - if ( $0 =~ m/^(.*?)[\/\\]([^\/\\]+)$/ ) { - $runtimedir = $1; - $PROGNAME = $2; - } - delete $ENV{'LANG'}; -} - -use strict; -use lib "/usr/local/nagios/libexec"; - -use utils qw($TIMEOUT %ERRORS &print_revision &support); -use vars qw($PROGNAME); - -$PROGNAME = "check_atalk"; - -my ( - $verbose, $host, $warning_avg, $warning_loss, - $critical_avg, $critical_loss, $count, $cmd, - $avg, $loss, $line -); -my ( $opt_c, $opt_w, $opt_H, $opt_p ); -$opt_c = $opt_w = $opt_p = $opt_H = ''; - -sub print_help (); -sub print_usage (); -sub help (); -sub version (); - -# Just in case of problems, let's not hang NetSaint -$SIG{'ALRM'} = sub { - print "Plugin Timeout\n"; - exit 2; -}; -alarm($TIMEOUT); - -delete @ENV{ 'PATH', 'IFS', 'CDPATH', 'ENV', 'BASH_ENV' }; - -use Getopt::Long; -Getopt::Long::Configure( 'bundling', 'no_ignore_case' ); -GetOptions( - "V|version" => \&version, - "h|help" => \&help, - "p|packets=i" => \$opt_p, - "c|critical=s" => \$opt_c, - "w|warning=s" => \$opt_w, - "H|hostname=s" => \$opt_H -); - - -# appletalk hostname ot address -$opt_H = shift unless ($opt_H); -unless ($opt_H) { print_usage (); exit $ERRORS{'UNKNOWN'}; } -if ( $opt_H && $opt_H =~ m/^([-a-zA-Z\.\:0-9]+)$/ ) { - $host = $1; -} -else { - print "$opt_H is not a valid host name\n"; - exit $ERRORS{'UNKNOWN'}; -} - -# number of packets -$opt_p = 5 unless $opt_p; -if ( $opt_p && $opt_p =~ m/^([1-9]+[0-9]*)$/ ) { - $count = $1; -} -else { - print "$opt_p is not a valid packet number\n"; - exit $ERRORS{'UNKNOWN'}; -} - -if ( $opt_w && $opt_w =~ m/^([1-9]+[0-9]*),([1-9][0-9]*)%$/ ) { - $warning_avg = $1; - $warning_loss = $2; -} -else { - print "$opt_w is not a valid threshold\n"; - exit $ERRORS{'UNKNOWN'}; -} - -if ( $opt_c && $opt_c =~ m/^([1-9]+[0-9]*),([1-9][0-9]*)%$/ ) { - $critical_avg = $1; - $critical_loss = $2; -} -else { - print "$opt_c is not a valid threshold\n"; - exit $ERRORS{'UNKNOWN'}; -} - -$cmd = "/usr/bin/aecho -c $count $host 2>&1 |"; -print "$cmd\n" if ($verbose); -open CMD, $cmd; - -while () { - print $_ if ($verbose); - $line = $_; - - # 5 packets sent, 5 packets received, 0% packet loss - # round-trip (ms) min/avg/max = 0/0/0 - - if (/received, ([0-9]+)% packet loss/) { - $loss = $1; - } - if (/min\/avg\/max = [0-9]+\/([0-9]+)\/[0-9]+/) { - $avg = $1; - } -} - -sub print_help() { - print_revision( $PROGNAME, '$Revision: 1771 $ ' ); - print "Copyright (c) 2002 Stefan Beck\n"; - print "\n"; - print "Check if an atalkhost responds to an atalk echo using\n"; - print " aecho -c \n"; - print "\n"; - print_usage (); - print "\n"; - print "-H, --hostname=HOST\n"; - print " host to ping\n"; - print "-w, --warning=THRESHOLD\n"; - print " warning threshold pair\n"; - print "-c, --critical=THRESHOLD\n"; - print " critical threshold pair\n"; - print "-p, --packets=INTEGER\n"; - print " number of ICMP ECHO packets to send (Default: 5)\n"; - print "\n"; - print - "THRESHOLD is ,% where is the round trip average -travel\n"; - print - "time (ms) which triggers a WARNING or CRITICAL state, and -is the\n"; - print "percentage of packet loss to trigger an alarm state.\n"; - print "\n"; - - support(); -} - -sub print_usage () { - print "$PROGNAME -H atalkhost -w ,% -c ,%\n"; - print " [-p packets] [-t timeout] [-L]\n"; - print "$PROGNAME [-h | --help]\n"; - print "$PROGNAME [-V | --version]\n"; -} - -sub version () { - print_revision( $PROGNAME, '$Revision: 1771 $ ' ); - exit $ERRORS{'OK'}; -} - -sub help () { - print_help (); - exit $ERRORS{'OK'}; -} - -my $state = "OK"; -my $answer = undef; - -if ( defined $loss && defined $avg ) { - if ( $loss >= $critical_loss ) { - $state = "CRITICAL"; - } - elsif ( $avg >= $critical_avg ) { - $state = "CRITICAL"; - } - elsif ( $loss >= $warning_loss ) { - $state = "WARNING"; - } - elsif ( $avg >= $warning_avg ) { - $state = "WARNING"; - } - else { - $state = "OK"; - } - $answer = "Appletalk PING $state - Packet loss = $loss%, RTA = $avg -ms\n"; -} -else { - $state = "UNKNOWN"; - $answer = "UNKNOWN - $line"; -} -print $answer; -exit $ERRORS{$state}; - - - - -------------------------------------------------------- -This sf.net email is sponsored by:ThinkGeek -Welcome to geek heaven. -http://thinkgeek.com/sf -_______________________________________________ -Nagios-devel mailing list -Nagios-devel@lists.sourceforge.net -https://lists.sourceforge.net/lists/listinfo/nagios-devel diff --git a/contrib/check_arping.pl b/contrib/check_arping.pl deleted file mode 100644 index c41c4a8..0000000 --- a/contrib/check_arping.pl +++ /dev/null @@ -1,120 +0,0 @@ -#! /usr/bin/perl -w -# -# check_arping.pl - Nagios plugin to check host status via ARP ping -# -# usage: -# check_arping -H hostname -I interface -T timeout -# -# -# Copyright (C) 2003 Kenny Root -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# -# Report bugs to: kenny@the-b.org, nagiosplug-help@lists.sf.net - -use POSIX; -use strict; -use lib "/usr/lib/nagios/plugins" ; -use utils qw($TIMEOUT %ERRORS &print_revision &support); - -use Net::Arping; -use Getopt::Long; - -my $PROGNAME = "check_arping"; - -my($status, $state, $answer); -my($opt_V, $opt_h, $opt_t, $opt_I, $opt_H); - - -#Option checking -$status = GetOptions( - "V|version" => \$opt_V, - "help" => \$opt_h, - "I|interface=s" => \$opt_I, - "H|host=s" => \$opt_H, - "t|timeout=i" => \$opt_t); - -if ($status == 0) -{ - print_help() ; - exit $ERRORS{'OK'}; -} - - -if ($opt_V) { - print_revision($PROGNAME,'$Revision: 1112 $ '); - exit $ERRORS{'OK'}; -} - -if ($opt_h) { - print_help(); - exit $ERRORS{'OK'}; -} - -if ($opt_t) { - if ($opt_t ne int($opt_t)) { - print "Timeout not in seconds!\n"; - print_help(); - exit $ERRORS{'OK'}; - } - $opt_t = int($opt_t); -} else { - $opt_t = 3; -} - -if (! utils::is_hostname($opt_H)){ - usage(); - exit $ERRORS{"UNKNOWN"}; -} - -my $ping = Net::Arping->new(); - -my $reply = $ping->arping(Host => $opt_H, Interface => $opt_I, Timeout => $opt_t); - -if ($reply eq "0") { - $state = "CRITICAL"; - print "$state: no reply from $opt_H on interface $opt_I in $opt_t seconds.\n"; - exit $ERRORS{$state}; -} else { - $state = "OK"; - $answer = "replied with MAC address $reply"; -} - -print "ARPING $state - $answer\n"; -exit $ERRORS{$state}; - - -sub usage { - print "\nMissing arguments!\n"; - print "\n"; - print "check_arping -I -H [-t ]\n"; - print "\n\n"; - support(); - exit $ERRORS{"UNKNOWN"}; -} - -sub print_help { - print "check_arping pings hosts that normally wouldn't allow\n"; - print "ICMP packets but are still on the local network.\n"; - print "\nUsage:\n"; - print " -H (--host) IP to query - (required)\n"; - print " -I (--interface) Interface to use.\n"; - print " -t (--timeout) Timeout in seconds.\n"; - print " -V (--version) Plugin version\n"; - print " -h (--help) usage help \n\n"; - print_revision($PROGNAME, '$Revision: 1112 $'); - -} diff --git a/contrib/check_asterisk.pl b/contrib/check_asterisk.pl deleted file mode 100644 index 179d367..0000000 --- a/contrib/check_asterisk.pl +++ /dev/null @@ -1,259 +0,0 @@ -#!/usr/bin/perl -w - -use strict; -use IO::Socket; -use Getopt::Long; -$|=1; - -my ( - $host, $username, $password, $verbose, $help, $command, $mode, - $ipaddr, $respaddr, $sendto, $msg, $recvfrom, - $version, $response, $message, $line, - $sock, $port, $reply, - $warning, $critical, - %warnval, %critval, - %channels, - $runmode, - $key, - $s, -); -my $stop = 0; -my $mgr_port = 5038; -my $iax_port = 4569; -my $exitcode = 0; -my $cause = ""; - -my $iax_answer = 0; -my $iax_maxlen = 1024; -my $iax_timeout = 5; -my $iax_src_call = "8000"; #8000 most siginificant bit is IAX packet type full ... required for a poke etc... -my $iax_dst_call = "0000"; -my $iax_timestamp = "00000000"; -my $iax_outbound_seq = "00"; -my $iax_inbound_seq = "00"; -my $iax_type = "06"; #IAX_Control - -sub ok { - $s = shift; - $s =~ s/[\r\n]//g; - print "OK: $s\n"; - exit(0); -} - -sub warning { - $s = shift; - $s =~ s/[\r\n]//g; - print "WARNING: $s\n"; - exit(1); -} - -sub error { - $s = shift; - $s =~ s/[\r\n]//g; - print "ERROR: $s\n"; - exit(2); -} - -sub unknown { - $s = shift; - $s =~ s/[\r\n]//g; - print "UNKNOWN: $s\n"; - exit(3); -} - -sub syntax { - $s = shift; - unless ($s =~ m/Help:/) { - $s = "Error: (".$s.")" or $s = 'Unknown'; - } - print "$s\n" unless ($help); - print "Syntax: $0 -m mgr -h -u -p [-cwv]\n"; - print "Syntax: $0 -m iax -h [-v]\n"; - print "* --host -h Host\n"; - print "* --mode -m Mode - eithr 'mgr' or 'iax'\n"; - print " --username -u Username\n"; - print " --password -p Password\n"; - print " --port -P n Port (if not using $mgr_port for manager or $iax_port for IAX)\n"; - print " --warning xxx=n Return warning if > n channels of type xxx.\n"; - print " --critical xxx=n Return critical if > n channels of type xxx.\n"; - print " --verbose -v Verbose\n"; - print " --help -h This help\n"; - exit(3); -} - -Getopt::Long::Configure('bundling'); -GetOptions - ("p=s" => \$password, "password=s" => \$password, - "u=s" => \$username, "username=s" => \$username, - "h=s" => \$host, "host=s" => \$host, - "P=i" => \$port, "port=i" => \$port, - "H" => \$help, "help" => \$help, - "v" => \$verbose, "verbose" => \$verbose, - "m=s" => \$mode, "mode=s" => \$mode, - "critical=s" => \$critical, "warning=s" => \$warning); - -syntax("Help:") if ($help); -syntax("Missing host") unless (defined($host)); -syntax("Missing mode") unless (defined($mode)); -if ($mode =~ /^iax$/i) { - print "Running in IAX mode\n" if ($verbose); - $runmode = 1; -} elsif ($mode =~ /^mgr$/i) { - print "Running in Manager mode\n" if ($verbose); - $runmode = 2; -} else { - syntax("Unknown mode $mode") -} - -############################################################################## - -if ($runmode == 2) { - $port = $mgr_port; - syntax("Missing username") unless (defined($username)); - syntax("Missing password") unless (defined($password)); - if (defined($warning)) { - foreach $s (split(/,/, $warning)) { - syntax("Warning value given, $s, is invalid") - unless ($s =~ /^(\w+)=(\d+)$/); - $warnval{$1} = $2; - print "Clear to give WARNING after $2 connections on $1\n" if ($verbose); - } - } - if (defined($critical)) { - foreach $s (split(/,/, $critical)) { - syntax("Critical value given, $s, is invalid") - unless ($s =~ /^(\w+)=(\d+)$/); - $critval{$1} = $2; - print "Clear to give CRITICAL after $2 connections on $1\n" if ($verbose); - } - } - - print "Connecting to $host:$port\n" if ($verbose); - unless ($sock = IO::Socket::INET->new(PeerAddr => $host, PeerPort => $port, Proto => 'tcp')) { - print("Could not connect to asterisk server ".$host.":".$port."\n"); - exit(2); - } - print "Connected to $host:$port\n" if ($verbose); - $version = <$sock>; - print $version if ($verbose); - - print $sock "Action: Login\r\nUsername: $username\r\nSecret: $password\r\nEvents: off\r\n\r\n"; - print "Action: Login\r\nUsername: $username\r\nSecret: $password\r\n\r\n" if ($verbose); - $response = <$sock>; - $message = <$sock>; - $s = <$sock>; - print $response.$message if ($verbose); - print $s if ($verbose); - - exit(1) unless ($response =~ m/^Response:\s+(.*)$/i); - exit(1) unless ($1 =~ m/Success/i); - - print $sock "Action: Status\r\n\r\n"; - print "Action: Status\r\n\r\n" if ($verbose); - - $response = <$sock>; - $message = <$sock>; - print $response.$message if ($verbose); - - &unknown("Unknown answer $response (wanted Response: something)") unless ($response =~ m/^Response:\s+(.*)$/i); - &unknown("$response didn't say Success") unless ($1 =~ m/Success/i); - &unknown("Unknown answer $response (wanted Message: something)") unless ($message =~ m/^Message:\s+(.*)$/i); - &unknown("didn't understand message $message") unless ($1 =~ m/Channel status will follow/i); - - $stop=0; - while (($stop == 0) && ($line = <$sock>)) { - print "$line" if ($verbose); - if ($line =~ m/Channel:\s+(\w+)\//) { - $channels{$1}++; - print "Found $1 channel\n" if ($verbose); - } - if ($line =~ m/Event:\s*StatusComplete/i) { - $stop++; - } - } - -# Log out - print $sock "Action: Logoff\r\n\r\n"; - - undef($s); - foreach $key (keys %channels) { - $s .= " " . $key . " (" . $channels{$key} . ")"; - } - - foreach $key (keys %critval) { - print "key = $key\n" if ($verbose); - if (defined($channels{$key}) && ($channels{$key} > $critval{$key})) { - $exitcode = 2; - $cause .= $channels{$key} . " $key channels detected. "; - } - } - - if ($exitcode < 2) { - foreach $key (keys %warnval) { - print "key = $key\n" if ($verbose); - if (defined($channels{$key}) && ($channels{$key} > $warnval{$key})) { - $exitcode = 1; - $cause .= $channels{$key} . " $key channels detected. "; - } - } - } - - if ($exitcode == 0) { - print "OK "; - } elsif ($exitcode == 1) { - print "WARNING "; - } elsif ($exitcode == 2) { - print "CRITICAL "; - } elsif ($exitcode > 2) { - print "UNKNOWN "; - } - if (defined($s)) { - $cause .= " Channels:$s"; - } else { - $cause .= " (idle)"; - } - - print $cause; - - print "\n" if ($verbose); - - exit($exitcode); -} elsif ($runmode == 1) { - $port = $iax_port; - - socket(PING, PF_INET, SOCK_DGRAM, getprotobyname("udp")); - - $msg = pack "H24", $iax_src_call . $iax_dst_call . $iax_timestamp . - $iax_outbound_seq . $iax_inbound_seq . $iax_type . $iax_type; - - $ipaddr = inet_aton($host); - $sendto = sockaddr_in($port,$ipaddr); - - send(PING, $msg, 0, $sendto) == length($msg) or die "cannot send to $host : $port : $!\n"; - - eval { - local $SIG{ALRM} = sub { die("alarm time out"); }; - alarm $iax_timeout; - - while (1) { - $recvfrom = recv(PING, $msg, $iax_maxlen, 0) or die "recv: $!"; - ($port, $ipaddr) = sockaddr_in($recvfrom); - $respaddr = inet_ntoa($ipaddr); - $iax_answer++; - # print "Response from $respaddr : $port\n"; - } - - }; - - if ($iax_answer) { - if ($iax_answer == 1) { - $reply = "reply"; - } else { - $reply = "replies"; - } - &ok("Got $iax_answer $reply"); - } else { - &error("Got no reply"); - } -} - diff --git a/contrib/check_axis.sh b/contrib/check_axis.sh deleted file mode 100644 index 231d9da..0000000 --- a/contrib/check_axis.sh +++ /dev/null @@ -1,95 +0,0 @@ -#!/bin/sh - -box=$1 -port=$2 -usr=$3 -pass=$4 - -if [ ! "$#" == "4" ]; then - echo -e "\nYou did not supply enough command line arguments. \nUsage: ./check_axis.sh \n \nCheck_axis.sh checks the status of LPT ports on Axis print servers. \nIt was written by Tom De Blende (tom.deblende@village.uunet.be) in 2002. \n" && exit "3" -fi - -tempfile=/tmp/status-$box.tmp -exit="3" - -ftp -in $box &>/dev/null < \&version, - "h|help" => \&help, - "v|verbose" => \$verbose, - "d|directory=s" => \$opt_d, - "s|minsize=s" => \$opt_s, - "t|timeout=s" => \$opt_t, - ); - -($opt_s) || ($opt_s = shift) || usage("Minimum File size not specified\n"); -usage("File size must be numeric value") unless ($opt_s =~ m/^[0-9]+$/); - -(($opt_t) && ($TIMEOUT = $opt_t)) || ($TIMEOUT = 120); -usage("TIMEOUT must be numeric value") unless ($TIMEOUT =~ m/^[0-9]+$/); - -# Don't hang if there are timeout issues -$SIG{'ALRM'} = sub { - print ("ERROR: No response from ftp server (alarm)\n"); - exit $ERRORS{'UNKNOWN'}; -}; -alarm($TIMEOUT); - -# Do stuff - -my $time = time; - -opendir(THISDIR, "$dir") or die "Can't open directory! $!"; -my @allfiles = grep !/^\./, readdir THISDIR; -closedir THISDIR; -while (my $file = $dir . pop @allfiles){ - my ($size, $mtime) = (stat($file))[7,9]; - if (((my $a = ($time - $mtime)) <= $within) and ($size >= $opt_s)){ - display_res("OK: File $file is <= $within and >=$opt_s bytes.\n","OK"); - } -} - -# If we got here nothing matched.... -display_res("CRITICAL: No files in $dir are <= $within and >= $minsize.", "CRITICAL"); - -exit; - -sub print_usage () { - print "Usage: $PROGNAME -s -t \n"; -} - -sub print_help () { - print_revision($PROGNAME,'$ Revision: 1.0 $ '); - print_usage(); - support(); -} - -sub version () { - print_revision($PROGNAME,'$ Revision: 1.0 $ '); - exit $ERRORS{'OK'}; -} - -sub help () { - print_help(); - exit $ERRORS{'OK'}; -} - -sub display_res ($$) { - my ($answer, $state) = @_; - print $answer; - exit $ERRORS{$state}; -} diff --git a/contrib/check_bgpstate.pl b/contrib/check_bgpstate.pl deleted file mode 100644 index 645d750..0000000 --- a/contrib/check_bgpstate.pl +++ /dev/null @@ -1,215 +0,0 @@ -#!/usr/bin/perl -w -# -# check_bgpstate.pl - nagios plugin -# -# Copyright (C) 2000 Christoph Kron -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# -# Report bugs to: ck@zet.net -# -# 11.01.2000 Version 1.0 - - - -use strict; - -use Net::SNMP; -use Getopt::Long; -&Getopt::Long::config('auto_abbrev'); - - -# whois programm for RIPE database queries -my $whois = '/usr/bin/whois'; -my $status; -my $TIMEOUT = 30; - -# critical bgp sessions -my %uplinks = ( 1273, 'Uplink ECRC', - 1755, 'Uplink EBONE', - 3300, 'Uplink AUCS' - ); - -my %ERRORS = ('UNKNOWN' , '-1', - 'OK' , '0', - 'WARNING', '1', - 'CRITICAL', '2'); - - -my %bgpPeerState = ( - '1',"idle", - '2',"connect", - '3',"active", - '4',"opensent", - '5',"openconfirm", - '6',"established" - ); -my $state = "UNKNOWN"; -my $answer = ""; -my $snmpkey; -my $snmpoid; -my $key; -my $community = "public"; -my $port = 161; -my @snmpoids; -my $snmpbgpPeerState = '1.3.6.1.2.1.15.3.1.2'; -my $snmpbgpPeerLocalAddr = '1.3.6.1.2.1.15.3.1.5'; -my $snmpbgpPeerRemoteAddr = '1.3.6.1.2.1.15.3.1.7'; -my $snmpbgpPeerRemoteAs = '1.3.6.1.2.1.15.3.1.9'; -my $hostname; -my $session; -my $error; -my $response; -my %bgpStatus; -my $bgpestablished =0 ; -my $bgpcritical =0; -my $bgpdown =0; -my $bgpidle =0; -my $bgpmessage; -my $asname; -my $remoteas; -my @output; - -sub usage { - printf "\nMissing arguments!\n"; - printf "\n"; - printf "Perl bgpstate plugin for Nagios\n"; - printf "monitors all BGP sessions\n"; - printf "usage: \n"; - printf "check_bgpstate.pl -c -p \n"; - printf "Copyright (C) 2000 Christoph Kron\n"; - printf "check_bgpstate.pl comes with ABSOLUTELY NO WARRANTY\n"; - printf "This programm is licensed under the terms of the "; - printf "GNU General Public License\n(check source code for details)\n"; - printf "\n\n"; - exit $ERRORS{"UNKNOWN"}; -} - -# Just in case of problems, let's not hang Nagios -$SIG{'ALRM'} = sub { - print ("ERROR: No snmp response from $hostname (alarm)\n"); - exit $ERRORS{"UNKNOWN"}; -}; -alarm($TIMEOUT); - - -$status = GetOptions("community=s",\$community, - "port=i",\$port); -if ($status == 0) -{ - &usage; -} - - #shift; - $hostname = shift || &usage; - - -push(@snmpoids, $snmpbgpPeerState); -push(@snmpoids, $snmpbgpPeerLocalAddr); -push(@snmpoids, $snmpbgpPeerRemoteAddr); -push(@snmpoids, $snmpbgpPeerRemoteAs); - -foreach $snmpoid (@snmpoids) { - - ($session, $error) = Net::SNMP->session( - -hostname => $hostname, - -community => $community, - -port => $port - ); - - if (!defined($session)) { - $state='UNKNOWN'; - $answer=$error; - print ("$state: $answer"); - exit $ERRORS{$state}; - } - - if (!defined($response = $session->get_table($snmpoid))) { - $answer=$session->error; - $session->close; - $state = 'CRITICAL'; - print ("$state: $answer,$snmpkey"); - exit $ERRORS{$state}; - } - - foreach $snmpkey (keys %{$response}) { - $snmpkey =~ m/.*\.(\d+\.\d+\.\d+\.\d+$)/; - $key = $1; -# printf "debug: $snmpkey: $key -> $response->{$snmpkey}\n"; - $bgpStatus{$key}{$snmpoid} = $response->{$snmpkey}; - } - $session->close; -} - -foreach $key (keys %bgpStatus) { - if ($bgpStatus{$key}{$snmpbgpPeerState} == 6 ) { - $bgpestablished++; - } - elsif ($bgpStatus{$key}{$snmpbgpPeerState} == 1 ) { - $bgpidle++; - } - else { - $bgpdown++ ; - if (exists($uplinks{$bgpStatus{$key}{$snmpbgpPeerRemoteAs}}) ) { - $bgpcritical++; - } - @output = `$whois -T aut-num AS$bgpStatus{$key}{$snmpbgpPeerRemoteAs}`; - - $asname = ""; - foreach (@output) { - if (m/as-name/) { - $asname = $_; - $asname =~ s/as-name://; - last; - } - if ( $asname =~ "" && m/descr/ ) { - $asname = $_; - $asname =~ s/descr://; - } - } - $asname =~ s/^\s*//; - $asname =~ s/\s*$//; - $bgpmessage .= sprintf("Peering with AS%s not established -> %s
", - $bgpStatus{$key}{$snmpbgpPeerRemoteAs}, - $asname); - } -} - - - if ($bgpdown > 0) { - if ($bgpcritical > 0) { - $state = 'CRITICAL'; - } - else { - $state = 'WARNING'; - } - $answer = sprintf("host '%s', sessions up: %d, down: %d, shutdown: %d
", - $hostname, - $bgpestablished, - $bgpdown, $bgpidle); - $answer = $answer . $bgpmessage . "\n"; - } - else { - $state = 'OK'; - $answer = sprintf("host '%s', sessions up: %d, down: %d, shutdown: %d\n", - $hostname, - $bgpestablished, - $bgpdown,$bgpidle); - } - -print ("$state: $answer"); -exit $ERRORS{$state}; - diff --git a/contrib/check_breeze.pl b/contrib/check_breeze.pl deleted file mode 100644 index bb83765..0000000 --- a/contrib/check_breeze.pl +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/perl - -# Plugin to test signal strength on Breezecom wireless equipment -# Contributed by Jeffrey Blank - -$Host=$ARGV[0]; -$sig_crit=$ARGV[1]; -$sig_warn=$ARGV[2]; -$sig=0; -$sig = `snmpget $Host public .1.3.6.1.4.1.710.3.2.3.1.3.0`; -@test=split(/ /,$sig); -$sig=@test[2]; -$sig=int($sig); -if ($sig>100){$sig=100} - -print "Signal Strength at: $sig%\n"; -if ($sig<$sig_crit) - {exit(2)} -if ($sig<$sig_warn) - {exit(1)} - -exit(0); diff --git a/contrib/check_cluster.c b/contrib/check_cluster.c deleted file mode 100644 index 06519e6..0000000 --- a/contrib/check_cluster.c +++ /dev/null @@ -1,332 +0,0 @@ -/***************************************************************************** - * - * CHECK_CLUSTER.C - Host and Service Cluster Plugin for NetSaint - * - * Copyright (c) 2000 Ethan Galstad (netsaint@netsaint.org) - * License: GPL - * Last Modified: 07-08-2000 - * - * License: - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - *****************************************************************************/ - - -#include -#include - -#define OK 0 -#define ERROR -1 - -#define TRUE 1 -#define FALSE 0 - -#define CHECK_SERVICES 1 -#define CHECK_HOSTS 2 - -#define MAX_INPUT_BUFFER 1024 - -#define STATE_OK 0 -#define STATE_WARNING 1 -#define STATE_CRITICAL 2 -#define STATE_UNKNOWN 3 - -typedef struct clustermember_struct{ - char *host_name; - char *svc_description; - struct clustermember_struct *next; - }clustermember; - - -int check_cluster_status(void); -int add_clustermember(char *,char *); -void free_memory(void); - -clustermember *clustermember_list=NULL; - -int total_services_ok=0; -int total_services_warning=0; -int total_services_unknown=0; -int total_services_critical=0; - -int total_hosts_up=0; -int total_hosts_down=0; -int total_hosts_unreachable=0; - -char status_log[MAX_INPUT_BUFFER]=""; -int warning_threshold=0; -int critical_threshold=0; - -int check_type=CHECK_SERVICES; - - -int main(int argc, char **argv){ - char input_buffer[MAX_INPUT_BUFFER]; - char *host_name; - char *svc_description; - int return_code=STATE_OK; - int error=FALSE; - - if(argc!=5){ - - printf("Invalid arguments supplied\n"); - printf("\n"); - - printf("Host/Service Cluster Plugin for NetSaint\n"); - printf("Copyright (c) 2000 Ethan Galstad (netsaint@netsaint.org)\n"); - printf("Last Modified: 07-08-2000\n"); - printf("License: GPL\n"); - printf("\n"); - printf("Usage: %s <--service | --host> \n",argv[0]); - printf("\n"); - printf("Options:\n"); - printf(" --service = Check service cluster status\n"); - printf(" --host = Check host cluster status\n"); - printf(" = This is the location of the NetSaint status log\n"); - printf(" = This is the number of hosts or services in\n"); - printf(" the cluster that must be in a non-OK state\n"); - printf(" in order to result in a warning status level\n"); - printf(" = This is the number of hosts or services in\n"); - printf(" the cluster that must be in a non-OK state\n"); - printf(" in order to result in a critical status level\n"); - printf("\n"); - printf("Notes:\n"); - printf("Members of the host or service cluster are read from STDIN.\n"); - printf("One host or service can be specified per line, services must\n"); - printf("be in the format of ;\n"); - printf("\n"); - - return STATE_UNKNOWN; - } - - /* see if we're checking a host or service clust */ - if(!strcmp(argv[1],"--host")) - check_type=CHECK_HOSTS; - else - check_type=CHECK_SERVICES; - - /* get the status log */ - strncpy(status_log,argv[2],sizeof(status_log)-1); - status_log[sizeof(status_log)-1]='\x0'; - - /* get the warning and critical thresholds */ - warning_threshold=atoi(argv[3]); - critical_threshold=atoi(argv[4]); - - - /* read all data from STDIN until there isn't anymore */ - while(fgets(input_buffer,sizeof(input_buffer)-1,stdin)){ - - if(feof(stdin)) - break; - - /*strip(input_buffer);*/ - - if(!strcmp(input_buffer,"")) - continue; - - if(!strcmp(input_buffer,"\n")) - continue; - - /* get the host name */ - if(check_type==CHECK_SERVICES) - host_name=(char *)strtok(input_buffer,";"); - else - host_name=(char *)strtok(input_buffer,"\n"); - if(host_name==NULL || !strcmp(host_name,"")){ - printf("Error: Host name is NULL!\n"); - continue; - } - - if(check_type==CHECK_SERVICES){ - - /* get the service description */ - svc_description=(char *)strtok(NULL,"\n"); - if(svc_description==NULL || !strcmp(svc_description,"")){ - printf("Error: Service description is NULL!\n"); - continue; - } - } - - /* add the cluster member to the list in memory */ - if(add_clustermember(host_name,svc_description)!=OK) - printf("Error: Could not add cluster member\n"); -#ifdef DEBUG - else - printf("Added cluster member\n"); -#endif - } - - - /* check the status of the cluster */ - if(check_cluster_status()==OK){ - - if(check_type==CHECK_SERVICES){ - if((total_services_warning+total_services_unknown+total_services_critical) >= critical_threshold) - return_code=STATE_CRITICAL; - else if((total_services_warning+total_services_unknown+total_services_critical) >= warning_threshold) - return_code=STATE_WARNING; - else - return_code=STATE_OK; - - printf("Service cluster %s: %d ok, %d warning, %d unknown, %d critical\n",(return_code==STATE_OK)?"ok":"problem",total_services_ok,total_services_warning,total_services_unknown,total_services_critical); - } - else{ - if((total_hosts_down+total_hosts_unreachable) >= critical_threshold) - return_code=STATE_CRITICAL; - else if((total_hosts_down+total_hosts_unreachable) >= warning_threshold) - return_code=STATE_WARNING; - else - return_code=STATE_OK; - - printf("Host cluster %s: %d up, %d down, %d unreachable\n",(return_code==STATE_OK)?"ok":"problem",total_hosts_up,total_hosts_down,total_hosts_unreachable); - } - } - else - return_code=STATE_UNKNOWN; - - free_memory(); - - return return_code; - } - - - -int add_clustermember(char *hst,char *svc){ - clustermember *new_clustermember; - - new_clustermember=(clustermember *)malloc(sizeof(clustermember)); - if(new_clustermember==NULL) - return ERROR; - - new_clustermember->host_name=NULL; - new_clustermember->svc_description=NULL; - - if(hst!=NULL){ - new_clustermember->host_name=(char *)malloc(strlen(hst)+1); - if(new_clustermember->host_name==NULL){ - free(new_clustermember); - return ERROR; - } - strcpy(new_clustermember->host_name,hst); - } - - if(svc!=NULL){ - new_clustermember->svc_description=(char *)malloc(strlen(svc)+1); - if(new_clustermember->svc_description==NULL){ - if(new_clustermember->host_name!=NULL) - free(new_clustermember->host_name); - free(new_clustermember); - return ERROR; - } - strcpy(new_clustermember->svc_description,svc); - } - - new_clustermember->next=clustermember_list; - clustermember_list=new_clustermember; - - return OK; - } - - -void free_memory(void){ - clustermember *this_clustermember; - clustermember *next_clustermember; - - for(this_clustermember=clustermember_list;this_clustermember!=NULL;this_clustermember=next_clustermember){ - next_clustermember=this_clustermember->next; - if(this_clustermember->host_name!=NULL) - free(this_clustermember->host_name); - if(this_clustermember->svc_description!=NULL) - free(this_clustermember->svc_description); - free(this_clustermember); - } - - return; - } - - - -int check_cluster_status(void){ - FILE *fp; - clustermember *temp_clustermember; - char input_buffer[MAX_INPUT_BUFFER]; - char matching_entry[MAX_INPUT_BUFFER]; - - fp=fopen(status_log,"r"); - if(fp==NULL){ - printf("Error: Could not open status log '%s' for reading\n",status_log); - return ERROR; - } - -#ifdef DEBUG - for(temp_clustermember=clustermember_list;temp_clustermember!=NULL;temp_clustermember=temp_clustermember->next){ - if(check_type==CHECK_HOSTS) - printf("Cluster member: '%s'\n",temp_clustermember->host_name); - else - printf("Cluster member: '%s'/'%s'\n",temp_clustermember->host_name,temp_clustermember->svc_description); - } -#endif - - for(fgets(input_buffer,MAX_INPUT_BUFFER-1,fp);!feof(fp);fgets(input_buffer,MAX_INPUT_BUFFER-1,fp)){ - - /* this is a host entry */ - if(strstr(input_buffer,"] HOST;") && check_type==CHECK_HOSTS){ - - /* this this a match? */ - for(temp_clustermember=clustermember_list;temp_clustermember!=NULL;temp_clustermember=temp_clustermember->next){ - - snprintf(matching_entry,sizeof(matching_entry)-1,";%s;",temp_clustermember->host_name); - - if(strstr(input_buffer,matching_entry)){ - if(strstr(input_buffer,";DOWN;")) - total_hosts_down++; - else if(strstr(input_buffer,";UNREACHABLE;")) - total_hosts_unreachable++; - else if(strstr(input_buffer,";UP;")) - total_hosts_up++; - } - } - - } - - /* this is a service entry */ - else if(strstr(input_buffer,"] SERVICE;") && check_type==CHECK_SERVICES){ - - /* this this a match? */ - for(temp_clustermember=clustermember_list;temp_clustermember!=NULL;temp_clustermember=temp_clustermember->next){ - - snprintf(matching_entry,sizeof(matching_entry)-1,";%s;%s;",temp_clustermember->host_name,temp_clustermember->svc_description); - - if(strstr(input_buffer,matching_entry)){ - if(strstr(input_buffer,";HOST DOWN;") || strstr(input_buffer,";UNREACHABLE;") || strstr(input_buffer,";CRITICAL;")) - total_services_critical++; - else if(strstr(input_buffer,";WARNING;")) - total_services_warning++; - else if(strstr(input_buffer,";UNKNOWN;")) - total_services_unknown++; - else if(strstr(input_buffer,";OK;") || strstr(input_buffer,";RECOVERY;")) - total_services_ok++; - } - } - - } - } - - fclose(fp); - - return OK; - } diff --git a/contrib/check_cluster2.README b/contrib/check_cluster2.README deleted file mode 100644 index a014984..0000000 --- a/contrib/check_cluster2.README +++ /dev/null @@ -1,5 +0,0 @@ -check_cluster2 is now part of the core Nagios-Plugins distribution and has -been renamed check_cluster. It will be installed automatically. - -The threshold format has changed and is not backward-compatible; be sure to -understand it correctly. Use --help to print the full help. diff --git a/contrib/check_cluster2.c b/contrib/check_cluster2.c deleted file mode 100644 index e60948d..0000000 --- a/contrib/check_cluster2.c +++ /dev/null @@ -1,232 +0,0 @@ -/***************************************************************************** - * - * CHECK_CLUSTER2.C - Host and Service Cluster Plugin for Nagios 2.x - * - * Copyright (c) 2000-2004 Ethan Galstad (nagios@nagios.org) - * License: GPL - * Last Modified: 03-11-2004 - * - * License: - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - *****************************************************************************/ - - -#include -#include -#include -#include -#include - -#define OK 0 -#define ERROR -1 - -#define TRUE 1 -#define FALSE 0 - -#define CHECK_SERVICES 1 -#define CHECK_HOSTS 2 - -#define MAX_INPUT_BUFFER 1024 - -#define STATE_OK 0 -#define STATE_WARNING 1 -#define STATE_CRITICAL 2 -#define STATE_UNKNOWN 3 - -int total_services_ok=0; -int total_services_warning=0; -int total_services_unknown=0; -int total_services_critical=0; - -int total_hosts_up=0; -int total_hosts_down=0; -int total_hosts_unreachable=0; - -int warning_threshold=1; -int critical_threshold=1; - -int check_type=CHECK_SERVICES; - -char *data_vals=NULL; -char *label=NULL; - - -int process_arguments(int,char **); - - - -int main(int argc, char **argv){ - char input_buffer[MAX_INPUT_BUFFER]; - char *ptr; - int data_val; - int return_code=STATE_OK; - int error=FALSE; - - if(process_arguments(argc,argv)==ERROR){ - - printf("Invalid arguments supplied\n"); - printf("\n"); - - printf("Host/Service Cluster Plugin for Nagios 2\n"); - printf("Copyright (c) 2000-2004 Ethan Galstad (nagios@nagios.org)\n"); - printf("Last Modified: 03-11-2004\n"); - printf("License: GPL\n"); - printf("\n"); - printf("Usage: %s (-s | -h) [-l label] [-w threshold] [-c threshold] [-d val1,val2,...,valn]\n",argv[0]); - printf("\n"); - printf("Options:\n"); - printf(" -s, --service = Check service cluster status\n"); - printf(" -h, --host = Check host cluster status\n"); - printf(" -l, --label = Optional prepended text output (i.e. \"Host cluster\")\n"); - printf(" -w, --warning = Specifies the number of hosts or services in cluster that must be in\n"); - printf(" a non-OK state in order to return a WARNING status level\n"); - printf(" -c, --critical = Specifies the number of hosts or services in cluster that must be in\n"); - printf(" a non-OK state in order to return a CRITICAL status level\n"); - printf(" -d, --data = The status codes of the hosts or services in the cluster, separated\n"); - printf(" by commas\n"); - printf("\n"); - - return STATE_UNKNOWN; - } - - /* check the data values */ - for(ptr=strtok(data_vals,",");ptr!=NULL;ptr=strtok(NULL,",")){ - - data_val=atoi(ptr); - - if(check_type==CHECK_SERVICES){ - switch(data_val){ - case 0: - total_services_ok++; - break; - case 1: - total_services_warning++; - break; - case 2: - total_services_critical++; - break; - case 3: - total_services_unknown++; - break; - default: - break; - } - } - else{ - switch(data_val){ - case 0: - total_hosts_up++; - break; - case 1: - total_hosts_down++; - break; - case 2: - total_hosts_unreachable++; - break; - default: - break; - } - } - } - - - /* return the status of the cluster */ - if(check_type==CHECK_SERVICES){ - if((total_services_warning+total_services_unknown+total_services_critical) >= critical_threshold) - return_code=STATE_CRITICAL; - else if((total_services_warning+total_services_unknown+total_services_critical) >= warning_threshold) - return_code=STATE_WARNING; - else - return_code=STATE_OK; - printf("%s %s: %d ok, %d warning, %d unknown, %d critical\n",(label==NULL)?"Service cluster":label,(return_code==STATE_OK)?"ok":"problem",total_services_ok,total_services_warning,total_services_unknown,total_services_critical); - } - else{ - if((total_hosts_down+total_hosts_unreachable) >= critical_threshold) - return_code=STATE_CRITICAL; - else if((total_hosts_down+total_hosts_unreachable) >= warning_threshold) - return_code=STATE_WARNING; - else - return_code=STATE_OK; - printf("%s %s: %d up, %d down, %d unreachable\n",(label==NULL)?"Host cluster":label,(return_code==STATE_OK)?"ok":"problem",total_hosts_up,total_hosts_down,total_hosts_unreachable); - } - - return return_code; - } - - - -int process_arguments(int argc, char **argv){ - int c; - int option=0; - static struct option longopts[]={ - {"data", required_argument,0,'d'}, - {"warning", required_argument,0,'w'}, - {"critical", required_argument,0,'c'}, - {"label", required_argument,0,'l'}, - {"host", no_argument, 0,'h'}, - {"service", no_argument, 0,'s'}, - {0,0,0,0} - }; - - /* no options were supplied */ - if(argc<2) - return ERROR; - - while(1){ - - c=getopt_long(argc,argv,"hsw:c:d:l:",longopts,&option); - - if(c==-1 || c==EOF || c==1) - break; - - switch(c){ - - case 'h': /* host cluster */ - check_type=CHECK_HOSTS; - break; - - case 's': /* service cluster */ - check_type=CHECK_SERVICES; - break; - - case 'w': /* warning threshold */ - warning_threshold=atoi(optarg); - break; - - case 'c': /* warning threshold */ - critical_threshold=atoi(optarg); - break; - - case 'd': /* data values */ - data_vals=(char *)strdup(optarg); - break; - - case 'l': /* text label */ - label=(char *)strdup(optarg); - break; - - default: - return ERROR; - break; - } - } - - if(data_vals==NULL) - return ERROR; - - return OK; - } diff --git a/contrib/check_compaq_insight.pl b/contrib/check_compaq_insight.pl deleted file mode 100644 index dfb0440..0000000 --- a/contrib/check_compaq_insight.pl +++ /dev/null @@ -1,296 +0,0 @@ -From mm@elabnet.de Mon Nov 18 09:59:04 2002 -Date: Mon, 18 Nov 2002 12:19:04 +0100 -From: Michael Markstaller -To: nagiosplug-devel@lists.sourceforge.net -Subject: [Nagiosplug-devel] Submission: check_insight / checking Compaq - Insight Agent status - -Hi, - -I've been looking to check the status/health of Compaq Insight Agents on -servers and found a spong plugin -(http://spong.sourceforge.net/downloads/plugins/spong-network/check_insi -ght) which I've slightly changed to work with Nagios. -I have pretty no idea of perl at all, just wanted to make it work for -me, so please don't shoot me for this copy-paste-code. I've tested some -basic things, it seems to work at least to report a warning if smthg is -degraded and OK of xcourse ;) -I'm also quite unsure if this is the right way to submit, so I'll just -try ;) -There're some "unknown" components on all servers I've checked so far, -if anybody has a documentation of what's exactly returned when getting -the OID 1.3.6.1.4.1.232.11.2.10.1.0 (CPQHOST_MIB isn't very descriptive) -I'd be happy to fix this. - ---- cut --- -#!/usr/bin/perl -# -# (c)2002 Michael Markstaller, Elaborated Networks GmbH -# send bug reports to -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty -# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# you should have received a copy of the GNU General Public License -# along with this program (or with Nagios); if not, write to the -# Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA -# -# -# Check Comapq Insight Management Agents Systems Status by SNMP -# based on the spong-plugin check_insight from: -# -http://spong.sourceforge.net/downloads/plugins/spong-network/check_insig -ht -# -# Usage: -# check_insight -H -C community -# - -use Net::SNMP; -use Getopt::Long; -Getopt::Long::Configure('bundling'); - -$version=0.01; - -my %ERRORS = ('UNKNOWN' , '-1', - 'OK' , '0', - 'WARNING', '1', - 'CRITICAL', '2'); - - -# -# some default values -# -$TIMEOUT=15; - -# -# get command line options the regular way -# -GetOptions - ("V" => \$opt_V, "version" => \$opt_V, - "h" => \$opt_h, "help" => \$opt_h, - "v" => \$verbose, "verbose" => \$verbose, - "H=s" => \$opt_H, "hostname=s" => \$opt_H, - "C=s" => \$opt_C, "community=s" => \$opt_C); - -# -# handle the verbose stuff first -# -if ($opt_V) { - print "\n"; - print "check_insight nagios plugin version $version\n"; - print "\n"; - print "The nagios plugins come with ABSOLUTELY NO WARRANTY. You -may redistribute\n"; - print "copies of the plugins under the terms of the GNU General -Public License.\n"; - print "For more information about these matters, see the file -named COPYING.\n"; - print "\n"; - print "(c)2002 Michael Markstaller, Elaborated Networks GmbH\n"; - print "\n"; - print "\n"; - exit $ERRORS{'UNKNOWN'}; -} - -if ($opt_h) { - print_help(); - exit $ERRORS{'UNKNOWN'}; -} - -# -# now get options the weired way and set the defaults -# if nothing else is provided -# -$opt_H = shift unless ($opt_H); -print_usage() unless ($opt_H); - -# -# dont let us wait forever... -# -$SIG{'ALRM'} = sub { - print ("ERROR: No response from server (alarm)\n"); - exit $ERRORS{"UNKNOWN"}; -}; -alarm($TIMEOUT); - - -# -# now we set things up for the real work -# and fire up the request -# - -######################################################################## -######## -my ($host) = ($opt_H); -my ($color, $summary, $message ) = ( "green", "", "" ); -($opt_C) || ($opt_C = shift) || ($opt_C = "public"); -my ($community) = $opt_C; - -# We use some look up tables for checking some config options. -my (@State) = ("Not Available", "Other", "OK", "Degraded", "Failed"); - -my (@MIBName) = ("", "Std", "Unknown", "Array", - "Netware", "SCSI", "Health","Unknown", - "Store", "SM2", "Thresh", "OS", "UPS", - "Unknown", "IDE", "Clusters", "Fibre", - "MIB", "NIC"); - -# These are the positions within the table to actually look at. -my (@MIBs) = (1, 2, 3, 5, 6, 10, 11, 14, 18); - -my ($oid) = "1.3.6.1.4.1.232.11.2.10.1.0"; # SysArray - -# Open the connection. -my ($session, $error) = Net::SNMP->session(Hostname => $host, - Community => $community); - -# If we can't open a connection, just return red straight away. -if (! defined $session) { - print ("ERROR: Unable to contact server '$opt_H'\n"); - exit $ERRORS{"UNKNOWN"}; -} - - -$session->translate; -my ($response) = $session->get_request($oid); - - if (!defined $response) { - # If there's no response, something screwy is going on, give up. - $summary = $session->error; - print ("ERROR: $summary\n"); - exit $ERRORS{"UNKNOWN"}; - $session->close; - } else { - $session->close; - - # I'm not convinced that this is the easiest way to go about this, -this is - # from some code which I've inherited and I've modified for use in -here. - # Hi George! - %h = %$response; - my ($d) = $h{$oid}; - - my (@list) = (); - - # Gobble the first two char's. - $d = substr $d,2; - - while (length($d) > 0) { - my ($v) = substr($d,0,2); - $v = hex($v); - $d = substr $d,2; - push @list, $v; - } - - # Value in $MIBs[1] is the overall status of the machine... - my ($cond) = $MIBs[1]; - $message .= "Status: $State[$cond] "; - - foreach my $v (@MIBs) { - $cond = $list[($v*4)+1]; # A little bit of magic. - - # We only bother printing the status out if it's actually -available, - # as if it's N/A or Unknown then it's probably because the machine - # isn't available. - $message .= "$MIBName[$v]: $State[$cond] " if $cond > 1; - next if $cond < 2; - - # What follows is some trickery to try and not to override a -previous - # message at the same or lower color. - if ($cond == 4) { - if ($color ne 'red') { - $color = 'red'; - $summary = "$MIBName[$v] is failed"; - } - } elsif ($cond == 3) { - if ($color ne 'red') { - $color = 'yellow'; - $summary = "$MIBName[$v] is degraded" if $summary eq ""; - } - } elsif ($cond < 2) { - if ($color eq 'green') { - $color = 'yellow'; - $summary = "$MIBName[$v] is unknown ($cond)" if $summary eq -""; - } - } - } - } - - $summary = "Ok" if $summary eq ""; - -# return ($color, $summary, $message); - -if ($color eq 'red') { - print ("red Output: $message\n"); - exit $ERRORS{"CRITICAL"}; - } elsif ($color eq 'yellow') { - print ("$summary $message\n"); - exit $ERRORS{"WARNING"}; - } elsif ($color eq 'green') { - print ("$message\n"); - exit $ERRORS{"OK"}; -} - - -sub print_usage () { - print "Usage: $0 -H -C \n"; } - -sub print_help () { - print "\n"; - print "\n"; - print "check_insight nagios plugin version $version\n"; - print "\n"; - print "The nagios plugins come with ABSOLUTELY NO WARRANTY. You -may redistribute\n"; - print "copies of the plugins under the terms of the GNU General -Public License.\n"; - print "For more information about these matters, see the file -named COPYING.\n"; - print "\n"; - print "(c)2002 Michael Markstaller, Elaborated Networks GmbH\n"; - print "\n"; - print "\n"; - print "This plugin checks the Compaq Insight Management agents -system status via SNMP on the specified host.\n"; - print "\n"; - print "\n"; - print_usage(); - print "\n"; - print "Options:\n"; - print " -H, --hostname=ADDRESS\n"; - print " host name argument for server.\n"; - print " -C, --community=STRING\n"; - print " SNMP Read-community string.\n"; - print " -h, --help\n"; - print " print detailed help screen.\n"; - print " -V, --version\n"; - print " print version information.\n"; - print "\n"; - print "\n"; -} ---- cut --- - -Michael - - -------------------------------------------------------- -This sf.net email is sponsored by: To learn the basics of securing -your web site with SSL, click here to get a FREE TRIAL of a Thawte -Server Certificate: http://www.gothawte.com/rd524.html -_______________________________________________ -Nagiosplug-devel mailing list -Nagiosplug-devel@lists.sourceforge.net -https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel diff --git a/contrib/check_cpqarray.c b/contrib/check_cpqarray.c deleted file mode 100644 index badffeb..0000000 --- a/contrib/check_cpqarray.c +++ /dev/null @@ -1,430 +0,0 @@ -/* - check_cpqarray, an extension for Netsaint / Nagios to check the - status of a Compaq SmartArray controller from the commandline. - Copyright (C) 2003 Guenther Mair - - based on the work and using main parts of - - CpqArray Deamon, a program to monitor and remotely configure a - SmartArray controller. - Copyright (C) 1999 Hugo Trippaers - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include -#include -#include - -#include "/usr/src/linux/drivers/block/ida_ioctl.h" -#include "/usr/src/linux/drivers/block/ida_cmd.h" -#include "/usr/src/linux/drivers/block/cpqarray.h" - - -const char *controllers[] = -{ - "/dev/ida/c0d0", - "/dev/ida/c1d0", - "/dev/ida/c2d0", - "/dev/ida/c3d0", - "/dev/ida/c4d0", - "/dev/ida/c5d0", - "/dev/ida/c6d0", - "/dev/ida/c7d0" -}; - -const char *statusstr[] = { - "Logical drive /dev/ida/c%dd%d: OK\n", - "Logical drive /dev/ida/c%dd%d: FAILED\n", - "Logical drive /dev/ida/c%dd%d: not configured.\n", - "Logical drive /dev/ida/c%dd%d: using interim recovery mode, %3.2f%% done.\n", - "Logical drive /dev/ida/c%dd%d: ready for recovery operation.\n", - "Logical drive /dev/ida/c%dd%d: is currently recovering, %3.2f%% done.\n", - "Wrong physical drive was replaced.\n", - "A physical drive is not properly connected.\n", - "Hardware is overheating.\n", - "Hardware has overheated.\n", - "Logical drive /dev/ida/c%dd%d: currently expanding, %3.2f%% done.\n", - "Logical drive /dev/ida/c%dd%d: not yet available.\n", - "Logical drive /dev/ida/c%dd%d: queued for expansion.\n", -}; - -extern char *optarg; -extern int optind, opterr, optopt; - -int ctrls_found_num; -int exit_code = 0; -struct controller ctrls_found[8]; - -#define DEBUG(x) fprintf(stderr, x) - -struct opts -{ - char debug; -}; - -struct slog_disk -{ - int status; - float pvalue; -}; - -struct controller -{ - char ctrl_devicename[20]; - int num_logd_found; - struct slog_disk log_disk[16]; -}; - - - -int status_check (struct opts opts) -{ - int devicefd; - int ctrl_cntr; - int logd_cntr; - ida_ioctl_t io, io2; - int status, nr_blks, blks_tr; - float pvalue; - int counter; - - for ( ctrl_cntr=0; - ctrl_cntr < ctrls_found_num; - ctrl_cntr++) { - - devicefd = open (controllers[ctrl_cntr], O_RDONLY); - - for ( logd_cntr=0; - logd_cntr < ctrls_found[ctrl_cntr].num_logd_found; - logd_cntr++) { - - memset (&io, 0, sizeof (io)); - - io.cmd = SENSE_LOG_DRV_STAT; - io.unit = logd_cntr | UNITVALID; - - if (ioctl (devicefd, IDAPASSTHRU, &io) < 0) - { - perror ("SENSE_LOG_DRV_STAT ioctl"); - return 0; - } - - status=io.c.sense_log_drv_stat.status; - - if ((status == 3) || (status == 5) || (status == 7)) { - /* is a progress indicator required? - */ - memset (&io2, 0, sizeof (io)); - - io2.cmd = ID_LOG_DRV; - io2.unit = logd_cntr | UNITVALID; - - if (ioctl (devicefd, IDAPASSTHRU, &io2) < 0) - { - perror ("ID_LOG_DRV ioctl"); - /* return 0; no return this isn't fatal for now */ - } - else - { - nr_blks = io2.c.id_log_drv.nr_blks; - blks_tr = io.c.sense_log_drv_stat.blks_to_recover; - - pvalue = ((float)(nr_blks - blks_tr)/(float)nr_blks) * 100; - } - } - else { - pvalue = 0.0; - } - - if (opts.debug) { - fprintf(stdout, "DEBUG: Status of controller %d unit %d is %d\n", - ctrl_cntr, logd_cntr, status); - fprintf(stdout, "DEBUG: "); - fprintf(stdout, statusstr[status], - ctrl_cntr, logd_cntr, pvalue); - fprintf(stdout, "\n"); - } - - printf(statusstr[status], ctrl_cntr, logd_cntr, pvalue); - - switch(status) - { - case 1: - case 2: - case 6: - case 7: - case 9: - /* CRITICAL */ - exit_code = 2; - break; - case 3: - case 4: - case 5: - case 8: - case 10: - case 11: - case 12: - /* WARNING (only if not yet at CRITICAL LEVEL) */ - if (exit_code < 2) exit_code = 1; - break; - case 0: - default: - /* do nothing */ - break; - } - - ctrls_found[ctrl_cntr].log_disk[logd_cntr].pvalue = pvalue; - ctrls_found[ctrl_cntr].log_disk[logd_cntr].status = status; - } - close (devicefd); - } - - return 1; -} - -int discover_controllers (struct opts opts) -{ - int cntr; - int foundone = 0; - - for (cntr = 0; cntr < 8; cntr++) - { - /* does this device exist ? */ - if ((access (controllers[cntr], R_OK | F_OK)) == 0) - { - /* it does :) */ - if (interrogate_controller (opts, cntr)) - { - foundone = 1; - if (opts.debug) - fprintf (stderr, "DEBUG: %s is a existing controller\n", - controllers[cntr]); - } - } - else if (opts.debug) - { - fprintf (stderr, "DEBUG: Device %s could not be opened\n", controllers[cntr]); - perror ("DEBUG: reason"); - } - } - return foundone; -} - -void boardid2str (unsigned long board_id, char *name) -{ - switch (board_id) - { - case 0x0040110E: /* IDA */ - strcpy (name, "Compaq IDA"); - break; - case 0x0140110E: /* IDA-2 */ - strcpy (name, "Compaq IDA-2"); - break; - case 0x1040110E: /* IAES */ - strcpy (name, "Compaq IAES"); - break; - case 0x2040110E: /* SMART */ - strcpy (name, "Compaq SMART"); - break; - case 0x3040110E: /* SMART-2/E */ - strcpy (name, "Compaq SMART-2/E"); - break; - case 0x40300E11: /* SMART-2/P or SMART-2DH */ - strcpy (name, "Compaq SMART-2/P (2DH)"); - break; - case 0x40310E11: /* SMART-2SL */ - strcpy (name, "Compaq SMART-2SL"); - break; - case 0x40320E11: /* SMART-3200 */ - strcpy (name, "Compaq SMART-3200"); - break; - case 0x40330E11: /* SMART-3100ES */ - strcpy (name, "Compaq SMART-3100ES"); - break; - case 0x40340E11: /* SMART-221 */ - strcpy (name, "Compaq SMART-221"); - break; - case 0x40400E11: /* Integrated Array */ - strcpy (name, "Compaq Integrated Array"); - break; - case 0x40500E11: /* Smart Array 4200 */ - strcpy (name, "Compaq Smart Array 4200"); - break; - case 0x40510E11: /* Smart Array 4250ES */ - strcpy (name, "Compaq Smart Array 4250ES"); - break; - case 0x40580E11: /* Smart Array 431 */ - strcpy (name, "Compaq Smart Array 431"); - break; - default: - /* - * Well, its a SMART-2 or better, don't know which - * kind. - */ - strcpy (name, "Unknown Controller Type"); - } -} - -int interrogate_controller (struct opts opts, int contrnum) -{ - int devicefd; - ida_ioctl_t io; - char buffer[30]; - int foundone = 0; - int cntr; - - devicefd = open (controllers[contrnum], O_RDONLY); - /* no checks, did that before */ - - /* clear io */ - memset (&io, 0, sizeof (io)); - - io.cmd = ID_CTLR; - - if (ioctl (devicefd, IDAPASSTHRU, &io) < 0) - { - if (opts.debug) perror ("DEBUG: ioctl"); - return 0; - } - - boardid2str (io.c.id_ctlr.board_id, buffer); - - strncpy (ctrls_found[ctrls_found_num].ctrl_devicename, - buffer, 20); - - ctrls_found[ctrls_found_num].num_logd_found = 0; - - for (cntr = 0; cntr < io.c.id_ctlr.nr_drvs; cntr++) - { - if (interrogate_logical (opts, devicefd, cntr)) - { - /* logical drive found, this could be used later one */ - foundone = 1; - } - } - - switch (ctrls_found[ctrls_found_num].num_logd_found) - { - case 0: - printf("Found a %s with no logical drives.\n", buffer); - break; - case 1: - printf("Found a %s with one Logical drive.\n", buffer, - ctrls_found[ctrls_found_num].num_logd_found); - break; - default: - printf("Found a %s with %d Logical drives.\n", buffer, - ctrls_found[ctrls_found_num].num_logd_found); - break; - } - - ctrls_found_num++; - - close (devicefd); - return 1; -} - -int interrogate_logical (struct opts opts, int devicefd, int unit_nr) -{ - ida_ioctl_t io; - ida_ioctl_t io2; - int nr_blks, blks_tr; - - if (opts.debug) printf ("DEBUG: interrogating unit %d\n", unit_nr); - - memset (&io, 0, sizeof (io)); - - io.cmd = ID_LOG_DRV; - io.unit = unit_nr | UNITVALID; - - if (ioctl (devicefd, IDAPASSTHRU, &io) < 0) - { - perror ("FATAL: ID_LOG_DRV ioctl"); - return 0; - } - - memset (&io2, 0, sizeof (io2)); - - io2.cmd = SENSE_LOG_DRV_STAT; - io2.unit = unit_nr | UNITVALID; - - if (ioctl (devicefd, IDAPASSTHRU, &io2) < 0) - { - perror ("FATAL: SENSE_LOG_DRV_STAT ioctl"); - return 0; - } - - ctrls_found[ctrls_found_num].num_logd_found++; - /* ctrls_found[ctrls_found_num].log_disk[unit_nr].status = - * io2.c.sense_log_drv_stat.status; - - * nr_blks = io2.c.id_log_drv.nr_blks; - * blks_tr = io.c.sense_log_drv_stat.blks_to_recover; - * ctrls_found[ctrls_found_num].log_disk[unit_nr].pvalue = - * ((float)(nr_blks - blks_tr)/(float)nr_blks) * 100; - */ - ctrls_found[ctrls_found_num].log_disk[unit_nr].status = 0; - ctrls_found[ctrls_found_num].log_disk[unit_nr].pvalue = 0; - - return 1; -} - - -void print_usage() -{ - printf("cpqarrayd [options]\n"); - printf(" -h prints this text\n"); - printf(" -d enables debugging\n"); -} - - -int main(int argc, char *argv[]) -{ - char option; - struct opts opts; /* commandline options */ - - memset(&opts, 0, sizeof(struct opts)); - - /* check options */ - while ((option = getopt (argc, argv, "dh:")) != EOF) - { - switch (option) - { - case 'd': - opts.debug = 1; - break; - case '?': - case 'h': - default: - print_usage(); - exit(0); - break; - } - } - - /* Check for existance of array controllers */ - if (!discover_controllers(opts)) { - printf("No array controller found!\n\n"); - exit(1); - } - - status_check(opts); - - return exit_code; -} diff --git a/contrib/check_digitemp.pl b/contrib/check_digitemp.pl deleted file mode 100755 index d2b40a1..0000000 --- a/contrib/check_digitemp.pl +++ /dev/null @@ -1,252 +0,0 @@ -#!/usr/bin/perl -w - -# check_digitemp.pl Copyright (C) 2002 by Brian C. Lane -# -# This is a NetSaint plugin script to check the temperature on a local -# machine. Remote usage may be possible with SSH -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# =========================================================================== -# Howto Install in NetSaint (tested with v0.0.7) -# -# 1. Copy this script to /usr/local/netsaint/libexec/ or wherever you have -# placed your NetSaint plugins -# -# 2. Create a digitemp config file in /usr/local/netsaint/etc/ -# eg. digitemp -i -s/dev/ttyS0 -c /usr/local/netsaint/etc/digitemp.conf -# -# 3. Make sure that the webserver user has permission to access the serial -# port being used. -# -# 4. Add a command to /usr/local/netsaint/etc/commands.cfg like this: -# command[check-temp]=$USER1$/check_digitemp.pl -w $ARG1$ -c $ARG2$ \ -# -t $ARG3$ -f $ARG4$ -# (fold into one line) -# -# 5. Tell NetSaint to monitor the temperature by adding a service line like -# this to your hosts.cfg file: -# service[kermit]=Temperature;0;24x7;3;5;1;home-admins;120;24x7;1;1;1;; \ -# check-temp!65!75!1!/usr/local/netsaint/etc/digitemp.conf -# (fold into one line) -# 65 is the warning temperature -# 75 is the critical temperature -# 1 is the sensor # (as reported by digitemp -a) to monitor -# digitemp.conf is the path to the config file -# -# 6. If you use Centigrade instead of Fahrenheit, change the commands.cfg -# line to include the -C argument. You can then pass temperature limits in -# Centigrade in the service line. -# -# =========================================================================== -# Howto Install in Nagios (tested with v1.0b4) -# -# 1. Copy this script to /usr/local/nagios/libexec/ or wherever you have -# placed your Nagios plugins -# -# 2. Create a digitemp config file in /usr/local/nagios/etc/ -# eg. digitemp -i -s/dev/ttyS0 -c /usr/local/nagios/etc/digitemp.conf -# -# 3. Make sure that the webserver user has permission to access the serial -# port being used. -# -# 4. Add a command to /usr/local/nagios/etc/checkcommands.cfg like this: -# -# #DigiTemp temperature check command -# define command{ -# command_name check_temperature -# command_line $USER1$/check_digitemp.pl -w $ARG1$ -c $ARG2$ \ -# -t $ARG3$ -f $ARG4$ -# (fold above into one line) -# } -# -# 5. Tell NetSaint to monitor the temperature by adding a service line like -# this to your service.cfg file: -# -# #DigiTemp Temperature check Service definition -# define service{ -# use generic-service -# host_name kermit -# service_description Temperature -# is_volatile 0 -# check_period 24x7 -# max_check_attempts 3 -# normal_check_interval 5 -# retry_check_interval 2 -# contact_groups home-admins -# notification_interval 240 -# notification_period 24x7 -# notification_options w,u,c,r -# check_command check_temperature!65!75!1! \ -# /usr/local/nagios/etc/digitemp.conf -# (fold into one line) -# } -# -# 65 is the warning temperature -# 75 is the critical temperature -# 1 is the sensor # (as reported by digitemp -a) to monitor -# digitemp.conf is the path to the config file -# -# 6. If you use Centigrade instead of Fahrenheit, change the checkcommands.cfg -# line to include the -C argument. You can then pass temperature limits in -# Centigrade in the service line. -# -# =========================================================================== - -# Modules to use -use strict; -use Getopt::Std; - -# Define all our variable usage -use vars qw($opt_c $opt_f $opt_t $opt_w $opt_F $opt_C - $temperature $conf_file $sensor $temp_fmt - $crit_level $warn_level $null - %exit_codes - $percent $fmt_pct - $verb_err $command_line); - - -# Predefined exit codes for NetSaint -%exit_codes = ('UNKNOWN' ,-1, - 'OK' , 0, - 'WARNING' , 1, - 'CRITICAL', 2,); - -# Default to Fahrenheit input and result (use -C to change this) -$temp_fmt = 3; - - -# Get the options -if ($#ARGV le 0) -{ - &usage; -} else { - getopts('f:t:FCc:w:'); -} - -# Shortcircuit the switches -if (!$opt_w or $opt_w == 0 or !$opt_c or $opt_c == 0) -{ - print "*** You must define WARN and CRITICAL levels!"; - &usage; -} - -# Check if levels are sane -if ($opt_w >= $opt_c) -{ - print "*** WARN level must not be greater than CRITICAL when checking temperature!"; - &usage; -} - - -$warn_level = $opt_w; -$crit_level = $opt_c; - -# Default sensor to read is #0 -if(!$opt_t) -{ - $sensor = 0; -} else { - $sensor = $opt_t; -} - -# Default config file is /etc/digitemp.conf -if(!$opt_f) -{ - $conf_file = "/etc/digitemp.conf"; -} else { - $conf_file = $opt_f; -} - -# Check for config file -if( !-f $conf_file ) { - print "*** You must have a digitemp.conf file\n"; - &usage; -} - - -if($opt_C) -{ - $temp_fmt = 2; -} - -# Read the output from digitemp -# Output in form 0\troom\tattic\tdrink -open( DIGITEMP, "/usr/local/bin/digitemp -c $conf_file -t $sensor -q -o $temp_fmt |" ); - -# Process the output from the command -while( ) -{ -# print "$_\n"; - chomp; - - if( $_ =~ /^nanosleep/i ) - { - print "Error reading sensor #$sensor\n"; - close(DIGITEMP); - exit $exit_codes{'UNKNOWN'}; - } else { - # Check for an error from digitemp, and report it instead - if( $_ =~ /^Error.*/i ) { - print $_; - close(DIGITEMP); - exit $exit_codes{'UNKNOWN'}; - } else { - ($null,$temperature) = split(/\t/); - } - } -} -close( DIGITEMP ); - -if( $temperature and $temperature >= $crit_level ) -{ - print "Temperature CRITICAL - Sensor #$sensor = $temperature "; - if( $temp_fmt == 3 ) { print "F\n"; } else { print "C\n"; } - exit $exit_codes{'CRITICAL'}; -} elsif ($temperature and $temperature >= $warn_level ) { - print "Temperature WARNING - Sensor #$sensor = $temperature "; - if( $temp_fmt == 3 ) { print "F\n"; } else { print "C\n"; } - exit $exit_codes{'WARNING'}; -} elsif( $temperature ) { - print "Temperature OK - Sensor #$sensor = $temperature "; - if( $temp_fmt == 3 ) { print "F\n"; } else { print "C\n"; } - exit $exit_codes{'OK'}; -} else { - print "Error parsing result for sensor #$sensor\n"; - exit $exit_codes{'UNKNOWN'}; -} - -# Show usage -sub usage() -{ - print "\ncheck_digitemp.pl v1.0 - NetSaint Plugin\n"; - print "Copyright 2002 by Brian C. Lane \n"; - print "See source for License\n"; - print "usage:\n"; - print " check_digitemp.pl -t -f -w -c \n\n"; - print "options:\n"; - print " -f DigiTemp Config File\n"; - print " -t DigiTemp Sensor #\n"; - print " -F Temperature in Fahrenheit\n"; - print " -C Temperature in Centigrade\n"; - print " -w temperature temperature >= to warn\n"; - print " -c temperature temperature >= when critical\n"; - - exit $exit_codes{'UNKNOWN'}; -} diff --git a/contrib/check_dlswcircuit.pl b/contrib/check_dlswcircuit.pl deleted file mode 100755 index f6ef931..0000000 --- a/contrib/check_dlswcircuit.pl +++ /dev/null @@ -1,221 +0,0 @@ -#!/usr/bin/perl -w -# -# check_dlswcircuit.pl - nagios plugin -# -# Checks if a Cisco Dlsw circuit is connected. -# -# -# Copyright (C) 2000 Carsten Foss & Christoph Kron -# -# Basically this is an adapted version of Christoph Kron's (ck@zet.net) check_ifoperstatus.pl plugin. -# most of the thanks should go to him. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# Arguments : -s -d -c -p -# - -# Source & Dest Mac/Sap arguments must be given in Hex as this example : 40.00.01.37.45.01.ss (Where ss is the sap) -# -# Sample command line : check_dlswcircuit.pl -s 40.00.01.37.45.01.04 -d 40.00.02.37.45.02.04 -c secret 1.2.3.4 -# -# Sample host.cfg entry : -#service[Dlsw-xx]=NCP1-NCP2;0;24x7;3;5;1;router-admins;240;24x7;1;1;0;;check_dlswcircuit!-s 40.00.01.37.45.01.04!-d 40.00..01.37.45.02.04!-c secret!1.2.3.4 -# remember to add the service to commands.cfg , something like this: -# command[check_dlswcircuit]=$USER1$/check_dlswcircuit.pl $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ -# -# Report bugs to: cfo@dmdata.dk -# -# 11.03.2000 Version 1.0 - -use strict; - -use Net::SNMP; -use Getopt::Long; -&Getopt::Long::config('auto_abbrev'); - - -my $status; -my $TIMEOUT = 15; - -my %ERRORS = ('UNKNOWN' , '-1', - 'OK' , '0', - 'WARNING', '1', - 'CRITICAL', '2'); - -my %dlswCircuitStatus = ( - '1','disconnected', - '2','circuitStart', - '3','resolvePending', - '4','circuitPending', - '5','circuitEstablished', - '6','connectPending', - '7','contactPending', - '8','connected', - '9','disconnectPending', - '10','haltPending', - '11','haltPendingNoack', - '13','circuitRestart', - '14','restartPending'); - -my $state = "UNKNOWN"; -my $answer = ""; -my $smac = ""; -my $dmac = ""; -my $community = "public"; -my $port = 161; -#Dlsw Circuit Oid enterprises.9.10.9.1.5.2.1.17.6.0.96.148.47.230.166.4.6.64.0.1.55.69.2.4 = 8 -my $enterpriseOid = "1.3.6.1.4.1"; -my $ciscoDlswCircuitOid = ".9.10.9.1.5.2.1.17."; -my $unknownOid = "6."; -my $smacOid = ""; -my $dmacOid = ""; -my $tmpOid = ""; -my @tmparg; -my $snmpoid; -my @snmpoids; -my $hostname; -my $session; -my $error; -my $response; -my $p = ""; -my $q = ""; - -sub usage { - printf "\nMissing arguments!\n"; - printf "\n"; - printf "Perl Check Cisco Dlsw Circuit State plugin for Nagios\n"; - printf "checks operational status of specified DLSW Circuit\n"; - printf "usage: \n"; - printf "check_dlswcircuit.pl -s -d -c -p "; - printf "\nCopyright (C) 2000 Carsten Foss\n"; - printf "check_dlswcircuit.pl comes with ABSOLUTELY NO WARRANTY\n"; - printf "This programm is licensed under the terms of the "; - printf "GNU General Public License\n(check source code for details)\n"; - printf "\n\n"; - exit $ERRORS{"UNKNOWN"}; -} - -# Just in case of problems, let's not hang Nagios -$SIG{'ALRM'} = sub { - print ("ERROR: No snmp response from $hostname (alarm)\n"); - exit $ERRORS{"UNKNOWN"}; -}; -alarm($TIMEOUT); - - -$status = GetOptions("sourcemac=s",\$smac,"destmac=s",\$dmac, - "community=s",\$community, - "port=i",\$port); -if ($status == 0) -{ - &usage; -} - -# -#Convert Source Mac & Sap -# - @tmparg = split(/\./,$smac); - #print "-$smac-\n"; - #print "@tmparg\n"; - #print "$#tmparg\n"; - if($#tmparg != 6) - { - print "SourceMac/Sap format $smac not valid\n"; - &usage; - } - while($p = shift @tmparg) - { - $q = hex($p); - $smacOid = $smacOid.$q; - $smacOid = $smacOid.'.'; - } - - #print "@tmparg1\n"; - #print "$smacOid\n"; - -# -#Convert Dest Mac & Sap -# - @tmparg = split(/\./,$dmac); - #print "-$dmac-\n"; - #print "@tmparg\n"; - #print "$#tmparg\n"; - if($#tmparg != 6) - { - print "DestMac/Sap format $dmac not valid\n"; - &usage; - } - - while($p = shift @tmparg) - { - $q = hex($p); - $dmacOid = $dmacOid.$q; - $dmacOid = $dmacOid.'.'; - } -# Remove Trailing Dot - $dmacOid = substr($dmacOid,0,length($dmacOid)-1); - - - #print "@tmparg1\n"; - #print "$dmacOid\n"; -#Build the Dlsw Oic to use - $snmpoid = $enterpriseOid.$ciscoDlswCircuitOid.$unknownOid.$smacOid.$unknownOid.$dmacOid ; - #print "$snmpoid\n"; - - #shift; - $hostname = shift || &usage; - - ($session, $error) = Net::SNMP->session( - -hostname => $hostname, - -community => $community, - -port => $port - ); - - if (!defined($session)) { - $state='UNKNOWN'; - $answer=$error; - print ("$state: $answer"); - exit $ERRORS{$state}; - } - - push(@snmpoids,$snmpoid); - #push(@snmpoids,$snmpLocIfDescr); - - if (!defined($response = $session->get_request(@snmpoids))) { - $answer=$session->error; - $session->close; - $state = 'CRITICAL'; - print ("$state: $answer,$community,$smac - $dmac"); - exit $ERRORS{$state}; - } - - $answer = sprintf("dlsw circuit %s - %s at host '%s',is %s\n", - $smac, - $dmac, - $hostname, - $dlswCircuitStatus{$response->{$snmpoid}} - ); - - $session->close; - - if ( $response->{$snmpoid} == 8 ) { - $state = 'OK'; - } - else { - $state = 'CRITICAL'; - } - -print ("$state: $answer"); -exit $ERRORS{$state}; diff --git a/contrib/check_dns_random.pl b/contrib/check_dns_random.pl deleted file mode 100644 index 4bed412..0000000 --- a/contrib/check_dns_random.pl +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/perl -# ------------------------------------------------------------------------------ -# File Name: check_dns_random.pl -# Author: Richard Mayhew - South Africa -# Date: 2000/01/26 -# Version: 1.0 -# Description: This script will check to see if dns resolves hosts -# randomly from a list using the check_dns plugin. -# Email: netsaint@splash.co.za -# ------------------------------------------------------------------------------ -# Copyright 1999 (c) Richard Mayhew -# Credits go to Ethan Galstad for coding Nagios -# If any changes are made to this script, please mail me a copy of the -# changes :) -# License GPL -# ------------------------------------------------------------------------------ -# Date Author Reason -# ---- ------ ------ -# 1999/09/26 RM Creation -# ------------------------------------------------------------------------------ - -# -----------------------------------------------------------------[ Require ]-- -require 5.004; - -# --------------------------------------------------------------------[ Uses ]-- -use Socket; -use strict; - -# --------------------------------------------------------------[ Enviroment ]-- -$ENV{PATH} = "/bin"; -$ENV{BASH_ENV} = ""; -$|=1; - -my $host = shift || &usage; - -my $domainfile = "/usr/local/nagios/etc/domains.list"; -my $wc = `/usr/bin/wc -l $domainfile`; -my $check = "/usr/local/nagios/libexec/check_dns"; -my $x = 0; -my $srv_file = ""; -my $z = ""; -my $y = ""; - -open(DOMAIN,"<$domainfile") or die "Error Opening $domainfile File!\n"; - while () { - $srv_file .= $_; -} - close(DOMAIN); - my @data = split(/\n/,$srv_file); - -chomp $wc; -$wc =~ s/ //g; -$wc =~ s/domains//g; - -$x = rand $wc; -($z,$y) = split(/\./,$x); - -system($check, $data[$z], $host); -exit ($? / 256); - -sub usage -{ - print "Minimum arguments not supplied!\n"; - print "\n"; - print "Perl Check Random DNS plugin for Nagios\n"; - print "Copyright (c) 2000 Richard Mayhew\n"; - print "\n"; - print "Usage: check_dns_random.pl \n"; - print "\n"; - print " = DNS server you would like to query.\n"; - exit -1; - -} - diff --git a/contrib/check_email_loop.pl b/contrib/check_email_loop.pl deleted file mode 100644 index 1b02ea3..0000000 --- a/contrib/check_email_loop.pl +++ /dev/null @@ -1,309 +0,0 @@ -#!/usr/bin/perl -w -# -# $Id: check_email_loop.pl 1290 2005-11-29 23:21:06Z harpermann $ -# -# (c)2000 Benjamin Schmid, blueshift@gmx.net (emergency use only ;-) -# Copyleft by GNU GPL -# -# -# check_email_loop Nagios Plugin -# -# This script sends a mail with a specific id in the subject via -# an given smtp-server to a given email-adress. When the script -# is run again, it checks for this Email (with its unique id) on -# a given pop3 account and send another mail. -# -# -# Example: check_email_loop.pl -poph=mypop -popu=user -pa=password -# -smtph=mailer -from=returnadress@yoursite.com -# -to=remaileradress@friend.com -pendc=2 -lostc=0 -# -# This example will send eacht time this check is executed a new -# mail to remaileradress@friend.com using the SMTP-Host mailer. -# Then it looks for any back-forwarded mails in the POP3 host -# mypop. In this Configuration CRITICAL state will be reached if -# more than 2 Mails are pending (meaning that they did not came -# back till now) or if a mails got lost (meaning a mail, that was -# send later came back prior to another mail). -# -# Michael Markstaller, mm@elabnet.de various changes/additions -# MM 021003: fixed some unquoted strings -# MM 021116: fixed/added pendwarn/lostwarn -# MM 030515: added deleting of orphaned check-emails -# changed to use "top" instead of get to minimize traffic (required changing match-string from "Subject: Email-ping [" to "Email-Ping [" - -use Net::POP3; -use Net::SMTP; -use strict; -use Getopt::Long; -&Getopt::Long::config('auto_abbrev'); - -# ---------------------------------------- - -my $TIMEOUT = 120; -my %ERRORS = ('OK' , '0', - 'WARNING', '1', - 'CRITICAL', '2'); - 'UNKNOWN' , '3'); - -my $state = "UNKNOWN"; -my ($sender,$receiver, $pophost, $popuser, $poppasswd, $smtphost,$keeporphaned); -my ($poptimeout,$smtptimeout,$pinginterval,$maxmsg)=(60,60,5,50); -my ($lostwarn, $lostcrit,$pendwarn, $pendcrit,$debug); -$debug = 0; - -# Internal Vars -my ($pop,$msgcount,@msglines,$statinfo,@messageids,$newestid); -my (%other_smtp_opts); -my ($matchcount,$statfile) = (0,"check_email_loop.stat"); - -# Subs declaration -sub usage; -sub messagematchs; -sub nsexit; - -# Just in case of problems, let's not hang Nagios -$SIG{'ALRM'} = sub { - print ("ERROR: $0 Time-Out $TIMEOUT s \n"); - exit $ERRORS{"UNKNOWN"}; -}; -alarm($TIMEOUT); - - -# Evaluate Command Line Parameters -my $status = GetOptions( - "from=s",\$sender, - "to=s",\$receiver, - "debug", \$debug, - "pophost=s",\$pophost, - "popuser=s",\$popuser, - "passwd=s",\$poppasswd, - "poptimeout=i",\$poptimeout, - "smtphost=s",\$smtphost, - "smtptimeout=i",\$smtptimeout, - "statfile=s",\$statfile, - "interval=i",\$pinginterval, - "lostwarn=i",\$lostwarn, - "lostcrit=i",\$lostcrit, - "pendwarn=i",\$pendwarn, - "pendcrit=i",\$pendcrit, - "maxmsg=i",\$maxmsg, - "keeporphaned=s",\$keeporphaned, - ); -usage() if ($status == 0 || ! ($pophost && $popuser && $poppasswd && - $smtphost && $receiver && $sender )); - -# Try to read the ids of the last send emails out of statfile -if (open STATF, "$statfile") { - @messageids = ; - chomp @messageids; - close STATF; -} - -# Try to open statfile for writing -if (!open STATF, ">$statfile") { - nsexit("Failed to open mail-ID database $statfile for writing",'CRITICAL'); -} - -# Ok - check if it's time to release another mail - -# ... - -# creating new serial id -my $serial = time(); -$serial = "ID#" . $serial . "#$$"; - - -# sending new ping email -%other_smtp_opts=(); -if ( $debug == 1 ) { - $other_smtp_opts{'Debug'} = 1; -} - -my $smtp = Net::SMTP->new($smtphost,Timeout=>$smtptimeout, %other_smtp_opts) - || nsexit("SMTP connect timeout ($smtptimeout s)",'CRITICAL'); -($smtp->mail($sender) && - $smtp->to($receiver) && - $smtp->data() && - $smtp->datasend("To: $receiver\nSubject: E-Mail Ping [$serial]\n\n". - "This is an automatically sent E-Mail.\n". - "It is not intended for a human reader.\n\n". - "Serial No: $serial\n") && - $smtp->dataend() && - $smtp->quit - ) || nsexit("Error delivering message",'CRITICAL'); - -# no the interessting part: let's if they are receiving ;-) - -$pop = Net::POP3->new( $pophost, - Timeout=>$poptimeout) - || nsexit("POP3 connect timeout (>$poptimeout s, host: $pophost)",'CRITICAL'); - -$msgcount=$pop->login($popuser,$poppasswd); - -$statinfo="$msgcount mails on POP3"; - -nsexit("POP3 login failed (user:$popuser)",'CRITICAL') if (!defined($msgcount)); - -# Check if more than maxmsg mails in pop3-box -nsexit(">$maxmsg Mails ($msgcount Mails on POP3); Please delete !",'WARNING') if ($msgcount > $maxmsg); - -my ($mid, $nid); -# Count messages, that we are looking 4: -while ($msgcount > 0) { - @msglines = @{$pop->top($msgcount,1)}; - for (my $i=0; $i < scalar @messageids; $i++) { - if (messagematchsid(\@msglines,$messageids[$i])) { - $matchcount++; - # newest received mail than the others, ok remeber id. - if (!defined $newestid) { - $newestid = $messageids[$i]; - } else { - $messageids[$i] =~ /\#(\d+)\#/; - $mid = $1; - $newestid =~ /\#(\d+)\#/; - $nid = $1; - if ($mid > $nid) { - $newestid = $messageids[$i]; - } - } - $pop->delete($msgcount); # remove E-Mail from POP3 server - splice @messageids, $i, 1;# remove id from List - last; # stop looking in list - } - } - # Delete orphaned Email-ping msg - my @msgsubject = grep /^Subject/, @msglines; - chomp @msgsubject; - # Scan Subject if email is an Email-Ping. In fact we match and delete also successfully retrieved messages here again. - if (!defined $keeporphaned && $msgsubject[0] =~ /E-Mail Ping \[/) { - $pop->delete($msgcount); # remove E-Mail from POP3 server - } - - $msgcount--; -} - -$pop->quit(); # necessary for pop3 deletion! - -# traverse through the message list and mark the lost mails -# that mean mails that are older than the last received mail. -if (defined $newestid) { - $newestid =~ /\#(\d+)\#/; - $newestid = $1; - for (my $i=0; $i < scalar @messageids; $i++) { - $messageids[$i] =~ /\#(\d+)\#/; - my $akid = $1; - if ($akid < $newestid) { - $messageids[$i] =~ s/^ID/LI/; # mark lost - } - } -} - -# Write list to id-Database -foreach my $id (@messageids) { - print STATF "$id\n"; -} -print STATF "$serial\n"; # remember send mail of this session -close STATF; - -# ok - count lost and pending mails; -my @tmp = grep /^ID/, @messageids; -my $pendingm = scalar @tmp; -@tmp = grep /^LI/, @messageids; -my $lostm = scalar @tmp; - -# Evaluate the Warnin/Crit-Levels -if (defined $pendwarn && $pendingm > $pendwarn) { $state = 'WARNING'; } -if (defined $lostwarn && $lostm > $lostwarn) { $state = 'WARNING'; } -if (defined $pendcrit && $pendingm > $pendcrit) { $state = 'CRITICAL'; } -if (defined $lostcrit && $lostm > $lostcrit) { $state = 'CRITICAL'; } - -if ((defined $pendwarn || defined $pendcrit || defined $lostwarn - || defined $lostcrit) && ($state eq 'UNKNOWN')) {$state='OK';} - - -# Append Status info -$statinfo = $statinfo . ", $matchcount mail(s) came back,". - " $pendingm pending, $lostm lost."; - -# Exit in a Nagios-compliant way -nsexit($statinfo); - -# ---------------------------------------------------------------------- - -sub usage { - print "check_email_loop 1.1 Nagios Plugin - Real check of a E-Mail system\n"; - print "=" x 75,"\nERROR: Missing or wrong arguments!\n","=" x 75,"\n"; - print "This script sends a mail with a specific id in the subject via an given\n"; - print "smtp-server to a given email-adress. When the script is run again, it checks\n"; - print "for this Email (with its unique id) on a given pop3 account and sends \n"; - print "another mail.\n"; - print "\nThe following options are available:\n"; - print " -from=text email adress of send (for mail returnr on errors)\n"; - print " -to=text email adress to which the mails should send to\n"; - print " -pophost=text IP or name of the POP3-host to be checked\n"; - print " -popuser=text Username of the POP3-account\n"; - print " -passwd=text Password for the POP3-user\n"; - print " -poptimeout=num Timeout in seconds for the POP3-server\n"; - print " -smtphost=text IP oder name of the SMTP host\n"; - print " -smtptimeout=num Timeout in seconds for the SMTP-server\n"; - print " -statfile=text File to save ids of messages ($statfile)\n"; - print " -interval=num Time (in minutes) that must pass by before sending\n"; - print " another Ping-mail (gibe a new try);\n"; - print " -lostwarn=num WARNING-state if more than num lost emails\n"; - print " -lostcrit=num CRITICAL \n"; - print " -pendwarn=num WARNING-state if more than num pending emails\n"; - print " -pendcrit=num CRITICAL \n"; - print " -maxmsg=num WARNING if more than num emails on POP3 (default 50)\n"; - print " -keeporphaned Set this to NOT delete orphaned E-Mail Ping msg from POP3\n"; - print " -debug send SMTP tranaction info to stderr\n\n"; - print " Options may abbreviated!\n"; - print " LOST mails are mails, being sent before the last mail arrived back.\n"; - print " PENDING mails are those, which are not. (supposed to be on the way)\n"; - print "\nExample: \n"; - print " $0 -poph=host -pa=pw -popu=popts -smtph=host -from=root\@me.com\n "; - print " -to=remailer\@testxy.com -lostc=0 -pendc=2\n"; - print "\nCopyleft 19.10.2000, Benjamin Schmid / 2003 Michael Markstaller, mm\@elabnet.de\n"; - print "This script comes with ABSOLUTELY NO WARRANTY\n"; - print "This programm is licensed under the terms of the "; - print "GNU General Public License\n\n"; - exit $ERRORS{"UNKNOWN"}; -} - -# --------------------------------------------------------------------- - -sub nsexit { - my ($msg,$code) = @_; - $code=$state if (!defined $code); - print "$code: $msg\n" if (defined $msg); - exit $ERRORS{$code}; -} - -# --------------------------------------------------------------------- - -sub messagematchsid { - my ($mailref,$id) = (@_); - my (@tmp); - my $match = 0; - - # ID - $id =~ s/^LI/ID/; # evtl. remove lost mail mark - @tmp = grep /E-Mail Ping \[/, @$mailref; - chomp @tmp; - if (($tmp[0] =~ /$id/)) - { $match = 1; } - - # Sender: -# @tmp = grep /^From:\s+/, @$mailref; -# if (@tmp && $sender ne "") -# { $match = $match && ($tmp[0]=~/$sender/); } - - # Receiver: -# @tmp = grep /^To: /, @$mailref; -# if (@tmp && $receiver ne "") -# { $match = $match && ($tmp[0]=~/$receiver/); } - - return $match; -} - -# --------------------------------------------------------------------- diff --git a/contrib/check_fan_cpq_present b/contrib/check_fan_cpq_present deleted file mode 100644 index 0bd1390..0000000 --- a/contrib/check_fan_cpq_present +++ /dev/null @@ -1,133 +0,0 @@ -#!/usr/bin/perl -# -# -# check_most.pl -i -p -c community -o [warn] [critical] -# -# NetSaint host script to get the disk usage from NT snmp -# -# Changes and Modifications -# ========================= -# 3-Aug-2000 - Xavier Dusart -# Created -# 2003 - Rainer Duffner - -BEGIN { - if ($0 =~ m/^(.*?)[\/\\]([^\/\\]+)$/) { - $runtimedir = $1; - $PROGNAME = $2; - } -} - - - -require 5.004; -use POSIX; -#use strict; -use Getopt::Std ; -use BER; -require 'SNMP_Session.pm'; -use vars qw($opt_H $opt_p $opt_C $opt_f $opt_h $PROGNAME); -use lib $main::runtimedir; -use utils qw($TIMEOUT %ERRORS &print_revision &usage &support); -use snmputil qw(%CPQ_LOCALE %CPQ_FAN_PRESENT %CPQ_FAN_OVERALL_COND %CPQ_FAN_SPEED); - -delete @ENV{qw(IFS CDPATH ENV BASH_ENV)}; # Make %ENV safer - -getopts('H:p:C:f:hV') ; - -my $ip_address=undef ; - -if ($opt_h) {&help();} - -if ($opt_H =~ m/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|[a-zA-Z][-a-zA-Z0-9]*(\.[a-zA-Z][-a-zA --Z0-9]*)*)$/) { - $ip_address = $opt_H ; - } -else { - usage(); - print "IP-Address format wrong\n"; - exit $ERRORS{'UNKNOWN'}; - } - -#if ($opt_p =~ m/^[0-9] - -my $port = $opt_p; - -my $community = $opt_C; - -my $fan = $opt_f ; - -#my $err_counter=0 ; -#my $err_status=""; - - my $fan_locale_oid = encode_oid (1,3,6,1,4,1,232,6,2,6,7,1,3,0,$fan ); -# not used for the moment - gives no usable output -# if reused, enter at end of list to avoid renumbering ! - my $fan_present_oid = encode_oid (1,3,6,1,4,1,232,6,2,6,7,1,4,0,$fan ); - my $fan_speed_oid = encode_oid (1,3,6,1,4,1,232,6,2,6,7,1,6,0,$fan ); - my $fan_condition_oid = encode_oid (1,3,6,1,4,1,232,6,2,6,7,1,9,0,$fan ); - my $count=1 ; - my $label ; - my @r_array=(); - my $q ; - my $diff ; - $warning=$warning/100 ; - $crititcal=$critical/100 ; - - -# get temperature, temperature_threshold bfore shutdown - my $session=SNMP_Session->open ($ip_address, $community, $port) || die "couldn't open SNMP-session to host" ; - - if ($session->get_request_response ($fan_present_oid, $fan_locale_oid, $fan_speed_oid, $fan_condition_oid )) { - (my $bindings) = $session->decode_get_response ($session->{pdu_buffer}); - while ($bindings ne '') { - ($binding, $bindings) = &decode_sequence ($bindings) ; - ($oid,$value) = &decode_by_template ($binding,"%O%@"); - $r_array[$count]=&pretty_print($value); - $count++; - } - } else { - print "No response from agent\n"; - exit $ERRORS{'CRITICAL'}; - } - $result_fan_present= $r_array[1]; - $result_fan_locale= $r_array[2]; - $result_fan_speed= $r_array[3]; - $result_fan_condition=$r_array[4]; - - - if ( $result_fan_present != 3 || $result_fan_speed !=2 ) { - print "Fan ". $fan . " ".$CPQ_LOCALE{$result_fan_locale}. " (".$result_fan_locale.") - Critical: Fan ".$CPQ_FAN_PRESENT{$result_fan_present}.". Speed: ". $CPQ_FAN_SPEED{$result_fan_speed}.". Overall condition: ". $CPQ_FAN_OVERALL_COND{$result_fan_condition} ."\n" ; - exit $ERRORS{'CRITICAL'} ; - } - else { - print "Fan " .$fan . " ".$CPQ_LOCALE{$result_fan_locale}. " (".$result_fan_locale.") - OK: Fan ".$CPQ_FAN_PRESENT{$result_fan_present}.". Speed: ". $CPQ_FAN_SPEED{$result_fan_speed}.". Overall condition: ". $CPQ_FAN_OVERALL_COND{$result_fan_condition} ."\n" ; - exit $ERRORS{'OK'} ; - } - - -sub print_usage () { - print "Usage: $PROGNAME -H -p -C -f \n"; - } - -sub print_help () { - print_revision($PROGNAME,'$Revision: 1113 $\n '); - print "Copyright (c) 2003 Rainer Duffner\n "; - print_usage(); - print "\n"; - print " = IP-Address or DNS-Name of the W2K-Server\n"; - print " = SNMP-Port (normaly 161)\n"; - print " = SNMP v1 community\n"; - print " = Fannumber (1, 2, 3 etc.)\n"; - } - -sub version () { - print_revision($PROGNAME,'$Revision: 1113 $ '); - exit $ERRORS{'OK'}; -} - -sub help () { - print_help(); - exit $ERRORS{'OK'}; -} - diff --git a/contrib/check_fan_fsc_present b/contrib/check_fan_fsc_present deleted file mode 100644 index 19f8e7f..0000000 --- a/contrib/check_fan_fsc_present +++ /dev/null @@ -1,135 +0,0 @@ -#!/usr/bin/perl -# -# -# check_most.pl -i -p -c community -o [warn] [critical] -# -# NetSaint host script to get the disk usage from NT snmp -# -# Changes and Modifications -# ========================= -# 3-Aug-2000 - Xavier Dusart -# Created -# 2003 - Rainer Duffner - -BEGIN { - if ($0 =~ m/^(.*?)[\/\\]([^\/\\]+)$/) { - $runtimedir = $1; - $PROGNAME = $2; - } -} - - - -require 5.004; -use POSIX; -#use strict; -use Getopt::Std ; -use BER; -require 'SNMP_Session.pm'; -use vars qw($opt_H $opt_p $opt_C $opt_f $opt_h $PROGNAME); -use lib $main::runtimedir; -use utils qw($TIMEOUT %ERRORS &print_revision &usage &support); -use snmputil qw(%FSC_LOCALE %FSC_FAN_STATUS); - -delete @ENV{qw(IFS CDPATH ENV BASH_ENV)}; # Make %ENV safer - -getopts('H:p:C:f:hV') ; - -my $ip_address=undef ; - -if ($opt_h) {&help();} - -if ($opt_H =~ m/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|[a-zA-Z][-a-zA-Z0-9]*(\.[a-zA-Z][-a-zA --Z0-9]*)*)$/) { - $ip_address = $opt_H ; - } -else { - usage(); - print "IP-Address format wrong\n"; - exit $ERRORS{'UNKNOWN'}; - } - -#if ($opt_p =~ m/^[0-9] - -my $port = $opt_p; - -my $community = $opt_C; - -my $fan = $opt_f ; - -#my $err_counter=0 ; -#my $err_status=""; - - my $fan_locale_oid = encode_oid (1,3,6,1,4,1,231,2,10,2,2,5,2,2,1,4,0,$fan-1 ); -# not used for the moment - gives no usable output -# if reused, enter at end of list to avoid renumbering ! - my $fan_cur_speed_oid = encode_oid (1,3,6,1,4,1,231,2,10,2,2,5,2,2,1,8,0,$fan-1 ); - my $fan_nom_max_speed_oid = encode_oid (1,3,6,1,4,1,231,2,10,2,2,5,2,2,1,9,0,$fan-1 ); - my $fan_cur_max_speed_oid = encode_oid (1,3,6,1,4,1,231,2,10,2,2,5,2,2,1,10,0,$fan-1 ); - my $fan_condition_oid = encode_oid (1,3,6,1,4,1,231,2,10,2,2,5,2,2,1,3,0,$fan-1 ); - my $count=1 ; - my $label ; - my @r_array=(); - my $q ; - my $diff ; - $warning=$warning/100 ; - $crititcal=$critical/100 ; - - -# get temperature, temperature_threshold bfore shutdown - my $session=SNMP_Session->open ($ip_address, $community, $port) || die "couldn't open SNMP-session to host" ; - - if ($session->get_request_response ($fan_locale_oid, $fan_cur_speed_oid, $fan_nom_max_speed_oid, $fan_cur_max_speed_oid, $fan_condition_oid )) { - (my $bindings) = $session->decode_get_response ($session->{pdu_buffer}); - while ($bindings ne '') { - ($binding, $bindings) = &decode_sequence ($bindings) ; - ($oid,$value) = &decode_by_template ($binding,"%O%@"); - $r_array[$count]=&pretty_print($value); - $count++; - } - } else { - print "No response from agent\n"; - exit $ERRORS{'CRITICAL'}; - } - $result_fan_locale= $r_array[1]; - $result_fan_cur_speed= $r_array[2]; - $result_fan_nom_max_speed= $r_array[3]; - $result_fan_cur_max_speed= $r_array[4]; - $result_fan_condition=$r_array[5]; - - - if ( $result_fan_condition != "3" ) { - print "Fan ". $fan . " ".$FSC_LOCALE{$result_fan_locale}. " (".$result_fan_locale.") - Critical: Cur./Nom./Cur-Max-Speed: ". $result_fan_cur_speed."/". $result_fan_nom_max_speed."/".$result_fan_cur_max_speed.". Overall condition: ". $FSC_FAN_STATUS{$result_fan_condition} ."\n" ; - exit $ERRORS{'CRITICAL'} ; - } - else { - print "Fan " .$fan . " ".$FSC_LOCALE{$result_fan_locale}. " (".$result_fan_locale.") - OK: Cur./Nom./Cur-Max-Speed: ". $result_fan_cur_speed."/". $result_fan_nom_max_speed."/".$result_fan_cur_max_speed.". Overall condition: ". $FSC_FAN_STATUS{$result_fan_condition} ."\n" ; - exit $ERRORS{'OK'} ; - } - - -sub print_usage () { - print "Usage: $PROGNAME -H -p -C -f \n"; - } - -sub print_help () { - print_revision($PROGNAME,'$Revision: 1113 $\n '); - print "Copyright (c) 2003 Rainer Duffner\n "; - print_usage(); - print "\n"; - print " = IP-Address or DNS-Name of the W2K-Server\n"; - print " = SNMP-Port (normaly 161)\n"; - print " = SNMP v1 community\n"; - print " = Fannumber (1, 2, 3 etc.)\n"; - } - -sub version () { - print_revision($PROGNAME,'$Revision: 1113 $ '); - exit $ERRORS{'OK'}; -} - -sub help () { - print_help(); - exit $ERRORS{'OK'}; -} - diff --git a/contrib/check_flexlm.pl b/contrib/check_flexlm.pl deleted file mode 100644 index 8fa0e33..0000000 --- a/contrib/check_flexlm.pl +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/local/bin/perl -# -# usage: -# check_flexlm.pl license_file -# -# Check available flexlm license managers. -# Use lmstat to check the status of the license server -# described by the license file given as argument. -# Check and interpret the output of lmstat -# and create returncodes and output. -# -# Contrary to the nagios concept, this script takes -# a file, not a hostname as an argument and returns -# the status of hosts and services described in that -# file. Use these hosts.cfg entries as an example -# -#host[anchor]=any host will do;some.address.com;;check-host-alive;3;120;24x7;1;1;1; -#service[anchor]=yodel;24x7;3;5;5;unix-admin;60;24x7;1;1;1;;check_flexlm!/opt/lic/licfiles/yodel_lic -#service[anchor]=yeehaw;24x7;3;5;5;unix-admin;60;24x7;1;1;1;;check_flexlm!/opt/lic/licfiles/yeehaw_lic -#command[check_flexlm]=/some/path/libexec/check_flexlm.pl $ARG1$ -# -# Notes: -# - you need the lmstat utility which comes with flexlm. -# - set the correct path in the variable $lmstat. -# -# initial version: 9-10-99 Ernst-Dieter Martin edmt@infineon.com -# current status: looks like working -# -# Copyright Notice: Do as you please, credit me, but don't blame me -# - -# Just in case of problems, let's not hang Nagios -$SIG{'ALRM'} = sub { - print "No Answer from Client\n"; - exit 2; -}; -alarm(20); - -$lmstat = "/opt/lic/sw/cadadm/default/bin/lmstat"; - -$licfile = shift; - -#print "$licfile \n"; - -open CMD,"$lmstat -c $licfile |"; - -$serverup = 0; - -while ( ) { - if ( /^License server status: [0-9]*@([-0-9a-zA-Z_]*),[0-9]*@([-0-9a-zA-Z_]*),[0-9]*@([-0-9a-zA-Z_]*)/ ) { - $ls1 = $1; - $ls2 = $2; - $ls3 = $3; - $lf1 = $lf2 = $lf3 = 0; - $servers = 3; - } elsif ( /^License server status: [0-9]*@([-0-9a-zA-Z_]*)/ ) { - $ls1 = $1; - $ls2 = $ls3 = ""; - $lf1 = $lf2 = $lf3 = 0; - $servers = 1; - } elsif ( / *$ls1: license server UP/ ) { - print "$ls1 UP, "; - $lf1 = 1 - } elsif ( / *$ls2: license server UP/ ) { - print "$ls2 UP, "; - $lf2 = 1 - } elsif ( / *$ls3: license server UP/ ) { - print "$ls3 UP, "; - $lf3 = 1 - } elsif ( / *([^:]*: UP .*)/ ) { - print " license server for $1\n"; - $serverup = 1; - } -} -if ( $serverup == 0 ) { - print " license server not running\n"; - exit 2; -} - -exit 0 if ( $servers == $lf1 + $lf2 + $lf3 ); -exit 1 if ( $servers == 3 && $lf1 + $lf2 + $lf3 == 2 ); -exit 2; diff --git a/contrib/check_frontpage b/contrib/check_frontpage deleted file mode 100644 index 21c5267..0000000 --- a/contrib/check_frontpage +++ /dev/null @@ -1,151 +0,0 @@ -#! /usr/bin/perl -w -# -# $Id: check_frontpage 1112 2005-01-27 04:46:08Z stanleyhopcroft $ -# -# Check that FrontPage extensions appear to be working on a specified host. -# Currently only checks that the hit counter is not returning an error. -# -# Probably not a good idea to use this on a host that someone's counting -# the hits on, so create a separate vhost for frontpage extensions testing, -# or just install the extensions on the default/root host for your server, and -# point it against that hostname, running it against all vhosts on a server is -# probably rather wasteful. -# -# Kev Green, oRe Net (http://www.orenet.co.uk/). - - -use strict; -use lib "/usr/lib/nagios/plugins"; -use utils qw($TIMEOUT %ERRORS &print_revision &support); -use vars qw($PROGNAME); -use Getopt::Long; -use LWP; -use vars qw($opt_V $opt_h $verbose $opt_w $opt_c $opt_H); -my ($tt,$url,$response,$stime, $etime,$warning,$critical,$mimetype,$failtype,$temp,$message); -my $rt = 0; - -$PROGNAME = "check_frontpage"; -sub print_help (); -sub print_usage (); - -$ENV{'PATH'}=''; -$ENV{'BASH_ENV'}=''; -$ENV{'ENV'}=''; - -Getopt::Long::Configure('bundling'); -GetOptions - ("V" => \$opt_V, "version" => \$opt_V, - "h" => \$opt_h, "help" => \$opt_h, - "v" => \$verbose, "verbose" => \$verbose, - "w=s" => \$opt_w, "warning=s" => \$opt_w, - "c=s" => \$opt_c, "critical=s" => \$opt_c, - "H=s" => \$opt_H, "hostname=s" => \$opt_H); - -if ($opt_V) { - print_revision($PROGNAME,'$Revision: 1112 $'); #' - exit $ERRORS{'OK'}; -} - -if ($opt_h) { - print_help(); - exit $ERRORS{'OK'}; -} - -$opt_H = shift unless ($opt_H); -print_usage() unless $opt_H; -my $host = $1 if ($opt_H =~ m/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|[a-zA-Z][-a-zA-Z0-9]+(\.[a-zA-Z0-9][-a-zA-Z0-9]+)*)$/); -print_usage() unless $host; - -($opt_c) || ($opt_c = shift) || ($opt_c = 120); -if ($opt_c =~ /([0-9]+)/) { - $critical = $1; -} else { - $critical = 10; -} - -($opt_w) || ($opt_w = shift) || ($opt_w = 60); -if ($opt_w =~ /([0-9]+)/) { - $warning = $1; -} else { - $warning = 5; -} - -# Guts go here, once we're through argument parsing and have warning and -# critical thresholds. -my $browser = LWP::UserAgent->new; - -my @urls = ( - # This is the "Hit Counter", which continues to work if frontpage extensions - # are 'uninstall'ed from the site, but not when they are 'fulluninstall'ed. - { - url => "_vti_bin/fpcount.exe?Page=_borders/right.htm|Image=4", - mimetype => "image/gif", - message => "None, or broken frontpage extensions on server, or virtual site 'fulluninstall'ed?", - failtype => "CRITICAL" - }, - # This is the "FrontPage Configuration Information" file, which is removed - # when you 'uninstall' the extensions from a site. - { - url => "_vti_inf.html", - mimetype => "text/html", - message => "Someone 'uninstall'ed extensions on virtual site?", - failtype => "WARNING" - } -); - -print "FRONTPAGE: "; - -foreach $temp (@urls) { - $url = $temp->{'url'}; - $mimetype = $temp->{'mimetype'}; - $failtype = $temp->{'failtype'}; - $message = $temp->{'message'}; - $stime = time(); - $response=$browser->get("http://".$host."/".$url); - $etime = time(); - $tt = $etime - $stime; - -# If we got a server error, or unknown output type, report back as critical. - if ($response->status_line !~ "^200") { - print $message." (".$response->status_line.")\r\n"; - exit $ERRORS{$failtype}; - } elsif ($response->content_type !~ $mimetype) { - print $message." (Wrong Content-type: ".$response->content_type.")\r\n"; - exit $ERRORS{$failtype}; - } else { - # Because we're dealing with multiple URL's - $rt += $tt; - } - -# Decide if the response time was critical or not. -# - if ($rt > $critical) { - print "Response time ".$rt." over critical threshold ".$critical."\r\n"; - exit($ERRORS{'CRITICAL'}); - } elsif ($rt > $warning) { - print "Response time ".$rt." over warning threshold ".$warning."\r\n"; - exit($ERRORS{'WARNING'}); - } -} -printf(" %s - %s second response time, ",$response->status_line, $rt); - -# If all the required URL's give the right responses quick enough, then we -# should be okay. -exit($ERRORS{'OK'}); - -sub print_usage () { - print "Usage: $PROGNAME -H [-w ] [-c ]\n"; - exit; -} - -sub print_help () { - print_revision($PROGNAME,'$Revision: 1112 $'); - print "Copyright (c) 2003 Kev Green\n"; - print "\n"; - print "FrontPage remains a copyright/trademark of Microsoft Corporation.\n"; - print_usage(); - print "\n"; - print " = Unknown.\n"; - print " = Server error from FrontPage extensions.\n\n"; - support(); -} diff --git a/contrib/check_hltherm.c b/contrib/check_hltherm.c deleted file mode 100644 index 85c989f..0000000 --- a/contrib/check_hltherm.c +++ /dev/null @@ -1,209 +0,0 @@ -/****************************************************************************************** - * - * CHECK_HLTHERM.C - * - * Program: Hot Little Therm temperature plugin for Nagios - * License: GPL - * Copyright (c) 1999-2002 Ethan Galstad (nagios@nagios.org) - * - * Last Modified: 02-28-2002 - * - * Command line: check_hltherm [-l label] [-s scale] [-lower] - * - * Description: - * - * This plugin checks the temperature of a given temperature probe on a - * Hot Little Therm digital thermometer. The plugin uses the 'therm' utility - * that is included with the HLT software to check the probe temperature. Both - * the HLT digital thermometer and software are produced by Spiderplant. See - * their website at http://www.spiderplant.com/hlt for more information. - * - *****************************************************************************************/ - -#include "config.h" -#include "common.h" -#include "popen.h" - -#define DEFAULT_TIMEOUT 10 /* default timeout in seconds */ - -#define HLTHERM_COMMAND "/usr/local/bin/therm" /* this should be moved out to the configure script */ - - -static void timeout_alarm_handler(int); /* author must provide */ -int process_arguments(int, char **); - -int timeout_interval=DEFAULT_TIMEOUT; - -double wtemp=0.0L; -double ctemp=0.0L; - -int check_lower_temps=FALSE; - -char probe[MAX_INPUT_BUFFER]=""; -char label[MAX_INPUT_BUFFER]="Temperature"; -char scale[MAX_INPUT_BUFFER]="Degrees"; - -FILE *fp; - - -int main(int argc, char **argv){ - int result=STATE_OK; - char command[MAX_INPUT_BUFFER]; - double temp=0.0L; - char input_buffer[MAX_INPUT_BUFFER]; - int found=0; - - /* process command line arguments */ - result=process_arguments(argc,argv); - - /* display usage if there was a problem */ - if(result==ERROR){ - printf("Incorrect arguments supplied\n"); - printf("\n"); - printf("Hot Little Therm temperature plugin for Nagios\n"); - printf("Copyright (c) 1999-2002 Ethan Galstad (nagios@nagios.org)\n"); - printf("Last Modified: 02-28-2002\n"); - printf("License: GPL\n"); - printf("\n"); - printf("Usage: %s [-l label] [-s scale] [-lower]\n",argv[0]); - printf("\n"); - printf("Options:\n"); - printf(" = Temperature necessary to result in a WARNING state\n"); - printf(" = Temperature necessary to result in a CRITICAL state\n"); - printf(" [label] = A descriptive label for the probe. Example: \"Outside Temp\"\n"); - printf(" [scale] = A descriptive label for the temperature scale. Example: \"Celsius\"\n"); - printf(" [-lower] = Evaluate temperatures with lower values being more critical\n"); - printf("\n"); - printf("This plugin checks the temperature of a given temperature probe on a\n"); - printf("Hot Little Therm digital thermometer. The plugin uses the 'therm' utility\n"); - printf("included with the HLT software to check the probe temperature. Both the\n"); - printf("HLT digital thermometer and software are produced by Spiderplant. See\n"); - printf("their website at http://www.spiderplant.com/hlt for more information.\n"); - printf("\n"); - return STATE_UNKNOWN; - } - - - result=STATE_OK; - - /* Set signal handling and alarm */ - if(signal(SIGALRM,timeout_alarm_handler)==SIG_ERR){ - printf("Cannot catch SIGALRM"); - return STATE_UNKNOWN; - } - - /* handle timeouts gracefully */ - alarm(timeout_interval); - - /* create the command line we're going to use */ - snprintf(command,sizeof(command),"%s %s",HLTHERM_COMMAND,probe); - command[sizeof(command)-1]='\x0'; - - /* run the command to check the temperature on the probe */ - fp=spopen(command); - if(fp==NULL){ - printf("Could not open pipe: %s\n",command); - return STATE_UNKNOWN; - } - - if(fgets(input_buffer,MAX_INPUT_BUFFER-1,fp)){ - found=1; - temp=(double)atof(input_buffer); - } - - /* close the pipe */ - spclose(fp); - - if(result==STATE_OK){ - - if(found==0){ - printf("Therm problem - Could not read program output\n"); - result=STATE_CRITICAL; - } - else{ - if(check_lower_temps==TRUE){ - if(temp<=ctemp) - result=STATE_CRITICAL; - else if(temp<=wtemp) - result=STATE_WARNING; - } - else{ - if(temp>=ctemp) - result=STATE_CRITICAL; - else if(temp>=wtemp) - result=STATE_WARNING; - } - - printf("Therm %s: %s = %2.1f %s\n",(result==STATE_OK)?"ok":"problem",label,temp,scale); - } - } - - return result; - } - - -/* process command-line arguments */ -int process_arguments(int argc, char **argv){ - int x; - - /* not enough options were supplied */ - if(argc<4) - return ERROR; - - /* first option is always the probe name */ - strncpy(probe,argv[1],sizeof(probe)-1); - probe[sizeof(probe)-1]='\x0'; - - /* 2nd and 3rd options are temperature thresholds */ - wtemp=(double)atof(argv[2]); - ctemp=(double)atof(argv[3]); - - /* process all remaining arguments */ - for(x=5;x<=argc;x++){ - - /* we got the lower temperature option */ - if(!strcmp(argv[x-1],"-lower")) - check_lower_temps=TRUE; - - /* we got the label */ - else if(!strcmp(argv[x-1],"-l")){ - if(x \$chk_fs, - "show-filesystems" => \$show_fs, - "check-filesystemID" => \$chk_fsid, - "check-cpu" => \$chk_cpu, - "host=s" => \$target_host, - "community=s" => \$target_community, - "filesystemID1=i" => \$fsid1_opt, - "filesystem=s" => \$fs_opt, - "protocol:s" => \$proto_opt, - "warning=i" => \$warning_opt, - "critical=i" => \$critical_opt); - -$proto_opt = 1 - unless $proto_opt == 1 || - $proto_opt == '2c' || - $proto_opt == 3; - -if ($chk_fs) { - walk_data($snmpwalk, $target_host, $target_community, $mounted_OID,$proto_opt ); - walk_data($snmpwalk, $target_host, $target_community, $totalspace_OID,$proto_opt ); - walk_data($snmpwalk, $target_host, $target_community, $freespace_OID,$proto_opt ); check_filesystem($fs_opt, $warning_opt, $critical_opt); -} elsif ($show_fs) { - walk_data($snmpwalk, $target_host, $target_community, $filesystemID1_OID,$proto_opt); - walk_data($snmpwalk, $target_host, $target_community, $mounted_OID,$proto_opt ); - walk_data($snmpwalk, $target_host, $target_community, $path_OID,$proto_opt); - show_filesystem(); -} elsif ($chk_fsid){ - $totalspace_fsID_OID = "$totalspace_OID.$fsid1_opt"; - $freespace_fsID_OID = "$freespace_OID.$fsid1_opt"; - walk_data($snmpwalk, $target_host, $target_community, $totalspace_fsID_OID,$proto_opt); - walk_data($snmpwalk, $target_host, $target_community, $freespace_fsID_OID,$proto_opt); - check_filesystemID1($fsid1_opt, $warning_opt, $critical_opt); -} elsif ($chk_cpu) { - get_cpu_load($snmpwalk, $target_host, $target_community, $cpu_5min_OID,$proto_opt); - check_cpu_5min($cpu, $warning_opt, $critical_opt); -} else { - print "\n\nUsage:\n"; - print "Checking 5-min CPU Load:\n"; - print " $0 --check-cpu -warning --critical --host --community --protocol \n\n"; - print "Checking local filesystem mounted on a host:\n"; - print " $0 --show-filesystems --host --community --protocol \n\n"; - print "Checking by filesystem name:\n"; - print " $0 --check-filesystem --filesystem --warning <% used space> --critical <% used space> --host --community --protocol \n\n"; - print "Checking by filesystem ID:\n"; - print " $0 --check-filesystemID --filesystemID --warning <% used space> --critical <% used space> --host --community --protocol \n\n"; -} - -sub get_cpu_load { - my ($snmpwalk, $target_host, $target_community, $OID,$vers) = @_; - die "cannot fork: $!" unless defined($pid = open(SNMPWALK, "-|")); - - if ($pid) { # parent - while () { - my @snmpdata = split(/:/,$_); - $cpu = $snmpdata[1]/100; - } - close(SNMPWALK) or warn "kid exited $?"; - } else { # child - exec($snmpwalk,'-c',$target_community,'-v',$vers,$target_host,$OID) or die "can't exec program: $!"; - } -} - -sub walk_data { -#This function queries the SNMP daemon for the specific OID - my ($snmpwalk, $target_host, $target_community, $OID,$vers) = @_; - - die "cannot fork: $!" unless defined($pid = open(SNMPWALK, "-|")); - - if ($pid) { # parent - while () { - $output = $_; - sort_walk_data($output); - } - close(SNMPWALK) or warn "kid exited $?"; - } else { # child - exec($snmpwalk,'-c',$target_community,'-v',$vers,$target_host,$OID) or die "can't exec program: $!"; - } -} - -sub sort_walk_data { - my ($snmp_data) = @_; - @fields = split(/\./,$snmp_data); - $item = $fields[8]; - $filesystemID1 = $fields[9]; - @fields2 = split(/=/,$fields[10]); -# $filesystemID2 = $fields2[0]; - $value = $fields2[1]; - chomp($value); - if ($value =~ /"/) { - @fields3 = split(/"/,$value); - $value = $fields3[1]; - } - if ($item == 3) { - $mounted{$filesystemID1} = "$value"; - } elsif ($item == 4) { - $totalspace{$filesystemID1} = "$value"; - } elsif ($item == 6) { - $freespace{$filesystemID1} = "$value"; - } elsif ($item == 10) { - $filesystempath{$filesystemID1} = "$value"; - } -} - -sub show_filesystem { - print "\n\nfilesystemID1\tmounted filesystem\tfilesystem path\n"; - foreach $element (keys %mounted) { - print "$element\t$mounted{$element}\t\t$filesystempath{$element}\n"; - } - print "\n\n"; -} - -sub check_filesystem { - -# Warning = percentage of used space >= $warning and < $critical -# Critical = percentage of used space > $warning and >= $critical -# OK = percentage of used space < $warning and < $critical - - my ($mounted_filesystem, $warning, $critical) = @_; - foreach $element (keys %mounted) { - if ($mounted{$element} eq $mounted_filesystem) { - my $warning_result = $totalspace{$element}*(100-$warning)/100; - my $critical_result = $totalspace{$element}*(100-$critical)/100; - my $result_percent = $freespace{$element}*100/$totalspace{$element}; - if (($freespace{$element} <= $warning_result) && ($freespace{$element} > $critical_result)) { - printf "Only %d M (%d%s) free\n",$freespace{$element}/1024,$result_percent,"%"; - exit 1; - } elsif ($freespace{$element} <= $critical_result) { - printf "Only %d M (%d%s) free\n",$freespace{$element}/1024,$result_percent,"%"; - exit 2; - } else { - printf "Disk ok - %d M (%d%s) free\n",$freespace{$element}/1024,$result_percent,"%"; - exit 0; - } - } - } - print "$mounted_filesystem doesn't exist in $target_host\n\n"; - exit -1; -} - -sub check_filesystemID1{ -# Warning = percentage of used space >= $warning and < $critical -# Critical = percentage of used space > $warning and >= $critical -# OK = percentage of used space < $warning and < $critical - - my ($fsid1, $warning, $critical) = @_; - foreach $element (keys %totalspace) { - if ($element eq $fsid1) { - my $warning_result = $totalspace{$element}*(100-$warning)/100; - my $critical_result = $totalspace{$element}*(100-$critical)/100; - my $result_percent = $freespace{$element}*100/$totalspace{$element}; - if (($freespace{$element} <= $warning_result) && ($freespace{$element} >= $critical_result)) { - printf "Only %d M (%d%s) free\n",$freespace{$element}/1024,$result_percent,"%"; - exit 1; - } elsif ($freespace{$element} <= $critical_result) { - printf "Only %d M (%d%s) free\n",$freespace{$element}/1024,$result_percent,"%"; - exit 2; - } else { - printf "Disk ok - %d M (%d%s) free\n",$freespace{$element}/1024,$result_percent,"%"; - exit 0; - } - } - } - print "$fsid1 doesn't exist in $target_host\n\n"; - exit -1; -} - -sub check_cpu_5min { - my ($cpu, $warn, $crit) = @_; - if ($cpu >= $crit) { - print "Critical- 5-min load: $cpu\n"; - exit 2; - } elsif ($cpu >= $warn) { - print "Warning - 5-min load: $cpu\n"; - exit 1; - } else { - print "Load ok - 5-min load: $cpu\n"; - exit 0; - } -} - - - diff --git a/contrib/check_http-with-client-certificate.c b/contrib/check_http-with-client-certificate.c deleted file mode 100644 index 60e1481..0000000 --- a/contrib/check_http-with-client-certificate.c +++ /dev/null @@ -1,1567 +0,0 @@ -/**************************************************************************** - * - * Program: HTTP plugin for Nagios - * License: GPL - * - * License Information: - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - *****************************************************************************/ - -/**************************************************************************** - * - * check_http is derived from the original check_http provided by - * Ethan Galstad/Karl DeBisschop - * - * This provides some additional functionality including: - * - check server certificate against supplied hostname (Host: header) if any - * - check server certificate against local CA certificates (as browsers do) - * - authenticate with client certificate (and optional passphrase) - * - specify HTTP returncodes to return a status of WARNING or OK instead of - * CRITICAL (only global for 3xx or 4xx errors) - * - check only against HTTP status line and exit immediately if not matched - * - *****************************************************************************/ - -const char *progname = "check_http"; -#define REVISION "$Revision: 1117 $" -#define CVSREVISION "1.24" -#define COPYRIGHT "2003" -#define AUTHORS "Fabian Pehla" -#define EMAIL "fabian@pehla.de" - -#include "config.h" -#include "common.h" -#include "netutils.h" -#include "utils.h" - - -#define HELP_TXT_SUMMARY "\ -This plugin tests the HTTP service on the specified host. It can test\n\ -normal (http) and secure (https) servers, follow redirects, search for\n\ -strings and regular expressions, check connection times, and report on\n\ -certificate expiration times.\n" - -#define HELP_TXT_OPTIONS "\ --H -I [-p ] [-u ]\n\ - [-w ] [-c ] [-t ]\n\ - [-S] [-C ] [-a ] [-A ]\n\ - [-Z ] [-e ] [-E ]\n\ - [-s ] [-r ] [-R ]\n\ - [-f (ok|warn|critical|follow)] [-g (ok|warn|critical)]\n" - -#define HELP_TXT_LONGOPTIONS "\ - -H, --hostname=\n\ - FQDN host name argument for use in HTTP Host:-Header (virtual host)\n\ - If used together wich the -S option, the server certificate will\n\ - be checked against this hostname\n\ - -I, --ip-address=
\n\ - IP address or hostname for TCP connect (use IP to avoid DNS lookup)\n\ - -p, --port=\n\ - Port number (default: %d)\n\ - -u, --url-path=\n\ - URL to request from host (default: %s)\n\ - -S, --ssl\n\ - Use SSL (default port: %d)\n\ - -C, --server-certificate-days=\n\ - Minimum number of days a server certificate must be valid\n\ - No other check can be combined with this option\n\ - -a, --basic-auth=\n\ - Colon separated username and password for basic authentication\n\ - -A, --client-certificate=\n\ - File containing X509 client certificate and key\n\ - -K, --passphrase=\n\ - Passphrase for the client certificate key\n\ - This option can only be used in combination with the -A option\n\ - -Z, --ca-certificate=\n\ - File containing certificates of trusted CAs\n\ - The server certificate will be checked against these CAs\n\ - -e, --http-expect=\n\ - String to expect in HTTP response line (Default: %s)\n\ - -E, --http-expect-only=\n\ - String to expect in HTTP response line\n\ - No other checks are made, this either matches the response\n\ - or exits immediately\n\ - -s, --content-string=\n\ - String to expect in content\n\ - -r, --content-ereg=\n\ - Regular expression to expect in content\n\ - -R, --content-eregi=\n\ - Case insensitive regular expression to expect in content\n\ - -f, --onredirect=(ok|warning|critical|follow)\n\ - Follow a redirect (3xx) or return with a user defined state\n\ - Default: OK\n\ - -g, --onerror=(ok|warning|critical)\n\ - Status to return on a client error (4xx)\n\ - -m, --min=INTEGER\n\ - Minimum page size required (bytes)\n\ - -t, --timeout=\n\ - Seconds before connection times out (default: %d)\n\ - -c, --critical=\n\ - Response time to result in critical status (seconds)\n\ - -w, --warning=\n\ - Response time to result in warning status (seconds)\n\ - -V, --version\n\ - Print version information\n\ - -v, --verbose\n\ - Show details for command-line debugging (do not use with nagios server)\n\ - -h, --help\n\ - Print detailed help screen\n" - - - -#define HTTP_PORT 80 -#define DEFAULT_HTTP_URL_PATH "/" -#define DEFAULT_HTTP_EXPECT "HTTP/1." -#define DEFAULT_HTTP_METHOD "GET" -#define DEFAULT_HTTP_REDIRECT_STATE STATE_OK -#define DEFAULT_HTTP_CLIENT_ERROR_STATE STATE_WARNING - -#define HTTP_TEMPLATE_REQUEST "%s%s %s HTTP/1.0\r\n" -#define HTTP_TEMPLATE_HEADER_USERAGENT "%sUser-Agent: %s/%s (nagios-plugins %s)\r\n" -#define HTTP_TEMPLATE_HEADER_HOST "%sHost: %s\r\n" -#define HTTP_TEMPLATE_HEADER_AUTH "%sAuthorization: Basic %s\r\n" - -/* fill in printf with protocol_text(use_ssl), state_text(state), page->status, elapsed_time */ -#define RESULT_TEMPLATE_STATUS_RESPONSE_TIME "%s %s: %s - %7.3f seconds response time|time=%7.3f\n" -#define RESULT_TEMPLATE_RESPONSE_TIME "%s %s: %7.3f seconds response time|time=%7.3f\n" - -#ifdef HAVE_SSL - -#ifdef HAVE_SSL_H -#include -#include -#include -#include -#include -#include -#include -#endif - -#ifdef HAVE_OPENSSL_SSL_H -#include -#include -#include -#include -#include -#include -#include -#endif - -#define HTTPS_PORT 443 -#endif - -#ifdef HAVE_REGEX_H -#include -#define REGEX_REGS 2 -#define MAX_REGEX_SIZE 256 -#endif - -#define chk_protocol(protocol) ( strstr( protocol, "https" ) ? TRUE : FALSE ); -#define protocol_std_port(use_ssl) ( use_ssl ? HTTPS_PORT : HTTP_PORT ); -#define protocol_text(use_ssl) ( use_ssl ? "HTTPS" : "HTTP" ) - -#define MAX_IPV4_HOSTLENGTH 64 -#define HTTP_HEADER_LOCATION_MATCH "%*[Ll]%*[Oo]%*[Cc]%*[Aa]%*[Tt]%*[Ii]%*[Oo]%*[Nn]: " -#define HTTP_HEADER_PROTOCOL_MATCH "%[HTPShtps]://" -#define HTTP_HEADER_HOSTNAME_MATCH "%[a-zA-Z0-9.-]" -#define HTTP_HEADER_PORT_MATCH ":%[0-9]" -#define HTTP_HEADER_URL_PATH_MATCH "%[/a-zA-Z0-9._-=@,]" - -/* -************************************************************************ -* GLOBAL VARIABLE/POINTER DEFINITIONS * -************************************************************************ -*/ - -/* misc variables */ -int verbose = FALSE; - -/* time thresholds to determine exit code */ -int use_warning_interval = FALSE; -double warning_interval = 0; -int use_critical_interval = FALSE; -double critical_interval = 0; -double elapsed_time = 0; -struct timeval start_tv; - -/* variables concerning the server host */ -int use_server_hostname = FALSE; -char *server_hostname = ""; // hostname for use in HTTPs Host: header -char *server_host = ""; // hostname or ip address for tcp connect -int use_server_port = FALSE; -int server_port = HTTP_PORT; - -int use_basic_auth = FALSE; -char basic_auth[MAX_INPUT_BUFFER] = ""; - -/* variables concerning server responce */ -struct pageref { - char *content; - size_t size; - char *status; - char *header; - char *body; -}; - -/* variables concerning ssl connections */ -int use_ssl = FALSE; -#ifdef HAVE_SSL -int server_certificate_min_days_valid = 0; -int check_server_certificate = FALSE; -X509 *server_certificate; // structure containing server certificate -int use_client_certificate = FALSE; -char *client_certificate_file = NULL; -int use_client_certificate_passphrase = FALSE; -char *client_certificate_passphrase = NULL; -int use_ca_certificate = FALSE; -char *ca_certificate_file = NULL; - -BIO *bio_err = 0; // error write context -#endif - - -/* variables concerning check behaviour */ -char *http_method = DEFAULT_HTTP_METHOD; -char *http_url_path = ""; -int use_http_post_data = FALSE; -char *http_post_data = ""; -int use_min_content_length = FALSE; -int min_content_length = 0; -int use_http_expect_only = FALSE; -char http_expect[MAX_INPUT_BUFFER] = DEFAULT_HTTP_EXPECT; -int check_content_string = FALSE; -char content_string[MAX_INPUT_BUFFER] = ""; -int http_redirect_state = DEFAULT_HTTP_REDIRECT_STATE; -int http_client_error_state = DEFAULT_HTTP_CLIENT_ERROR_STATE; - -#ifdef HAVE_REGEX_H -regex_t regex_preg; -regmatch_t regex_pmatch[REGEX_REGS]; -int check_content_regex = FALSE; -char content_regex[MAX_REGEX_SIZE] = ""; -int regex_cflags = REG_NOSUB | REG_EXTENDED | REG_NEWLINE; -int regex_error = 0; -char regex_error_buffer[MAX_INPUT_BUFFER] = ""; -#endif - - - -/* -************************************************************************ -* FUNCTION PROTOTYPES * -************************************************************************ -*/ - -void print_usage( void ); -void print_help( void ); -int process_arguments (int, char **); -int http_request( int sock, struct pageref *page); - -int parse_http_response( struct pageref *page ); -int check_http_response( struct pageref *page ); -int check_http_content( struct pageref *page ); -int prepare_follow_redirect( struct pageref *page ); - -static char *base64 (char *bin, int len); - -#ifdef HAVE_SSL -int ssl_terminate( int state, char *string ); -static int passwd_cb( char *buf, int num, int rwflag, void *userdata ); -static void sigpipe_handle( int x ); -SSL_CTX * initialize_ssl_ctx( void ); -void destroy_ssl_ctx( SSL_CTX *ctx ); -int fetch_server_certificate( SSL *ssl ); -int check_server_certificate_chain( SSL *ssl ); -int check_server_certificate_hostname( void ); -int check_server_certificate_expires( void ); -int https_request( SSL_CTX *ctx, SSL *ssl, struct pageref *page ); -#endif - -/* -************************************************************************ -* IMPLEMENTATION * -************************************************************************ -*/ - -/* - * main() - * - * PSEUDOCODE OF HOW MAIN IS SUPPOSED TO WORK - * - * process command line arguments including sanity check - * initialize alarm signal handling - * if use_ssl - * build ssl context - * LOOP: - * make tcp connection - * if use_ssl - * make ssl connection - * if use_server_hostname - * check if certificate matches hostname - * if check_server_certificate - * check expiration date of server certificate - * return STATUS - * else - * request http page - * handle ssl rehandshake - * close ssl connection - * else - * request http page - * close tcp connection - * analyze http page - * if follow on redirect - * repeat LOOP - * end of LOOP - * destroy ssl context - */ -int -main (int argc, char **argv) -{ - int result = STATE_UNKNOWN; - int sock; - struct pageref page; -#ifdef HAVE_SSL - SSL_CTX *ctx; - SSL *ssl; - BIO *sbio; -#endif - - if ( process_arguments(argc, argv) == ERROR ) - usage( "check_http: could not parse arguments\n" ); - -#ifdef HAVE_SSL - /* build SSL context if required: - * a) either we use ssl from the beginning OR - * b) or we follor redirects wich may lead os to a ssl page - */ - if ( use_ssl || ( http_redirect_state == STATE_DEPENDENT ) ) - ctx=initialize_ssl_ctx(); -#endif - - /* Loop around 3xx onredirect=follow */ - do { - - /* - * initialize alarm signal handling, set socket timeout, start timer - * socket_timeout and socket_timeout_alarm_handler are defined in - * netutils.c - */ - (void) signal( SIGALRM, socket_timeout_alarm_handler ); - (void) alarm( socket_timeout ); - gettimeofday( &start_tv, NULL ); - - /* make a tcp connection */ - result = my_tcp_connect( server_host, server_port, &sock ); - - /* result of tcp connect */ - if ( result == STATE_OK ) - { -#ifdef HAVE_SSL - /* make a ssl connection */ - if ( use_ssl ) { - ssl=SSL_new( ctx ); - sbio=BIO_new_socket( sock, BIO_NOCLOSE ); - SSL_set_bio( ssl, sbio, sbio); - if ( SSL_connect( ssl ) <= 0 ) - ssl_terminate( STATE_CRITICAL, "check_http: SSL connect error" ); - - /* fetch server certificate */ - result = fetch_server_certificate( ssl ); - - /* verify server certificate against CAs */ - if ( ( result == STATE_OK ) && use_ca_certificate ) { - result = check_server_certificate_chain( ssl ); - } - - /* check if certificate matches hostname */ - if ( ( result == STATE_OK ) && use_server_hostname ) { - result = check_server_certificate_hostname(); - } - - if ( result == STATE_OK ) { - /* check server certificate expire date */ - if ( check_server_certificate ) { - result = check_server_certificate_expires(); - /* OR: perform http request */ - } else { - result = https_request( ctx, ssl, (struct pageref *) &page ); - } - } - SSL_shutdown( ssl ); - SSL_free( ssl ); - } else { -#endif - /* HTTP implementation */ - result = http_request( sock, (struct pageref *) &page ); -#ifdef HAVE_SSL - } -#endif - /* stop timer and calculate elapsed_time */ - elapsed_time = delta_time( start_tv ); - - /* close the tcp connection */ - close( sock ); - - /* reset the alarm */ - alarm( 0 ); - - /* analyze http page */ - /* TO DO */ - if ( result == STATE_OK ) - result = parse_http_response( (struct pageref *) &page ); - - if ( result == STATE_OK ) - result = check_http_response( (struct pageref *) &page ); - - switch ( result ) { - case STATE_OK: - /* weiter geht's */ - result = check_http_content( (struct pageref *) &page ); - break; - case STATE_DEPENDENT: - /* try to determine redirect parameters */ - result = prepare_follow_redirect( (struct pageref *) &page ); - break; - } - - } else { - /* some error occured while trying to make a tcp connect */ - exit( result ); - } - - } while ( result == STATE_DEPENDENT ); // end of onredirect loop - - /* destroy SSL context */ -#ifdef HAVE_SSL - if ( use_ssl || ( http_redirect_state == STATE_DEPENDENT ) ) - destroy_ssl_ctx( ctx ); -#endif - - /* if we ever get to this point, everything went fine */ - printf( RESULT_TEMPLATE_STATUS_RESPONSE_TIME, - protocol_text( use_ssl ), - state_text( result ), - page.status, - elapsed_time, - elapsed_time ); - - return result; -} - - -void -print_help( void ) -{ - print_revision( progname, REVISION ); - printf - ( "Copyright (c) %s %s <%s>\n\n%s\n", - COPYRIGHT, AUTHORS, EMAIL, HELP_TXT_SUMMARY ); - print_usage(); - printf( "NOTE: One or both of -H and -I must be specified\n" ); - printf( "\nOptions:\n" HELP_TXT_LONGOPTIONS "\n", - HTTP_PORT, DEFAULT_HTTP_URL_PATH, HTTPS_PORT, - DEFAULT_HTTP_EXPECT, DEFAULT_SOCKET_TIMEOUT ); -#ifdef HAVE_SSL - //printf( SSLDESCRIPTION ); -#endif -} - - -void -print_usage( void ) -{ - printf( "Usage:\n" " %s %s\n" -#ifdef HAVE_GETOPT_H - " %s (-h | --help) for detailed help\n" - " %s (-V | --version) for version information\n", -#else - " %s -h for detailed help\n" - " %s -V for version information\n", -#endif - progname, HELP_TXT_OPTIONS, progname, progname ); -} - - -/* -* process_arguments() -* -* process command line arguments either using getopt_long or getopt -* (parsing long argumants manually) -*/ -int -process_arguments( int argc, char **argv ) -{ - int c, i = 1; - extern char *optarg; - -#ifdef HAVE_GETOPT_H - int option_index = 0; - static struct option long_options[] = { - STD_LONG_OPTS, - {"file", required_argument, 0, 'F'}, - {"ip-address", required_argument, 0, 'I'}, - {"port", required_argument, 0, 'p'}, - {"url-path", required_argument, 0, 'u'}, - {"post-data", required_argument, 0, 'P'}, - {"ssl", no_argument, 0, 'S'}, - {"server-certificate-days", required_argument, 0, 'C'}, - {"basic-auth", required_argument, 0, 'a'}, - {"client-certificate", required_argument, 0, 'A'}, - {"passphrase", required_argument, 0, 'K'}, - {"ca-certificate", required_argument, 0, 'Z'}, - {"http-expect", required_argument, 0, 'e'}, - {"http-expect-only", required_argument, 0, 'E'}, - {"content-string", required_argument, 0, 's'}, - {"content-ereg-linespan", required_argument, 0, 'l'}, - {"content-ereg", required_argument, 0, 'r'}, - {"content-eregi", required_argument, 0, 'R'}, - {"onredirect", required_argument, 0, 'f'}, - {"onerror", required_argument, 0, 'g'}, - {"min", required_argument, 0, 'm'}, - {0, 0, 0, 0} - }; -#endif - - - /* convert commonly used arguments to their equivalent standard options */ - for (c = 1; c < argc; c++) { - if ( strcmp( "-to", argv[c]) == 0 ) - strcpy( argv[c], "-t" ); - if ( strcmp( "-hn", argv[c]) == 0 ) - strcpy( argv[c], "-H" ); - if ( strcmp( "-wt", argv[c]) == 0 ) - strcpy( argv[c], "-w" ); - if ( strcmp( "-ct", argv[c]) == 0 ) - strcpy( argv[c], "-c" ); - } - -#define OPTCHARS "Vvht:c:w:H:F:I:p:u:P:SC:a:A:K:Z:e:E:s:r:R:f:g:lm:" - - - while (1) { - -#ifdef HAVE_GETOPT_H - c = getopt_long( argc, argv, OPTCHARS, long_options, &option_index ); -#else - c = getopt( argc, argv, OPTCHARS ); -#endif - - if ( ( c == -1 ) || ( c == EOF ) ) { - break; - } - - switch (c) { - case '?': /* usage */ - usage2( "unknown argument", optarg ); - break; - - /* Standard options */ - case 'h': /* help */ - print_help(); - exit( STATE_OK ); - break; - case 'V': /* version */ - print_revision( progname, REVISION ); - exit( STATE_OK ); - break; - case 'v': /* verbose */ - verbose = TRUE; - break; - case 't': /* timeout period */ - if ( !is_intnonneg( optarg ) ) - usage2( "timeout interval must be a non-negative integer", optarg ); - /* socket_timeout is defined in netutils.h and defaults to - * DEFAULT_SOCKET_TIMEOUT from common.h - */ - socket_timeout = atoi( optarg ); - break; - case 'c': /* critical time threshold */ - if ( !is_nonnegative( optarg ) ) - usage2( "invalid critical threshold", optarg ); - critical_interval = strtod( optarg, NULL ); - use_critical_interval = TRUE; - break; - case 'w': /* warning time threshold */ - if ( !is_nonnegative( optarg ) ) - usage2( "invalid warning threshold", optarg ); - warning_interval = strtod( optarg, NULL ); - use_warning_interval = TRUE; - break; - case 'H': /* Host Name (virtual host) */ - /* this rejects FQDNs, so we leave it for now... - *if ( !is_hostname( optarg ) ) - * usage2( "invalid hostname", optarg ); - */ - asprintf( &server_hostname, "%s", optarg ); - use_server_hostname = TRUE; - break; - case 'F': /* File (dummy) */ - break; - /* End of standard options */ - - - case 'I': /* Server IP-address or Hostname */ - /* this rejects FQDNs, so we leave it for now... - *if ( !is_host( optarg ) ) - * usage2( "invalid ip address or hostname", optarg ) - */ - asprintf( &server_host, "%s", optarg ); - break; - case 'p': /* Server port */ - if ( !is_intnonneg( optarg ) ) - usage2( "invalid port number", optarg ); - server_port = atoi( optarg ); - use_server_port = TRUE; - break; - case 'S': /* use SSL */ -#ifdef HAVE_SSL - use_ssl = TRUE; - if ( use_server_port == FALSE ) - server_port = HTTPS_PORT; -#else - usage( "check_http: invalid option - SSL is not available\n" ); -#endif - break; - case 'C': /* Server certificate warning time threshold */ -#ifdef HAVE_SSL - if ( !is_intnonneg( optarg ) ) - usage2( "invalid certificate expiration period", optarg ); - server_certificate_min_days_valid = atoi( optarg ); - check_server_certificate = TRUE; -#else - usage( "check_http: invalid option - SSL is not available\n" ); -#endif - break; - case 'a': /* basic authorization info */ - strncpy( basic_auth, optarg, MAX_INPUT_BUFFER - 1 ); - basic_auth[MAX_INPUT_BUFFER - 1] = 0; - use_basic_auth = TRUE; - break; - case 'A': /* client certificate */ -#ifdef HAVE_SSL - asprintf( &client_certificate_file, "%s", optarg ); - use_client_certificate = TRUE; -#else - usage( "check_http: invalid option - SSL is not available\n" ); -#endif - break; - case 'K': /* client certificate passphrase */ -#ifdef HAVE_SSL - asprintf( &client_certificate_passphrase, "%s", optarg ); - use_client_certificate_passphrase = TRUE; -#else - usage( "check_http: invalid option - SSL is not available\n" ); -#endif - case 'Z': /* valid CA certificates */ -#ifdef HAVE_SSL - asprintf( &ca_certificate_file, "%s", optarg ); - use_ca_certificate = TRUE; -#else - usage( "check_http: invalid option - SSL is not available\n" ); -#endif - break; - case 'u': /* URL PATH */ - asprintf( &http_url_path, "%s", optarg ); - break; - case 'P': /* POST DATA */ - asprintf( &http_post_data, "%s", optarg ); - use_http_post_data = TRUE; - asprintf( &http_method, "%s", "POST" ); - break; - case 'e': /* expected string in first line of HTTP response */ - strncpy( http_expect , optarg, MAX_INPUT_BUFFER - 1 ); - http_expect[MAX_INPUT_BUFFER - 1] = 0; - break; - case 'E': /* expected string in first line of HTTP response and process no other check*/ - strncpy( http_expect , optarg, MAX_INPUT_BUFFER - 1 ); - http_expect[MAX_INPUT_BUFFER - 1] = 0; - use_http_expect_only = TRUE; - break; - case 's': /* expected (sub-)string in content */ - strncpy( content_string , optarg, MAX_INPUT_BUFFER - 1 ); - content_string[MAX_INPUT_BUFFER - 1] = 0; - check_content_string = TRUE; - break; - case 'l': /* regex linespan */ -#ifdef HAVE_REGEX_H - regex_cflags &= ~REG_NEWLINE; -#else - usage( "check_http: call for regex which was not a compiled option\n" ); -#endif - break; - case 'R': /* expected case insensitive regular expression in content */ -#ifdef HAVE_REGEX_H - regex_cflags |= REG_ICASE; -#else - usage( "check_http: call for regex which was not a compiled option\n" ); -#endif - case 'r': /* expected regular expression in content */ -#ifdef HAVE_REGEX_H - strncpy( content_regex , optarg, MAX_REGEX_SIZE - 1 ); - content_regex[MAX_REGEX_SIZE - 1] = 0; - check_content_regex = TRUE; - regex_error = regcomp( ®ex_preg, content_regex, regex_cflags ); - if ( regex_error != 0 ) { - regerror( regex_error, ®ex_preg, regex_error_buffer, MAX_INPUT_BUFFER ); - printf( "Could Not Compile Regular Expression: %s", regex_error_buffer ); - return ERROR; - } -#else - usage( "check_http: call for regex which was not a compiled option\n" ); -#endif - break; - case 'f': /* onredirect (3xx errors) */ - if ( !strcmp( optarg, "follow" ) ) - http_redirect_state = STATE_DEPENDENT; - if ( !strcmp( optarg, "unknown" ) ) - http_redirect_state = STATE_UNKNOWN; - if ( !strcmp( optarg, "ok" ) ) - http_redirect_state = STATE_OK; - if ( !strcmp( optarg, "warning" ) ) - http_redirect_state = STATE_WARNING; - if ( !strcmp( optarg, "critical" ) ) - http_redirect_state = STATE_CRITICAL; - break; - case 'g': /* onerror (4xx errors) */ - if ( !strcmp( optarg, "unknown" ) ) - http_client_error_state = STATE_UNKNOWN; - if ( !strcmp( optarg, "ok" ) ) - http_client_error_state = STATE_OK; - if ( !strcmp( optarg, "warning" ) ) - http_client_error_state = STATE_WARNING; - if ( !strcmp( optarg, "critical" ) ) - http_client_error_state = STATE_CRITICAL; - break; - case 'm': /* min */ - if ( !is_intnonneg( optarg ) ) - usage2( "invalid page size", optarg ); - min_content_length = atoi( optarg ); - use_min_content_length = TRUE; - break; - } // end switch - } // end while(1) - - c = optind; - - - /* Sanity checks on supplied command line arguments */ - - /* 1. if both host and hostname are not defined, try to - * fetch one more argument which is possibly supplied - * without an option - */ - if ( ( strcmp( server_host, "" ) ) && (c < argc) ) { - asprintf( &server_host, "%s", argv[c++] ); - } - - /* 2. check if another artument is supplied - */ - if ( ( strcmp( server_hostname, "" ) == 0 ) && (c < argc) ) { - asprintf( &server_hostname, "%s", argv[c++] ); - } - - /* 3. if host is still not defined, just copy hostname, - * which is then guaranteed to be defined by now - */ - if ( strcmp( server_host, "") == 0 ) { - if ( strcmp( server_hostname, "" ) == 0 ) { - usage ("check_http: you must specify a server address or host name\n"); - } else { - asprintf( &server_host, "%s", server_hostname ); - } - } - - /* 4. check if content checks for a string and a regex - * are requested for only one of both is possible at - * a time - */ - if ( check_content_string && check_content_regex ) - usage( "check_http: you can only check for string OR regex at a time\n" ); - - /* 5. check for options which require use_ssl */ - if ( check_server_certificate && !use_ssl ) - usage( "check_http: you must use -S to check server certificate\n" ); - if ( use_client_certificate && !use_ssl ) - usage( "check_http: you must use -S to authenticate with a client certificate\n" ); - if ( use_ca_certificate && !use_ssl ) - usage( "check_http: you must use -S to check server certificate against CA certificates\n" ); - - /* 6. check for passphrase without client certificate */ - if ( use_client_certificate_passphrase && !use_client_certificate ) - usage( "check_http: you must supply a client certificate to use a passphrase\n" ); - - - /* Finally set some default values if necessary */ - if ( strcmp( http_method, "" ) == 0 ) - asprintf( &http_method, "%s", DEFAULT_HTTP_METHOD ); - if ( strcmp( http_url_path, "" ) == 0 ) { - asprintf( &http_url_path, "%s", DEFAULT_HTTP_URL_PATH ); - } - - return TRUE; -} - - -int -http_request( int sock, struct pageref *page ) -{ - char *buffer = ""; - char recvbuff[MAX_INPUT_BUFFER] = ""; - int buffer_len = 0; - int content_len = 0; - size_t sendsize = 0; - size_t recvsize = 0; - char *content = ""; - size_t size = 0; - char *basic_auth_encoded = NULL; - - asprintf( &buffer, HTTP_TEMPLATE_REQUEST, buffer, http_method, http_url_path ); - - asprintf( &buffer, HTTP_TEMPLATE_HEADER_USERAGENT, buffer, progname, REVISION, PACKAGE_VERSION ); - - if ( use_server_hostname ) { - asprintf( &buffer, HTTP_TEMPLATE_HEADER_HOST, buffer, server_hostname ); - } - - if ( use_basic_auth ) { - basic_auth_encoded = base64( basic_auth, strlen( basic_auth ) ); - asprintf( &buffer, HTTP_TEMPLATE_HEADER_AUTH, buffer, basic_auth_encoded ); - } - - /* either send http POST data */ - if ( use_http_post_data ) { - /* based on code written by Chris Henesy */ - asprintf( &buffer, "Content-Type: application/x-www-form-urlencoded\r\n" ); - asprintf( &buffer, "Content-Length: %i\r\n\r\n", buffer, content_len ); - asprintf( &buffer, "%s%s%s", buffer, http_post_data, "\r\n" ); - sendsize = send( sock, buffer, strlen( buffer ), 0 ); - if ( sendsize < strlen( buffer ) ) { - printf( "ERROR: Incomplete write\n" ); - return STATE_CRITICAL; - } - /* or just a newline */ - } else { - asprintf( &buffer, "%s%s", buffer, "\r\n" ); - sendsize = send( sock, buffer, strlen( buffer ) , 0 ); - if ( sendsize < strlen( buffer ) ) { - printf( "ERROR: Incomplete write\n" ); - return STATE_CRITICAL; - } - } - - - /* read server's response */ - - do { - recvsize = recv( sock, recvbuff, MAX_INPUT_BUFFER - 1, 0 ); - if ( recvsize > (size_t) 0 ) { - recvbuff[recvsize] = '\0'; - asprintf( &content, "%s%s", content, recvbuff ); - size += recvsize; - } - } while ( recvsize > (size_t) 0 ); - - asprintf( &page->content, "%s", content ); - page->size = size; - - /* return a CRITICAL status if we couldn't read any data */ - if ( size == (size_t) 0) - ssl_terminate( STATE_CRITICAL, "No data received" ); - - return STATE_OK; -} - - -int -parse_http_response( struct pageref *page ) -{ - char *content = ""; //local copy of struct member - char *status = ""; //local copy of struct member - char *header = ""; //local copy of struct member - size_t len = 0; //temporary used - char *pos = ""; //temporary used - - asprintf( &content, "%s", page->content ); - - /* find status line and null-terminate it */ - // copy content to status - status = content; - - // find end of status line and copy pointer to pos - content += (size_t) strcspn( content, "\r\n" ); - pos = content; - - // advance content pointer behind the newline of status line - content += (size_t) strspn( content, "\r\n" ); - - // null-terminate status line at pos - status[strcspn( status, "\r\n")] = 0; - strip( status ); - - // copy final status to struct member - page->status = status; - - - /* find header and null-terminate it */ - // copy remaining content to header - header = content; - - // loop until line containing only newline is found (end of header) - while ( strcspn( content, "\r\n" ) > 0 ) { - //find end of line and copy pointer to pos - content += (size_t) strcspn( content, "\r\n" ); - pos = content; - - if ( ( strspn( content, "\r" ) == 1 && strspn( content, "\r\n" ) >= 2 ) || - ( strspn( content, "\n" ) == 1 && strspn( content, "\r\n" ) >= 2 ) ) - content += (size_t) 2; - else - content += (size_t) 1; - } - // advance content pointer behind the newline - content += (size_t) strspn( content, "\r\n" ); - - // null-terminate header at pos - header[pos - header] = 0; - - // copy final header to struct member - page->header = header; - - - // copy remaining content to body - page->body = content; - - if ( verbose ) { - printf( "STATUS: %s\n", page->status ); - printf( "HEADER: \n%s\n", page->header ); - printf( "BODY: \n%s\n", page->body ); - } - - return STATE_OK; -} - - -int -check_http_response( struct pageref *page ) -{ - char *msg = ""; - - /* check response time befor anything else */ - if ( use_critical_interval && ( elapsed_time > critical_interval ) ) { - asprintf( &msg, RESULT_TEMPLATE_RESPONSE_TIME, - protocol_text( use_ssl ), - state_text( STATE_CRITICAL ), - elapsed_time, - elapsed_time ); - terminate( STATE_CRITICAL, msg ); - } - if ( use_warning_interval && ( elapsed_time > warning_interval ) ) { - asprintf( &msg, RESULT_TEMPLATE_RESPONSE_TIME, - protocol_text( use_ssl ), - state_text( STATE_WARNING ), - elapsed_time, - elapsed_time ); - terminate( STATE_WARNING, msg ); - } - - - /* make sure the status line matches the response we are looking for */ - if ( strstr( page->status, http_expect ) ) { - /* The result is only checked against the expected HTTP status line, - so exit immediately after this check */ - if ( use_http_expect_only ) { - if ( ( server_port == HTTP_PORT ) -#ifdef HAVE_SSL - || ( server_port == HTTPS_PORT ) ) -#else - ) -#endif - asprintf( &msg, "Expected HTTP response received from host\n" ); - else - asprintf( &msg, "Expected HTTP response received from host on port %d\n", server_port ); - terminate( STATE_OK, msg ); - } - } else { - if ( ( server_port == HTTP_PORT ) -#ifdef HAVE_SSL - || ( server_port == HTTPS_PORT ) ) -#else - ) -#endif - asprintf( &msg, "Invalid HTTP response received from host\n" ); - else - asprintf( &msg, "Invalid HTTP response received from host on port %d\n", server_port ); - terminate( STATE_CRITICAL, msg ); - } - - /* check the return code */ - /* server errors result in a critical state */ - if ( strstr( page->status, "500" ) || - strstr( page->status, "501" ) || - strstr( page->status, "502" ) || - strstr( page->status, "503" ) || - strstr( page->status, "504" ) || - strstr( page->status, "505" )) { - asprintf( &msg, RESULT_TEMPLATE_STATUS_RESPONSE_TIME, - protocol_text( use_ssl ), - state_text( http_client_error_state ), - page->status, - elapsed_time, - elapsed_time ); - terminate( STATE_CRITICAL, msg ); - } - - /* client errors result in a warning state */ - if ( strstr( page->status, "400" ) || - strstr( page->status, "401" ) || - strstr( page->status, "402" ) || - strstr( page->status, "403" ) || - strstr( page->status, "404" ) || - strstr( page->status, "405" ) || - strstr( page->status, "406" ) || - strstr( page->status, "407" ) || - strstr( page->status, "408" ) || - strstr( page->status, "409" ) || - strstr( page->status, "410" ) || - strstr( page->status, "411" ) || - strstr( page->status, "412" ) || - strstr( page->status, "413" ) || - strstr( page->status, "414" ) || - strstr( page->status, "415" ) || - strstr( page->status, "416" ) || - strstr( page->status, "417" ) ) { - asprintf( &msg, RESULT_TEMPLATE_STATUS_RESPONSE_TIME, - protocol_text( use_ssl ), - state_text( http_client_error_state ), - page->status, - elapsed_time, - elapsed_time ); - terminate( http_client_error_state, msg ); - } - - /* check redirected page if specified */ - if (strstr( page->status, "300" ) || - strstr( page->status, "301" ) || - strstr( page->status, "302" ) || - strstr( page->status, "303" ) || - strstr( page->status, "304" ) || - strstr( page->status, "305" ) || - strstr( page->status, "306" ) || - strstr( page->status, "307" ) ) { - if ( http_redirect_state == STATE_DEPENDENT ) { - /* returning STATE_DEPENDENT means follow redirect */ - return STATE_DEPENDENT; - } else { - asprintf( &msg, RESULT_TEMPLATE_STATUS_RESPONSE_TIME, - protocol_text( use_ssl ), - state_text( http_redirect_state ), - page->status, - elapsed_time, - elapsed_time ); - terminate( http_redirect_state, msg ); - } - } - - return STATE_OK; -} - -int -check_http_content( struct pageref *page ) -{ - char *msg = ""; - - /* check for string in content */ - if ( check_content_string ) { - if ( strstr( page->content, content_string ) ) { - asprintf( &msg, RESULT_TEMPLATE_STATUS_RESPONSE_TIME, - protocol_text( use_ssl ), - state_text( STATE_OK ), - page->status, - elapsed_time, - elapsed_time ); - terminate( STATE_OK, msg ); - } else { - asprintf( &msg, RESULT_TEMPLATE_STATUS_RESPONSE_TIME, - protocol_text( use_ssl ), - state_text( STATE_CRITICAL ), - page->status, - elapsed_time, - elapsed_time ); - terminate( STATE_CRITICAL, msg ); - } - } - -#ifdef HAVE_REGEX_H - /* check for regex in content */ - if ( check_content_regex ) { - regex_error = regexec( ®ex_preg, page->content, REGEX_REGS, regex_pmatch, 0); - if ( regex_error == 0 ) { - asprintf( &msg, RESULT_TEMPLATE_STATUS_RESPONSE_TIME, - protocol_text( use_ssl ), - state_text( STATE_OK ), - page->status, - elapsed_time, - elapsed_time ); - terminate( STATE_OK, msg ); - } else { - if ( regex_error == REG_NOMATCH ) { - asprintf( &msg, "%s, %s: regex pattern not found\n", - protocol_text( use_ssl) , - state_text( STATE_CRITICAL ) ); - terminate( STATE_CRITICAL, msg ); - } else { - regerror( regex_error, ®ex_preg, regex_error_buffer, MAX_INPUT_BUFFER); - asprintf( &msg, "%s %s: Regex execute Error: %s\n", - protocol_text( use_ssl) , - state_text( STATE_CRITICAL ), - regex_error_buffer ); - terminate( STATE_CRITICAL, msg ); - } - } - } -#endif - - return STATE_OK; -} - - -int -prepare_follow_redirect( struct pageref *page ) -{ - char *header = NULL; - char *msg = ""; - char protocol[6]; - char hostname[MAX_IPV4_HOSTLENGTH]; - char port[6]; - char *url_path = NULL; - char *orig_url_path = NULL; - char *orig_url_dirname = NULL; - size_t len = 0; - - asprintf( &header, "%s", page->header ); - - - /* restore some default values */ - use_http_post_data = FALSE; - asprintf( &http_method, "%s", DEFAULT_HTTP_METHOD ); - - /* copy url of original request, maybe we need it to compose - absolute url from relative Location: header */ - asprintf( &orig_url_path, "%s", http_url_path ); - - while ( strcspn( header, "\r\n" ) > (size_t) 0 ) { - url_path = realloc( url_path, (size_t) strcspn( header, "\r\n" ) ); - if ( url_path == NULL ) - terminate( STATE_UNKNOWN, "HTTP UNKNOWN: could not reallocate url_path" ); - - - /* Try to find a Location header combination of METHOD HOSTNAME PORT and PATH */ - /* 1. scan for Location: http[s]://hostname:port/path */ - if ( sscanf ( header, HTTP_HEADER_LOCATION_MATCH HTTP_HEADER_PROTOCOL_MATCH HTTP_HEADER_HOSTNAME_MATCH HTTP_HEADER_PORT_MATCH HTTP_HEADER_URL_PATH_MATCH, &protocol, &hostname, &port, url_path ) == 4 ) { - asprintf( &server_hostname, "%s", hostname ); - asprintf( &server_host, "%s", hostname ); - use_ssl = chk_protocol(protocol); - server_port = atoi( port ); - asprintf( &http_url_path, "%s", url_path ); - return STATE_DEPENDENT; - } - else if ( sscanf ( header, HTTP_HEADER_LOCATION_MATCH HTTP_HEADER_PROTOCOL_MATCH HTTP_HEADER_HOSTNAME_MATCH HTTP_HEADER_URL_PATH_MATCH, &protocol, &hostname, url_path ) == 3) { - asprintf( &server_hostname, "%s", hostname ); - asprintf( &server_host, "%s", hostname ); - use_ssl = chk_protocol(protocol); - server_port = protocol_std_port(use_ssl); - asprintf( &http_url_path, "%s", url_path ); - return STATE_DEPENDENT; - } - else if ( sscanf ( header, HTTP_HEADER_LOCATION_MATCH HTTP_HEADER_PROTOCOL_MATCH HTTP_HEADER_HOSTNAME_MATCH HTTP_HEADER_PORT_MATCH, &protocol, &hostname, &port ) == 3) { - asprintf( &server_hostname, "%s", hostname ); - asprintf( &server_host, "%s", hostname ); - use_ssl = chk_protocol(protocol); - server_port = atoi( port ); - asprintf( &http_url_path, "%s", DEFAULT_HTTP_URL_PATH ); - return STATE_DEPENDENT; - } - else if ( sscanf ( header, HTTP_HEADER_LOCATION_MATCH HTTP_HEADER_PROTOCOL_MATCH HTTP_HEADER_HOSTNAME_MATCH, protocol, hostname ) == 2 ) { - asprintf( &server_hostname, "%s", hostname ); - asprintf( &server_host, "%s", hostname ); - use_ssl = chk_protocol(protocol); - server_port = protocol_std_port(use_ssl); - asprintf( &http_url_path, "%s", DEFAULT_HTTP_URL_PATH ); - } - else if ( sscanf ( header, HTTP_HEADER_LOCATION_MATCH HTTP_HEADER_URL_PATH_MATCH, url_path ) == 1 ) { - /* check for relative url and prepend path if necessary */ - if ( ( url_path[0] != '/' ) && ( orig_url_dirname = strrchr( orig_url_path, '/' ) ) ) { - *orig_url_dirname = '\0'; - asprintf( &http_url_path, "%s%s", orig_url_path, url_path ); - } else { - asprintf( &http_url_path, "%s", url_path ); - } - return STATE_DEPENDENT; - } - header += (size_t) strcspn( header, "\r\n" ); - header += (size_t) strspn( header, "\r\n" ); - } /* end while (header) */ - - - /* default return value is STATE_DEPENDENT to continue looping in main() */ - asprintf( &msg, "% %: % - Could not find redirect Location", - protocol_text( use_ssl ), - state_text( STATE_UNKNOWN ), - page->status ); - terminate( STATE_UNKNOWN, msg ); -} - -#ifdef HAVE_SSL -int -https_request( SSL_CTX *ctx, SSL *ssl, struct pageref *page ) -{ - char *buffer = ""; - char recvbuff[MAX_INPUT_BUFFER] = ""; - int buffer_len = 0; - int content_len = 0; - size_t sendsize = 0; - size_t recvsize = 0; - char *content = ""; - size_t size = 0; - char *basic_auth_encoded = NULL; - - asprintf( &buffer, HTTP_TEMPLATE_REQUEST, buffer, http_method, http_url_path ); - - asprintf( &buffer, HTTP_TEMPLATE_HEADER_USERAGENT, buffer, progname, REVISION, PACKAGE_VERSION ); - - if ( use_server_hostname ) { - asprintf( &buffer, HTTP_TEMPLATE_HEADER_HOST, buffer, server_hostname ); - } - - if ( use_basic_auth ) { - basic_auth_encoded = base64( basic_auth, strlen( basic_auth ) ); - asprintf( &buffer, HTTP_TEMPLATE_HEADER_AUTH, buffer, basic_auth_encoded ); - } - - /* either send http POST data */ - if ( use_http_post_data ) { - asprintf( &buffer, "%sContent-Type: application/x-www-form-urlencoded\r\n", buffer ); - asprintf( &buffer, "%sContent-Length: %i\r\n\r\n", buffer, content_len ); - asprintf( &buffer, "%s%s%s", buffer, http_post_data, "\r\n" ); - sendsize = SSL_write( ssl, buffer, strlen( buffer ) ); - switch ( SSL_get_error( ssl, sendsize ) ) { - case SSL_ERROR_NONE: - if ( sendsize < strlen( buffer ) ) - ssl_terminate( STATE_CRITICAL, "SSL ERROR: Incomplete write.\n" ); - break; - default: - ssl_terminate( STATE_CRITICAL, "SSL ERROR: Write problem.\n" ); - break; - } - /* or just a newline */ - } else { - - asprintf( &buffer, "%s\r\n", buffer ); - sendsize = SSL_write( ssl, buffer, strlen( buffer ) ); - switch ( SSL_get_error( ssl, sendsize ) ) { - case SSL_ERROR_NONE: - if ( sendsize < strlen( buffer ) ) - ssl_terminate( STATE_CRITICAL, "SSL ERROR: Incomplete write.\n" ); - break; - default: - ssl_terminate( STATE_CRITICAL, "SSL ERROR: Write problem.\n" ); - break; - } - } - - - /* read server's response */ - - do { - recvsize = SSL_read( ssl, recvbuff, MAX_INPUT_BUFFER - 1 ); - - switch ( SSL_get_error( ssl, recvsize ) ) { - case SSL_ERROR_NONE: - if ( recvsize > (size_t) 0 ) { - recvbuff[recvsize] = '\0'; - asprintf( &content, "%s%s", content, recvbuff ); - size += recvsize; - } - break; - case SSL_ERROR_WANT_READ: - if ( use_client_certificate ) { - continue; - } else { - // workaround while we don't have anonymous client certificates: return OK - //ssl_terminate( STATE_WARNING, "HTTPS WARNING - Client Certificate required.\n" ); - ssl_terminate( STATE_OK, "HTTPS WARNING - Client Certificate required.\n" ); - } - break; - case SSL_ERROR_ZERO_RETURN: - break; - case SSL_ERROR_SYSCALL: - ssl_terminate( STATE_CRITICAL, "SSL ERROR: Premature close.\n" ); - break; - default: - ssl_terminate( STATE_CRITICAL, "SSL ERROR: Read problem.\n" ); - break; - } - } while ( recvsize > (size_t) 0 ); - - asprintf( &page->content, "%s", content ); - page->size = size; - - /* return a CRITICAL status if we couldn't read any data */ - if ( size == (size_t) 0) - ssl_terminate( STATE_CRITICAL, "No data received" ); - - return STATE_OK; -} -#endif - - -#ifdef HAVE_SSL -int -ssl_terminate(int state, char *string ) { - ERR_print_errors( bio_err ); - terminate( state, string ); -} -#endif - -#ifdef HAVE_SSL -static int -password_cb( char *buf, int num, int rwflag, void *userdata ) -{ - if ( num < strlen( client_certificate_passphrase ) + 1 ) - return( 0 ); - - strcpy( buf, client_certificate_passphrase ); - return( strlen( client_certificate_passphrase ) ); -} -#endif - -#ifdef HAVE_SSL -static void -sigpipe_handle( int x ) { -} -#endif - -#ifdef HAVE_SSL -SSL_CTX * -initialize_ssl_ctx( void ) -{ - SSL_METHOD *meth; - SSL_CTX *ctx; - - if ( !bio_err ) { - /* Global system initialization */ - SSL_library_init(); - SSL_load_error_strings(); - - /* An error write context */ - bio_err=BIO_new_fp( stderr, BIO_NOCLOSE ); - } - - /* set up as SIGPIPE handler */ - signal( SIGPIPE, sigpipe_handle ); - - /* create our context */ - meth=SSLv3_method(); - ctx=SSL_CTX_new( meth ); - - /* load client certificate and key */ - if ( use_client_certificate ) { - if ( !(SSL_CTX_use_certificate_chain_file( ctx, client_certificate_file )) ) - ssl_terminate( STATE_CRITICAL, "check_http: can't read client certificate file" ); - - /* set client certificate key passphrase */ - if ( use_client_certificate_passphrase ) { - SSL_CTX_set_default_passwd_cb( ctx, password_cb ); - } - - if ( !(SSL_CTX_use_PrivateKey_file( ctx, client_certificate_file, SSL_FILETYPE_PEM )) ) - ssl_terminate( STATE_CRITICAL, "check_http: can't read client certificate key file" ); - } - - /* load the CAs we trust */ - if ( use_ca_certificate ) { - if ( !(SSL_CTX_load_verify_locations( ctx, ca_certificate_file, 0 )) ) - ssl_terminate( STATE_CRITICAL, "check_http: can't read CA certificate file" ); - -#if (OPENSSL_VERSION_NUMBER < 0x00905100L) - SSL_CTX_set_verify_depth( ctx, 1 ); -#endif - } - - return ctx; -} -#endif - -#ifdef HAVE_SSL -void destroy_ssl_ctx( SSL_CTX *ctx ) -{ - SSL_CTX_free( ctx ); -} -#endif - -#ifdef HAVE_SSL -int -fetch_server_certificate( SSL *ssl ) -{ - server_certificate = SSL_get_peer_certificate( ssl ); - if ( server_certificate == NULL ) - ssl_terminate( STATE_CRITICAL, "SSL ERROR: Cannot retrieve server certificate.\n" ); - - return STATE_OK; -} -#endif - - -#ifdef HAVE_SSL -int -check_server_certificate_chain( SSL *ssl ) -{ - if ( SSL_get_verify_result( ssl ) != X509_V_OK ) - ssl_terminate( STATE_CRITICAL, "SSL ERROR: Cannot verify server certificate chain.\n" ); - - return STATE_OK; -} -#endif - - -#ifdef HAVE_SSL -int -check_server_certificate_hostname( ) -{ - char server_CN[256]; - char *msg = NULL; - X509_NAME_get_text_by_NID( X509_get_subject_name( server_certificate ), NID_commonName, server_CN, 256 ); - if ( strcasecmp( server_CN, server_hostname ) ) { - asprintf( &msg, "SSL ERROR: Server Certificate does not match Hostname %s.\n", server_hostname ); - ssl_terminate( STATE_WARNING, msg ); - } - - return STATE_OK; -} -#endif - -#ifdef HAVE_SSL -int -check_server_certificate_expires( ) -{ - ASN1_STRING *tm; - int offset; - struct tm stamp; - int days_left; - char timestamp[17] = ""; - char *msg = NULL; - - /* Retrieve timestamp of certificate */ - tm = X509_get_notAfter( server_certificate ); - - /* Generate tm structure to process timestamp */ - if ( tm->type == V_ASN1_UTCTIME ) { - if ( tm->length < 10 ) { - ssl_terminate( STATE_CRITICAL, "ERROR: Wrong time format in certificate.\n" ); - } else { - stamp.tm_year = ( tm->data[0] - '0' ) * 10 + ( tm->data[1] - '0' ); - if ( stamp.tm_year < 50 ) - stamp.tm_year += 100; - offset = 0; - } - } else { - if ( tm->length < 12 ) { - ssl_terminate( STATE_CRITICAL, "ERROR: Wrong time format in certificate.\n" ); - } else { - stamp.tm_year = - ( tm->data[0] - '0' ) * 1000 + ( tm->data[1] - '0' ) * 100 + - ( tm->data[2] - '0' ) * 10 + ( tm->data[3] - '0' ); - stamp.tm_year -= 1900; - offset = 2; - } - } - stamp.tm_mon = - ( tm->data[2 + offset] - '0' ) * 10 + ( tm->data[3 + offset] - '0' ) - 1; - stamp.tm_mday = - ( tm->data[4 + offset] - '0' ) * 10 + ( tm->data[5 + offset] - '0' ); - stamp.tm_hour = - ( tm->data[6 + offset] - '0' ) * 10 + ( tm->data[7 + offset] - '0' ); - stamp.tm_min = - ( tm->data[8 + offset] - '0' ) * 10 + ( tm->data[9 + offset] - '0' ); - stamp.tm_sec = 0; - stamp.tm_isdst = -1; - - days_left = ( mktime( &stamp ) - time( NULL ) ) / 86400; - snprintf - ( timestamp, 17, "%02d.%02d.%04d %02d:%02d", - stamp.tm_mday, stamp.tm_mon +1, stamp.tm_year + 1900, - stamp.tm_hour, stamp.tm_min ); - - if ( ( days_left > 0 ) && ( days_left <= server_certificate_min_days_valid ) ) { - asprintf( &msg, "Certificate expires in %d day(s) (%s).\n", days_left, timestamp ); - ssl_terminate( STATE_WARNING, msg ); - } - if ( days_left < 0 ) { - asprintf( &msg, "Certificate expired on %s.\n", timestamp ); - ssl_terminate( STATE_CRITICAL, msg ); - } - - if (days_left == 0) { - asprintf( &msg, "Certificate expires today (%s).\n", timestamp ); - ssl_terminate( STATE_WARNING, msg ); - } - - asprintf( &msg, "Certificate will expire on %s.\n", timestamp ); - ssl_terminate( STATE_OK, msg ); -} -#endif - -/* written by lauri alanko */ -static char * -base64 (char *bin, int len) -{ - - char *buf = (char *) malloc ((len + 2) / 3 * 4 + 1); - int i = 0, j = 0; - - char BASE64_END = '='; - char base64_table[64] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - - while (j < len - 2) { - buf[i++] = base64_table[bin[j] >> 2]; - buf[i++] = base64_table[((bin[j] & 3) << 4) | (bin[j + 1] >> 4)]; - buf[i++] = base64_table[((bin[j + 1] & 15) << 2) | (bin[j + 2] >> 6)]; - buf[i++] = base64_table[bin[j + 2] & 63]; - j += 3; - } - - switch (len - j) { - case 1: - buf[i++] = base64_table[bin[j] >> 2]; - buf[i++] = base64_table[(bin[j] & 3) << 4]; - buf[i++] = BASE64_END; - buf[i++] = BASE64_END; - break; - case 2: - buf[i++] = base64_table[bin[j] >> 2]; - buf[i++] = base64_table[((bin[j] & 3) << 4) | (bin[j + 1] >> 4)]; - buf[i++] = base64_table[(bin[j + 1] & 15) << 2]; - buf[i++] = BASE64_END; - break; - case 0: - break; - } - - buf[i] = '\0'; - return buf; -} - diff --git a/contrib/check_hw.sh b/contrib/check_hw.sh deleted file mode 100644 index 9d3b574..0000000 --- a/contrib/check_hw.sh +++ /dev/null @@ -1,66 +0,0 @@ -#! /bin/sh -# -# Tested on SuSE 9.1 Professional with the hwinfo-8.62-0.2 package installed. -# -# Before you can run this plugin, you must do: -# /usr/sbin/hwinfo --short > /etc/hw.original -# add to cron job: -# /usr/sbin/hwinfo --short > /etc/hw.current -# /usr/bin/diff /etc/hw.original /etc/hw.current > /tmp/hw.check -# -# -# Rok Debevc -- rok.debevc@agenda.si -# -# -PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin - -PROGNAME=`basename $0` -PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'` -REVISION=`echo '$Revision: 939 $' | sed -e 's/[^0-9.]//g'` - -. $PROGPATH/utils.sh - - -print_usage() { - echo "Usage: $PROGNAME" -} - -print_help() { - print_revision $PROGNAME $REVISION - echo "" - print_usage - echo "" - echo "This plugin checks hardware changes." - echo "" - support - exit 0 -} - -case "$1" in - --help) - print_help - exit 0 - ;; - -h) - print_help - exit 0 - ;; - --version) - print_revision $PROGNAME $REVISION - exit 0 - ;; - -V) - print_revision $PROGNAME $REVISION - exit 0 - ;; - *) - if `du /tmp/hw.check | cut -c 1|grep "^[0]" > /dev/null` ; then - echo No hardware is changed - exit 0 - else - echo ***hardware is changed*** look into /tmp/hw.check - exit 2 - fi - ;; -esac - diff --git a/contrib/check_ica_master_browser.pl b/contrib/check_ica_master_browser.pl deleted file mode 100755 index 922e718..0000000 --- a/contrib/check_ica_master_browser.pl +++ /dev/null @@ -1,228 +0,0 @@ -#!/usr/bin/perl -w - -# $Id: check_ica_master_browser.pl 1099 2005-01-25 09:09:33Z stanleyhopcroft $ - -# Revision 1.1 2005/01/25 09:09:33 stanleyhopcroft -# New plugin - checks that ICA master browser is what it should be (important for firewalled dialup) -# - -use strict ; - -use IO::Socket; -use IO::Select; -use Getopt::Long ; - -use lib qw(/usr/local/nagios/libexec) ; -use utils qw(%ERRORS &print_revision &support &usage); -use packet_utils qw(&pdump &tethereal) ; - -my $PROGNAME = 'check_ica_master_browser' ; - -# You might have to change this... - -my $PACKET_TIMEOUT = 1; - # Number of seconds to wait for further UDP packets -my $TEST_COUNT = 2; - # Number of datagrams sent without reply -my $BUFFER_SIZE = 1500; - # buffer size used for 'recv' calls. -my $ICA_PORT = 1604; - # what port ICA runs on. Unlikely to change. - -# End user config. - -my ($debug, $preferred_master, $bcast_addr, $ica_browser, $timeout) ; - -Getopt::Long::Configure('bundling', 'no_ignore_case'); -GetOptions - ("V|version" => \&version, - "h|help" => \&help, - "v|verbose" => \$debug, - "B|broadcast_addr:s" => \$bcast_addr, - "I|ica_browser:s" => \$ica_browser, - "P|preferred_master:s" => \$preferred_master, - "T|Packet_timeout:i" => \$timeout, -) ; - - -my $broadcast_addr = $1 if $bcast_addr and $bcast_addr =~ m#(\d+\.\d+\.\d+\.\d+)# ; -usage("Invalid broadcast address: $bcast_addr") - if $bcast_addr and not defined($broadcast_addr) ; - -usage("You must provide either the name of an ICA browser or the broadcast address of the subnet containing them\n") - unless ($ica_browser or $broadcast_addr) ; - -usage("You must provide the name or address of a preferred ICA master browser\n") - unless ($preferred_master) ; - -my $preferred_master_n = $preferred_master =~ m#(\d+\.\d+\.\d+\.\d+)# - ? $preferred_master - : inet_ntoa(scalar gethostbyname($preferred_master)) ; - -my $Timeout = $timeout || $PACKET_TIMEOUT ; - - # Definitions of query strings. Change at your own risk :) - # this info was gathered with tcpdump whilst trying to use an ICA client, - # so I'm not 100% sure of what each value is. - -my $bcast_helo = &tethereal(<<'End_of_Tethereal_trace', '1e') ; -0020 ff ff 04 d6 06 44 00 26 4a 76 1e 00 01 30 02 fd .....D.&Jv...0.. -0030 a8 e3 00 02 f5 95 9f f5 30 07 00 00 00 00 00 00 ........0....... -0040 00 00 00 00 00 00 01 00 ........ -End_of_Tethereal_trace - -my $direct_helo = &tethereal(<<'End_of_Tethereal_trace', '20') ; -0020 64 17 05 0f 06 44 00 28 ab b5 20 00 01 30 02 fd d....D.(.. ..0.. -0030 a8 e3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ -0040 00 00 00 00 00 00 00 00 00 00 ........ -End_of_Tethereal_trace - -my $Udp = IO::Socket::INET->new( Proto => 'udp' ) - || die "Socket failure: $!"; - - # select is here to allow us to set timeouts on the connections. Otherwise they - # just 'stop' until a server appears. - -my $select = IO::Select->new($Udp) - || die "Select failure: $!"; - -$Udp->sockopt(SO_BROADCAST, 1 ); - -my ($remote_host, $buff, $destination, $raddr, $rport, $rhost, @remote_response); -my ($query_message, $send_addr, $this_test) ; - -$buff = ''; -$this_test = 0; - - # If there is no response to the first helo packet it will be resent - # up to $TEST_COUNT (see at the top). - -$query_message = $broadcast_addr ? $bcast_helo : $direct_helo ; -$destination = $broadcast_addr ? $broadcast_addr: $ica_browser ; -$send_addr = sockaddr_in($ICA_PORT, inet_aton($destination) ) ; - -while ( ++$this_test <= $TEST_COUNT && !$buff ) { - - print "Sending helo datagram. datagram number: ", $this_test, "\n" - if $debug ; - - print "Querying $destination for master browser\n" - if $debug ; - &pdump($query_message) - if $debug ; - $Udp->send($query_message, 0, $send_addr ); - if ( $select->can_read($Timeout) ) { - $remote_host = $Udp->recv($buff, $BUFFER_SIZE, 0 ); - } - - last - if $buff ; - sleep 1 ; - -} - - # Ok we've looped several times, looking for a response. If we don't have one - # yet, we simply mark the whole lot as being unavailable. - -unless ( $buff ) { - print "Failed. No response to helo datagram (master browser query) from $destination.\n" ; - exit $ERRORS{CRITICAL} ; -} - -($rport, $raddr) = sockaddr_in( $remote_host ); -$rhost = gethostbyaddr( $raddr, AF_INET ); -my @tmpbuf = unpack('C*', $buff ); -if ( $debug ) { - print "$rhost:$rport responded with: ",length($buff), " bytes\n"; - &pdump($buff) ; -} - - # Now we have a response, then we need to figure out the master browser, and - # query it for published applications... - -my $master_browser = join '.', @tmpbuf[32..35] ; -my ($master_browser_a) = gethostbyaddr(inet_aton($master_browser), AF_INET) =~ /^(\w+?)\./ ; - - # Ok should probably error check this, because it's remotely possible - # that a server response might be completely wrong... - -print "Master browser = $master_browser_a/$master_browser\n" - if $debug ; - -$send_addr = sockaddr_in($ICA_PORT, inet_aton($master_browser)); - -my $subject_clause = $bcast_addr ? "of the \"$destination\" subnet" : "known to ICA server \"$destination\"" ; - -if ( $master_browser eq $preferred_master_n ) { - print "Preferred master browser \"$preferred_master\" __is__ the master browser (\"$master_browser_a/$master_browser\") $subject_clause.\n" ; - exit $ERRORS{OK} ; -} else { - print "\"\u$preferred_master\" is __not__ the master browser (\"$master_browser_a/$master_browser\") $subject_clause: remote clients (dialup) may not find Published applications from Master Browser.\n" ; - exit $ERRORS{CRITICAL} ; -} - -close $Udp; - - -sub print_usage () { - print "Usage: $PROGNAME (-B | -I ) - P " ; -} - -sub print_help () { - print_revision($PROGNAME,'$Revision: 1099 $ '); - print "Copyright (c) 2002 Ed Rolison/Tom De Blende/S Hopcroft - -Perl Check Citrix Master Browser plugin for Nagios. - -Returns OK if the Citrix master browser is that given by the -P option. - -The plugin works by - If the -B option is specified, sends a broadcast helo to find the address of the Citrix master browser in the specified subnet. - return critical if there is no reply; - Else if the -I option is specified - send a direct helo to the specified server until there is a response (containing the address of the Citrix master browser) - - - return Critical if the response does not contain the address of the 'preferred master browser' (-P option). - return OK - - How ICA Clients Use the Master ICA Browser. - -Citrix ICA Clients must locate the master browser to get the address of a server or published application. - -The Citrix ICA Client can locate the master browser by sending out broadcast packets, or, -if the address of a Citrix server is specified in the Citrix ICA Client or in an ICA file, -the ICA Client locates the master browser by sending directed packets to the specified address. -The ICA Client requests the address of the ICA master browser from the Citrix server. - -"; - print_usage(); - print ' --B, --broadcast_address:STRING - The broadcast address that should contain Citrix master browser. This option takes precedence over -I. --I, --ica_browser:STRING - Optional name or address of an ICA server that could be the master browser (used when broadcast not possible). --P, --preferred_master:STRING - Name or address of the ICA server that _should_ be the master browser. - Required. --T, --packet-timeout:INTEGER - Time to wait for UDP packets (default 1 sec). --v, --verbose - Debugging output. --h, --help - This stuff. - -'; - support(); -} - -sub version () { - print_revision($PROGNAME,'$Revision: 1099 $ '); - exit $ERRORS{'OK'}; -} - -sub help () { - print_help(); - exit $ERRORS{'OK'}; -} - diff --git a/contrib/check_ica_metaframe_pub_apps.pl b/contrib/check_ica_metaframe_pub_apps.pl deleted file mode 100755 index 0edbdca..0000000 --- a/contrib/check_ica_metaframe_pub_apps.pl +++ /dev/null @@ -1,381 +0,0 @@ -#!/usr/bin/perl -w - -# $Id: check_ica_metaframe_pub_apps.pl 1098 2005-01-25 09:07:39Z stanleyhopcroft $ - -# Revision 1.1 2005/01/25 09:07:39 stanleyhopcroft -# Replacement (structured name mainly) for check_citrix: check of ICA browse service -# -# Revision 1.1 2005-01-25 17:00:24+11 anwsmh -# Initial revision -# - -use strict ; - -use IO::Socket; -use IO::Select; -use Getopt::Long ; - -my ($bcast_addr, $timeout, $debug, @citrix_servers, $crit_pub_apps, $warn_pub_apps, $long_list) ; - -use lib qw(/usr/local/nagios/libexec) ; -use utils qw(%ERRORS &print_revision &support &usage) ; -use packet_utils qw(&pdump &tethereal) ; - -my $PROGNAME = 'check_ica_metaframe_pub_apps' ; - -sub print_help (); -sub print_usage (); -sub help (); -sub version (); - - # You might have to change this... - -my $PACKET_TIMEOUT = 1; - # Number of seconds to wait for further UDP packets -my $TEST_COUNT = 2; -# Number of datagrams sent without reply -my $BUFFER_SIZE = 1500; - # buffer size used for 'recv' calls. -my $LONG_LIST = 0 ; - # this is for if you have many published applications. - # if you set it, it won't do any harm, but may slow the test - # down a little. (Since it does a 'recv' twice instead of - # once and therefore may have to wait for a timeout). -my $ICA_PORT = 1604; - # what port ICA runs on. Unlikely to change. - -Getopt::Long::Configure('bundling', 'no_ignore_case'); -GetOptions - ("V|version" => \&version, - "h|help" => \&help, - "v|verbose" => \$debug, - "B|broadcast_addr:s" => \$bcast_addr, - "C|citrix_servers:s" => \@citrix_servers, - "L|long_list" => \$long_list, - "P|crit_pub_apps:s" => \$crit_pub_apps, - "T|Packet_timeout:i" => \$timeout, - "W|warn_pub_apps:s" => \$warn_pub_apps, -) ; - - -my $broadcast_addr = $1 if $bcast_addr and $bcast_addr =~ m#(\d+\.\d+\.\d+\.\d+)# ; -usage("Invalid broadcast address: $bcast_addr\n") - if $bcast_addr and not defined($broadcast_addr) ; - -usage("You must provide either the names of citrix servers or the broadcast address of the subnet containing them\n") - unless (@citrix_servers or $broadcast_addr) ; - -my @target = defined $broadcast_addr ? ($broadcast_addr) : @citrix_servers ; - -usage("You must provide the names of the published applications that the Citrix browser should be advertising\n") - unless $crit_pub_apps or $warn_pub_apps ; - -my $Timeout = $timeout - if defined $timeout ; -$Timeout = $PACKET_TIMEOUT - unless defined $Timeout ; -$long_list = $LONG_LIST - unless defined $long_list ; - -my @crit_pub_apps = $crit_pub_apps ? split(/,/, $crit_pub_apps) : () ; -my @warn_pub_apps = $warn_pub_apps ? split(/,/, $warn_pub_apps) : () ; - - # Definitions of query strings. Change at your own risk :) - # this info was gathered with tcpdump whilst trying to use an ICA client, - # so I'm not 100% sure of what each value is. - -my $bcast_helo = &tethereal(<<'End_of_Tethereal_trace', '1e') ; -0020 ff ff 04 d6 06 44 00 26 4a 76 1e 00 01 30 02 fd .....D.&Jv...0.. -0030 a8 e3 00 02 f5 95 9f f5 30 07 00 00 00 00 00 00 ........0....... -0040 00 00 00 00 00 00 01 00 ....... -End_of_Tethereal_trace - -my $bcast_query_app = &tethereal(<<'End_of_Tethereal_trace', '24') ; -0020 64 17 04 50 06 44 00 2c 85 6a 24 00 01 32 02 fd d..P.D.,.j$..2.. -0030 a8 e3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ -0040 00 00 00 00 00 00 21 00 02 00 00 00 00 00 ......!...... -End_of_Tethereal_trace - -my $direct_helo = &tethereal(<<'End_of_Tethereal_trace', '20') ; -0020 64 17 05 0f 06 44 00 28 ab b5 20 00 01 30 02 fd d....D.(.. ..0.. -0030 a8 e3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ -0040 00 00 00 00 00 00 00 00 00 00 ......... -End_of_Tethereal_trace - -my $direct_query_app = &tethereal(<<'End_of_Tethereal_trace', '2c') ; -0020 64 17 05 10 06 44 00 34 7a 9a 2c 00 02 32 02 fd d....D.4z.,..2.. -0030 a8 e3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ -0040 00 00 00 00 00 00 21 00 02 00 01 00 00 00 00 00 ......!......... -0050 00 00 00 00 00 00 ...... -End_of_Tethereal_trace - -my $Udp = IO::Socket::INET->new( Proto => 'udp' ) - || die "Socket failure: $!"; - - # Select is here to allow us to set timeouts on the connections. - # Otherwise they just 'stop' until a server appears. - -my $select = IO::Select->new($Udp) - || die "Select failure: $!"; - # Helo needs to be broadcastt, but query does not. -$Udp->sockopt(SO_BROADCAST, 1 ); - -my ($remote_host, $buff, $buff2, $raddr, $rport, $rhost, @remote_response); -my ($query_message, $send_addr, $this_test) ; - -$buff = $buff2 = ''; -$this_test = 0; - - # If there is no response to the first helo packet it will be resent - # up to TEST_COUNT (see at the top). - -while ( ++$this_test <= $TEST_COUNT && !$buff ) { - - print "Sending helo datagram. datagram number: ", $this_test, "\n" - if $debug ; - - # If we have multiple targets, we probe each of them until we get a - # response... - - foreach my $destination (@target) { - $query_message = $broadcast_addr ? $bcast_helo : $direct_helo ; - print "Querying $destination for master browser\n" - if $debug ; - $send_addr = sockaddr_in($ICA_PORT, inet_aton($destination) ); - &pdump($query_message) - if $debug ; - $Udp->send($query_message, 0, $send_addr ); - if ( $select->can_read($Timeout) ) { - $remote_host = $Udp->recv($buff, $BUFFER_SIZE, 0 ); - } - - last - if $buff ; - sleep 1 ; - - } -} - - # Ok we've looped several times, looking for a response. If we don't have one - # yet, we simply mark the whole lot as being unavailable. - -unless ( $buff ) { - print "Failed. No response to helo datagram (master browser query) from ", $broadcast_addr ? $broadcast_addr : "@citrix_servers", ".\n" ; - exit $ERRORS{CRITICAL} ; -} - -($rport, $raddr) = sockaddr_in( $remote_host ); -$rhost = gethostbyaddr( $raddr, AF_INET ); -my @tmpbuf = unpack('C*', $buff ); -if ( $debug ) { - print "$rhost:$rport responded with: ", length($buff), " bytes\n"; - &pdump($buff) ; -} - - # Now we have a response, then we need to figure out the master browser, and - # query it for published applications... - -my $master_browser = join '.', @tmpbuf[32..35] ; - - # Ok should probably error check this, because it's remotely possible - # that a server response might be completely wrong... - -print "Master browser = $master_browser\n" - if $debug ; - -$send_addr = sockaddr_in($ICA_PORT, inet_aton($master_browser)); - -if ( $broadcast_addr ) { - print "using broadcast query\n" - if $debug ; - $query_message = $bcast_query_app; -} else { - print "using directed query\n" - if $debug ; - $query_message = $direct_query_app; -} - - # Now we send the appropriate query string, to the master browser we've found. - -$buff = ''; -$this_test = 0 ; - -print "Querying master browser for published application list\n" - if $debug ; - -while ( ++$this_test <= $TEST_COUNT && !$buff ) { - print "Sending application query datagram. datagram number: ", $this_test, "\n" - if $debug ; - &pdump($query_message) - if $debug ; - $Udp->send($query_message, 0, $send_addr); - - if ( $select->can_read($Timeout) ) { - $remote_host = $Udp->recv($buff, $BUFFER_SIZE, 0 ); - # $buff = substr($buff, 32) ; - # Hope that ICA preamble is first 32 bytes - } - - # Long application lists are delivered in multiple packets - - my $buff2 = '' ; - while ( $long_list && $select->can_read($Timeout) ) { - $remote_host = $Udp->recv($buff2, $BUFFER_SIZE, 0); - $buff .= $buff2 - if $buff2 ; - # $buff .= substr($buff2, 32) if $buff2 ; - # Hope that ICA preamble is first 32 bytes - } - - last if $buff ; - sleep 1 ; - -} - -unless ( $buff ) { - print "Failed. No response to application query datagram from ", $master_browser, ".\n" ; - exit $ERRORS{CRITICAL} ; -} - - # we got a response from a couple of retries of the app query - -($rport, $raddr) = sockaddr_in ( $remote_host ); -$rhost = gethostbyaddr ( $raddr, AF_INET ); -if ( $debug ) { - print "$rhost:$rport responded to app query with: ", length($buff), " bytes\n"; - &pdump($buff) ; -} - -my $app_list = $buff ; - # delete nulls in unicode - # but only if there is unicode (usually from - # broadcast query) - -$app_list =~ s/(?:(\w| |-)\x00)/$1/g - if $app_list =~ /(?:(?:(?:\w| |-)\x00){3,})/ ; - # FIXME an application name is - # 3 or more unicoded characters - - # FIXME locale - # extract null terminated strings - -my (@clean_app_list, $clean_app_list) ; -$clean_app_list = join(',', @clean_app_list = $app_list =~ m#([A-Za-z](?:\w| |-|[ÄÖÜäöüß])+?(?=\x00))#g ) ; - - # patch for German umlauts et al from Herr Mike Gerber. - - # $clean_app_list = join(',', @clean_app_list = $app_list =~ m#([A-Z](?:\w| |-)+?(?=\x00))#g ) ; - - # FIXME everyones apps don't start with caps - -print qq(Received list of applications: "$clean_app_list".\n) - if $debug ; - -if ( scalar @crit_pub_apps and my @missing = &simple_diff(\@clean_app_list, \@crit_pub_apps) ) { - print qq(Failed. "@missing" not found in list of published applications), - qq(" $clean_app_list" from master browser "$master_browser".\n) ; - exit $ERRORS{CRITICAL} ; -} - -if ( my @missing = &simple_diff(\@clean_app_list, \@warn_pub_apps) ) { - print qq(Warning. "@missing" not found in list of published applications), - qq(" $clean_app_list" from master browser "$master_browser".\n) ; - exit $ERRORS{WARNING} ; -} - -my @x = (@crit_pub_apps, @warn_pub_apps) ; -my $blah = ( scalar(@x) == 1 - ? 'the published application "' . join(',', @x) . '" is available' - : 'the published applications "' . join(',', @x) . '" are available' ) ; - -print qq(Ok. Citrix master browser "$master_browser" reported that $blah.\n) ; -exit $ERRORS{OK} ; - - # sleep $Timeout; - # because otherwise we can get responses from - # the WRONG servers. DOH -close $Udp; - - -sub print_usage () { - print "Usage: $PROGNAME (-B | -C ..) -W -P \n"; -} - -sub print_help () { - print_revision($PROGNAME,'$Revision: 1098 $ '); - print "Copyright (c) 2002 Ed Rolison/Tom De Blende/S Hopcroft - -Perl Check Citrix plugin for Nagios. - -Returns OK if the Citrix master browser returns a 'published application' list that contain names specified by the -W or -P options - -The plugin works by - If the -B option is specified, sending a broadcast helo to find the address of the Citrix master browser in the specified subnet. - return critical if there is no reply; - Else if the -C option is specified - send a direct helo to the specified server until there is a response (containing the address of the Citrix master browser) - - Query the master browser (using a 'broadcast published applications query ' if -B) and compare the published applications returned - to those specified by -W and -P options - - return Critical if the published applications specified by -P is not a subset of the query responses; - return Warning if the published applications specified by -W is not a subset of the query responses; - return OK - -"; - print_usage(); - print ' --B, --broadcast_address=STRING - The broadcast address that should contain Citrix master browser. This option takes precedence over -C. --C, --citrix_server:STRING - Optional __name(s)__ of Citrix servers that could be the master browser (used when broadcast not possible). --L, --long_list - Set this if you have heaps of published applications (ie more than will fit in _one_ UDP packet) --P, --crit_published_app=STRING - Optional comma separated list of published application that must be in the response from the master browser. - Check returns critical otherwise. --T, --packet-timeout:INTEGER - Time to wait for UDP packets (default 1 sec). --W, --warn_published_app=STRING - Optional comma separated list of published application that should be in the response from the master browser. - Check returns warning otherwise. --v, --verbose - Debugging output. --h, --help - This stuff. - -'; - support(); -} - -sub version () { - print_revision($PROGNAME,'$Revision: 1098 $ '); - exit $ERRORS{'OK'}; -} - -sub help () { - print_help(); - exit $ERRORS{'OK'}; -} - - -sub simple_diff { - -my ( $a_list, $b_list) = @_ ; - - # simple set difference 'Recipe 4.7 Perl Cookbook', Christiansen and Torkington - - my (%seen, @missing) ; - - @seen{@$a_list} = () ; - - foreach my $item (@$b_list) { - push @missing, $item - unless exists $seen{$item} ; - } - - @missing ; -} - - - diff --git a/contrib/check_ica_program_neigbourhood.pl b/contrib/check_ica_program_neigbourhood.pl deleted file mode 100755 index 1f0fb45..0000000 --- a/contrib/check_ica_program_neigbourhood.pl +++ /dev/null @@ -1,618 +0,0 @@ -#!/usr/bin/perl -w - -# $Id: check_ica_program_neigbourhood.pl 1097 2005-01-25 09:05:53Z stanleyhopcroft $ - -# Revision 1.1 2005/01/25 09:05:53 stanleyhopcroft -# New plugin to check Citrix Metaframe XP "Program Neighbourhood" -# -# Revision 1.1 2005-01-25 16:50:30+11 anwsmh -# Initial revision -# - -use strict ; - -use Getopt::Long; - -use utils qw($TIMEOUT %ERRORS &print_revision &support); -use LWP 5.65 ; -use XML::Parser ; - -my $PROGNAME = 'check_program_neigbourhood' ; -my ($debug, $xml_debug, $pn_server, $pub_apps, $app_servers, $server_farm, $usage) ; - -Getopt::Long::Configure('bundling', 'no_ignore_case') ; -GetOptions - ("V|version" => \&version, - "A|published_app:s" => \$pub_apps, - "h|help" => \&help, - 'usage|?' => \&usage, - "F|server_farm=s" => \$server_farm, - "P|pn_server=s" => \$pn_server, - "S|app_server=s" => \$app_servers, - "v|verbose" => \$debug, - "x|xml_debug" => \$xml_debug, -) ; - -$pn_server || do { - print "Name or IP Address of _one_ Program Neighbourhood server is required.\n" ; - &print_usage ; - exit $ERRORS{UNKNOWN} ; -} ; - -$pub_apps ||= 'Word 2003' ; -$pub_apps =~ s/["']//g ; -my @pub_apps = split /,\s*/, $pub_apps ; - -my @app_servers = split /,\s*/, $app_servers ; - -@app_servers || do { - print "IP Address of _each_ Application server in the Metaframe Citrix XP server farm is required.\n" ; - &print_usage ; - exit $ERRORS{UNKNOWN} ; -} ; - -my @non_ip_addresses = grep ! /\d+\.\d+\.\d+\.\d+/, @app_servers ; - -scalar(@non_ip_addresses) && do { - print qq(Application servers must be specified by IP Address (not name): "@non_ip_addresses".\n) ; - &print_usage ; - exit $ERRORS{UNKNOWN} ; -} ; - -$server_farm || do { - print "Name of Citrix Metaframe XP server farm is required.\n" ; - &print_usage ; - exit $ERRORS{UNKNOWN} ; -} ; - -my %xml_tag = () ; -my @tag_stack = () ; - -my $xml_p = new XML::Parser(Handlers => {Start => \&handle_start, - End => sub { pop @tag_stack }, - Char => \&handle_char}) ; - -# values required by Metaframe XP that don't appear to matter too much - -my $client_host = 'Nagios server (http://www.Nagios.ORG)' ; -my $user_name = 'nagios' ; -my $domain = 'Nagios_Uber_Alles' ; - -# end values required by Metaframe XP - -my $nilpotent_req = <<'EOR' ; - - - - - - -EOR - -my $server_farm_req = <<'EOR' ; - - - - - - - -EOR - -my $spec_server_farm_req = < - - - - - $server_farm* - - $client_host - - - - - $user_name - $domain - - - -EOR - -my $app_req = < - - - - - PUBLISHED_APP_ENCODED - - Nagios_Service_Check - - - - - $PROGNAME - $domain - - - -EOR - -my $ua = LWP::UserAgent->new ; -my $req = HTTP::Request->new('POST', "http://$pn_server/scripts/WPnBr.dll") ; - $req->content_type('text/xml') ; - -my $svr ; - -my @pubapp_encoded = map { my $x = $_ ; $x =~ s/(\W)/'&#' . ord($1) . ';'/eg; $x } @pub_apps ; - -my $error_tag_cr = sub { ! exists($xml_tag{ErrorId}) } ; - -my @app_reqs = ( - # { Content => url, Ok => ok_condition, Seq => \d+ } - - { Content => $nilpotent_req, Ok => $error_tag_cr, Seq => 0 }, - { Content => $server_farm_req, Ok => sub { - ! exists($xml_tag{ErrorId}) && - exists( $xml_tag{ServerFarmName}) && - defined($xml_tag{ServerFarmName}) && - $xml_tag{ServerFarmName} eq $server_farm - }, Seq => 2 }, - { Content => $nilpotent_req, Ok => $error_tag_cr, Seq => 4 }, - { Content => $spec_server_farm_req, Ok => sub { - ! exists($xml_tag{ErrorId}) && - exists( $xml_tag{ServerAddress}) && - defined($xml_tag{ServerAddress}) && - $xml_tag{ServerAddress} =~ /\d+\.\d+\.\d+\.\d+:\d+/ - }, Seq => 6 }, - { Content => $nilpotent_req, Ok => $error_tag_cr, Seq => 8 }, - { Content => $app_req, Ok => sub { - ! exists($xml_tag{ErrorId}) && - exists( $xml_tag{ServerAddress}) && - defined($xml_tag{ServerAddress}) && - (($svr) = split(/:/, $xml_tag{ServerAddress})) && - defined($svr) && - scalar(grep $_ eq $svr, @app_servers) - }, Seq => 10 } -) ; - -my $app_location ; - -foreach my $pub_app (@pub_apps) { - - my $pubapp_enc = shift @pubapp_encoded ; - my $app_req_tmp = $app_reqs[5]{Content} ; - $app_reqs[5]{Content} =~ s/PUBLISHED_APP_ENCODED/$pubapp_enc/ ; - - foreach (@app_reqs) { - - $req->content($_->{Content}) ; - - $debug && print STDERR "App: $pub_app Seq: $_->{Seq}\n", $req->as_string, "\n" ; - - my $resp = $ua->request($req) ; - - $debug && print STDERR "App: $pub_app Seq: ", $_->{Seq} + 1, "\n", $resp->as_string, "\n" ; - - $resp->is_error && do { - my $err = $resp->as_string ; - $err =~ s/\n//g ; - &outahere(qq(Failed. HTTP error finding $pub_app at seq $_->{Seq}: "$err")) ; - } ; - my $xml = $resp->content ; - - my $xml_disp ; - ($xml_disp = $xml) =~ s/\n//g ; - $xml_disp =~ s/ \s+/ /g ; - - &outahere($resp->as_string) - unless $xml ; - - my ($xml_ok, $whine) = &valid_xml($xml_p, $xml) ; - - $xml_ok || &outahere(qq(Failed. Bad XML finding $pub_app at eq $_->{Seq} in "$xml_disp".)) ; - - &{$_->{Ok}} || &outahere(qq(Failed. \"\&\$_->{Ok}\" false finding $pub_app at seq $_->{Seq} in "$xml_disp".)) ; - - # Ugly but alternative is $_->{Ok}->(). - # eval $_->{Ok} where $_->{Ok} is an - # expression returning a bool is possible. but - # sub { } prevent recompilation. - - } - - $app_reqs[5]{Content} = $app_req_tmp ; - - $app_location .= qq("$pub_app" => $svr, ) ; - -} - -substr($app_location, -2, 2) = '' ; -print qq(Ok. Citrix XML service located all published apps $app_location.\n) ; -exit $ERRORS{'OK'} ; - -sub outahere { - print "Citrix XML service $_[0]\n" ; - exit $ERRORS{CRITICAL} ; -} - -sub valid_xml { - my ($p, $input) = @_ ; - - %xml_tag = () ; - @tag_stack = () ; - - eval { - $p->parse($input) - } ; - - return (0, qq(XML::Parser->parse failed: Bad XML in "$input".!)) - if $@ ; - - if ( $xml_debug ) { - print STDERR pack('A4 A30 A40', ' ', $_, qq(-> "$xml_tag{$_}")), "\n" - foreach (keys %xml_tag) - } - - return (1, 'valid xml') - -} - - -sub handle_start { - push @tag_stack, $_[1] ; - - $xml_debug && print STDERR pack('A8 A30 A40', ' ', 'handle_start - tag', " -> '$_[1]'"), "\n" ; - $xml_debug && print STDERR pack('A8 A30 A60', ' ', 'handle_start - @tag_stack', " -> (@tag_stack)"), "\n" ; -} - -sub handle_char { - my $text = $_[1] ; - - !($text =~ /\S/ || $text =~ /^[ \t]$/) && return ; - - $text =~ s/\n//g ; - - my $tag = $tag_stack[-1] ; - - $xml_debug && print STDERR pack('A8 A30 A30', ' ', 'handle_char - tag', " -> '$tag'"), "\n" ; - $xml_debug && print STDERR pack('A8 A30 A40', ' ', 'handle_char - text', " -> '$text'"), "\n" ; - - $xml_tag{$tag} .= $text ; - -} - - -sub print_help() { - -# 1 2 3 4 5 6 7 8 -#12345678901234567890123456789012345678901234567890123456789012345678901234567890 - - print_revision($PROGNAME,'$Revision: 1097 $ '); - -my $help = < -S -A - -F [-v -x -h -V] - -Check the Citrix Metaframe XP service by completing an HTTP dialogue with a Program -Neigbourhood server (pn_server) that returns an ICA server in the named Server farm -hosting the specified applications (an ICA server in a farm which runs some MS app). -EOHELP - - print $help ; - print "\n"; - print "\n"; - print_usage(); - print "\n"; - support(); -} - -sub print_usage () { - -# 1 2 3 4 5 6 7 8 -#12345678901234567890123456789012345678901234567890123456789012345678901234567890 - -my $usage = < - - - -HTTP/1.1 100 Continue -Server: Citrix Web PN Server -Date: Thu, 30 Sep 2004 00:12:40 GMT - - -resp 1 -HTTP/1.1 200 OK -Server: Citrix Web PN Server -Date: Thu, 30 Sep 2004 00:12:40 GMT -Content-type: text/xml -Content-length: 253 - - - - - - - - - - -req 2 -POST /scripts/WPnBr.dll HTTP/1.1 -Content-type: text/xml -Host: 10.1.2.2:80 -Content-Length: 191 -Connection: Keep-Alive - - - - - - -HTTP/1.1 100 Continue -Server: Citrix Web PN Server -Date: Thu, 30 Sep 2004 00:12:40 GMT - - -resp 3 -HTTP/1.1 200 OK -Server: Citrix Web PN Server -Date: Thu, 30 Sep 2004 00:12:40 GMT -Content-type: text/xml -Content-length: 293 - - - - - - - - FOOFARM01 - - - - -req 4 -POST /scripts/WPnBr.dll HTTP/1.1 -Content-type: text/xml -Host: 10.1.2.2:80 -Content-Length: 220 -Connection: Keep-Alive - - - - - - -HTTP/1.1 100 Continue -Server: Citrix Web PN Server -Date: Thu, 30 Sep 2004 00:12:55 GMT - - -resp 5 -HTTP/1.1 200 OK -Server: Citrix Web PN Server -Date: Thu, 30 Sep 2004 00:12:55 GMT -Content-type: text/xml -Content-length: 253 - - - - - - - - - - -req 6 -POST /scripts/WPnBr.dll HTTP/1.1 -Content-type: text/xml -Host: 10.1.2.2:80 -Content-Length: 442 -Connection: Keep-Alive - - - - - -i - FOOFARM01* - WS09535 - - - - - foo-user - some-domain - - - -HTTP/1.1 100 Continue -Server: Citrix Web PN Server -Date: Thu, 30 Sep 2004 00:12:56 GMT - - -resp 7 -HTTP/1.1 200 OK -Server: Citrix Web PN Server -Date: Thu, 30 Sep 2004 00:12:56 GMT -Content-type: text/xml -Content-length: 507 - - - - - - - 10.1.2.2:1494 - win32 - tcp - ica30 - 10.1.2.2 - ica_svr01.some.domain:443 - - - -req 8 -POST /scripts/WPnBr.dll HTTP/1.1 -Content-type: text/xml -Host: 10.1.2.2:80 -Content-Length: 220 -Connection: Keep-Alive - - - - - - -HTTP/1.1 100 Continue -Server: Citrix Web PN Server -Date: Thu, 30 Sep 2004 00:13:29 GMT - - -resp 9 -HTTP/1.1 200 OK -Server: Citrix Web PN Server -Date: Thu, 30 Sep 2004 00:13:29 GMT -Content-type: text/xml -Content-length: 253 - - - - - - - - - - -req 10 -POST /scripts/WPnBr.dll HTTP/1.1 -Content-type: text/xml -Host: 10.1.2.2:80 -Content-Length: 446 -Connection: Keep-Alive - - - - - -i - - EXCEL#32;2003 - - WS09535 - - - - foo-user - some-domain - -i - - -HTTP/1.1 100 Continue -Server: Citrix Web PN Server -Date: Thu, 30 Sep 2004 00:13:29 GMT - - -resp 11 -HTTP/1.1 200 OK -Server: Citrix Web PN Server -Date: Thu, 30 Sep 2004 00:13:29 GMT -Content-type: text/xml -Content-length: 509 - - - - - - - 10.1.2.14:1494 - win32 - tcp - ica30 - 10.1.2.14 - ica_svr02.some.domain:443 - - - -** One sees this XML on an error (there may well be other error XML also, but I haven't seen it) ** - - - - - - unspecified - 0x0000000E - - - - -=end comment - -=cut - - -# You never know when you may be embedded ... - - diff --git a/contrib/check_inodes-freebsd.pl b/contrib/check_inodes-freebsd.pl deleted file mode 100644 index d66e5e3..0000000 --- a/contrib/check_inodes-freebsd.pl +++ /dev/null @@ -1,127 +0,0 @@ -#!/usr/bin/perl - -# check_inodes.pl for FreeBSD -# Designed on FreeBSD 4.6 (although this should not matter) -# parses df output, splits, and then takes variables -# df.pl -f mountpoint -w warningnumber -c critical number -# USE NUMBERS AND NOT PERCENTS FOR wanring and critical values -# -h is help -# -v is version -# Mountpoints: -# like / or /usr or /var (whatever you mount drives NOT the device names) -# Andrew Ryder - 20020804 - atr@mrcoffee.org - - -use strict; -use Getopt::Long; -use vars qw($opt_V $opt_h $opt_w $opt_c $opt_f $verbose $PROGNAME); -use lib "/usr/local/libexec/nagios" ; -use utils qw($TIMEOUT %ERRORS &print_revision &support); - -my $df = "/bin/df"; -my $grep = "/usr/bin/grep"; - -$PROGNAME="df.pl"; - -sub print_help (); -sub print_usage (); - - -$ENV{'PATH'}=''; -$ENV{'BASH_ENV'}=''; -$ENV{'ENV'}=''; - -Getopt::Long::Configure('bundling'); -GetOptions - ("V" => \$opt_V, "version" => \$opt_V, - "h" => \$opt_h, "help" => \$opt_h, - "w=s" => \$opt_w, "warning=s" => \$opt_w, - "c=s" => \$opt_c, "critical=s" => \$opt_c, - "f=s" => \$opt_f, "filesystem=s" => \$opt_f); - - -if ($opt_V) { - print_revision($PROGNAME,'$Revision: 72 $ '); - exit $ERRORS{'OK'}; -} - -if ($opt_h) { - print_help(); - exit $ERRORS{'OK'}; -} - -($opt_w) || ($opt_w = shift) || ($opt_w = 50); -my $warning = $1 if ($opt_w =~ /([0-9]+)/); - -($opt_c) || ($opt_c = shift) || ($opt_c = 75); -my $critical = $1 if ($opt_c =~ /([0-9]+)/); - -if ($opt_c < $opt_w) { - print "Critical offset should be larger than warning offset\n"; - print_usage(); - exit $ERRORS{"UNKNOWN"}; -} - -($opt_f) || ($opt_f = "/"); - - -unless (-e $df) { - print "UNKNOWN: $df is not where df is\n"; - exit $ERRORS{'UNKNOWN'}; - } - -unless (-e $grep) { - print "UNKNOWN: $grep is not where grep is\n"; - exit $ERRORS{'UNKNOWN'}; - } - -unless (-d $opt_f) { - print "UNKNOWN: $opt_f is not a mount point\n"; - exit $ERRORS{'UNKNOWN'}; - } - - -my $state = $ERRORS{'UNKNOWN'}; -my $answer; - -open(DF, "$df -i $opt_f| $grep -v Filesystem |"); - -while () { - - my ($fs,$onek,$used,$avail,$capacity,$iused,$ifree,$ipercent,$mounted) = split; - $ipercent =~ s/%//s; - - if ($ipercent > $opt_w) { - $state = $ERRORS{'WARNING'}; - $answer = "WARNING: $ipercent percent inodes free on $opt_f\n"; - } elsif ($ipercent > $opt_w) { - $state = $ERRORS{'CRITCAL'}; - $answer = "CRITICAL: $ipercent percent inodes free on $opt_f\n"; - } elsif ($ipercent < $opt_w) { - $state = $ERRORS{'OK'}; - $answer = "OK: $ipercent percent inodes free on $opt_f\n"; - } -} - -close(DF); - -print "$answer"; -exit $state; - -sub print_usage () { - print "Usage: $PROGNAME [-w ] [-c ]\n"; - print "Example: $PROGNAME /dev/ad0s1a -w 50 -c 75\n"; -} - -sub print_help () { - print_revision($PROGNAME,'$Revision: 72 $'); - print "Copyright (c) 2002 Andrew Ryder\n"; - print "\n"; - print_usage(); - print "\n"; - print " = Inode Percent at which a warning message is returned. Defaults to 50.\n"; - print " = Inode Percent at which a critical message is returned..\n Defaults to 75.\n\n"; - support(); -} - - diff --git a/contrib/check_inodes.pl b/contrib/check_inodes.pl deleted file mode 100755 index 5767878..0000000 --- a/contrib/check_inodes.pl +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/perl -############################################################################## -# This plugin uses df to gather filesystem statistics and check the percent # -# used of inodes. I've put a switch in here since i've got both aix and # -# linux systems...adjust for your syntax's results. # -# Note: the percentages passed in MUST NOT have % after them # -# No warranty is either implied, nor expressed herein. # -# # -############################################################################## - -$filesystem = $ARGV[0]; -$warnpercent = $ARGV[1]; -$critpercent = $ARGV[2]; - -#------Find out what kind of syntax to expect -$systype=`uname`; -chomp($systype); - -#------Make sure we got called with the right number of arguments -#------you could also put a check in here to make sure critical level is -#------greater than warning...but what the heck. -die "Usage: check_inodes filesystem warnpercent critpercent" unless @ARGV; - -if ($#ARGV < 2) { - die "Usage: check_inodes filesystem warnpercent critpercent"; -}#end if - -#------This gets the data from the df command -$inputline = `df -i $filesystem|grep -v "Filesystem"`; - -#------replaces all spaces with a single :, that way we can use split -$inputline =~ y/ /:/s; - -#------different oses give back different sets of columns from the df -i -#------(at least mine do). This way I can use this plugin on all my hosts -#------if neither of these work, add your own in, or if you've got one that -#------just flat out reports something different...well...perl is your friend. -SWITCH: { - if ($systype eq "Linux") { - ($fs,$inodes,$iused,$ifree,$ipercent,$mntpt) = split(/:/,$inputline); - last SWITCH; - }#end if - if ($systype eq "AIX") { - ($fs,$blks,$free,$percentused,$iused,$ipercent,$mntpt) = split(/:/,$inputline); - last SWITCH; - }#end if -}#end switch - -#------First we check for critical, since that is, by definition and convention -#------going to exceed the warning threshold -$ipercent =~ y/%//ds; - -if ($ipercent > $critpercent) { - print "CRITICAL: $filesystem inode use exceeds critical threshold $critpercent ($ipercent)"; - exit 1; -}# end if - -#------Next we check the warning threshold -if ($ipercent > $warnpercent) { - print "WARNING: $filesystem inode use exceeds warning threshold $warnpercent ($ipercent)"; - exit 2; -}# end if - - -#------thanks to the magic of procedural programming, we figure if we got here, -#------everything MUST be fine. -print "$filesystem inode use within limits ($ipercent)"; -exit 0; - diff --git a/contrib/check_ipxping.c b/contrib/check_ipxping.c deleted file mode 100644 index 937b921..0000000 --- a/contrib/check_ipxping.c +++ /dev/null @@ -1,201 +0,0 @@ -/****************************************************************************************** - * - * CHECK_IPXPING.C - * - * Program: IPX ping plugin for Nagios - * License: GPL - * Copyright (c) 1999 Ethan Galstad (nagios@nagios.org) - * - * Last Modified: 09-24-1999 - * - * Command line: CHECK_IPXPING - * - * Description: - * - * This plugin will use the /usr/bin/ipxping command to ping the specified host using the - * IPX protocol. Note: Linux users must have IPX support compiled into the kernerl and - * must have IPX configured correctly in order for this plugin to work. - * If the round trip time value is above the level, a STATE_WARNING is - * returned. If it exceeds the level, a STATE_CRITICAL is returned. - * - * - * - * IMPORTANT!! - * - * This plugin will only work with the ipxping command that has been ported to Linux. - * The version for Sun takes different command line arguments and differs in its output. - * - *****************************************************************************************/ - -#include "config.h" -#include "common.h" -#include "netutils.h" -#include "popen.h" - -/* this should be moved out to the configure script! */ -#define IPXPING_COMMAND "/tmp/ipxping/ipxping" - -/* these should be moved to the common header file */ -#define MAX_IPXNET_ADDRESS_LENGTH 12 -#define MAX_IPXHOST_ADDRESS_LENGTH 18 - -int socket_timeout=DEFAULT_SOCKET_TIMEOUT; -char dest_network[MAX_IPXNET_ADDRESS_LENGTH]; -char dest_address[MAX_IPXHOST_ADDRESS_LENGTH]; -int wrtt; -int crtt; - -int process_arguments(int,char **); - -FILE * spopen(const char *); -int spclose(FILE *); - -int main(int argc, char **argv){ - char command_line[MAX_INPUT_BUFFER]; - int rtt; - int bytes_returned; - int result=STATE_OK; - FILE *fp; - char input_buffer[MAX_INPUT_BUFFER]; - char *substr; - int current_line; - - if(process_arguments(argc,argv)!=OK){ - printf("Incorrect arguments supplied\n"); - printf("\n"); - printf("IPX ping plugin for Nagios\n"); - printf("Copyright (c) 1999 Ethan Galstad (nagios@nagios.org)\n"); - printf("Last Modified: 09-24-1999\n"); - printf("License: GPL\n"); - printf("\n"); - printf("Usage: %s [-to to_sec]\n",argv[0]); - printf("\n"); - printf("Options:\n"); - printf(" = IPX network that the remote host lies on. (Hex Format - 00:00:00:00)\n"); - printf(" = MAC address of the remote host. (Hex Format - 00:00:00:00:00:00)\n"); - printf(" = Round trip time in milliseconds necessary to result in a WARNING state\n"); - printf(" = Round trip time in milliseconds necessary to result in a CRITICAL state\n"); - printf(" [to_sec] = Seconds before we should timeout waiting for ping result. Default = %d sec\n",DEFAULT_SOCKET_TIMEOUT); - printf("\n"); - printf("Notes:\n"); - printf("This plugin will use the /usr/bin/ipxping command to ping the specified host using\n"); - printf("the IPX protocol. IPX support must be compiled into the kernel and your host must\n"); - printf("be correctly configured to use IPX before this plugin will work! An RPM package of\n"); - printf("the ipxping binary can be found at...\n"); - printf("http://www.rpmfind.net/linux/RPM/contrib/libc5/i386/ipxping-0.0-2.i386.shtml\n"); - printf("\n"); - return STATE_UNKNOWN; - } - - /* create the command line to use... */ - sprintf(command_line,"%s %s %s",IPXPING_COMMAND,dest_network,dest_address); - - /* initialize alarm signal handling */ - signal(SIGALRM,socket_timeout_alarm_handler); - - /* set socket timeout */ - alarm(socket_timeout); - - /* run the command */ - fp = spopen(command_line); - if(fp==NULL){ - printf("Unable to open pipe: %s",command_line); - return STATE_UNKNOWN; - } - - current_line=0; - while(fgets(input_buffer,MAX_INPUT_BUFFER-1,fp)){ - - current_line++; - - /* skip the first line of the output */ - if(current_line==1) - continue; - - /* we didn't get the "is alive" */ - if(current_line==2 && !strstr(input_buffer,"is alive")) - result=STATE_CRITICAL; - - /* get the round trip time */ - if(current_line==3){ - substr=strtok(input_buffer,":"); - substr=strtok(NULL,"\n"); - rtt=atoi(substr); - } - - /* get the number of bytes returned */ - if(current_line==4 && strstr(input_buffer,"bytes returned")){ - bytes_returned=atoi(input_buffer); - } - } - - /* close the pipe */ - spclose(fp); - - /* reset the alarm */ - alarm(0); - - if(current_line==1 || result==STATE_CRITICAL) - printf("IPX Ping problem - No response from host\n"); - else{ - - if(rtt>crtt) - result=STATE_CRITICAL; - else if(rtt>wrtt) - result=STATE_WARNING; - - printf("IPX Ping %s - RTT = %d ms, %d bytes returned from %s %s\n",(result==STATE_OK)?"ok":"problem",rtt,bytes_returned,dest_network,dest_address); - } - - - return result; - } - - - -/* process all arguments passed on the command line */ -int process_arguments(int argc, char **argv){ - int x; - - /* no options were supplied */ - if(argc<5) - return ERROR; - - /* get the destination network address */ - strncpy(dest_network,argv[1],sizeof(dest_network)-1); - dest_network[sizeof(dest_network)-1]='\x0'; - - /* get the destination host address */ - strncpy(dest_address,argv[2],sizeof(dest_address)-1); - dest_address[sizeof(dest_address)-1]='\x0'; - - /* get the round trip time variables */ - wrtt=atoi(argv[3]); - crtt=atoi(argv[4]); - - /* process remaining arguments */ - for(x=6;x<=argc;x++){ - - /* we got the timeout to use */ - if(!strcmp(argv[x-1],"-to")){ - if(x \&version, - "h|help" => \&help, - "v|verbose" => \$verbose, - "w|warning=s" => \$opt_w, - "c|critical=s" => \$opt_c, - "n|name=s" => \$classname - ); - - -my $state = 'OK'; -my $min_warn = undef -my $max_warn = undef; -my $min_crit = undef; -my $max_crit = undef; - - -($opt_w) || ($opt_w = shift); -check_ranges($opt_w,\$min_warn, \$max_warn, "warning"); -($opt_c) || ($opt_c = shift); -check_ranges($opt_c,\$min_crit, \$max_crit, "critical"); - - -# -# Determine # of running processes for the java programs that interest us. -# -my @javalist = getJavaList(); - -my $total = 0; -my $msgout = ""; -my @fields; - -if ( defined $classname ) { - - #filter out a single java process based on class name - foreach (@javalist) { - @fields = split(/\s+/, $_); - $total = $fields[-1] and last if $classname eq $fields[0]; - } - $msgout .= "$total processes for $classname\n"; -} else { - #Handle all java processes - $msgout .= "\n"; - foreach (@javalist) { - @fields = split(/\s+/, $_); - - $total += $fields[-1]; - $msgout .= " $fields[-1] processes for "; - $msgout .= (scalar @fields > 1)? $fields[0] : "unknown" ; - $msgout .= "\n"; - } - my $msgtotal = "$total java processes for ". scalar @javalist . " applications"; - - if ( defined $verbose ) { - $msgout = $msgtotal . $msgout; - } else { - $msgout = $msgtotal; - } - -} - -# -# Set the state with the data we now have accumulated -# Note that due to the order of testing, warnings have precedence over -# criticals. This is logical, since you should be able to create a criticals -# range which encompasses a warning range. eg. following should be possible: -# -# check_javaproc -w 5:10 -c 3:12 -# proper specification of the ranges is the responsibility of the script user. -# -$state = 'CRITICAL' if (defined $min_crit && $total < $min_crit); -$state = 'CRITICAL' if (defined $max_crit && $total > $max_crit); -$state = 'CRITICAL' if (!defined $min_crit && !defined $max_crit && $total==0 ); -$state = 'WARNING' if (defined $min_warn && $total < $min_warn); -$state = 'WARNING' if (defined $max_warn && $total > $max_warn); - -print $msgout; -print "$state\n" if ($verbose); -exit $ERRORS{$state}; - -################################### -# Support routines for Nagios -################################### -sub check_ranges($$$$) { - my ($opt, $min, $max, $rangename) = @_; - - if ( defined $opt ) { - if ( $opt =~ /^([0-9]*)\:([0-9]*)$/) { - $$min = $1 if $1 > 0; - $$max= $2 if $2 > 0; - } else { - usage("Invalid $rangename range: $opt\n"); - } - } - - if ( defined $$min && defined $$max ) { - usage("Min value of $rangename range larger than max value: $opt\n") if ( $$min > $$max); - } -} - -sub print_usage () { - print "Usage: $PROGNAME [-v] [-w ] [-c ] [ -n ]\n"; -} - -sub print_help () { - revision(); - print "Copyright (c) 2002 by Wim Rijnders - -Perl Check java processes plugin for Nagios - -"; - print_usage(); - print " --v, --verbose - Return additional information. - Intended as a command-line aid, not recommended for Nagios script usage. - --w, --warning=INTEGER:INTEGER - Minimum and maximum number of processes outside of which a warning will be - generated. If omitted, no warning is generated. - --c, --critical=INTEGER:INTEGER - Minimum and maximum number of processes outside of which a critical will be - generated. If omitted, a critical is generated if no processes are running. - --n, --name=STRING - Name of class specified on the java command line (from which main() is run). - If omitted, all java processes are taken into account. - -"; - support(); -} - -sub revision() { - print_revision($PROGNAME,'$Revision: 211 $ '); -} - -sub version () { - revision(); - exit $ERRORS{'OK'}; -} - -sub help () { - print_help(); - exit $ERRORS{'OK'}; -} - -################################### -# Routines for delivering the data -################################### - -# -# Generate a formatted list of running java processes. -# -# Returns an array of strings having the following syntax: -# -# <#processes for this class> -# -sub getJavaList() { - - my @output; - - # Untaint - local $ENV{'PATH'} = '/bin:/usr/bin'; - local $ENV{'BASH_ENV'} = '~/.bashrc'; - - # We are only interested in the full command line - # The -H opstion is important for the order of the processes; - # this option ensures that all child processes are listed under - # their parents - @output=`ps -AHo \"\%a\" -ww`; - - #remove preceding whitespace and final EOL - foreach (@output) { - s/^\s*//; - chop; - } - - #Combine any consecutive processes with exactly the same command line - #into a single item - @output = checkSameLine(@output); - - #Filter out all java processes - my @javalist; - for (my $i = 0; $i < scalar @output; ++$i) { - push @javalist, $output[$i] if $output[$i] =~ /^\S*java/; - } - - foreach (@javalist) { - #The java statement at the beginning is redundant; remove it - s/^\S*java//; - - #remove all defines - s/\-D\S+//g; - - #remove classpath - s/\-(classpath|cp)\s+\S+//g; - - #remove any other parameters we don't want to see - s/\-server\s+//g; - s/\-X\S*\s+//g; - - #remove any redundant whitespaces at the beginning - s/^\s+//; - - } - - @javalist; -} - - -# -# Combine all consecutive lines with an identical command line -# to a signle line with a count at the end -# -sub checkSameLine { - my @input = @_; - my @output; - my $prevline= ""; - my $prevcount = 0; - - foreach my $a (@input) { - if ( $prevline eq $a) { - ++$prevcount; - } else { - push @output, $prevline . " " . ($prevcount + 1); - $prevcount = 0; - } - $prevline = $a; - } - - #don't forget the last item! - if ( $prevcount > 0 ) { - push @output, $prevline . " " . ($prevcount + 1); - } - - @output; -} - -#======= end check_javaproc ===== diff --git a/contrib/check_joy.sh b/contrib/check_joy.sh deleted file mode 100755 index 8783a59..0000000 --- a/contrib/check_joy.sh +++ /dev/null @@ -1,69 +0,0 @@ -#! /bin/sh - -PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin - -PROGNAME=`basename $0` -PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'` -REVISION=`echo '$Revision: 2 $' | sed -e 's/[^0-9.]//g'` -STATUS="" - -. $PROGPATH/utils.sh - - -print_usage() { - echo "Usage: $PROGNAME /dev/js<#>