diff --git a/ACKNOWLEDGEMENTS b/ACKNOWLEDGEMENTS index bd0b1a9..7b8dbe2 100644 --- a/ACKNOWLEDGEMENTS +++ b/ACKNOWLEDGEMENTS @@ -2,7 +2,7 @@ This file contains the origin of code copied verbatim into some or all of the Na The NagiosPlugin team thanks the original authors. -Copied code is cited in the source by indented commnents of the form +Copied code is cited in the source by indented comments of the form .. indent level .. /* Author YYYY sub-citation see ACKNOWLEDGEMENTS */ @@ -27,3 +27,7 @@ Copyright (C) 91, 1995-2004 Free Software Foundation, Inc. http://www.gnu.org/software/coreutils/ Use of macros and lib files in m4/np_coreutils.m4 and lib/. Setuid installs in plugins-root +Gnulib team +Copyright (C) 2001, 2003, 2004, 2006 Free Software Foundation, Inc +http://www.gnu.org/software/gnulib/ +Use of lib files that originally were used from coreutils diff --git a/AUTHORS b/AUTHORS index beb4ad7..22e1602 100644 --- a/AUTHORS +++ b/AUTHORS @@ -2,13 +2,18 @@ The Nagios Plugins are brought to you by the Nagios Plugins Development Team. Jeremy T Bouse Peter Bray +Gavin Carr Karl DeBisschop +Matthias Eble Ethan Galstad Sean Finney Subhendu Ghosh +Thomas Guyot-Sionnest Stanley Hopcroft Matthew Kent Harper Mann Benoit Mortier +Nathan Vonnahme Ton Voon +Holger Weiss Michael Wirtgen diff --git a/BUGS b/BUGS index ecf0678..4465d25 100644 --- a/BUGS +++ b/BUGS @@ -1,13 +1,37 @@ -This file lists known bugs in this specific release. It lists the major bugs from the Nagios -Plugins page on Sourceforge at http://sourceforge.net/tracker/?group_id=29880&atid=397597. +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. -For the 1.4.4 release: +For the 1.4.8 release: -1578214 - check_proc crashes on Itanium2 +1687867 - check_http: buffer overflow vulnerability +1675306 - check_dhcp: does not add mandatory 'end' option +1675286 - check_ssh: -S flag not working +1652471 - check_http: missing Accept header +1648570 - check_dhcp error by asking 2 dhcp servers +1637767 - check_ping on FreeBSD 5.4 fails +1614168 - not compatible with OpenSSL 0.9.8d +1595449 - check_procs bus error on Solaris 8,9,10 1573700 - check_swap on HP-UX incorrect 1573638 - check_swap SEGVs on Sol 10 +1541340 - check_procs won't execute on Solaris 9 x86 +1523748 - check_disk should error if warn range is subset of critical +1506121 - check_http problem with protocol change in redirect +1498923 - check_ldap build error on Solaris 9 +1495828 - pst3 failure on solaris 10 x86 +1494629 - check_icmp fails after a time on FreeBSD +1480574 - check_disk missing -lm on Solaris +1478287 - check_dns fails with CNAMEs 1475899 - check_tcp segfaults with multiple -s or -e args +1470013 - check_tcp complains about double values in parameter +1469472 - check_ping dns lookup problem +1469468 - signal handler in popen.c is broken +1466426 - check_ldaps doesn't default to port 636 1447642 - check_ping segfault on Sol 10 +1433179 - check_jabber does not honor --mismatch +1381604 - Perlsec breaks any perl plugin with perl 5.8.x +1373801 - check_ping timeout on Mandrake 10.1 +1370031 - check_disk_smb requires DNS agree with NetBIOS names 1344584 - check_snmp counter64 values not handled correctly 1291987 - urlize useragent does not work 1225470 - check_swap perf data incorrect diff --git a/CHANGES b/CHANGES deleted file mode 100644 index 7b1bf9c..0000000 --- a/CHANGES +++ /dev/null @@ -1,37 +0,0 @@ -This file documents the major additions and syntax changes between releases. - -1.4.4 - New C based check_ntp. The perl version is now deprecated. - New check_apt plugin - Notice: plugins in contrib/ will start to be removed from this distribution. - Please check at http://www.nagiosexchange.org for contributed plugins - Major bug fixes to check_disk where values were incorrectly calculated and alerted on. - check_udp2 removed. check_udp is now linked to check_tcp.c - check_mailq now errors if the sub-program run returns non-zero return code. This would appear - as if mailqs were okay when the nagios user could not query the mail-queues - Compile problems with check_snmp fixed - -1.4.3 - Setuid plugins (check_dhcp, check_icmp) separated into plugins-root/. Run make install as root to install - SSL plugins work with gnutls as well as OpenSSL - check_mysql_query added to run arbitrary SQL commands, with threshold checking - libtool now required for development systems - Notice: check_udp (compiled from check_udp.c) will be deprecated in the next release. - check_udp2 should be used instead and will be renamed to check_udp - -1.4.2 - Fix for Redhat ES4 for check_dns and check_dig - -1.4 - IPv6 support in check_ping, check_by_ssh, check_http, check_ldap, check_smtp, check_tcp - Internationalisation support - Performance data added to most plugins - check_disk now using GNU coreutils code - New plugins - check_dhcp, check_icmp - contrib/check_citrix has been replaced by contrib/check_ica* (requires packet_utils.pm in libexec) - check_http --min changed to --pagesize, added max so min:max in check - check_vsz and check_rss deprecated - functionality moved into check_procs - check_swap % thresholds changed to measure amount free, instead of amount used - check_disk syntax changes for -p, -m/-M, defaults to MB instead of kB - check_procs -C expects no path for the command name - diff --git a/ChangeLog b/ChangeLog index 93d76b7..166b2a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,767 @@ +2007-04-10 08:17 dermoth + + * po/: POTFILES.in, de.po, fr.po, nagios-plugins.pot: Add some + check_ntp translations + +2007-04-10 08:17 dermoth + + * plugins/check_ntp.c: - Fix possibility of printing scientific + numbers in perfdata - Use fperfdata function for perfdata + formatting - Make the printing part a bit more flexible (similar + to check_disk) + +2007-04-10 06:58 dermoth + + * po/: de.po, fr.po, nagios-plugins.pot: Hopefully this is correct. + Need to make more changes so I'm commiting these. + +2007-04-04 21:08 dermoth + + * plugins/check_ntp.c: Fix for getting dispersion instead of jitter + on older servers (like xntpd on Solaris). + +2007-04-03 18:19 hweiss + + * plugins/check_ntp.c: Fix the synchronization source selection on + big-endian systems. + +2007-04-03 02:31 dermoth + + * plugins/check_ntp.c: Temporary fix for jitter calculation + +2007-04-02 13:39 hweiss + + * plugins/check_ntp.c: Don't rely on the assumption that the size + of a READSTAT response is a multiple of + sizeof(ntp_assoc_status_pair). + +2007-04-02 10:28 tonvoon + + * lib/tests/Makefile.am: Add libgnu.a as regex functions required + +2007-04-02 08:32 dermoth + + * plugins/check_ntp.c: Fix byte order in verbose logging + +2007-04-02 07:00 dermoth + + * plugins/check_ntp.c: Seems like we don't get any jitter + sometimes. While this needs to be fixed we should at least handle + it gracefully. + +2007-04-01 15:21 psychotrahe + + * plugins/t/check_http.t: check_http.t: - added internet_access + variable to skip tests where internet access is required. + - added host_tcp_http2 variable for a webserver serving + the string 'nagios' in index - no tests are + skipped if the new vars are not defined (existing installations) + +2007-04-01 12:17 psychotrahe + + * lib/utils_disk.c: utils_disk: fixed handling if check_disk -p is + a device (np_set_best_match()) + +2007-03-31 19:49 hweiss + + * NEWS: Various check_ntp fixes + +2007-03-31 19:48 hweiss + + * plugins/check_ntp.c: Fix an out-of-bounds memcpy(3) and add a + realloc(3) error check in jitter_request(). + +2007-03-31 18:35 hweiss + + * plugins/check_ntp.c: Add a warning to the verbose output if + jitter_request() found no synchronization source. + +2007-03-31 18:29 hweiss + + * plugins/check_ntp.c: Avoid division by zero. + +2007-03-31 18:25 hweiss + + * plugins/check_ntp.c: Remove the '-O' option, as it's ignored. + +2007-03-30 16:45 tonvoon + + * m4/np_mysqlclient.m4: Use AS_HELP_STRING instead of + ACX_HELP_STRING + +2007-03-30 15:08 tonvoon + + * NEWS, configure.in, m4/np_mysqlclient.m4: Fix AC_CHECK_LIB for + mysql_init - add dependent libraries. mysql detection separated + into external m4 file + +2007-03-30 10:00 psychotrahe + + * lib/tests/test_disk.c, plugins/t/check_disk.t: Test Cases for + check_disk's -r, -R, -C and -g + +2007-03-30 09:56 psychotrahe + + * plugins/check_disk.c: check_disk: minor fix for -C if bestmatch + != -p + +2007-03-30 09:53 psychotrahe + + * lib/utils_disk.c, lib/utils_disk.h, plugins/check_disk.c: + check_disk: added regex functionality -r and -R. see np-devel + mail (2007-02-10) + +2007-03-30 09:52 psychotrahe + + * lib/utils_disk.c, lib/utils_disk.h, plugins/check_disk.c: + check_disk: added grouping functionality. see np-devel mail + (2007-02-10) + +2007-03-30 09:48 psychotrahe + + * lib/utils_disk.c, lib/utils_disk.h, plugins/check_disk.c: + check_disk -C is more flexible now. See np-devel post + (2007-02-10) + +2007-03-29 18:58 hweiss + + * THANKS.in, plugins/check_mysql.c: Fix argument processing (Felix + Frank - 1690697) + +2007-03-29 18:34 hweiss + + * plugins-root/Makefile.am: Set the "read" and "execute" bits only + for "user" and "group" in order to not overwrite + "--without-world-permissions" for the root plugins. + +2007-03-29 11:32 tonvoon + + * BUGS, NEWS, configure.in, package.def, ChangeLog: 1.4.7 release + +2007-03-29 11:25 tonvoon + + * plugins/check_ntp.c: Adding help text for jitter flags + +2007-03-27 07:53 dermoth + + * THANKS.in, plugins-root/check_icmp.c: Fix bug #1494629 - + check_icmp fails after some time on FreeBSD + +2007-03-25 14:55 tonvoon + + * configure.in, NEWS: Reinstate --with-nagios-user/group and new + --without-group-permissions ./configure options + +2007-03-22 17:54 hweiss + + * THANKS.in, plugins/common.h: Increase MAX_INPUT_BUFFER from 1k to + 8k in order to increase I/O performance (Stefan Meier) + +2007-03-16 12:11 gonzai + + * plugins-scripts/check_ifoperstatus.pl: Fix bogus 'eq ( || )' + constructions in check_ifoperstatus.pl. + +2007-03-12 10:51 tonvoon + + * NEWS, plugins/check_ping.c, plugins/t/check_ping.t: check_ping's + timeout interval is only +1 if ping command has a timeout value. + Tests updated to check for 100% packet loss (always if ping has + timeout), otherwise will check for "timed out" string + +2007-03-11 06:51 dermoth + + * plugins-root/t/check_icmp.t: Add tests for new check_icmp switch + -m + +2007-03-11 02:27 tonvoon + + * plugins/t/check_ping.t, plugins-root/t/check_icmp.t: Converted + check_ping.t to new-style testcases. Added test case for + check_icmp - requires sudo access + +2007-03-11 01:57 tonvoon + + * plugins/check_ping.c: Fixed some help display. Removed -L from + usage as deprecated option + +2007-03-08 09:09 dermoth + + * NEWS, THANKS.in, plugins-root/check_icmp.c: New switch to + check_icmp to set the minimum required hosts for success. + +2007-03-08 06:12 dermoth + + * config_test/child_test.c: Ficing C++ style comments + +2007-03-08 06:09 dermoth + + * plugins-root/check_icmp.c: Fixed C++ style comments, but I don't + get why those lines were originally commented out. + +2007-03-06 22:45 tonvoon + + * plugins/check_http.c: Fix option handling (Nobuhiro Ban - + 1657280) + +2007-03-06 22:29 tonvoon + + * plugins/check_smtp.c: Fixed compile errors in check_smtp.c + +2007-03-06 22:17 tonvoon + + * NEWS, THANKS.in, plugins/check_smtp.c: Fixed broken HELO cmd + (Enrico Scholz - 1675279) + +2007-03-06 17:29 tonvoon + + * NEWS, configure.in, plugins/check_procs.c: Use /usr/ucb/ps on + Solaris in preference to pst3 (problems in 64bit mode) + +2007-03-06 17:26 tonvoon + + * plugins/t/check_disk.t: Test failure if a filesystem which is a + subset of another fails the inode check (Matthias Elbe - 1660953) + +2007-03-06 14:18 tonvoon + + * NEWS, configure.in: Detect if check_mysql compile will work at + ./configure time, due to some Redhat systems distributing + mysql_config, but not the include files + +2007-03-06 11:03 tonvoon + + * configure.in: Clearer message when --with-nagios-user is used for + ./configure + +2007-03-06 10:48 tonvoon + + * FAQ, INSTALLING, NEWS, README, plugins-root/Makefile.am: Root + plugins installed with world executable permissions. Removed + references to --with-nagios-user and --with-nagios-group in + README + +2007-03-02 01:38 egalstad + + * plugins/check_mrtgtraf.c: Fix for broken check_mrtgtraf + +2007-02-24 01:03 dermoth + + * doc/makefile: Fix the makefile ('[[' is bash-specific, 'rm -f' + don't remove directories) + +2007-02-14 20:56 tonvoon + + * NEWS, contrib/check_sybase: check_sybase now maintained in + NagiosExchange + +2007-02-14 20:52 tonvoon + + * plugins/check_disk.c: Fixed typo in help for -M + +2007-02-14 10:11 tonvoon + + * plugins/: check_tcp.c, t/check_tcp.t: Documentation fix re: + --escape flag. Fix of ./check_tcp test to webservers to make it + more standards compliant + +2007-02-09 14:35 tonvoon + + * NEWS, THANKS.in, po/.cvsignore, po/Makefile.in.in: Fixed + MKINSTALLDIRS problem on some systems - Lars Stavholm + +2007-02-07 14:46 tonvoon + + * lib/: Makefile.config-opts, parse_ini.c, + tests/Makefile.config-opts, tests/config-tiny.ini, + tests/plugin.ini, tests/test_ini.c: Added test files to test the + parse_ini.c routines. Requires libtap + +2007-02-07 14:06 hweiss + + * plugins/check_swap.c: Include before + in order to fix compilation on OpenBSD (nsturm - 1653934) + +2007-02-06 23:30 dermoth + + * plugins/check_tcp.c: Correct vim typo in comment block :P + +2007-02-06 21:03 opensides + + * plugins/check_disk.c, plugins/check_http.c, + plugins/check_ide_smart.c, plugins/check_mrtg.c, + plugins/check_mrtgtraf.c, plugins/check_overcr.c, + plugins/check_smtp.c, plugins/check_tcp.c, po/de.po, po/fr.po, + po/nagios-plugins.pot: + correcting some translation problems + +2007-02-06 19:33 seanius + + * lib/: parse_ini.c, parse_ini.h: initial version of ini file + parsing routines in C + +2007-02-06 18:34 opensides + + * po/Makevars: + adding PACKAGE_BUGREPORT to fix Report-Msgid-Bugs-To: + +2007-02-05 13:51 tonvoon + + * AUTHORS, doc/RELEASING: Update list of team members. More notes + on new releases + +2007-02-05 13:13 tonvoon + + * BUGS, NEWS, ChangeLog, configure.in, package.def: For 1.4.6 + release + +2007-02-02 09:10 dermoth + + * plugins/check_snmp.c: Fix parsing of multiple OIDs sets needmibs + = TRUE + +2007-02-01 06:53 dermoth + + * plugins/: check_tcp.c, t/check_jabber.t: Fix progname being + partly set to upper case Change formating of invalid hostname + output + +2007-02-01 05:37 dermoth + + * NEWS: Adding NEWS entry for check_jabber + +2007-02-01 05:33 dermoth + + * plugins-scripts/check_log.sh: Fix bug #1593073 Check_Log problem + with log rotation + +2007-01-31 22:50 tonvoon + + * plugins/t/check_jabber.t: Converted to new style object and + Test::More testing. Skipped jabber server tests if not defined + +2007-01-31 06:18 dermoth + + * plugins/t/check_jabber.t: Add check_jabber test. Will ask for a + jabber host (default should be OK) + +2007-01-31 04:47 dermoth + + * plugins/check_tcp.c: Fix Debian Bug #392610: check_jabber always + return warning + +2007-01-30 14:24 dermoth + + * plugins/check_tcp.c: Jail does not requires any arguments + +2007-01-30 09:56 tonvoon + + * config.rpath: make dist failing without config.rpath in top + level. File copied from build-aux/ + +2007-01-30 05:01 dermoth + + * plugins/: check_tcp.c, t/check_tcp.t: Fix reporting bug using + expect, affecting (not fixing) Debian bug #392610: check_jabber + always return warning + +2007-01-30 02:22 hweiss + + * configure.in: grep(1) "-q" isn't portable (e.g., it won't work on + Solaris 8), redirect output to /dev/null instead. + +2007-01-29 14:14 dermoth + + * plugins/: check_disk.c, t/check_disk.t: Revert 1643463 (reversed + disk thresholds) keeping the thresholds checks. + +2007-01-29 12:13 hweiss + + * configure.in: Automake 1.10 says: "compiling `test_disk.c' with + per-target flags requires `AM_PROG_CC_C_O' in `configure.in'". + +2007-01-29 10:06 tonvoon + + * config.rpath, build-aux/config.rpath: Move config.rpath into + build-aux for automake 1.10 + +2007-01-28 22:00 hweiss + + * INSTALLING: Remove description of deprecated ./configure + --with-nagios-{user,group} options. + +2007-01-28 21:46 hweiss + + * plugins/check_apt.c, plugins/check_by_ssh.c, plugins/check_dig.c, + plugins/check_dns.c, plugins/check_fping.c, plugins/check_game.c, + plugins/check_hpjd.c, plugins/check_http.c, + plugins/check_ide_smart.c, plugins/check_ldap.c, + plugins/check_load.c, plugins/check_mrtg.c, + plugins/check_mrtgtraf.c, plugins/check_mysql.c, + plugins/check_mysql_query.c, plugins/check_nagios.c, + plugins/check_nt.c, plugins/check_ntp.c, plugins/check_nwstat.c, + plugins/check_overcr.c, plugins/check_pgsql.c, + plugins/check_ping.c, plugins/check_procs.c, + plugins/check_radius.c, plugins/check_real.c, + plugins/check_smtp.c, plugins/check_snmp.c, plugins/check_ssh.c, + plugins/check_swap.c, plugins/check_tcp.c, plugins/check_time.c, + plugins/check_ups.c, plugins/check_users.c, plugins/negate.c, + plugins/urlize.c, plugins/utils.c, plugins/utils.h, + plugins-root/check_dhcp.c: Don't try to print `optarg' (which + will be a NULL pointer) if an unknown command line option was + used, as this leads to a segfault on some systems. The unknown + option will be printed by getopt(3) anyway. So, simply call + print_usage() and exit UNKNOWN via the new usage5() instead. + +2007-01-27 21:49 dermoth + + * plugins/: check_disk.c, t/check_disk.t: Fix #1643463: + Miscalculating thresholds check_disk + +2007-01-27 17:49 hweiss + + * lib/utils_base.c: Change the variable names `true' and `false' + (which are keywords in C99) to `yes' and `no'. Fixes compilation + when using SGI's MIPSpro c99(1). + +2007-01-27 17:42 hweiss + + * plugins/common.h: Include GNULib's "dirname.h" in order to pull + in the base_name() prototype, fixes compilation of check_procs + using SGI's MIPSpro C. + +2007-01-27 16:56 hweiss + + * ACKNOWLEDGEMENTS, NEWS: Fix typos. + +2007-01-27 16:51 hweiss + + * NEWS: Added "-o,--ssh-option=OPTION" which hands "-o OPTION" over + to ssh(1) and "-q,--quiet" which tells ssh(1) to suppress + warnings (Gerhard Lausser - 1472491) + +2007-01-27 16:37 hweiss + + * plugins-root/check_dhcp.c: Include which is a + prerequisite for on NetBSD and OpenBSD (at least). + +2007-01-25 00:58 tonvoon + + * Makefile.am, README, configure.in, doc/RELEASING: Update + references to NEWS instead of CHANGES. Fix compile of libtap test + programs + +2007-01-25 00:26 tonvoon + + * config.guess, config.sub, configure.in, ltmain.sh, + build-aux/.cvsignore, build-aux/ltmain.sh: Use build-aux + directory. Removed unnecessary checks in configure.in. Keeping + libtool to link to libtap - can't find a suitable replacement + method + +2007-01-24 23:18 tonvoon + + * ACKNOWLEDGEMENTS, CHANGES, NEWS, config.rpath, configure.in, + doc/developer-guidelines.sgml, gl/.cvsignore, + plugins/Makefile.am, plugins/check_procs.c, po/POTFILES.in: + Various cleanups in the syncing with gnulib + +2007-01-24 22:46 tonvoon + + * Makefile.am, NEWS, config.rpath, configure.in, + doc/developer-guidelines.sgml, gl/Makefile.am, gl/alloca.c, + gl/alloca_.h, gl/asnprintf.c, gl/asprintf.c, gl/basename.c, + gl/c-strtod.c, gl/c-strtod.h, gl/cloexec.c, gl/cloexec.h, + gl/creat-safer.c, gl/dirname.c, gl/dirname.h, gl/dup-safer.c, + gl/error.c, gl/error.h, gl/exit.h, gl/exitfail.c, gl/exitfail.h, + gl/fcntl--.h, gl/fcntl-safer.h, gl/fd-safer.c, gl/fsusage.c, + gl/fsusage.h, gl/full-read.c, gl/full-read.h, gl/full-write.c, + gl/full-write.h, gl/gai_strerror.c, gl/getaddrinfo.c, + gl/getaddrinfo.h, gl/gethostname.c, gl/getloadavg.c, gl/getopt.c, + gl/getopt1.c, gl/getopt_.h, gl/getopt_int.h, gl/gettext.h, + gl/inet_ntop.c, gl/inet_ntop.h, gl/intprops.h, gl/malloc.c, + gl/mbchar.c, gl/mbchar.h, gl/mbuiter.h, gl/memchr.c, gl/minmax.h, + gl/mountlist.c, gl/mountlist.h, gl/open-safer.c, gl/pipe-safer.c, + gl/printf-args.c, gl/printf-args.h, gl/printf-parse.c, + gl/printf-parse.h, gl/regcomp.c, gl/regex.c, gl/regex.h, + gl/regex_internal.c, gl/regex_internal.h, gl/regexec.c, + gl/safe-read.c, gl/safe-read.h, gl/safe-write.c, gl/safe-write.h, + gl/size_max.h, gl/snprintf.c, gl/snprintf.h, gl/socket_.h, + gl/stdbool_.h, gl/stdint_.h, gl/strcase.h, gl/strcasecmp.c, + gl/strdup.c, gl/strdup.h, gl/stripslash.c, gl/strncasecmp.c, + gl/strndup.c, gl/strndup.h, gl/strnlen.c, gl/strnlen.h, + gl/strnlen1.c, gl/strnlen1.h, gl/unistd--.h, gl/unistd-safer.h, + gl/unistd_.h, gl/vasnprintf.c, gl/vasnprintf.h, gl/vasprintf.c, + gl/vasprintf.h, gl/vsnprintf.c, gl/vsnprintf.h, gl/wchar_.h, + gl/wctype_.h, gl/wcwidth.h, gl/xalloc-die.c, gl/xalloc.h, + gl/xmalloc.c, gl/xsize.h, gl/xstrndup.c, gl/xstrndup.h, + gl/m4/absolute-header.m4, gl/m4/alloca.m4, gl/m4/arpa_inet_h.m4, + gl/m4/c-strtod.m4, gl/m4/cloexec.m4, gl/m4/codeset.m4, + gl/m4/dirname.m4, gl/m4/dos.m4, gl/m4/double-slash-root.m4, + gl/m4/eoverflow.m4, gl/m4/error.m4, gl/m4/exitfail.m4, + gl/m4/extensions.m4, gl/m4/fcntl-safer.m4, gl/m4/fstypename.m4, + gl/m4/fsusage.m4, gl/m4/getaddrinfo.m4, gl/m4/gethostname.m4, + gl/m4/getloadavg.m4, gl/m4/getopt.m4, gl/m4/gettext.m4, + gl/m4/glibc2.m4, gl/m4/glibc21.m4, gl/m4/gnulib-cache.m4, + gl/m4/gnulib-common.m4, gl/m4/gnulib-comp.m4, + gl/m4/gnulib-tool.m4, gl/m4/iconv.m4, gl/m4/inet_ntop.m4, + gl/m4/inline.m4, gl/m4/intdiv0.m4, gl/m4/intl.m4, + gl/m4/intldir.m4, gl/m4/intmax.m4, gl/m4/intmax_t.m4, + gl/m4/inttypes-pri.m4, gl/m4/inttypes_h.m4, gl/m4/lcmessage.m4, + gl/m4/lib-ld.m4, gl/m4/lib-link.m4, gl/m4/lib-prefix.m4, + gl/m4/lock.m4, gl/m4/longdouble.m4, gl/m4/longlong.m4, + gl/m4/ls-mntd-fs.m4, gl/m4/mbchar.m4, gl/m4/mbiter.m4, + gl/m4/mbrtowc.m4, gl/m4/memchr.m4, gl/m4/minmax.m4, + gl/m4/mountlist.m4, gl/m4/netinet_in_h.m4, gl/m4/nls.m4, + gl/m4/onceonly_2_57.m4, gl/m4/po.m4, gl/m4/printf-posix.m4, + gl/m4/progtest.m4, gl/m4/regex.m4, gl/m4/safe-read.m4, + gl/m4/safe-write.m4, gl/m4/size_max.m4, gl/m4/snprintf.m4, + gl/m4/socklen.m4, gl/m4/sockpfaf.m4, gl/m4/ssize_t.m4, + gl/m4/stdbool.m4, gl/m4/stdint.m4, gl/m4/stdint_h.m4, + gl/m4/strcase.m4, gl/m4/strdup.m4, gl/m4/strndup.m4, + gl/m4/strnlen.m4, gl/m4/sys_socket_h.m4, gl/m4/uintmax_t.m4, + gl/m4/ulonglong.m4, gl/m4/unistd-safer.m4, gl/m4/unistd_h.m4, + gl/m4/vasnprintf.m4, gl/m4/vasprintf.m4, gl/m4/visibility.m4, + gl/m4/vsnprintf.m4, gl/m4/wchar.m4, gl/m4/wchar_t.m4, + gl/m4/wctype.m4, gl/m4/wcwidth.m4, gl/m4/wint_t.m4, + gl/m4/xalloc.m4, gl/m4/xsize.m4, gl/m4/xstrndup.m4, + lib/Makefile.am, lib/alloca.c, lib/alloca_.h, lib/basename.c, + lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cloexec.c, + lib/cloexec.h, lib/creat-safer.c, lib/dirname.h, lib/dup-safer.c, + lib/error.c, lib/error.h, lib/exit.h, lib/exitfail.c, + lib/exitfail.h, lib/fcntl--.h, lib/fcntl-safer.h, lib/fd-safer.c, + lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h, + lib/full-write.c, lib/full-write.h, lib/getloadavg.c, + lib/getopt.c, lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, + lib/gettext.h, lib/intprops.h, lib/malloc.c, lib/mountlist.c, + lib/mountlist.h, lib/open-safer.c, lib/pipe-safer.c, + lib/realloc.c, lib/regcomp.c, lib/regex.c, lib/regex.h, + lib/regex_internal.c, lib/regex_internal.h, lib/regexec.c, + lib/safe-read.c, lib/safe-read.h, lib/safe-write.c, + lib/safe-write.h, lib/snprintf.c, lib/stdbool_.h, lib/strcase.h, + lib/strtod.c, lib/unistd--.h, lib/unistd-safer.h, + lib/unlocked-io.h, lib/xalloc-die.c, lib/xalloc.h, lib/xmalloc.c, + lib/xstrdup.c, lib/tests/Makefile.am, m4/Makefile.am.in, + m4/afs.m4, m4/alloca.m4, m4/basename.m4, m4/c-strtod.m4, + m4/codeset.m4, m4/dos.m4, m4/error.m4, m4/exitfail.m4, + m4/extensions.m4, m4/fcntl-safer.m4, m4/fstypename.m4, + m4/fsusage.m4, m4/getopt.m4, m4/gettext.m4, m4/glibc21.m4, + m4/iconv.m4, m4/inttypes-pri.m4, m4/inttypes.m4, + m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4, + m4/longdouble.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, + m4/mountlist.m4, m4/nls.m4, m4/np_coreutils.m4, m4/np_curl.m4, + m4/onceonly_2_57.m4, m4/po.m4, m4/progtest.m4, m4/regex.m4, + m4/restrict.m4, m4/signed.m4, m4/stdbool.m4, m4/stdint_h.m4, + m4/uintmax_t.m4, m4/ulonglong.m4, m4/unistd-safer.m4, + m4/unlocked-io.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xalloc.m4, + plugins/Makefile.am, plugins/check_smtp.c, plugins/common.h, + plugins/getaddrinfo.c, plugins/getaddrinfo.h, + plugins/gethostbyname.c, plugins/gethostbyname.h, + plugins/netutils.h, plugins-root/Makefile.am, tools/setup, + tools/update_coreutils: Sync with gnulib - lots of extraneous + code removed in preference to GNU code + +2007-01-23 18:34 hweiss + + * THANKS.in, plugins/check_ssh.c: Support `check_ssh + --hostname=ADDRESS' (but keep `--host=ADDRESS' for backward + compatibility) (Ville Mattila - 1642780) + +2007-01-23 18:20 hweiss + + * REQUIREMENTS: Location updates + +2007-01-23 17:20 hweiss + + * plugins/check_tcp.c: Add missing `break' to the switch-case block + that handles the `-m' option (Nobuhiro Ban - 1642682) + +2007-01-23 16:42 hweiss + + * THANKS.in, plugins/check_radius.c: Initialize `data' to zero, + fixes potential segfault (Nobuhiro Ban - 1642658) + +2007-01-23 14:39 hweiss + + * lib/mountlist.c: Add support for statvfs(2) which is needed in + order to compile the plugins on NetBSD 3.0 and newer. The + current coreutils release supports statvfs(2), so this patch + won't be needed anymore when updating the coreutils files. + +2007-01-22 04:05 hweiss + + * plugins/check_by_ssh.c: Added "-o,--ssh-option=OPTION" which + hands "-o OPTION" over to ssh(1) and "-q,--quiet" which tells + ssh(1) to suppress warnings (Gerhard Lausser - 1472491) + +2007-01-20 20:45 tonvoon + + * doc/developer-guidelines.sgml: Updated policy on contributed + plugins + +2007-01-20 20:06 tonvoon + + * doc/: LEAVERS, NEW_STARTERS, RELEASING: Administrative notes + +2007-01-20 10:59 seanius + + * plugins/check_ntp.c: compilation fixes for check_ntp.c: - + check_ntp.c:290: warning: overflow in implicit constant + conversion fixed with an explicit cast to int8_t. - + check_ntp.c:544: warning: pointer of type ‘void *’ used in + arithmetic fixed by casting to ptrdiff_t before arithmetic and + (void*) afterwards - in TVtoNTP64, cast arithmetic result passed + to R32 as uint64_t. + +2007-01-20 07:18 dermoth + + * plugins/: check_http.c, check_ldap.c: Fix bug #1632091: printf + format string typos. Add some more cosmetic changes. + +2007-01-20 06:27 dermoth + + * plugins-root/check_icmp.c: Fix bug #1632078: critical threshold % + incorrectly displayed by check_icmp + +2007-01-20 06:07 dermoth + + * CHANGES, THANKS.in, plugins/netutils.c: Fix bug #1632072 pointer + error in plugins/netutils.c. Add changelog entry for previous + commit. + +2007-01-17 05:28 dermoth + + * THANKS.in, plugins/check_procs.c: Fix bug #1630970 Fix for buffer + overflow of check_procs procprog string + +2007-01-08 11:05 tonvoon + + * CHANGES, THANKS.in, plugins/t/check_disk.t: Added notes about + check_disk perf data fix. Added test to check perf data is same + when mount points reversed + +2007-01-07 07:14 dermoth + + * plugins/check_disk.c: Fix bug #1627970: check_disk performance + output for more then one partition + +2007-01-06 06:41 dermoth + + * plugins/check_ping.c: Fix bug #1629008: check_ping fails to + handle Packet filtered error + +2007-01-06 06:33 dermoth + + * plugins/check_ping.c: Revert last patch: it works but not really + for the reason I though. + +2007-01-06 04:52 dermoth + + * plugins/check_ping.c: Fix the way check_ping calculate the + maximum run time + +2007-01-04 11:51 dermoth + + * plugins/check_real.c: Fix bug #1574863: check_real does not + accept the '-v' option + +2007-01-04 11:35 dermoth + + * plugins/check_ping.c: Fix bug #1592605: check_ping times out + +2007-01-04 11:18 dermoth + + * tools/: README, distclean: Adding my distclean script + +2006-12-23 18:59 dermoth + + * plugins/t/check_snmp.t: Regexps in check_snmp tests fails where + they shouldn't. + +2006-12-21 05:25 dermoth + + * NPTest.pm: - Fixing small error (wrong file name) in NPTest.pm + documentation. + +2006-12-20 22:33 tonvoon + + * CHANGES, THANKS.in, plugins/check_http.c, plugins/t/check_http.t: + Removed unused timestamp variable (Matthias Eble) Fixed + redirection test. Added extra tests for funny syntax when + checking certificates, updated help for more common syntax + +2006-12-20 19:25 tonvoon + + * lib/utils_disk.c, lib/utils_disk.h, plugins/check_disk.c, + plugins/t/check_disk.t: Fixed inode thresholds, regressed from + previous release + +2006-12-20 11:32 opensides + + * po/: de.po, fr.po, nagios-plugins.pot: + updated the nagios-pulgins.pot files now that localization is + clean first pass at updating the french locale + +2006-12-12 12:59 tonvoon + + * plugins-scripts/t/utils.t: Enhanced test for single letters in + fqdn + +2006-12-12 08:56 tonvoon + + * plugins-scripts/utils.pm.in: Allow single characters in fqdn + (Dave Alden) + +2006-12-07 22:38 tonvoon + + * CHANGES, THANKS.in, configure.in: Fixed HP/UX's swapinfo command + for check_procs (Dick van den Burg - 1573700) + +2006-12-07 16:07 tonvoon + + * THANKS.in, plugins/check_disk.c, plugins/check_swap.c, + plugins/common.h, plugins/netutils.h: Fix coredump on 64bit + Solaris. Also adds more error conditions and moves swap specific + includes out of common.h (Duncan Ferguson - 1588031) + +2006-12-06 20:34 tonvoon + + * plugins/Makefile.am: Move SSL libs to correct order per plugin + +2006-12-06 17:36 tonvoon + + * plugins/Makefile.am: Only include -lssl for plugins that require + it + +2006-12-06 17:00 tonvoon + + * configure.in: Flag common compile error because of no ar on + Solaris + +2006-12-06 15:58 tonvoon + + * Makefile.am: Remove CVS files from distribution + +2006-12-06 15:53 tonvoon + + * doc/developer-guidelines.sgml: Add libtool requirement for + development + +2006-11-09 11:44 tonvoon + + * CHANGES, THANKS.in, plugins/check_ping.c, plugins/netutils.c: + Reduced DNS lookups in check_ping and netutils.c in IPv6 + configurations (Pawel Malachowski) + +2006-11-03 15:40 tonvoon + + * lib/: Makefile.am, alloca.c, alloca_.h: Add alloca files, + required for *BSD + +2006-11-01 21:15 tonvoon + + * ChangeLog, configure.in, package.def: For 1.4.5 release + 2006-10-27 16:37 tonvoon * plugins-scripts/: utils.pm.in, t/utils.t: More edge testcases. diff --git a/FAQ b/FAQ index 370ac99..5ba948f 100644 --- a/FAQ +++ b/FAQ @@ -1,87 +1,93 @@ Frequently Asked Questions ************************** -1. Q: Where can I find documentation for plugin? +Q: Where can I find documentation for plugin? - A: All plugins that comply with minimal development guideline for - this project include internal documentation. The documentation - can be read executing plugin with the '-h' option ('--help' if - long options are enabled). If the '-h' option does not work, that - is a bug. +A: All plugins that comply with minimal development guideline for + this project include internal documentation. The documentation + can be read executing plugin with the -h or --help option. If + the '-h' option does not work, that is a bug. -2. Q: What version of plugin am I running? - A: All plugins that comply with minimal development guideline for - this project include detailed version information. When executed - with the '-V' option, a version string will be printed: +Q: What version of plugin am I running? - check_radius (nagios-plugins 1.3.0-alpha1) 1.11 +A: All plugins that comply with minimal development guideline for + this project include detailed version information. When executed + with the '-V' option, a version string will be printed: - Note that this string include both the assigned package release - name and the CVS-generated revision for the individual plugin. - Authors should strictly adhere to this format. All bug reports - and help requests should reference this information. + check_radius (nagios-plugins 1.3.0-alpha1) 1.11 -3. Q: What information do I need to include when asking for help or - submitting a bug report? + Note that this string include both the assigned package release + name and the CVS-generated revision for the individual plugin. + Authors should strictly adhere to this format. All bug reports + and help requests should reference this information. - A: At a minimum, the output from 'uname -a' and the version string - from ' -V' and, of course, a description of the - problem and any solution/patch. -4. Q: I'm using Redhat Linux (or some other RPM-based distribution). - Which packages should I install? +Q: What information do I need to include when asking for help or + submitting a bug report? - A: The package nagios-plugins-..rpm contains only - those plugins that should work on any POSIX compliant system. In - other words, you should be able to install this package on your - system, no matter what else is or in not installed. +A: At a minimum, the output from 'uname -a' and the version string + from ' -V' and, of course, a description of the + problem and any solution/patch. - However, most of us have more complex systems than barebones - POSIX. We tried creating a variety of separate packages so - each dependency could be installed cleanly, but many people - found that this resulted in too many packages. So in the end, - all the non-POSIX plugins were folded into one RPM - (nagios-plugins-..rpm). Most people will need to - use RPM's '--nodeps' option to install this package. -5. Q: My system uses the .deb package format. What packages should I - install? +Q: I'm using Redhat Linux (or some other RPM-based distribution). + Which packages should I install? - A: We strive for cooperation between all packagers and developers. - The answers for .deb are the same as for RPM, after changing the - package name suffixes accordingly. +A: The package nagios-plugins-..rpm contains only + those plugins that should work on any POSIX compliant system. In + other words, you should be able to install this package on your + system, no matter what else is or in not installed. -6. Q: I prefer to build my own RPMs. Do I need to install all of the - various dependencies? + However, most of us have more complex systems than barebones + POSIX. We tried creating a variety of separate packages so + each dependency could be installed cleanly, but many people + found that this resulted in too many packages. So in the end, + all the non-POSIX plugins were folded into one RPM + (nagios-plugins-..rpm). Most people will need to + use RPM's '--nodeps' option to install this package. - A: Beginning with the 1.2.9-1 release, you may run - rpm --define 'custom 1' -ta nagios-plugins-.tar.gz +Q: My system uses the .deb package format. What packages should I + install? - In prior releases, you must unpack the tarball and build the - RPM using nagios-custom.spec with 'rpm -ba'. +A: We strive for cooperation between all packagers and developers. + The answers for .deb are the same as for RPM, after changing the + package name suffixes accordingly. -7. Q: I get an error like - Warning: Return code of 127 for check of service 'PING' on host 'anyhost' was out of bounds. +Q: I prefer to build my own RPMs. Do I need to install all of the + various dependencies? - when I run Nagios. (Often check_ping runs just fine on the - command line). +A: Beginning with the 1.2.9-1 release, you may run - A: Commonly, system administrators will make security as tight as - possible on the monitoring system. Sometimes this includes OS - options or hardening scripts that prevent unprivileged users from - running the ping command. Nagios runs with no more privileges - than 'nobody' -- check to be sure that the nagios user can - actually run check ping. (This can also happen with other binaries - executed by nagios, but ping seems to be far and away the biggest - offender.) + rpm --define 'custom 1' -ta nagios-plugins-.tar.gz -8. Q: I have a plugin to offer. What do I do to get it accepted? + In prior releases, you must unpack the tarball and build the + RPM using nagios-custom.spec with 'rpm -ba'. - A: Send it to nagiosplug-devel@lists.sourceforge.net. Usually, we - just drop it into contrib until we have a chance to check if the - standard options are used, etc. - You can also get feedback on improving the plugin via the mailing list. +Q: I get an error like + + Warning: Return code of 127 for check of service 'PING' on host 'anyhost' was out of bounds. + + when I run Nagios. (Often check_ping runs just fine on the + command line). + +A: Commonly, system administrators will make security as tight as + possible on the monitoring system. Sometimes this includes OS + options or hardening scripts that prevent unprivileged users from + running the ping command. Nagios runs with no more privileges + than 'nobody' -- check to be sure that the nagios user can + actually run check ping. (This can also happen with other binaries + executed by nagios, but ping seems to be far and away the biggest + offender.) + + +Q: I have a plugin to offer. What can I do? + +A: You can make it available on NagiosExchange (http://nagiosexchange.org) + where other people can find it for use. + + You can also get feedback on improving the plugin via the + nagiosplug-devel@lists.sourceforge.net mailing list. diff --git a/INSTALL b/INSTALL index 095b1eb..23e5f25 100644 --- a/INSTALL +++ b/INSTALL @@ -1,7 +1,7 @@ Installation Instructions ************************* -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004 Free +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives @@ -102,16 +102,16 @@ for another architecture. Installation Names ================== -By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PREFIX'. +By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PREFIX', the package will -use PREFIX as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular @@ -159,7 +159,7 @@ where SYSTEM can have one of these forms: need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should -use the `--target=TYPE' option to select the type of system they will +use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a @@ -189,8 +189,13 @@ them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc -will cause the specified gcc to be used as the C compiler (unless it is -overridden in the site shell script). +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). Here is a another example: + + /bin/bash ./configure CONFIG_SHELL=/bin/bash + +Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent +configuration-related scripts to be executed by `/bin/bash'. `configure' Invocation ====================== diff --git a/Makefile.am b/Makefile.am index a45758a..b76bf76 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,21 +1,22 @@ ## Process this file with automake to produce Makefile.in -SUBDIRS = lib plugins plugins-scripts plugins-root m4 po +SUBDIRS = gl lib plugins plugins-scripts plugins-root po EXTRA_DIST = config.rpath \ - ABOUT-NLS ACKNOWLEDGEMENTS AUTHORS BUGS CHANGES CODING FAQ LEGAL \ + ABOUT-NLS ACKNOWLEDGEMENTS AUTHORS BUGS CODING FAQ LEGAL NEWS \ REQUIREMENTS SUPPORT THANKS \ NPTest.pm contrib pkg nagios-plugins.spec \ config_test/Makefile config_test/run_tests config_test/child_test.c \ tools/tinderbox_build -ACLOCAL_AMFLAGS = -I m4 +ACLOCAL_AMFLAGS = -I gl/m4 -I m4 localedir = $(datadir)/locale DEFS = -DLOCALEDIR=\"$(localedir)\" dist-hook: make THANKS nagios-plugins.spec pkg/fedora/nagios-plugins.spec + rm -rf `find $(distdir) -name CVS` install-root: cd plugins-root && $(MAKE) $@ diff --git a/Makefile.in b/Makefile.in index 03b2030..6a72ca8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.4 from Makefile.am. +# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# 2003, 2004, 2005 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. @@ -39,34 +39,72 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/config.h.in $(srcdir)/test.pl.in \ $(top_srcdir)/configure $(top_srcdir)/pkg/solaris/pkginfo.in \ ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS THANKS \ - compile config.guess config.rpath config.sub depcomp \ - install-sh ltmain.sh missing mkinstalldirs + 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 \ + config.rpath mkinstalldirs subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/afs.m4 \ - $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/basename.m4 \ - $(top_srcdir)/m4/c-strtod.m4 $(top_srcdir)/m4/codeset.m4 \ - $(top_srcdir)/m4/dos.m4 $(top_srcdir)/m4/exitfail.m4 \ - $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fcntl-safer.m4 \ - $(top_srcdir)/m4/fstypename.m4 $(top_srcdir)/m4/fsusage.m4 \ - $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/inttypes_h.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/ls-mntd-fs.m4 \ - $(top_srcdir)/m4/mountlist.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/np_coreutils.m4 $(top_srcdir)/m4/np_curl.m4 \ - $(top_srcdir)/m4/onceonly_2_57.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/regex.m4 \ - $(top_srcdir)/m4/restrict.m4 $(top_srcdir)/m4/stdbool.m4 \ - $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \ - $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/unistd-safer.m4 \ - $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/xalloc.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in +am__aclocal_m4_deps = $(top_srcdir)/m4/np_mysqlclient.m4 \ + $(top_srcdir)/gl/m4/absolute-header.m4 \ + $(top_srcdir)/gl/m4/alloca.m4 \ + $(top_srcdir)/gl/m4/arpa_inet_h.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/double-slash-root.m4 \ + $(top_srcdir)/gl/m4/eoverflow.m4 $(top_srcdir)/gl/m4/error.m4 \ + $(top_srcdir)/gl/m4/exitfail.m4 \ + $(top_srcdir)/gl/m4/extensions.m4 \ + $(top_srcdir)/gl/m4/fcntl-safer.m4 \ + $(top_srcdir)/gl/m4/fstypename.m4 \ + $(top_srcdir)/gl/m4/fsusage.m4 \ + $(top_srcdir)/gl/m4/getaddrinfo.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 \ + $(top_srcdir)/gl/m4/gnulib-common.m4 \ + $(top_srcdir)/gl/m4/gnulib-comp.m4 \ + $(top_srcdir)/gl/m4/iconv.m4 $(top_srcdir)/gl/m4/inet_ntop.m4 \ + $(top_srcdir)/gl/m4/inline.m4 $(top_srcdir)/gl/m4/intmax_t.m4 \ + $(top_srcdir)/gl/m4/inttypes_h.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/lock.m4 \ + $(top_srcdir)/gl/m4/longdouble.m4 \ + $(top_srcdir)/gl/m4/longlong.m4 \ + $(top_srcdir)/gl/m4/ls-mntd-fs.m4 \ + $(top_srcdir)/gl/m4/mbchar.m4 $(top_srcdir)/gl/m4/mbiter.m4 \ + $(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/memchr.m4 \ + $(top_srcdir)/gl/m4/minmax.m4 $(top_srcdir)/gl/m4/mountlist.m4 \ + $(top_srcdir)/gl/m4/netinet_in_h.m4 $(top_srcdir)/gl/m4/nls.m4 \ + $(top_srcdir)/gl/m4/onceonly_2_57.m4 $(top_srcdir)/gl/m4/po.m4 \ + $(top_srcdir)/gl/m4/progtest.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/size_max.m4 \ + $(top_srcdir)/gl/m4/snprintf.m4 $(top_srcdir)/gl/m4/socklen.m4 \ + $(top_srcdir)/gl/m4/sockpfaf.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \ + $(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stdint.m4 \ + $(top_srcdir)/gl/m4/stdint_h.m4 $(top_srcdir)/gl/m4/strcase.m4 \ + $(top_srcdir)/gl/m4/strdup.m4 $(top_srcdir)/gl/m4/strndup.m4 \ + $(top_srcdir)/gl/m4/strnlen.m4 \ + $(top_srcdir)/gl/m4/sys_socket_h.m4 \ + $(top_srcdir)/gl/m4/ulonglong.m4 \ + $(top_srcdir)/gl/m4/unistd-safer.m4 \ + $(top_srcdir)/gl/m4/unistd_h.m4 \ + $(top_srcdir)/gl/m4/vasnprintf.m4 \ + $(top_srcdir)/gl/m4/vasprintf.m4 \ + $(top_srcdir)/gl/m4/vsnprintf.m4 $(top_srcdir)/gl/m4/wchar.m4 \ + $(top_srcdir)/gl/m4/wchar_t.m4 $(top_srcdir)/gl/m4/wctype.m4 \ + $(top_srcdir)/gl/m4/wcwidth.m4 $(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 configure.status.lineno -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = command.cfg test.pl pkg/solaris/pkginfo SOURCES = @@ -92,6 +130,10 @@ GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print INSTALL = @INSTALL@ +ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@ +ABSOLUTE_UNISTD_H = @ABSOLUTE_UNISTD_H@ +ABSOLUTE_WCHAR_H = @ABSOLUTE_WCHAR_H@ +ABSOLUTE_WCTYPE_H = @ABSOLUTE_WCTYPE_H@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ @@ -99,11 +141,17 @@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ +ARPA_INET_H = @ARPA_INET_H@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ +BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ +BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ +BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ +BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ +BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -122,6 +170,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +EOVERFLOW = @EOVERFLOW@ EXEEXT = @EXEEXT@ EXTRAS = @EXTRAS@ EXTRAS_ROOT = @EXTRAS_ROOT@ @@ -131,7 +180,22 @@ F77 = @F77@ FFLAGS = @FFLAGS@ GETLOADAVG_LIBS = @GETLOADAVG_LIBS@ GETOPT_H = @GETOPT_H@ +GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@ +GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@ GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ +HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ +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_STDINT_H = @HAVE_STDINT_H@ +HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ +HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ +HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ +HAVE_WINT_T = @HAVE_WINT_T@ HAVE__BOOL = @HAVE__BOOL@ HOSTNAME = @HOSTNAME@ INSTALL_DATA = @INSTALL_DATA@ @@ -146,6 +210,8 @@ LDAPINCLUDE = @LDAPINCLUDE@ LDAPLIBS = @LDAPLIBS@ LDFLAGS = @LDFLAGS@ LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ +LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ @@ -157,15 +223,15 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MATHLIBS = @MATHLIBS@ -MKINSTALLDIRS = @MKINSTALLDIRS@ +MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ MYSQLCFLAGS = @MYSQLCFLAGS@ -MYSQLCONFIG = @MYSQLCONFIG@ MYSQLINCLUDE = @MYSQLINCLUDE@ MYSQLLIBS = @MYSQLLIBS@ NEED_SETGID = @NEED_SETGID@ -NEED_VA_LIST = @NEED_VA_LIST@ +NETINET_IN_H = @NETINET_IN_H@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -203,6 +269,7 @@ PKG_ARCH = @PKG_ARCH@ PLUGIN_TEST = @PLUGIN_TEST@ POSUB = @POSUB@ POW_LIB = @POW_LIB@ +PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RADIUSLIBS = @RADIUSLIBS@ RANLIB = @RANLIB@ @@ -213,16 +280,26 @@ SCRIPT_TEST = @SCRIPT_TEST@ SET_MAKE = @SET_MAKE@ SH = @SH@ SHELL = @SHELL@ +SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ +SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SOCKETLIBS = @SOCKETLIBS@ SSLINCLUDE = @SSLINCLUDE@ SSLLIBS = @SSLLIBS@ STDBOOL_H = @STDBOOL_H@ +STDINT_H = @STDINT_H@ STRIP = @STRIP@ SUPPORT = @SUPPORT@ +SYS_SOCKET_H = @SYS_SOCKET_H@ +UNISTD_H = @UNISTD_H@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARRANTY = @WARRANTY@ +WCHAR_H = @WCHAR_H@ +WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WCTYPE_H = @WCTYPE_H@ +WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ @@ -247,6 +324,8 @@ build_vendor = @build_vendor@ check_tcp_ssl = @check_tcp_ssl@ datadir = @datadir@ exec_prefix = @exec_prefix@ +gl_LIBOBJS = @gl_LIBOBJS@ +gl_LTLIBOBJS = @gl_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -257,9 +336,11 @@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = $(datadir)/locale localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +np_mysql_config = @np_mysql_config@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ @@ -268,16 +349,15 @@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ with_trusted_path = @with_trusted_path@ -SUBDIRS = lib plugins plugins-scripts plugins-root m4 po +SUBDIRS = gl lib plugins plugins-scripts plugins-root po EXTRA_DIST = config.rpath \ - ABOUT-NLS ACKNOWLEDGEMENTS AUTHORS BUGS CHANGES CODING FAQ LEGAL \ + ABOUT-NLS ACKNOWLEDGEMENTS AUTHORS BUGS CODING FAQ LEGAL NEWS \ REQUIREMENTS SUPPORT THANKS \ NPTest.pm contrib pkg nagios-plugins.spec \ config_test/Makefile config_test/run_tests config_test/child_test.c \ tools/tinderbox_build -ACLOCAL_AMFLAGS = -I m4 -localedir = $(datadir)/locale +ACLOCAL_AMFLAGS = -I gl/m4 -I m4 # Solaris pkgmk BUILDDIR = build-solaris @@ -361,7 +441,13 @@ uninstall-info-am: # (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): - @set fnord $$MAKEFLAGS; amf=$$2; \ + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ @@ -373,7 +459,7 @@ $(RECURSIVE_TARGETS): local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ @@ -381,7 +467,13 @@ $(RECURSIVE_TARGETS): mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: - @set fnord $$MAKEFLAGS; amf=$$2; \ + @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)' ;; \ @@ -402,7 +494,7 @@ maintainer-clean-recursive: local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ @@ -477,7 +569,7 @@ distclean-tags: distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) - $(mkdir_p) $(distdir)/. $(distdir)/config_test $(distdir)/m4 $(distdir)/pkg/solaris $(distdir)/plugins-scripts $(distdir)/po $(distdir)/tools + $(mkdir_p) $(distdir)/. $(distdir)/build-aux $(distdir)/config_test $(distdir)/gl/m4 $(distdir)/m4 $(distdir)/pkg/solaris $(distdir)/plugins-scripts $(distdir)/po $(distdir)/tools @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ @@ -718,6 +810,7 @@ uninstall-info: uninstall-info-recursive dist-hook: make THANKS nagios-plugins.spec pkg/fedora/nagios-plugins.spec + rm -rf `find $(distdir) -name CVS` install-root: cd plugins-root && $(MAKE) $@ diff --git a/NEWS b/NEWS index 1c3c54c..ed94cd3 100644 --- a/NEWS +++ b/NEWS @@ -1,2 +1,73 @@ -New in 1.2.9: -* Added support for multiplatform builds +This file documents the major additions and syntax changes between releases. + +1.4.8 11th April 2007 + Respects --without-world-permissions for setuid plugins + check_disk extra options for regex matching of filesystems and grouping of filesystems + for collective thresholds + Better configure test for mysqlclient availability + Various check_ntp fixes + +1.4.7 29th March 2007 + check_procs uses /usr/ucb/ps if available - fixes pst3 problems on Solaris + Fixed MKINSTALLDIRS problem in po/ + ./configure now detects if possible to compile check_mysql + Fixed broken HELO in check_smtp + check_icmp now allows to set a minimum number of hosts required for successs (-m) + check_icmp fix for *BSD when running for long time + check_ping times out 1 second quicker if host is unreachable + Root plugins installed with world executable + check_sybase from contrib now maintained in NagiosExchange + --with-nagios-user/group reinstated ./configure option + New --without-world-permissions ./configure option + +1.4.6 5th February 2007 + Reduced number of DNS lookups in check_ping and netutils.c for IPv6 configurations + Fixed compile problems with *BSD re: alloca.h + Fixed Solaris problems with check_swap (tested on Solaris 9) + Fixed check_swap for HP/UX where swapinfo command was incorrect + Fixed check_disk inode threshold checks, regressed at r1.4.4. + Fixed crit/warn for check_disk perf data + Fixed buffer overflow in check_procs + Fixed error handling for UNIX sockets in netutils.c + New -q and -o options for check_by_ssh which are handed over to ssh(1) as is + Synced with latest GNUlib + Fixed check_jabber always returns warning + +1.4.5 + Fixed bug in perl's is_hostname routine + +1.4.4 + New C based check_ntp. The perl version is now deprecated. + New check_apt plugin + Notice: plugins in contrib/ will start to be removed from this distribution. + Please check at http://www.nagiosexchange.org for contributed plugins + Major bug fixes to check_disk where values were incorrectly calculated and alerted on. + check_udp2 removed. check_udp is now linked to check_tcp.c + check_mailq now errors if the sub-program run returns non-zero return code. This would appear + as if mailqs were okay when the nagios user could not query the mail-queues + Compile problems with check_snmp fixed + +1.4.3 + Setuid plugins (check_dhcp, check_icmp) separated into plugins-root/. Run make install as root to install + SSL plugins work with gnutls as well as OpenSSL + check_mysql_query added to run arbitrary SQL commands, with threshold checking + libtool now required for development systems + Notice: check_udp (compiled from check_udp.c) will be deprecated in the next release. + check_udp2 should be used instead and will be renamed to check_udp + +1.4.2 + Fix for Redhat ES4 for check_dns and check_dig + +1.4 + IPv6 support in check_ping, check_by_ssh, check_http, check_ldap, check_smtp, check_tcp + Internationalisation support + Performance data added to most plugins + check_disk now using GNU coreutils code + New plugins - check_dhcp, check_icmp + contrib/check_citrix has been replaced by contrib/check_ica* (requires packet_utils.pm in libexec) + check_http --min changed to --pagesize, added max so min:max in check + check_vsz and check_rss deprecated - functionality moved into check_procs + check_swap % thresholds changed to measure amount free, instead of amount used + check_disk syntax changes for -p, -m/-M, defaults to MB instead of kB + check_procs -C expects no path for the command name + diff --git a/NPTest.pm b/NPTest.pm index e2296af..c3dacea 100644 --- a/NPTest.pm +++ b/NPTest.pm @@ -21,7 +21,7 @@ use Data::Dumper; use Test; use vars qw($VERSION); -$VERSION = do { my @r = (q$Revision: 1.13 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; # must be all one line, for MakeMaker +$VERSION = do { my @r = (q$Revision: 1.14 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; # must be all one line, for MakeMaker =head1 NAME @@ -57,10 +57,10 @@ If a parameter needs to be entered and the test is run without a tty attached (such as a cronjob), the parameter will be assigned as if it was "none". Tests can check for the parameter and skip if not set. -Responses are stored in an external, file-based -cache so subsequent test runs will use these values. The user is able -to change the values by amending the values in the file /var/tmp/NPTest.pm, -or by setting the appropriate environment variable before running the test. +Responses are stored in an external, file-based cache so subsequent test +runs will use these values. The user is able to change the values by +amending the values in the file /var/tmp/NPTest.cache, or by setting +the appropriate environment variable before running the test. The option exists to store parameters in a scoped means, allowing a test harness to a localise a parameter should the need arise. This diff --git a/README b/README index 208cd19..b06d5b5 100644 --- a/README +++ b/README @@ -5,7 +5,7 @@ Nagios Plugins README see below. In addition, generic instructions for the GNU toolchain can be found in the INSTALL file. -* For major changes between releases, read the CHANGES file. +* For major changes between releases, read the NEWS file. * For information on detailed changes that have been made or plugins that have been added, read the Changelog file. @@ -60,15 +60,11 @@ Nagios Plugins Quick-and-Dirty Installation Instructions 1) Run the configure script to initialize variables and create a Makefile, etc. - ./configure --prefix=BASEDIRECTORY --with-nagios-user=SOMEUSER --with-nagios-group=SOMEGROUP --with-cgiurl=SOMEURL + ./configure --prefix=BASEDIRECTORY --with-cgiurl=SOMEURL a) Replace BASEDIRECTORY with the path of the directory under which Nagios is installed (default is '/usr/local/nagios') - b) Replace SOMEUSER with the name of a user on your system that will be - assigned permissions to the installed plugins (default is 'nagios') - c) Replace SOMEGRP with the name of a group on your system that will be - assigned permissions to the installed plugins (default is 'nagios') - d) Replace CGIURL with the path used to access the Nagios CGIs with + b) Replace CGIURL with the path used to access the Nagios CGIs with a web browser (default is '/nagios/cgi-bin') diff --git a/REQUIREMENTS b/REQUIREMENTS index bcc6433..ebc495b 100644 --- a/REQUIREMENTS +++ b/REQUIREMENTS @@ -10,32 +10,29 @@ below... check_fping: - Requires the fping utility distributed with SATAN. Either download and install SATAN or grab the fping program from - http://www.fping.com - http://www.stanford.edu/~schemers/docs/fping/fping.html - ftp://ftp.redhat.com/pub/contrib/libc6/SRPMS/fping-2.2b1-1.src.rpm - ftp://ftp.redhat.com/pub/contrib/libc6/RPMS/fping-2.2b1-1.i386.rpm + http://www.fping.com/ + RPM: http://rpmfind.net/linux/rpm2html/search.php?query=fping Note that the fping command must be setuid root to function. check_game: - Requires the qstat utility available from - http://www.qstat.org - http://www.activesw.com/people/steve/qstat.html + http://sourceforge.net/projects/qstat/ Last tested on qstat 2.3d BETA check_hpjd: - - Requires the NET-SNMP package available from - http://net-snmp.sourceforge.net + - Requires the NET-SNMP package available from + http://net-snmp.sourceforge.net/ The snmpget binary is all that is required. check_ldap: - Requires the LDAP libraries available from - http://www.openldap.org + http://www.openldap.org/ Lib: libldap, liblber Redhat Source: openldap-1.2.9-6.i386.rpm, openldap-devel-1.2.9-6.i386.rpm check_mysql, check_mysql_query: - Requires the MySQL libraries available from - http://www.mysql.org + http://www.mysql.org/ 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 @@ -43,37 +40,37 @@ check_mysql, check_mysql_query: check_pqsql: - Requires the PostgreSQL libraries available from - http://www.postgresql.org + http://www.postgresql.org/ check_radius: - - Requires the radiusclient library available from - http://www.cityline.net/~lf/radius/ - RPM (rpmfind): radiusclient-0.3.1-1, radiusclient-devel-0.3.1-1 + - Requires the radiusclient library available from + ftp://ftp.cityline.net/pub/radiusclient/ + RPM (rpmfind): radiusclient 0.3.2, radiusclient-devel-0.3.2 check_snmp: - - Requires the NET-SNMP package available from - http://net-snmp.sourceforge.net + - Requires the NET-SNMP package available from + http://net-snmp.sourceforge.net/ check_ifstatus/check_ifoperstatus - Requires Net::SNMP perl module - http://www.perl.com/CPAN/modules/by-authors/id/D/DT/DTOWN/ + http://www.perl.com/CPAN/modules/by-authors/id/D/DT/DTOWN/ check_nwstat: - Requires MRTGEXT NLM for Novell Servers - http://www.engr.wisc.edu/~drews/mrtg/ + http://forge.novell.com/modules/xfmod/project/?mrtgext check_nt: - Requires NSClient to run on the NT server to monitor http://nsclient.ready2run.nl/ check_ups: - - Requires Network UPS Tools (>= 1.4) to run on the server to monitor - http://www.networkupstools.org/ + - Requires Network UPS Tools (>= 1.4) to run on the server to monitor + http://www.networkupstools.org/ OS Specific Issues ------------------ HP-UX 11.11 -You need to use the version of gcc provided by HP at version 3.3.3. +You need to use the version of gcc provided by HP at version 3.3.3. Also, you need GNU make 3.8 diff --git a/THANKS b/THANKS index 0fe3e3e..68c1149 100644 --- a/THANKS +++ b/THANKS @@ -18,9 +18,11 @@ Daniel Austin Markus Baertschi Bradley Baetz Michael Bakker +Nobuhiro Ban Jeremy Baumgartner Andreas Behal Lutz Behnke +Marlo Bell Simon Bellwood Allan Bennett Guy Van Den Bergh @@ -30,6 +32,7 @@ Tom De Blende Eric Bollengier Richard Brodie Matthew Brown +Dick van den Burg Jason Burnett Carlos Canau Jim Carroll @@ -53,6 +56,7 @@ Paul Dlug Andy Doran Rainer Duffner Ian Duggan +Matthias Eble Edwin Eefting Mike Emigh Hans Engelen @@ -64,10 +68,13 @@ Merijn Evertse Karl Ewald Paul Farrall Reuben Farrelly +Mark Favas +Duncan Ferguson Paulo Fessel Paulo Afonso Graner Fessel James Fidell Johan Fischer +Felix Frank Rick Frey Matt Garrett Robby Giffin @@ -77,6 +84,7 @@ Aravind Gottipati Kev Green Steve Greenland Olaf Greis +Chris Grim Steven Grimm Jon Hallett Steve Hanselman @@ -85,6 +93,7 @@ Gunnar Hellekson Johannes Herlitz Ian Holsman Peter Hoogendijk +Jason Hoos Chester Hosey Bob Ingraham Cire Iriarte @@ -108,6 +117,7 @@ Pedro Leite Larry Low Jacob Lundqvist Guenther Mair +Pawel Malachowski Michael Markstaller John Marquart Ernst-Dieter Martin @@ -115,9 +125,11 @@ Jason Martin Christopher Maser Mathieu Masseboeuf Alexander Matey +Ville Mattila Richard Mayhew Patrick McCormick Mike McHenry +Stefan Meier Jan-Piet Mens Sven Meyer Christian Mies @@ -166,6 +178,8 @@ Thomas Schimpke Benjamin Schmid Henning Schmiedehausen Cove Schneider +Enrico Scholz +Sebastian Schubert Russell Scibetti Noel Sebastien Lonny Selinger @@ -174,6 +188,7 @@ Tom Shields Sean Shore Antony Simmonds John Sivak +Lars Stavholm Nikolay Sturm David Sullivan Kjell Sundtjonn diff --git a/aclocal.m4 b/aclocal.m4 index 380e027..8edca65 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.9.4 -*- Autoconf -*- +# generated automatically by aclocal 1.9.6 -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 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. @@ -13,7 +13,7 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# serial 47 AC_PROG_LIBTOOL +# serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) @@ -123,7 +123,7 @@ esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. -Xsed='sed -e s/^X//' +Xsed='sed -e 1s/^X//' [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. @@ -143,7 +143,7 @@ rm="rm -f" default_ofile=libtool can_build_shared=yes -# All known linkers require a `.a' archive for static linking (except M$VC, +# All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" @@ -163,6 +163,7 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" @@ -182,16 +183,16 @@ old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) - old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) - old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi -cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` +_LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it case $deplibs_check_method in @@ -233,11 +234,56 @@ AC_DEFUN([_LT_AC_SYS_COMPILER], # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_AC_SYS_COMPILER +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +AC_DEFUN([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +AC_DEFUN([_LT_COMPILER_BOILERPLATE], +[ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +AC_DEFUN([_LT_LINKER_BOILERPLATE], +[ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* +])# _LT_LINKER_BOILERPLATE + + # _LT_AC_SYS_LIBPATH_AIX # ---------------------- # Links a minimal program and checks the executable @@ -317,8 +363,8 @@ if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string="`eval $cmd`") 2>/dev/null && - echo_test_string="`eval $cmd`" && + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break @@ -487,7 +533,7 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case "`/usr/bin/file conftest.o`" in + case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*linux*) @@ -538,6 +584,22 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) CFLAGS="$SAVE_CFLAGS" fi ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) @@ -569,7 +631,7 @@ AC_CACHE_CHECK([$1], [$2], # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -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:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) @@ -579,8 +641,10 @@ AC_CACHE_CHECK([$1], [$2], echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 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 - if test ! -s conftest.err; then + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi @@ -606,11 +670,16 @@ AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], LDFLAGS="$LDFLAGS $3" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The compiler can only warn and ignore the option if not recognized + # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi else $2=yes fi @@ -669,20 +738,50 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=8192; ;; - netbsd* | freebsd* | openbsd* | darwin* ) + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else - lt_cv_sys_max_cmd_len=65536 # usable default for *BSD + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; - *) + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. @@ -713,7 +812,7 @@ fi # _LT_AC_CHECK_DLFCN -# -------------------- +# ------------------ AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl ])# _LT_AC_CHECK_DLFCN @@ -721,7 +820,7 @@ AC_DEFUN([_LT_AC_CHECK_DLFCN], # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ------------------------------------------------------------------ +# --------------------------------------------------------------------- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "$cross_compiling" = yes; then : @@ -787,17 +886,19 @@ int main () else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } + else + puts (dlerror ()); exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; - x$lt_unknown|x*) $3 ;; + x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed @@ -809,7 +910,7 @@ rm -fr conftest* # AC_LIBTOOL_DLOPEN_SELF -# ------------------- +# ---------------------- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then @@ -880,7 +981,7 @@ else test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" - eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" @@ -893,7 +994,7 @@ else ]) if test "x$lt_cv_dlopen_self" = xyes; then - LDFLAGS="$LDFLAGS $link_static_flag" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( @@ -941,7 +1042,7 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -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:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) @@ -953,11 +1054,13 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - if test ! -s out/conftest.err; then + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi - chmod u+w . + chmod u+w . 2>&AS_MESSAGE_LOG_FD $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation @@ -1217,7 +1320,8 @@ cygwin* | mingw* | pw32*) dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' @@ -1247,7 +1351,7 @@ cygwin* | mingw* | pw32*) ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; @@ -1270,7 +1374,7 @@ darwin* | rhapsody*) soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -1293,20 +1397,17 @@ freebsd1*) dynamic_linker=no ;; -kfreebsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - -freebsd*) - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) @@ -1324,14 +1425,19 @@ freebsd*) freebsd2*) shlibpath_overrides_runpath=yes ;; - freebsd3.[01]* | freebsdelf3.[01]*) + freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; - *) # from 3.2 on + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; esac ;; @@ -1351,7 +1457,7 @@ hpux9* | hpux10* | hpux11*) version_type=sunos need_lib_prefix=no need_version=no - case "$host_cpu" in + case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes @@ -1391,6 +1497,18 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; @@ -1434,7 +1552,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be Linux ELF. -linux*) +linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -1450,7 +1568,7 @@ linux*) # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -1463,7 +1581,7 @@ linux*) dynamic_linker='GNU/Linux ld.so' ;; -knetbsd*-gnu) +netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -1472,7 +1590,7 @@ knetbsd*-gnu) shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes - dynamic_linker='GNU ld.so' + dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) @@ -1512,8 +1630,13 @@ nto-qnx*) openbsd*) version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no - need_version=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH @@ -1551,13 +1674,6 @@ osf3* | osf4* | osf5*) sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - ;; - solaris*) version_type=linux need_lib_prefix=no @@ -1583,7 +1699,7 @@ sunos4*) need_version=yes ;; -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) +sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -1616,6 +1732,29 @@ sysv4*MP*) fi ;; +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -1629,6 +1768,11 @@ uts4*) esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER @@ -1653,6 +1797,9 @@ if test -f "$ltmain" && test -n "$tagnames"; then AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) fi fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. @@ -1680,7 +1827,7 @@ if test -f "$ltmain" && test -n "$tagnames"; then case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_LIBTOOL_LANG_CXX_CONFIG else @@ -1743,7 +1890,7 @@ AC_DEFUN([AC_LIBTOOL_DLOPEN], # AC_LIBTOOL_WIN32_DLL # -------------------- -# declare package support for building win32 dll's +# declare package support for building win32 DLLs AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_WIN32_DLL @@ -1781,7 +1928,7 @@ AC_ARG_ENABLE([shared], # AC_DISABLE_SHARED # ----------------- -#- set the default shared flag to --disable-shared +# set the default shared flag to --disable-shared AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no) @@ -1917,7 +2064,7 @@ dnl not every word. This closes a longstanding sh security hole. if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) - file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then @@ -2027,7 +2174,7 @@ AC_CACHE_VAL(lt_cv_path_LD, if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_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 `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; @@ -2173,7 +2320,7 @@ gnu*) hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file - case "$host_cpu" in + case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so @@ -2189,6 +2336,11 @@ hpux10.20* | hpux11*) esac ;; +interix3*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; @@ -2200,11 +2352,11 @@ irix5* | irix6* | nonstopux*) ;; # This must be Linux ELF. -linux*) +linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; -netbsd*) +netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else @@ -2234,15 +2386,11 @@ osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; -sco3.2v5*) - lt_cv_deplibs_check_method=pass_all - ;; - solaris*) lt_cv_deplibs_check_method=pass_all ;; -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) +sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' @@ -2263,10 +2411,13 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) siemens) lt_cv_deplibs_check_method=pass_all ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; esac ;; -sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*) +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac @@ -2286,36 +2437,43 @@ AC_DEFUN([AC_PROG_NM], # Let the user override the test. lt_cv_path_NM="$NM" else - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/${ac_tool_prefix}nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" break ;; *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac ;; esac - esac - fi + fi + done + IFS="$lt_save_ifs" done - IFS="$lt_save_ifs" test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" @@ -2347,13 +2505,13 @@ esac # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl convenience library and # LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL -# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If -# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will -# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with -# '${top_srcdir}/' (note the single quotes!). If your package is not -# flat and you're not using automake, define top_builddir and -# top_srcdir appropriately in the Makefiles. +# --enable-ltdl-convenience to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# it is assumed to be `libltdl'. LIBLTDL will be prefixed with +# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' +# (note the single quotes!). If your package is not flat and you're not +# using automake, define top_builddir and top_srcdir appropriately in +# the Makefiles. AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in @@ -2372,13 +2530,13 @@ AC_DEFUN([AC_LIBLTDL_CONVENIENCE], # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl installable library and # LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-install to the configure arguments. Note that LIBLTDL -# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If -# DIRECTORY is not provided and an installed libltdl is not found, it is -# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/' -# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single -# quotes!). If your package is not flat and you're not using automake, -# define top_builddir and top_srcdir appropriately in the Makefiles. +# --enable-ltdl-install to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# and an installed libltdl is not found, it is assumed to be `libltdl'. +# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with +# '${top_srcdir}/' (note the single quotes!). If your package is not +# flat and you're not using automake, define top_builddir and top_srcdir +# appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl @@ -2421,12 +2579,12 @@ _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ])# _LT_AC_LANG_CXX # _LT_AC_PROG_CXXCPP -# --------------- +# ------------------ AC_DEFUN([_LT_AC_PROG_CXXCPP], [ AC_REQUIRE([AC_PROG_CXX]) if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP fi @@ -2470,7 +2628,7 @@ _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) # AC_LIBTOOL_RC -# -------------- +# ------------- # enable support for Windows resource files AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) @@ -2503,36 +2661,9 @@ lt_simple_link_test_code='int main(){return(0);}\n' _LT_AC_SYS_COMPILER -# -# Check for any special shared library compilation flags. -# -_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= -if test "$GCC" = no; then - case $host_os in - sco3.2v5*) - _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' - ;; - esac -fi -if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then - AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) - if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then : - else - AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) - _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no - fi -fi - - -# -# Check to make sure the static flag actually works. -# -AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], - _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), - $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), - [], - [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) - +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) @@ -2542,9 +2673,9 @@ AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP -AC_LIBTOOL_DLOPEN_SELF($1) +AC_LIBTOOL_DLOPEN_SELF -# Report which librarie types wil actually be built +# Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) @@ -2553,7 +2684,7 @@ test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. -case "$host_os" in +case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then @@ -2603,6 +2734,7 @@ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no +_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= @@ -2620,7 +2752,7 @@ _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= # Source file extension for C++ test sources. -ac_ext=cc +ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o @@ -2630,11 +2762,15 @@ _LT_AC_TAGVAR(objext, $1)=$objext lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' +lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD @@ -2645,18 +2781,18 @@ lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else - unset lt_cv_prog_gnu_ld + $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else - unset lt_cv_path_LD + $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC -cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` +_LT_CC_BASENAME([$compiler]) # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately @@ -2745,6 +2881,7 @@ case $host_os in ;; esac done + ;; esac exp_sym_flag='-bexport' @@ -2763,7 +2900,7 @@ case $host_os in _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) + case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` @@ -2782,8 +2919,12 @@ case $host_os in _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi + ;; esac shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi else # not using gcc if test "$host_cpu" = ia64; then @@ -2810,12 +2951,12 @@ case $host_os in _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX @@ -2824,16 +2965,26 @@ case $host_os in # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - _LT_AC_TAGVAR(always_export_symbols, $1)=yes # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds it's shared libraries. - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + chorus*) case $cc_basename in *) @@ -2843,7 +2994,6 @@ case $host_os in esac ;; - cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. @@ -2853,7 +3003,7 @@ case $host_os in _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then @@ -2862,13 +3012,13 @@ case $host_os in echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) - case "$host_os" in + case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; @@ -2906,7 +3056,7 @@ case $host_os in _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else @@ -2914,12 +3064,12 @@ case $host_os in fi _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else - case "$cc_basename" in + case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; @@ -2932,11 +3082,11 @@ case $host_os in dgux*) case $cc_basename in - ec++) + ec++*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; - ghcx) + ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no @@ -2947,14 +3097,14 @@ case $host_os in ;; esac ;; - freebsd[12]*) + freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before switch to ELF _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; - freebsd* | kfreebsd*-gnu) + freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes @@ -2971,11 +3121,11 @@ case $host_os in # location of the library. case $cc_basename in - CC) + CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; - aCC) + aCC*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when @@ -2985,7 +3135,7 @@ case $host_os in # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then @@ -2999,34 +3149,23 @@ case $host_os in ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then - case "$host_cpu" in - hppa*64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; *) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi - case "$host_cpu" in - hppa*64*) + case $host_cpu in + hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; - ia64*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, @@ -3036,14 +3175,17 @@ case $host_os in esac case $cc_basename in - CC) + CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; - aCC) - case "$host_cpu" in - hppa*64*|ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + aCC*) + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' @@ -3062,9 +3204,12 @@ case $host_os in *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then - case "$host_cpu" in - ia64*|hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' @@ -3078,11 +3223,25 @@ case $host_os in ;; esac ;; + interix3*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; irix5* | irix6*) case $cc_basename in - CC) + CC*) # SGI C++ - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is @@ -3093,7 +3252,7 @@ case $host_os in *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi @@ -3104,9 +3263,9 @@ case $host_os in _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; - linux*) + linux* | k*bsd*-gnu) case $cc_basename in - KCC) + KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file @@ -3131,7 +3290,7 @@ case $host_os in # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - icpc) + icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols @@ -3143,8 +3302,12 @@ case $host_os in _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no @@ -3152,7 +3315,16 @@ case $host_os in _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; - cxx) + pgCC*) + # Portland Group C++ compiler + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) # Compaq C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' @@ -3183,7 +3355,7 @@ case $host_os in ;; mvs*) case $cc_basename in - cxx) + cxx*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; @@ -3193,7 +3365,7 @@ case $host_os in ;; esac ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= @@ -3222,7 +3394,7 @@ case $host_os in ;; osf3*) case $cc_basename in - KCC) + KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file @@ -3238,14 +3410,14 @@ case $host_os in _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - RCC) + RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; - cxx) + cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: @@ -3263,7 +3435,7 @@ case $host_os in *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: @@ -3282,7 +3454,7 @@ case $host_os in ;; osf4* | osf5*) case $cc_basename in - KCC) + KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file @@ -3297,17 +3469,17 @@ case $host_os in # the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - RCC) + RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; - cxx) + cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' @@ -3326,7 +3498,7 @@ case $host_os in *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: @@ -3347,27 +3519,14 @@ case $host_os in # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; - sco*) - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - case $cc_basename in - CC) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; sunos4*) case $cc_basename in - CC) + CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; - lcc) + lcc*) # Lucid # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no @@ -3380,36 +3539,33 @@ case $host_os in ;; solaris*) case $cc_basename in - CC) + CC*) # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system - # linker. + # linker. We must also pass each convience library through + # to the system linker between allextract/defaultextract. + # The C++ compiler will combine linker options so we + # cannot just pass the convience library names through + # without $wl. # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is @@ -3417,7 +3573,7 @@ case $host_os in # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; - gcx) + gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' @@ -3455,12 +3611,63 @@ case $host_os in ;; esac ;; - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac ;; tandem*) case $cc_basename in - NCC) + NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no @@ -3493,8 +3700,6 @@ AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) -AC_LIBTOOL_SYS_LIB_STRIP -AC_LIBTOOL_DLOPEN_SELF($1) AC_LIBTOOL_CONFIG($1) @@ -3512,7 +3717,7 @@ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld ])# AC_LIBTOOL_LANG_CXX_CONFIG # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) -# ------------------------ +# ------------------------------------ # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary @@ -3566,7 +3771,7 @@ if AC_TRY_EVAL(ac_compile); then # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. - output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`" + output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` for p in `eval $output_verbose_link_cmd`; do case $p in @@ -3642,13 +3847,37 @@ fi $rm -f confest.$objext +# PORTME: override above test on systems where it is broken +ifelse([$1],[CXX], +[case $host_os in +interix3*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + _LT_AC_TAGVAR(predep_objects,$1)= + _LT_AC_TAGVAR(postdep_objects,$1)= + _LT_AC_TAGVAR(postdeps,$1)= + ;; + +solaris*) + case $cc_basename in + CC*) + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' + ;; + esac + ;; +esac +]) + case " $_LT_AC_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac ])# AC_LIBTOOL_POSTDEP_PREDEP # AC_LIBTOOL_LANG_F77_CONFIG -# ------------------------ +# -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. @@ -3692,12 +3921,16 @@ lt_simple_link_test_code=" program t\n end\n" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC -cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` +_LT_CC_BASENAME([$compiler]) AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) @@ -3707,7 +3940,7 @@ test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. -case "$host_os" in +case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then @@ -3716,7 +3949,9 @@ aix3*) fi ;; aix4* | aix5*) - test "$enable_shared" = yes && enable_static=no + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi ;; esac AC_MSG_RESULT([$enable_shared]) @@ -3726,8 +3961,6 @@ AC_MSG_CHECKING([whether to build static libraries]) test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) -test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - _LT_AC_TAGVAR(GCC, $1)="$G77" _LT_AC_TAGVAR(LD, $1)="$LD" @@ -3737,8 +3970,6 @@ AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) -AC_LIBTOOL_SYS_LIB_STRIP - AC_LIBTOOL_CONFIG($1) @@ -3767,20 +3998,27 @@ _LT_AC_TAGVAR(objext, $1)=$objext lt_simple_compile_test_code="class foo {}\n" # Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds + AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) @@ -3788,8 +4026,6 @@ AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) -AC_LIBTOOL_SYS_LIB_STRIP -AC_LIBTOOL_DLOPEN_SELF($1) AC_LIBTOOL_CONFIG($1) @@ -3799,7 +4035,7 @@ CC="$lt_save_CC" # AC_LIBTOOL_LANG_RC_CONFIG -# -------------------------- +# ------------------------- # Ensure that the configuration vars for the Windows resource compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. @@ -3823,11 +4059,16 @@ lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes AC_LIBTOOL_CONFIG($1) @@ -3857,7 +4098,7 @@ if test -f "$ltmain"; then # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ @@ -3963,7 +4204,7 @@ ifelse([$1], [], # # 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. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -3974,7 +4215,7 @@ ifelse([$1], [], SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="$SED -e s/^X//" +Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. @@ -4009,6 +4250,12 @@ fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo @@ -4020,6 +4267,9 @@ AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + # A language-specific compiler. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) @@ -4085,7 +4335,7 @@ max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) -# Must we lock files when doing compilation ? +# Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? @@ -4359,9 +4609,6 @@ symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' -# Transform the above into a raw symbol and a C symbol. -symxfrm='\1 \2\3 \3' - # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" @@ -4383,7 +4630,7 @@ hpux*) # Its linker distinguishes data from code symbols lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; -linux*) +linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[[ABCDGIRSTW]]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" @@ -4396,9 +4643,18 @@ irix* | nonstopux*) osf*) symcode='[[BCDEGQRST]]' ;; -solaris* | sysv5*) +solaris*) symcode='[[BDRT]]' ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; sysv4) symcode='[[DFNSTU]]' ;; @@ -4421,8 +4677,11 @@ esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + # Write the raw and C identifiers. - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no @@ -4578,6 +4837,10 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic @@ -4586,7 +4849,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) ;; *) @@ -4611,7 +4874,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; chorus*) case $cc_basename in - cxch68) + cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; @@ -4620,7 +4883,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files - case "$cc_basename" in + case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' @@ -4629,10 +4892,10 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; dgux*) case $cc_basename in - ec++) + ec++*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; - ghcx) + ghcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; @@ -4640,22 +4903,22 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; esac ;; - freebsd* | kfreebsd*-gnu) + freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in - CC) + CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; - aCC) + aCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" - case "$host_cpu" in + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -4668,9 +4931,13 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; esac ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; irix5* | irix6* | nonstopux*) case $cc_basename in - CC) + CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. @@ -4679,20 +4946,26 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; esac ;; - linux*) + linux* | k*bsd*-gnu) case $cc_basename in - KCC) + KCC*) # KAI C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; - icpc) + icpc* | ecpc*) # Intel C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; - cxx) + pgCC*) + # Portland Group C++ compiler. + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. @@ -4709,25 +4982,25 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; mvs*) case $cc_basename in - cxx) + cxx*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; - netbsd*) + netbsd* | netbsdelf*-gnu) ;; osf3* | osf4* | osf5*) case $cc_basename in - KCC) + KCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; - RCC) + RCC*) # Rational C++ 2.4.1 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; - cxx) + cxx*) # Digital/Compaq C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha @@ -4741,24 +5014,15 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; psos*) ;; - sco*) - case $cc_basename in - CC) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - *) - ;; - esac - ;; solaris*) case $cc_basename in - CC) + CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; - gcx) + gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; @@ -4768,12 +5032,12 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; sunos4*) case $cc_basename in - CC) + CC*) # Sun C++ 4.x _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; - lcc) + lcc*) # Lucid _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; @@ -4783,7 +5047,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; tandem*) case $cc_basename in - NCC) + NCC*) # NonStop-UX NCC 3.20 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; @@ -4791,7 +5055,14 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; esac ;; - unixware*) + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac ;; vxworks*) ;; @@ -4838,6 +5109,11 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. @@ -4854,7 +5130,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -4883,7 +5159,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files - case "$cc_basename" in + case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' @@ -4901,7 +5177,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -4924,13 +5200,20 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; - linux*) - case $CC in + linux* | k*bsd*-gnu) + case $cc_basename in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; ccc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. @@ -4945,15 +5228,15 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - sco3.2v5*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' - ;; - solaris*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac ;; sunos4*) @@ -4962,7 +5245,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + sysv4 | sysv4.2uw2* | sysv4.3*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' @@ -4975,6 +5258,17 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) fi ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + uts4*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' @@ -5002,7 +5296,7 @@ if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi -case "$host_os" in +case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= @@ -5011,6 +5305,16 @@ case "$host_os" in _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ;; esac + +# +# Check to make sure the static flag actually works. +# +wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" +AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) ]) @@ -5035,7 +5339,10 @@ ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + ;; + linux* | k*bsd*-gnu) + _LT_AC_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' @@ -5078,7 +5385,8 @@ ifelse([$1],[CXX],[ # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= - + # Just being paranoid about ensuring that cc_basename is set. + _LT_CC_BASENAME([$compiler]) case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time @@ -5088,6 +5396,10 @@ ifelse([$1],[CXX],[ with_gnu_ld=no fi ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; openbsd*) with_gnu_ld=no ;; @@ -5098,6 +5410,27 @@ ifelse([$1],[CXX],[ # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) @@ -5148,10 +5481,10 @@ EOF _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then @@ -5160,13 +5493,60 @@ EOF echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else - ld_shlibs=no + _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; - netbsd*) + interix3*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + _LT_AC_TAGVAR(link_all_deplibs, $1)=no + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= @@ -5176,7 +5556,7 @@ EOF fi ;; - solaris* | sysv5*) + solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 @@ -5197,6 +5577,33 @@ EOF fi ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + sunos4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= @@ -5204,31 +5611,6 @@ EOF _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds" - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - if test $supports_anon_versioning = yes; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ -cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -$echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - else - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds" - fi - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' @@ -5239,16 +5621,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ ;; esac - if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then - runpath_var=LD_RUN_PATH - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - fi + if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) @@ -5260,7 +5637,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$link_static_flag"; then + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported @@ -5294,6 +5671,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ break fi done + ;; esac exp_sym_flag='-bexport' @@ -5312,7 +5690,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) + case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` @@ -5331,8 +5709,12 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi + ;; esac shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi else # not using gcc if test "$host_cpu" = ia64; then @@ -5340,11 +5722,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then + if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' - fi + fi fi fi @@ -5358,12 +5740,12 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX @@ -5372,13 +5754,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - _LT_AC_TAGVAR(always_export_symbols, $1)=yes # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds it's shared libraries. - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; @@ -5412,12 +5792,12 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' + _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) - case "$host_os" in + case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; @@ -5446,16 +5826,16 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else - case "$cc_basename" in + case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; @@ -5496,7 +5876,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu) + freebsd* | dragonfly*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes @@ -5519,47 +5899,62 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; - hpux10* | hpux11*) + hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*|ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else - case "$host_cpu" in - hppa*64*|ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' @@ -5583,7 +5978,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else @@ -5653,7 +6048,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' @@ -5661,21 +6056,15 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; - sco3.2v5*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ;; - solaris*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' if test "$GCC" = yes; then + wlarc='${wl}' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else + wlarc='' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' @@ -5684,8 +6073,18 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; + *) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; @@ -5742,36 +6141,45 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ fi ;; - sysv4.2uw2*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=no + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - hardcode_runpath_var=yes - runpath_var=LD_RUN_PATH - ;; + runpath_var='LD_RUN_PATH' - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi - runpath_var='LD_RUN_PATH' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; - sysv5*) - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi ;; uts4*) @@ -5789,11 +6197,6 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - # # Do we need to explicitly link libc? # @@ -5821,6 +6224,7 @@ x|xyes) libobjs=conftest.$ac_objext deplibs= wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= @@ -5946,7 +6350,7 @@ lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && break + test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in @@ -5976,23 +6380,11 @@ SED=$lt_cv_path_SED AC_MSG_RESULT([$SED]) ]) -# -*- Autoconf -*- -# Copyright (C) 2002, 2003 Free Software Foundation, Inc. -# Generated from amversion.in; do not edit by hand. - -# 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, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# Copyright (C) 2002, 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. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- @@ -6005,26 +6397,15 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.9.4])]) + [AM_AUTOMAKE_VERSION([1.9.6])]) -# AM_AUX_DIR_EXPAND +# AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001, 2003 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, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to @@ -6071,26 +6452,16 @@ AC_PREREQ([2.50])dnl am_aux_dir=`cd $ac_aux_dir && pwd` ]) -# AM_CONDITIONAL -*- Autoconf -*- +# AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 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. -# 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, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 6 +# serial 7 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- @@ -6114,26 +6485,15 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# serial 7 -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 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. -# 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, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - +# serial 8 # 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, @@ -6142,7 +6502,6 @@ fi])]) # CC etc. in the Makefile, will ask for an AC_PROG_CC use... - # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. @@ -6282,27 +6641,16 @@ AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) -# Generate code to set up dependency tracking. -*- Autoconf -*- +# Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 -# Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 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. -# 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, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -#serial 2 +#serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ @@ -6361,54 +6709,31 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) -# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- +# 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. -# Copyright (C) 1996, 1997, 2000, 2001, 2003 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, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 7 +# 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 -*- +# Do all the work for Automake. -*- Autoconf -*- -# 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. - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 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. -# 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. +# serial 12 -# 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. - -# serial 11 +# 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. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) @@ -6510,51 +6835,27 @@ for _am_header in $config_headers :; do done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) +# Copyright (C) 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. + # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. - -# Copyright (C) 2001, 2003 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, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) -# -*- Autoconf -*- -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 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. -# 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, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 1 +# serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. @@ -6569,26 +6870,15 @@ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) -# Check to see how 'make' treats includes. -*- Autoconf -*- +# Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 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. -# 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, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 2 +# serial 3 # AM_MAKE_INCLUDE() # ----------------- @@ -6632,28 +6922,45 @@ AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) -# -*- Autoconf -*- - - -# Copyright (C) 1997, 1999, 2000, 2001, 2003 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, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 1999, 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 3 +# AM_PROG_CC_C_O +# -------------- +# Like AC_PROG_CC_C_O, but changed for automake. +AC_DEFUN([AM_PROG_CC_C_O], +[AC_REQUIRE([AC_PROG_CC_C_O])dnl +AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +# FIXME: we rely on the cache variable name because +# there is no other way. +set dummy $CC +ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` +if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != 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 +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 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 4 + # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], @@ -6678,27 +6985,16 @@ else fi ]) +# Copyright (C) 2003, 2004, 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. + # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. - -# Copyright (C) 2003, 2004 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, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - +# # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). @@ -6752,26 +7048,15 @@ else fi AC_SUBST([mkdir_p])]) -# Helper functions for option handling. -*- Autoconf -*- +# Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 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. -# 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, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 2 +# serial 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- @@ -6796,28 +7081,16 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. # -# Check to make sure that the build environment is sane. -# +# 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. -# Copyright (C) 1996, 1997, 2000, 2001, 2003 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, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 3 +# serial 4 # AM_SANITY_CHECK # --------------- @@ -6860,25 +7133,14 @@ Check your system clock]) fi AC_MSG_RESULT(yes)]) +# Copyright (C) 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. + # AM_PROG_INSTALL_STRIP - -# Copyright (C) 2001, 2003 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, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - +# --------------------- # 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 @@ -6901,25 +7163,13 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004 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, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 1 +# Copyright (C) 2004, 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 2 # _AM_PROG_TAR(FORMAT) # -------------------- @@ -7007,39 +7257,81 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR -m4_include([m4/afs.m4]) -m4_include([m4/alloca.m4]) -m4_include([m4/basename.m4]) -m4_include([m4/c-strtod.m4]) -m4_include([m4/codeset.m4]) -m4_include([m4/dos.m4]) -m4_include([m4/exitfail.m4]) -m4_include([m4/extensions.m4]) -m4_include([m4/fcntl-safer.m4]) -m4_include([m4/fstypename.m4]) -m4_include([m4/fsusage.m4]) -m4_include([m4/getopt.m4]) -m4_include([m4/gettext.m4]) -m4_include([m4/iconv.m4]) -m4_include([m4/inttypes_h.m4]) -m4_include([m4/lib-ld.m4]) -m4_include([m4/lib-link.m4]) -m4_include([m4/lib-prefix.m4]) -m4_include([m4/ls-mntd-fs.m4]) -m4_include([m4/mountlist.m4]) -m4_include([m4/nls.m4]) -m4_include([m4/np_coreutils.m4]) -m4_include([m4/np_curl.m4]) -m4_include([m4/onceonly_2_57.m4]) -m4_include([m4/po.m4]) -m4_include([m4/progtest.m4]) -m4_include([m4/regex.m4]) -m4_include([m4/restrict.m4]) -m4_include([m4/stdbool.m4]) -m4_include([m4/stdint_h.m4]) -m4_include([m4/uintmax_t.m4]) -m4_include([m4/ulonglong.m4]) -m4_include([m4/unistd-safer.m4]) -m4_include([m4/unlocked-io.m4]) -m4_include([m4/xalloc.m4]) +m4_include([m4/np_mysqlclient.m4]) +m4_include([gl/m4/absolute-header.m4]) +m4_include([gl/m4/alloca.m4]) +m4_include([gl/m4/arpa_inet_h.m4]) +m4_include([gl/m4/c-strtod.m4]) +m4_include([gl/m4/cloexec.m4]) +m4_include([gl/m4/codeset.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/eoverflow.m4]) +m4_include([gl/m4/error.m4]) +m4_include([gl/m4/exitfail.m4]) +m4_include([gl/m4/extensions.m4]) +m4_include([gl/m4/fcntl-safer.m4]) +m4_include([gl/m4/fstypename.m4]) +m4_include([gl/m4/fsusage.m4]) +m4_include([gl/m4/getaddrinfo.m4]) +m4_include([gl/m4/gethostname.m4]) +m4_include([gl/m4/getloadavg.m4]) +m4_include([gl/m4/getopt.m4]) +m4_include([gl/m4/gettext.m4]) +m4_include([gl/m4/gnulib-common.m4]) +m4_include([gl/m4/gnulib-comp.m4]) +m4_include([gl/m4/iconv.m4]) +m4_include([gl/m4/inet_ntop.m4]) +m4_include([gl/m4/inline.m4]) +m4_include([gl/m4/intmax_t.m4]) +m4_include([gl/m4/inttypes_h.m4]) +m4_include([gl/m4/lib-ld.m4]) +m4_include([gl/m4/lib-link.m4]) +m4_include([gl/m4/lib-prefix.m4]) +m4_include([gl/m4/lock.m4]) +m4_include([gl/m4/longdouble.m4]) +m4_include([gl/m4/longlong.m4]) +m4_include([gl/m4/ls-mntd-fs.m4]) +m4_include([gl/m4/mbchar.m4]) +m4_include([gl/m4/mbiter.m4]) +m4_include([gl/m4/mbrtowc.m4]) +m4_include([gl/m4/memchr.m4]) +m4_include([gl/m4/minmax.m4]) +m4_include([gl/m4/mountlist.m4]) +m4_include([gl/m4/netinet_in_h.m4]) +m4_include([gl/m4/nls.m4]) +m4_include([gl/m4/onceonly_2_57.m4]) +m4_include([gl/m4/po.m4]) +m4_include([gl/m4/progtest.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/size_max.m4]) +m4_include([gl/m4/snprintf.m4]) +m4_include([gl/m4/socklen.m4]) +m4_include([gl/m4/sockpfaf.m4]) +m4_include([gl/m4/ssize_t.m4]) +m4_include([gl/m4/stdbool.m4]) +m4_include([gl/m4/stdint.m4]) +m4_include([gl/m4/stdint_h.m4]) +m4_include([gl/m4/strcase.m4]) +m4_include([gl/m4/strdup.m4]) +m4_include([gl/m4/strndup.m4]) +m4_include([gl/m4/strnlen.m4]) +m4_include([gl/m4/sys_socket_h.m4]) +m4_include([gl/m4/ulonglong.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]) +m4_include([gl/m4/vsnprintf.m4]) +m4_include([gl/m4/wchar.m4]) +m4_include([gl/m4/wchar_t.m4]) +m4_include([gl/m4/wctype.m4]) +m4_include([gl/m4/wcwidth.m4]) +m4_include([gl/m4/wint_t.m4]) +m4_include([gl/m4/xalloc.m4]) +m4_include([gl/m4/xsize.m4]) +m4_include([gl/m4/xstrndup.m4]) m4_include([acinclude.m4]) diff --git a/compile b/build-aux/compile similarity index 94% rename from compile rename to build-aux/compile index 3d21703..1b1d232 100755 --- a/compile +++ b/build-aux/compile @@ -1,9 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand `-c -o'. -scriptversion=2004-10-12.08 +scriptversion=2005-05-14.22 -# Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -18,7 +18,7 @@ scriptversion=2004-10-12.08 # # 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. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -47,11 +47,11 @@ right script to run: please start by reading the file `INSTALL'. Report bugs to . EOF - exit 0 + exit $? ;; -v | --v*) echo "compile $scriptversion" - exit 0 + exit $? ;; esac diff --git a/config.guess b/build-aux/config.guess similarity index 98% rename from config.guess rename to build-aux/config.guess index 8229471..45bee13 100755 --- a/config.guess +++ b/build-aux/config.guess @@ -1,9 +1,9 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -timestamp='2004-11-12' +timestamp='2005-04-22' # 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 @@ -53,7 +53,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 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO @@ -804,6 +804,9 @@ EOF i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; + amd64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; @@ -1137,6 +1140,10 @@ EOF # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit 0 ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos @@ -1197,6 +1204,9 @@ EOF *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit 0 ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; @@ -1413,7 +1423,9 @@ This script, last modified $timestamp, has failed to recognize the operating system you are using. It is advised that you download the most up to date version of the config scripts from - ftp://ftp.gnu.org/pub/gnu/config/ + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess +and + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub If the version you run ($0) is already up to date, please send the following data and any information you think might be diff --git a/build-aux/config.rpath b/build-aux/config.rpath new file mode 100755 index 0000000..e082db6 --- /dev/null +++ b/build-aux/config.rpath @@ -0,0 +1,660 @@ +#! /bin/sh +# Output a system dependent set of variables, describing how to set the +# run time search path of shared libraries in an executable. +# +# Copyright 1996-2006 Free Software Foundation, Inc. +# Taken from GNU libtool, 2001 +# Originally by Gordon Matzigkeit , 1996 +# +# 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. +# +# The first argument passed to this file is the canonical host specification, +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld +# should be set by the caller. +# +# The set of defined variables is at the end of this script. + +# Known limitations: +# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer +# than 256 bytes, otherwise the compiler driver will dump core. The only +# 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, +# which needs '.lib'). +libext=a +shrext=.so + +host="$1" +host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + +# Code taken from libtool.m4's _LT_CC_BASENAME. + +for cc_temp in $CC""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` + +# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC. + +wl= +if test "$GCC" = yes; then + wl='-Wl,' +else + case "$host_os" in + aix*) + wl='-Wl,' + ;; + darwin*) + case $cc_basename in + xlc*) + wl='-Wl,' + ;; + esac + ;; + mingw* | pw32* | os2*) + ;; + hpux9* | hpux10* | hpux11*) + wl='-Wl,' + ;; + irix5* | irix6* | nonstopux*) + wl='-Wl,' + ;; + newsos6) + ;; + linux*) + case $cc_basename in + icc* | ecc*) + wl='-Wl,' + ;; + pgcc | pgf77 | pgf90) + wl='-Wl,' + ;; + ccc*) + wl='-Wl,' + ;; + como) + wl='-lopt=' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + wl='-Wl,' + ;; + esac + ;; + esac + ;; + osf3* | osf4* | osf5*) + wl='-Wl,' + ;; + sco3.2v5*) + ;; + solaris*) + wl='-Wl,' + ;; + sunos4*) + wl='-Qoption ld ' + ;; + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + wl='-Wl,' + ;; + sysv4*MP*) + ;; + unicos*) + wl='-Wl,' + ;; + uts4*) + ;; + esac +fi + +# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS. + +hardcode_libdir_flag_spec= +hardcode_libdir_separator= +hardcode_direct=no +hardcode_minus_L=no + +case "$host_os" in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; +esac + +ld_shlibs=yes +if test "$with_gnu_ld" = yes; then + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + # Unlike libtool, we use -rpath here, not --rpath, since the documented + # option of GNU ld is called -rpath, not --rpath. + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + case "$host_os" in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + 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 + ;; + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + cygwin* | mingw* | pw32*) + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + interix3*) + hardcode_direct=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + netbsd*) + ;; + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + else + ld_shlibs=no + fi + ;; + esac + ;; + sunos4*) + hardcode_direct=yes + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + esac + if test "$ld_shlibs" = no; then + hardcode_libdir_flag_spec= + fi +else + case "$host_os" in + aix3*) + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + else + aix_use_runtimelinking=no + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + fi + hardcode_direct=yes + hardcode_libdir_separator=':' + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct=yes + else + # We have old collect2 + hardcode_direct=unsupported + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + fi + # Begin _LT_AC_SYS_LIBPATH_AIX. + echo 'int main () { return 0; }' > conftest.c + ${CC} ${LDFLAGS} conftest.c -o conftest + aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` + if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` + fi + if test -z "$aix_libpath"; then + aix_libpath="/usr/lib:/lib" + fi + rm -f conftest.c conftest + # End _LT_AC_SYS_LIBPATH_AIX. + if test "$aix_use_runtimelinking" = yes; then + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + else + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + fi + 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 + ;; + bsdi[45]*) + ;; + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + libext=lib + ;; + darwin* | rhapsody*) + hardcode_direct=no + if test "$GCC" = yes ; then + : + else + case $cc_basename in + xlc*) + ;; + *) + ld_shlibs=no + ;; + esac + fi + ;; + dgux*) + hardcode_libdir_flag_spec='-L$libdir' + ;; + freebsd1*) + ld_shlibs=no + ;; + freebsd2.2*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + freebsd2*) + hardcode_direct=yes + hardcode_minus_L=yes + ;; + freebsd* | kfreebsd*-gnu | dragonfly*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + hpux9*) + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + hpux10*) + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + hpux11*) + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + ;; + *) + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + irix5* | irix6* | nonstopux*) + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + netbsd*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + newsos6) + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + openbsd*) + hardcode_direct=yes + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + else + case "$host_os" in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + osf3*) + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + osf4* | osf5*) + if test "$GCC" = yes; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + # Both cc and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + hardcode_libdir_separator=: + ;; + solaris*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + sunos4*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + ;; + sysv4) + case $host_vendor in + sni) + hardcode_direct=yes # is this really true??? + ;; + siemens) + hardcode_direct=no + ;; + motorola) + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + ;; + sysv4.3*) + ;; + sysv4*MP*) + if test -d /usr/nec; then + ld_shlibs=yes + fi + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + ;; + sysv5* | sco3.2v5* | sco5v6*) + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator=':' + ;; + uts4*) + hardcode_libdir_flag_spec='-L$libdir' + ;; + *) + ld_shlibs=no + ;; + esac +fi + +# Check dynamic linker characteristics +# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER. +# Unlike libtool.m4, here we don't care about _all_ names of the library, but +# only about the one the linker finds when passed -lNAME. This is the last +# element of library_names_spec in libtool.m4, or possibly two of them if the +# linker has special search rules. +library_names_spec= # the last element of library_names_spec in libtool.m4 +libname_spec='lib$name' +case "$host_os" in + aix3*) + library_names_spec='$libname.a' + ;; + aix4* | aix5*) + library_names_spec='$libname$shrext' + ;; + amigaos*) + library_names_spec='$libname.a' + ;; + beos*) + library_names_spec='$libname$shrext' + ;; + bsdi[45]*) + library_names_spec='$libname$shrext' + ;; + cygwin* | mingw* | pw32*) + shrext=.dll + library_names_spec='$libname.dll.a $libname.lib' + ;; + darwin* | rhapsody*) + shrext=.dylib + library_names_spec='$libname$shrext' + ;; + dgux*) + library_names_spec='$libname$shrext' + ;; + freebsd1*) + ;; + kfreebsd*-gnu) + library_names_spec='$libname$shrext' + ;; + freebsd* | dragonfly*) + case "$host_os" in + freebsd[123]*) + library_names_spec='$libname$shrext$versuffix' ;; + *) + library_names_spec='$libname$shrext' ;; + esac + ;; + gnu*) + library_names_spec='$libname$shrext' + ;; + hpux9* | hpux10* | hpux11*) + case $host_cpu in + ia64*) + shrext=.so + ;; + hppa*64*) + shrext=.sl + ;; + *) + shrext=.sl + ;; + esac + library_names_spec='$libname$shrext' + ;; + interix3*) + library_names_spec='$libname$shrext' + ;; + irix5* | irix6* | nonstopux*) + library_names_spec='$libname$shrext' + case "$host_os" in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; + *) libsuff= shlibsuff= ;; + esac + ;; + esac + ;; + linux*oldld* | linux*aout* | linux*coff*) + ;; + linux*) + library_names_spec='$libname$shrext' + ;; + knetbsd*-gnu) + library_names_spec='$libname$shrext' + ;; + netbsd*) + library_names_spec='$libname$shrext' + ;; + newsos6) + library_names_spec='$libname$shrext' + ;; + nto-qnx*) + library_names_spec='$libname$shrext' + ;; + openbsd*) + library_names_spec='$libname$shrext$versuffix' + ;; + os2*) + libname_spec='$name' + shrext=.dll + library_names_spec='$libname.a' + ;; + osf3* | osf4* | osf5*) + library_names_spec='$libname$shrext' + ;; + solaris*) + library_names_spec='$libname$shrext' + ;; + sunos4*) + library_names_spec='$libname$shrext$versuffix' + ;; + sysv4 | sysv4.3*) + library_names_spec='$libname$shrext' + ;; + sysv4*MP*) + library_names_spec='$libname$shrext' + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + library_names_spec='$libname$shrext' + ;; + uts4*) + library_names_spec='$libname$shrext' + ;; +esac + +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' +escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` +shlibext=`echo "$shrext" | sed -e 's,^\.,,'` +escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` +escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` +escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` + +LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO @@ -231,13 +231,14 @@ case $basic_machine in | 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 \ + | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ - | m32r | m32rle | m68000 | m68k | m88k | mcore \ + | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -262,7 +263,8 @@ case $basic_machine in | pyramid \ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ + | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ @@ -298,7 +300,7 @@ case $basic_machine in | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ - | bs2000-* \ + | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ @@ -310,7 +312,7 @@ case $basic_machine in | ip2k-* | iq2000-* \ | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | mcore-* \ + | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -336,7 +338,8 @@ case $basic_machine in | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ + | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ diff --git a/depcomp b/build-aux/depcomp similarity index 89% rename from depcomp rename to build-aux/depcomp index 11e2d3b..04701da 100755 --- a/depcomp +++ b/build-aux/depcomp @@ -1,9 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2004-05-31.23 +scriptversion=2005-07-09.11 -# Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005 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 @@ -17,8 +17,8 @@ scriptversion=2004-05-31.23 # 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. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -50,11 +50,11 @@ Environment variables: Report bugs to . EOF - exit 0 + exit $? ;; -v | --v*) echo "depcomp $scriptversion" - exit 0 + exit $? ;; esac @@ -287,36 +287,43 @@ tru64) base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then - # Dependencies are output in .lo.d with libtool 1.4. - # With libtool 1.5 they are output both in $dir.libs/$base.o.d - # and in $dir.libs/$base.o.d and $dir$base.o.d. We process the - # latter, because the former will be cleaned when $dir.libs is - # erased. - tmpdepfile1="$dir.libs/$base.lo.d" - tmpdepfile2="$dir$base.o.d" - tmpdepfile3="$dir.libs/$base.d" + # With Tru64 cc, shared objects can also be used to make a + # static library. This mecanism 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 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" + tmpdepfile1=$dir$base.o.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi - if test -f "$tmpdepfile1"; then - tmpdepfile="$tmpdepfile1" - elif test -f "$tmpdepfile2"; then - tmpdepfile="$tmpdepfile2" - else - tmpdepfile="$tmpdepfile3" - 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 []. @@ -460,7 +467,8 @@ cpp) done "$@" -E | - sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + 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" diff --git a/install-sh b/build-aux/install-sh similarity index 98% rename from install-sh rename to build-aux/install-sh index 6ebe46d..4d4a951 100755 --- a/install-sh +++ b/build-aux/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2004-12-17.09 +scriptversion=2005-05-14.22 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -109,7 +109,7 @@ while test -n "$1"; do shift continue;; - --help) echo "$usage"; exit 0;; + --help) echo "$usage"; exit $?;; -m) chmodcmd="$chmodprog $2" shift @@ -134,7 +134,7 @@ while test -n "$1"; do shift continue;; - --version) echo "$0 $scriptversion"; exit 0;; + --version) echo "$0 $scriptversion"; exit $?;; *) # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. diff --git a/ltmain.sh b/build-aux/ltmain.sh similarity index 100% rename from ltmain.sh rename to build-aux/ltmain.sh diff --git a/missing b/build-aux/missing similarity index 93% rename from missing rename to build-aux/missing index 64b5f90..894e786 100755 --- a/missing +++ b/build-aux/missing @@ -1,9 +1,9 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2004-09-07.08 +scriptversion=2005-06-08.21 -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004 +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. @@ -19,8 +19,8 @@ scriptversion=2004-09-07.08 # 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. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -87,12 +87,12 @@ Supported PROGRAM values: yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." - exit 0 + exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" - exit 0 + exit $? ;; -*) @@ -288,11 +288,18 @@ WARNING: \`$1' is $msg. You should only need it if 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 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then - file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` + # ... 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 ;; diff --git a/config.h.in b/config.h.in index 9ec4087..2c237ef 100644 --- a/config.h.in +++ b/config.h.in @@ -1,7 +1,31 @@ /* config.h.in. Generated from configure.in by autoheader. */ -/* Define if you have the Andrew File System. */ -#undef AFS +/* Define this to an absolute name of . */ +#undef ABSOLUTE_STDINT_H + +/* Define this to an absolute name of . */ +#undef ABSOLUTE_UNISTD_H + +/* Define this to an absolute name of . */ +#undef ABSOLUTE_WCHAR_H + +/* Define this to an absolute name of . */ +#undef ABSOLUTE_WCTYPE_H + +/* Define to the number of bits in type 'ptrdiff_t'. */ +#undef BITSIZEOF_PTRDIFF_T + +/* Define to the number of bits in type 'sig_atomic_t'. */ +#undef BITSIZEOF_SIG_ATOMIC_T + +/* Define to the number of bits in type 'size_t'. */ +#undef BITSIZEOF_SIZE_T + +/* Define to the number of bits in type 'wchar_t'. */ +#undef BITSIZEOF_WCHAR_T + +/* Define to the number of bits in type 'wint_t'. */ +#undef BITSIZEOF_WINT_T /* URL of CGI programs */ #undef CGIURL @@ -26,10 +50,16 @@ /* Define to 1 for DGUX with . */ #undef DGUX +/* Define to 1 if // is a file system root distinct from /. */ +#undef DOUBLE_SLASH_IS_DISTINCT_ROOT + /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS +/* Define as good substitute value for EOVERFLOW. */ +#undef EOVERFLOW + /* 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. */ @@ -39,18 +69,18 @@ separator. */ #undef FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR -#if FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX -# define FILE_SYSTEM_PREFIX_LEN(Filename) \ - ((Filename)[0] && (Filename)[1] == ':' ? 2 : 0) -#else -# define FILE_SYSTEM_PREFIX_LEN(Filename) 0 -#endif +/* 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 you have `alloca' after including , a header that +/* Define to 1 when using the gnulib module fcntl-safer. */ +#undef GNULIB_FCNTL_SAFER + +/* Define to 1 if you have 'alloca' after including , a header that may be supplied by this distribution. */ #undef HAVE_ALLOCA @@ -58,14 +88,11 @@ includes only if HAVE_ALLOCA_H is defined. */ #undef HAVE_ALLOCA_H -/* Define to 1 if you have the `asprintf' function. */ -#undef HAVE_ASPRINTF +/* Define to 1 if you have the header file. */ +#undef HAVE_ARPA_INET_H -/* Define to 1 if strtold conforms to C99. */ -#undef HAVE_C99_STRTOLD - -/* Define if system has C99 compatible vsnprintf */ -#undef HAVE_C99_VSNPRINTF +/* Define to 1 if you have the header file. */ +#undef HAVE_BP_SYM_H /* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework. */ @@ -85,57 +112,57 @@ */ #undef HAVE_DCGETTEXT -/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if - you don't. */ -#undef HAVE_DECL_CLEARERR_UNLOCKED - -/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you +/* Define to 1 if you have the declaration of `freeaddrinfo', and to 0 if you don't. */ -#undef HAVE_DECL_FEOF_UNLOCKED +#undef HAVE_DECL_FREEADDRINFO -/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if - you don't. */ -#undef HAVE_DECL_FERROR_UNLOCKED - -/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if - you don't. */ -#undef HAVE_DECL_FFLUSH_UNLOCKED - -/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if - you don't. */ -#undef HAVE_DECL_FGETS_UNLOCKED - -/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if - you don't. */ -#undef HAVE_DECL_FPUTC_UNLOCKED - -/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if - you don't. */ -#undef HAVE_DECL_FPUTS_UNLOCKED - -/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if - you don't. */ -#undef HAVE_DECL_FREAD_UNLOCKED - -/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if - you don't. */ -#undef HAVE_DECL_FWRITE_UNLOCKED - -/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if - you don't. */ -#undef HAVE_DECL_GETCHAR_UNLOCKED - -/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you +/* Define to 1 if you have the declaration of `gai_strerror', and to 0 if you don't. */ -#undef HAVE_DECL_GETC_UNLOCKED +#undef HAVE_DECL_GAI_STRERROR -/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if - you don't. */ -#undef HAVE_DECL_PUTCHAR_UNLOCKED - -/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you +/* Define to 1 if you have the declaration of `getaddrinfo', and to 0 if you don't. */ -#undef HAVE_DECL_PUTC_UNLOCKED +#undef HAVE_DECL_GETADDRINFO + +/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. + */ +#undef HAVE_DECL_GETENV + +/* Define to 1 if you have the declaration of `getnameinfo', and to 0 if you + don't. */ +#undef HAVE_DECL_GETNAMEINFO + +/* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you + don't. */ +#undef HAVE_DECL_INET_NTOP + +/* Define to 1 if you have the declaration of `isblank', and to 0 if you + don't. */ +#undef HAVE_DECL_ISBLANK + +/* 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_r', and to 0 if you + don't. */ +#undef HAVE_DECL_STRERROR_R + +/* Define to 1 if you have the declaration of `strncasecmp', and to 0 if you + don't. */ +#undef HAVE_DECL_STRNCASECMP + +/* Define to 1 if you have the declaration of `strndup', and to 0 if you + don't. */ +#undef HAVE_DECL_STRNDUP + +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#undef HAVE_DECL_STRNLEN /* Define to 1 if you have the declaration of `swapctl', and to 0 if you don't. */ @@ -145,6 +172,14 @@ don't. */ #undef HAVE_DECL_SYSCONF +/* 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 `wcwidth', and to 0 if you + don't. */ +#undef HAVE_DECL_WCWIDTH + /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H @@ -169,17 +204,17 @@ /* Define to 1 if you have the `fs_stat_dev' function. */ #undef HAVE_FS_STAT_DEV -/* Define if struct statfs has the f_fstypename member. */ -#undef HAVE_F_FSTYPENAME_IN_STATFS +/* Define to 1 if you have the `gai_strerror' function. */ +#undef HAVE_GAI_STRERROR -/* Does system provide RFC 2553/Posix getaddrinfo? */ +/* Define to 1 if you have the `getaddrinfo' function. */ #undef HAVE_GETADDRINFO -/* Number of parameters to gethostbyname_r or 0 if not available */ -#undef HAVE_GETHOSTBYNAME_R +/* Define to 1 if you have the `gethostbyname' function. */ +#undef HAVE_GETHOSTBYNAME -/* Set when getipnodebyname is available */ -#undef HAVE_GETIPNODEBYNAME +/* Define to 1 if you have the `gethostname' function. */ +#undef HAVE_GETHOSTNAME /* Define to 1 if you have the `getloadavg' function. */ #undef HAVE_GETLOADAVG @@ -205,9 +240,23 @@ /* Define to 1 if you have the header file. */ #undef HAVE_GNUTLS_OPENSSL_H +/* Define to 1 if you have the `hasmntopt' function. */ +#undef HAVE_HASMNTOPT + /* Define if you have the iconv() function. */ #undef HAVE_ICONV +/* 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 + /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H @@ -215,8 +264,17 @@ declares uintmax_t. */ #undef HAVE_INTTYPES_H_WITH_UINTMAX -/* Define to 1 if you have the `isblank' function. */ -#undef HAVE_ISBLANK +/* Define to 1 if defines AF_INET. */ +#undef HAVE_IPV4 + +/* Define to 1 if defines AF_INET6. */ +#undef HAVE_IPV6 + +/* Define to 1 if you have the `iswcntrl' function. */ +#undef HAVE_ISWCNTRL + +/* Define to 1 if you have the `iswctype' function. */ +#undef HAVE_ISWCTYPE /* Define to 1 if you have the header file. */ #undef HAVE_KRB5_H @@ -251,9 +309,6 @@ /* Define to 1 if you have the `ldap' library (-lldap). */ #undef HAVE_LIBLDAP -/* Define to 1 if you have the `lwres' library (-llwres). */ -#undef HAVE_LIBLWRES - /* Define to 1 if you have the `pq' library (-lpq). */ #undef HAVE_LIBPQ @@ -269,8 +324,14 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H -/* Define to 1 if you have the header file. */ -#undef HAVE_LWRES_NETDB_H +/* Define if you have the 'long double' type. */ +#undef HAVE_LONG_DOUBLE + +/* Define if you have the 'long long' type. */ +#undef HAVE_LONG_LONG + +/* Define to 1 if the system has the type `long long int'. */ +#undef HAVE_LONG_LONG_INT /* Define to 1 if you have the header file. */ #undef HAVE_MACH_MACH_H @@ -285,6 +346,12 @@ /* Define to 1 if you have the `mbrtowc' function. */ #undef HAVE_MBRTOWC +/* 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 @@ -294,9 +361,24 @@ /* Define to 1 if you have the `mempcpy' function. */ #undef HAVE_MEMPCPY +/* Define to 1 if defines the MIN and MAX macros. */ +#undef HAVE_MINMAX_IN_LIMITS_H + +/* Define to 1 if defines the MIN and MAX macros. */ +#undef HAVE_MINMAX_IN_SYS_PARAM_H + /* Define to 1 if you have the header file. */ #undef HAVE_MNTENT_H +/* Defined if mysqlclient is found and can compile */ +#undef HAVE_MYSQLCLIENT + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETDB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETINET_IN_H + /* Define to 1 if you have the `next_dev' function. */ #undef HAVE_NEXT_DEV @@ -327,24 +409,23 @@ /* 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 /* Define to 1 if you have the header file. */ #undef HAVE_POSTGRESQL_LIBPQ_FE_H -/* Define if /proc/loadavg or similar exists */ -#undef HAVE_PROC_LOADAVG - /* Define if we have /proc/meminfo */ #undef HAVE_PROC_MEMINFO /* Define to 1 if you have the `pstat_getdynamic' function. */ #undef HAVE_PSTAT_GETDYNAMIC -/* Define to 1 if your system has a GNU libc compatible `realloc' function, - and to 0 otherwise. */ -#undef HAVE_REALLOC +/* Define to 1 if the system has the type `ptrdiff_t'. */ +#undef HAVE_PTRDIFF_T /* Define to 1 if you have the header file. */ #undef HAVE_RSA_H @@ -352,12 +433,18 @@ /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT -/* Define to 1 if you have the `setlocale' function. */ -#undef HAVE_SETLOCALE - /* Define to 1 if you have the header file. */ #undef HAVE_SIGNAL_H +/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ +#undef HAVE_SIGNED_SIG_ATOMIC_T + +/* Define to 1 if 'wchar_t' is a signed integer type. */ +#undef HAVE_SIGNED_WCHAR_T + +/* Define to 1 if 'wint_t' is a signed integer type. */ +#undef HAVE_SIGNED_WINT_T + /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF @@ -389,30 +476,42 @@ /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP +/* Define to 1 if you have the `strerror_r' function. */ +#undef HAVE_STRERROR_R + /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H +/* Define to 1 if you have the `strncasecmp' function. */ +#undef HAVE_STRNCASECMP + +/* Define if you have the strndup() function and it works. */ +#undef HAVE_STRNDUP + /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR -/* Define to 1 if you have the `strtod' function. */ -#undef HAVE_STRTOD - /* Define to 1 if you have the `strtol' function. */ #undef HAVE_STRTOL /* Define to 1 if you have the `strtoul' function. */ #undef HAVE_STRTOUL +/* Define to 1 if the system has the type `struct addrinfo'. */ +#undef HAVE_STRUCT_ADDRINFO + /* Define to 1 if `f_fstypename' is member of `struct fsstat'. */ #undef HAVE_STRUCT_FSSTAT_F_FSTYPENAME /* Define to 1 if `n_un.n_name' is member of `struct nlist'. */ #undef HAVE_STRUCT_NLIST_N_UN_N_NAME +/* Define to 1 if `f_fstypename' is member of `struct statfs'. */ +#undef HAVE_STRUCT_STATFS_F_FSTYPENAME + /* Define to 1 if `se_nblks' is member of `struct swapent'. */ #undef HAVE_STRUCT_SWAPENT_SE_NBLKS @@ -431,6 +530,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYSLOG_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_BITYPES_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FILSYS_H @@ -440,8 +542,8 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FS_TYPES_H -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_LOADAVG_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MNTENT_H @@ -491,17 +593,20 @@ /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H -/* Define if you have the 'uintmax_t' type in or . */ -#undef HAVE_UINTMAX_T - /* Define to 1 if you have the header file. */ #undef HAVE_UIO_H +/* Define to 1 if you have the `uname' function. */ +#undef HAVE_UNAME + /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H -/* Define if you have the 'unsigned long long' type. */ -#undef HAVE_UNSIGNED_LONG_LONG +/* 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. */ +#undef HAVE_VASNPRINTF /* Define to 1 if you have the `vasprintf' function. */ #undef HAVE_VASPRINTF @@ -515,15 +620,33 @@ /* Define to 1 if you have the header file. */ #undef HAVE_WCHAR_H +/* Define if you have the 'wchar_t' type. */ +#undef HAVE_WCHAR_T + /* Define to 1 if you have the `wcrtomb' function. */ #undef HAVE_WCRTOMB /* Define to 1 if you have the `wcscoll' function. */ #undef HAVE_WCSCOLL +/* Define to 1 if you have the `wcslen' function. */ +#undef HAVE_WCSLEN + /* Define to 1 if you have the header file. */ #undef HAVE_WCTYPE_H +/* Define to 1 if you have the `wcwidth' function. */ +#undef HAVE_WCWIDTH + +/* Define to 1 if you have the header file. */ +#undef HAVE_WINSOCK2_H + +/* Define if you have the 'wint_t' type. */ +#undef HAVE_WINT_T + +/* Define to 1 if you have the header file. */ +#undef HAVE_WS2TCPIP_H + /* Define to 1 if you have the header file. */ #undef HAVE_X509_H @@ -570,9 +693,15 @@ #undef MOUNTED_GETMNTENT2 /* Define if there is a function named getmntinfo for reading the list of - mounted file systems. (4.4BSD, Darwin) */ + mounted file systems and it returns an array of 'struct statfs'. (4.4BSD, + Darwin) */ #undef MOUNTED_GETMNTINFO +/* Define if there is a function named getmntinfo for reading the list of + mounted file systems and it returns an array of 'struct statvfs'. (NetBSD + 3.0) */ +#undef MOUNTED_GETMNTINFO2 + /* Define if there is a function named listmntent that can be used to list all mounted file systems. (UNICOS) */ #undef MOUNTED_LISTMNTENT @@ -589,6 +718,9 @@ 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 + /* path and args for nslookup */ #undef NSLOOKUP_COMMAND @@ -658,9 +790,6 @@ /* Define if packet count must precede host */ #undef PING_PACKETS_FIRST -/* Location of /proc/loadavg */ -#undef PROC_LOADAVG - /* path to /proc/meminfo if name changes */ #undef PROC_MEMINFO @@ -679,12 +808,28 @@ /* Variable list for sscanf of 'ps' output */ #undef PS_VARLIST +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'ptrdiff_t'. */ +#undef PTRDIFF_T_SUFFIX + /* Forced workaround on redhat in spopen */ #undef REDHAT_SPOPEN_ERROR /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'sig_atomic_t'. */ +#undef SIG_ATOMIC_T_SUFFIX + +/* Define as the maximum value of type 'size_t', if the system doesn't define + it. */ +#undef SIZE_MAX + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'size_t'. */ +#undef SIZE_T_SUFFIX + /* Define type of socket size */ #undef SOCKET_SIZE_TYPE @@ -733,6 +878,9 @@ /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS +/* Define to 1 if strerror_r returns char *. */ +#undef STRERROR_R_CHAR_P + /* Define to 1 on System V Release 4. */ #undef SVR4 @@ -767,17 +915,20 @@ /* Define if using OpenSSL libraries */ #undef USE_OPENSSL -/* Define to 1 if you want getc etc. to use unlocked I/O if available. - Unlocked I/O can improve performance in unithreaded apps, but it is not - safe for multithreaded apps. */ -#undef USE_UNLOCKED_IO - /* Version number of package */ #undef VERSION +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'wchar_t'. */ +#undef WCHAR_T_SUFFIX + /* path and arguments for invoking 'who' */ #undef WHO_COMMAND +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'wint_t'. */ +#undef WINT_T_SUFFIX + /* Define to 1 if on AIX 3. System headers sometimes define this. We just want to avoid a redefinition error message. */ @@ -785,23 +936,14 @@ # undef _ALL_SOURCE #endif -/* Number of bits in a file offset, on hosts where this is settable. */ -#undef _FILE_OFFSET_BITS - /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif -/* Define for large files, on AIX-style hosts. */ -#undef _LARGE_FILES - /* Define to 1 if on MINIX. */ #undef _MINIX -/* OSF needs this for getaddrinfo */ -#undef _OSF_SOURCE - /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE @@ -819,6 +961,9 @@ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#endif /* Define to rpl_ if the getopt replacement functions and variables should be used. */ @@ -845,9 +990,15 @@ #undef inline #endif +/* Define to long or long long if and don't define. */ +#undef intmax_t + /* 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 `int' if does not define. */ #undef pid_t @@ -884,9 +1035,6 @@ /* Define to rpl_re_syntax_options if the replacement should be used. */ #undef re_syntax_options -/* Define to rpl_realloc if the replacement function should be used. */ -#undef realloc - /* Define to rpl_regcomp if the replacement should be used. */ #undef regcomp @@ -909,6 +1057,8 @@ /* type to use in place of socklen_t if not defined */ #undef socklen_t -/* Define to unsigned long or unsigned long long if and - don't define. */ -#undef uintmax_t +/* Define as a signed type of the same size as size_t. */ +#undef ssize_t + +/* Define to rpl_strnlen if the replacement function should be used. */ +#undef strnlen diff --git a/config.rpath b/config.rpath index 5ead758..e082db6 100755 --- a/config.rpath +++ b/config.rpath @@ -2,28 +2,13 @@ # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # -# Copyright 1996-2002 Free Software Foundation, Inc. +# Copyright 1996-2006 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 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 -# 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. -# -# 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 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. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM @@ -34,43 +19,89 @@ # # The set of defined variables is at the end of this script. -# All known linkers require a `.a' archive for static linking (except M$VC, +# Known limitations: +# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer +# than 256 bytes, otherwise the compiler driver will dump core. The only +# 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, # which needs '.lib'). libext=a -shlibext= +shrext=.so host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +# Code taken from libtool.m4's _LT_CC_BASENAME. + +for cc_temp in $CC""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` + +# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC. + wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in - aix3* | aix4* | aix5*) + aix*) wl='-Wl,' ;; + darwin*) + case $cc_basename in + xlc*) + wl='-Wl,' + ;; + esac + ;; + mingw* | pw32* | os2*) + ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; - irix5* | irix6*) + irix5* | irix6* | nonstopux*) wl='-Wl,' ;; + newsos6) + ;; linux*) - echo '__INTEL_COMPILER' > conftest.$ac_ext - if $CC -E conftest.$ac_ext >/dev/null | grep __INTEL_COMPILER >/dev/null - then - : - else - # Intel icc - wl='-Qoption,ld,' - fi + case $cc_basename in + icc* | ecc*) + wl='-Wl,' + ;; + pgcc | pgf77 | pgf90) + wl='-Wl,' + ;; + ccc*) + wl='-Wl,' + ;; + como) + wl='-lopt=' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + wl='-Wl,' + ;; + esac + ;; + esac ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; + sco3.2v5*) + ;; solaris*) wl='-Wl,' ;; @@ -78,15 +109,20 @@ else wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - if test "x$host_vendor" = xsni; then - wl='-LD' - else - wl='-Wl,' - fi + wl='-Wl,' + ;; + sysv4*MP*) + ;; + unicos*) + wl='-Wl,' + ;; + uts4*) ;; esac fi +# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS. + hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no @@ -101,6 +137,10 @@ case "$host_os" in with_gnu_ld=no fi ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; openbsd*) with_gnu_ld=no ;; @@ -108,10 +148,18 @@ esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + # Unlike libtool, we use -rpath here, not --rpath, since the documented + # option of GNU ld is called -rpath, not --rpath. + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' case "$host_os" in aix3* | aix4* | aix5*) - # On AIX, the GNU linker is very broken - ld_shlibs=no + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' @@ -120,12 +168,12 @@ if test "$with_gnu_ld" = yes; then # 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 can use + # behavior of shared libraries on other platforms, we cannot use # them. ld_shlibs=no ;; beos*) - if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no @@ -135,29 +183,61 @@ if test "$with_gnu_ld" = yes; then # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' - ;; - solaris* | sysv5*) - if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then : else ld_shlibs=no fi ;; + interix3*) + hardcode_direct=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + netbsd*) + ;; + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + else + ld_shlibs=no + fi + ;; + esac + ;; sunos4*) hardcode_direct=yes ;; *) - if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac - if test "$ld_shlibs" = yes; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + if test "$ld_shlibs" = no; then + hardcode_libdir_flag_spec= fi else case "$host_os" in @@ -188,6 +268,7 @@ else break fi done + ;; esac fi hardcode_direct=yes @@ -207,15 +288,30 @@ else hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi + ;; esac fi + # Begin _LT_AC_SYS_LIBPATH_AIX. + echo 'int main () { return 0; }' > conftest.c + ${CC} ${LDFLAGS} conftest.c -o conftest + aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` + if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` + fi + if test -z "$aix_libpath"; then + aix_libpath="/usr/lib:/lib" + fi + rm -f conftest.c conftest + # End _LT_AC_SYS_LIBPATH_AIX. if test "$aix_use_runtimelinking" = yes; then - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else - hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" fi fi ;; @@ -225,6 +321,8 @@ else # see comment about different semantics on the GNU ld section ld_shlibs=no ;; + bsdi[45]*) + ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. @@ -234,7 +332,21 @@ else libext=lib ;; darwin* | rhapsody*) - hardcode_direct=yes + hardcode_direct=no + if test "$GCC" = yes ; then + : + else + case $cc_basename in + xlc*) + ;; + *) + ld_shlibs=no + ;; + esac + fi + ;; + dgux*) + hardcode_libdir_flag_spec='-L$libdir' ;; freebsd1*) ld_shlibs=no @@ -247,18 +359,46 @@ else hardcode_direct=yes hardcode_minus_L=yes ;; - freebsd*) + freebsd* | kfreebsd*-gnu | dragonfly*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; - hpux9* | hpux10* | hpux11*) + hpux9*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes - hardcode_minus_L=yes # Not in the search PATH, but as the default - # location of the library. + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes ;; - irix5* | irix6*) + hpux10*) + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + hpux11*) + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + ;; + *) + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + irix5* | irix6* | nonstopux*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; @@ -303,8 +443,6 @@ else fi hardcode_libdir_separator=: ;; - sco3.2v5*) - ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; @@ -314,33 +452,33 @@ else hardcode_minus_L=yes ;; sysv4) - if test "x$host_vendor" = xsno; then - hardcode_direct=yes # is this really true??? - else - hardcode_direct=no # Motorola manual says yes, but my tests say they lie - fi + case $host_vendor in + sni) + hardcode_direct=yes # is this really true??? + ;; + siemens) + hardcode_direct=no + ;; + motorola) + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac ;; sysv4.3*) ;; - sysv5*) - hardcode_libdir_flag_spec= - ;; - uts4*) - hardcode_libdir_flag_spec='-L$libdir' - ;; - dgux*) - hardcode_libdir_flag_spec='-L$libdir' - ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; - sysv4.2uw2*) - hardcode_direct=yes - hardcode_minus_L=no + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) ;; - sysv5uw7* | unixware7*) + sysv5* | sco3.2v5* | sco5v6*) + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator=':' + ;; + uts4*) + hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no @@ -349,136 +487,145 @@ else fi # Check dynamic linker characteristics +# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER. +# Unlike libtool.m4, here we don't care about _all_ names of the library, but +# only about the one the linker finds when passed -lNAME. This is the last +# element of library_names_spec in libtool.m4, or possibly two of them if the +# linker has special search rules. +library_names_spec= # the last element of library_names_spec in libtool.m4 libname_spec='lib$name' -sys_lib_dlsearch_path_spec="/lib /usr/lib" -sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" case "$host_os" in aix3*) - shlibext=so + library_names_spec='$libname.a' ;; aix4* | aix5*) - shlibext=so + library_names_spec='$libname$shrext' ;; amigaos*) - shlibext=ixlibrary + library_names_spec='$libname.a' ;; beos*) - shlibext=so + library_names_spec='$libname$shrext' ;; - bsdi4*) - shlibext=so - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + bsdi[45]*) + library_names_spec='$libname$shrext' ;; cygwin* | mingw* | pw32*) - case $GCC,$host_os in - yes,cygwin*) - shlibext=dll.a - ;; - yes,mingw*) - shlibext=dll - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"` - ;; - yes,pw32*) - shlibext=dll - ;; - *) - shlibext=dll - ;; - esac + shrext=.dll + library_names_spec='$libname.dll.a $libname.lib' ;; darwin* | rhapsody*) - shlibext=dylib + shrext=.dylib + library_names_spec='$libname$shrext' + ;; + dgux*) + library_names_spec='$libname$shrext' ;; freebsd1*) ;; - freebsd*) - shlibext=so + kfreebsd*-gnu) + library_names_spec='$libname$shrext' + ;; + freebsd* | dragonfly*) + case "$host_os" in + freebsd[123]*) + library_names_spec='$libname$shrext$versuffix' ;; + *) + library_names_spec='$libname$shrext' ;; + esac ;; gnu*) - shlibext=so + library_names_spec='$libname$shrext' ;; hpux9* | hpux10* | hpux11*) - shlibext=sl + case $host_cpu in + ia64*) + shrext=.so + ;; + hppa*64*) + shrext=.sl + ;; + *) + shrext=.sl + ;; + esac + library_names_spec='$libname$shrext' ;; - irix5* | irix6*) - shlibext=so + interix3*) + library_names_spec='$libname$shrext' + ;; + irix5* | irix6* | nonstopux*) + library_names_spec='$libname$shrext' case "$host_os" in - irix5*) + irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in - *-32|*"-32 ") libsuff= shlibsuff= ;; - *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 ;; - *-64|*"-64 ") libsuff=64 shlibsuff=64 ;; + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" ;; - linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) + linux*oldld* | linux*aout* | linux*coff*) ;; - linux-gnu*) - shlibext=so + linux*) + library_names_spec='$libname$shrext' + ;; + knetbsd*-gnu) + library_names_spec='$libname$shrext' ;; netbsd*) - shlibext=so + library_names_spec='$libname$shrext' ;; newsos6) - shlibext=so + library_names_spec='$libname$shrext' + ;; + nto-qnx*) + library_names_spec='$libname$shrext' ;; openbsd*) - shlibext=so + library_names_spec='$libname$shrext$versuffix' ;; os2*) libname_spec='$name' - shlibext=dll + shrext=.dll + library_names_spec='$libname.a' ;; osf3* | osf4* | osf5*) - shlibext=so - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - sco3.2v5*) - shlibext=so + library_names_spec='$libname$shrext' ;; solaris*) - shlibext=so + library_names_spec='$libname$shrext' ;; sunos4*) - shlibext=so + library_names_spec='$libname$shrext$versuffix' ;; - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - shlibext=so - case "$host_vendor" in - motorola) - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - uts4*) - shlibext=so - ;; - dgux*) - shlibext=so + sysv4 | sysv4.3*) + library_names_spec='$libname$shrext' ;; sysv4*MP*) - if test -d /usr/nec; then - shlibext=so - fi + library_names_spec='$libname$shrext' + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + library_names_spec='$libname$shrext' + ;; + uts4*) + library_names_spec='$libname$shrext' ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` +shlibext=`echo "$shrext" | sed -e 's,^\.,,'` +escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` +escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` -escaped_sys_lib_search_path_spec=`echo "X$sys_lib_search_path_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` -escaped_sys_lib_dlsearch_path_spec=`echo "X$sys_lib_dlsearch_path_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` -sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' < #include #include @@ -25,43 +25,43 @@ int main(){ printf("can't fork\n"); _exit(-1); - case 0 : // this is the code the child runs - close(1); // close stdout - // pipefd[1] is for writing to the pipe. We want the output - // that used to go to the standard output (file descriptor 1) - // to be written to the pipe. The following command does this, - // creating a new file descripter 1 (the lowest available) - // that writes where pipefd[1] goes. - dup (pipefd[1]); // points pipefd at file descriptor - // the child isn't going to read from the pipe, so - // pipefd[0] can be closed + case 0 : /* this is the code the child runs */ + close(1); /* close stdout */ + /* pipefd[1] is for writing to the pipe. We want the output + * that used to go to the standard output (file descriptor 1) + * to be written to the pipe. The following command does this, + * creating a new file descripter 1 (the lowest available) + * that writes where pipefd[1] goes. */ + dup (pipefd[1]); /* points pipefd at file descriptor */ + /* the child isn't going to read from the pipe, so + * pipefd[0] can be closed */ close (pipefd[0]); - //These are the commands to run, with success commented. dig and nslookup only problems - //execl ("/bin/date","date",0); // 100% - //execl ("/bin/cat", "cat", "/etc/hosts", 0); // 100% - //execl ("/usr/bin/dig", "dig", "redhat.com", 0); // 69% - //execl("/bin/sleep", "sleep", "1", 0); // 100% - execl ("/usr/bin/nslookup","nslookup","redhat.com",0); // 90% (after 100 tests), 40% (after 10 tests) - //execl ("/bin/ping","ping","-c","1","localhost",0); // 100% - //execl ("/bin/ping","ping","-c","1","192.168.10.32",0); // 100% + /* These are the commands to run, with success commented. dig and nslookup only problems */ + /*execl ("/bin/date","date",0);*/ /* 100% */ + /*execl ("/bin/cat", "cat", "/etc/hosts", 0);*/ /* 100% */ + /*execl ("/usr/bin/dig", "dig", "redhat.com", 0);*/ /* 69% */ + /*execl("/bin/sleep", "sleep", "1", 0);*/ /* 100% */ + execl ("/usr/bin/nslookup","nslookup","redhat.com",0); /* 90% (after 100 tests), 40% (after 10 tests) */ + /*execl ("/bin/ping","ping","-c","1","localhost",0);*/ /* 100% */ + /*execl ("/bin/ping","ping","-c","1","192.168.10.32",0);*/ /* 100% */ _exit(0); - default: // this is the code the parent runs + default: /* this is the code the parent runs */ - close(0); // close stdin - // Set file descriptor 0 (stdin) to read from the pipe + close(0); /* close stdin */ + /* Set file descriptor 0 (stdin) to read from the pipe */ dup (pipefd[0]); - // the parent isn't going to write to the pipe + /* the parent isn't going to write to the pipe */ close (pipefd[1]); - // Now read from the pipe + /* Now read from the pipe */ fgets(str, 1023, stdin); - //printf("1st line output is %s\n", str); + /*printf("1st line output is %s\n", str);*/ - //while (!childtermd); // Uncomment this line to fix + /*while (!childtermd);*/ /* Uncomment this line to fix */ died= wait(&status); - //printf("died=%d status=%d\n", died, status); + /*printf("died=%d status=%d\n", died, status);*/ if (died > 0) _exit(0); else _exit(1); } @@ -71,7 +71,7 @@ void popen_sigchld_handler (int signo) { if (signo == SIGCHLD) { - //printf("Caught sigchld\n"); + /*printf("Caught sigchld\n");*/ childtermd = 1; } } diff --git a/configure b/configure index b8d134c..6771664 100755 --- a/configure +++ b/configure @@ -1,7 +1,7 @@ #! /bin/sh # From configure.in . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for nagios-plugins 1.4.5. +# Generated by GNU Autoconf 2.59 for nagios-plugins 1.4.8. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation @@ -286,8 +286,8 @@ if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string="`eval $cmd`") 2>/dev/null && - echo_test_string="`eval $cmd`" && + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break @@ -422,8 +422,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='nagios-plugins' PACKAGE_TARNAME='nagios-plugins' -PACKAGE_VERSION='1.4.5' -PACKAGE_STRING='nagios-plugins 1.4.5' +PACKAGE_VERSION='1.4.8' +PACKAGE_STRING='nagios-plugins 1.4.8' PACKAGE_BUGREPORT='' ac_unique_file="NPTest.pm" @@ -465,10 +465,10 @@ ac_includes_default="\ # include #endif" -ac_config_libobj_dir=lib +gt_needs= gl_header_list= gl_func_list= -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os RELEASE INSTALL CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS NEED_SETGID KMEM_GROUP GETLOADAVG_LIBS POW_LIB PLUGIN_TEST SCRIPT_TEST WARRANTY SUPPORT with_trusted_path PKG_ARCH REV_DATESTAMP REV_TIMESTAMP PYTHON SH PERL LIBGNUTLS_CONFIG HOSTNAME BASENAME SOCKETLIBS MATHLIBS EXTRA_TEST PGLIBS PGINCLUDE RADIUSLIBS LDAPLIBS LDAPINCLUDE MYSQLCONFIG MYSQLINCLUDE MYSQLLIBS MYSQLCFLAGS KRBINCLUDE SSLINCLUDE check_tcp_ssl SSLLIBS PATH_TO_PS PATH_TO_PING PATH_TO_PING6 PATH_TO_NSLOOKUP PATH_TO_UPTIME PATH_TO_RPCINFO PATH_TO_LMSTAT PATH_TO_SMBCLIENT PATH_TO_WHO PATH_TO_SNMPGET PATH_TO_SNMPGETNEXT PATH_TO_QUAKESTAT PATH_TO_QSTAT PATH_TO_FPING PATH_TO_SSH PATH_TO_MAILQ PATH_TO_QMAIL_QSTAT PATH_TO_SWAP PATH_TO_SWAPINFO PATH_TO_LSPS PATH_TO_DIG PATH_TO_APTGET NEED_VA_LIST EXTRAS EXTRAS_ROOT EXTRA_NETOBJS DEPLIBS MKINSTALLDIRS USE_NLS MSGFMT GMSGFMT XGETTEXT MSGMERGE INTL_MACOSX_LIBS LIBICONV LTLIBICONV INTLLIBS LIBINTL LTLIBINTL POSUB STDBOOL_H HAVE__BOOL ALLOCA ALLOCA_H GETOPT_H LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os RELEASE INSTALL CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE RANLIB ac_ct_RANLIB CPP EGREP LN_S ECHO AR ac_ct_AR CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS POW_LIB PLUGIN_TEST SCRIPT_TEST WARRANTY SUPPORT with_trusted_path PKG_ARCH REV_DATESTAMP REV_TIMESTAMP PYTHON SH PERL LIBGNUTLS_CONFIG HOSTNAME BASENAME SOCKETLIBS MATHLIBS EXTRA_TEST PGLIBS PGINCLUDE RADIUSLIBS LDAPLIBS LDAPINCLUDE np_mysql_config MYSQLINCLUDE MYSQLLIBS MYSQLCFLAGS KRBINCLUDE SSLINCLUDE check_tcp_ssl SSLLIBS PATH_TO_PS PATH_TO_PING PATH_TO_PING6 PATH_TO_NSLOOKUP PATH_TO_UPTIME PATH_TO_RPCINFO PATH_TO_LMSTAT PATH_TO_SMBCLIENT PATH_TO_WHO PATH_TO_SNMPGET PATH_TO_SNMPGETNEXT PATH_TO_QUAKESTAT PATH_TO_QSTAT PATH_TO_FPING PATH_TO_SSH PATH_TO_MAILQ PATH_TO_QMAIL_QSTAT PATH_TO_SWAP PATH_TO_SWAPINFO PATH_TO_LSPS PATH_TO_DIG PATH_TO_APTGET EXTRAS EXTRAS_ROOT EXTRA_NETOBJS DEPLIBS USE_NLS MSGFMT GMSGFMT MSGFMT_015 GMSGFMT_015 XGETTEXT XGETTEXT_015 MSGMERGE localedir INTL_MACOSX_LIBS LIBICONV LTLIBICONV INTLLIBS LIBINTL LTLIBINTL POSUB GL_COND_LIBTOOL_TRUE GL_COND_LIBTOOL_FALSE ALLOCA ALLOCA_H ARPA_INET_H SYS_SOCKET_H NEED_SETGID KMEM_GROUP GETLOADAVG_LIBS GETOPT_H NETINET_IN_H STDBOOL_H HAVE__BOOL HAVE_LONG_LONG_INT HAVE_UNSIGNED_LONG_LONG_INT HAVE_INTTYPES_H HAVE_SYS_TYPES_H ABSOLUTE_STDINT_H HAVE_STDINT_H HAVE_SYS_INTTYPES_H HAVE_SYS_BITYPES_H BITSIZEOF_PTRDIFF_T BITSIZEOF_SIG_ATOMIC_T BITSIZEOF_SIZE_T BITSIZEOF_WCHAR_T BITSIZEOF_WINT_T HAVE_SIGNED_SIG_ATOMIC_T HAVE_SIGNED_WCHAR_T HAVE_SIGNED_WINT_T PTRDIFF_T_SUFFIX SIG_ATOMIC_T_SUFFIX SIZE_T_SUFFIX WCHAR_T_SUFFIX WINT_T_SUFFIX STDINT_H MKDIR_P UNISTD_H ABSOLUTE_UNISTD_H EOVERFLOW ABSOLUTE_WCHAR_H WCHAR_H HAVE_WINT_T ABSOLUTE_WCTYPE_H HAVE_WCTYPE_H WCTYPE_H LIBGNU_LIBDEPS LIBGNU_LTLIBDEPS LTLIBOBJS gl_LIBOBJS gl_LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -957,7 +957,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures nagios-plugins 1.4.5 to adapt to many kinds of systems. +\`configure' configures nagios-plugins 1.4.8 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1023,7 +1023,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of nagios-plugins 1.4.5:";; + short | recursive ) echo "Configuration of nagios-plugins 1.4.8:";; esac cat <<\_ACEOF @@ -1032,6 +1032,9 @@ Optional Features: --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-threads={posix|solaris|pth|win32} + specify multithreading API + --disable-threads build without multithread safety --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] @@ -1039,18 +1042,18 @@ Optional Features: --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) - --enable-emulate-getaddrinfo enable getaddrinfo emulation (default=no) --disable-nls do not use Native Language Support --disable-rpath do not hardcode runtime library paths --enable-redhat-pthread-workaround force Redhat patch to be applied (default: test system) - --disable-largefile omit support for large files Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - + --with-nagios-user=USER Installs executables with this user. Defaults to install user + --with-nagios-group=GROUP Installs executables with this group. Defaults to install user + --without-world-permissions Installs executables without world permissions --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use both] @@ -1062,9 +1065,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 - --with-mysql=DIR Compiles mysql plugins. Expects DIR/bin/mysql_config - --with-lwres=DIR use lwres library for getaddrinfo (default=no) - --with-proc-loadavg=PATH path to /proc/loadavg or equivalent + --with-mysql=DIR Locates mysql libraries. Expects + DIR/bin/mysql_config. Default to search for + mysql_config in PATH --with-ps-command=PATH Verbatim command to execute for ps --with-ps-format=FORMAT Format string for scanning ps output --with-ps-cols=NUM Number of columns in ps command @@ -1093,7 +1096,6 @@ Optional Packages: don't compile regex; this is the default on systems with recent-enough versions of the GNU C Library (use with caution on other systems) - --with-afs support for the Andrew File System [default=no] Some influential environment variables: CC C compiler command @@ -1200,14 +1202,14 @@ esac else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi - cd $ac_popdir + cd "$ac_popdir" done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -nagios-plugins configure 1.4.5 +nagios-plugins configure 1.4.8 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -1221,7 +1223,7 @@ cat >&5 <<_ACEOF 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.5, which was +It was created by nagios-plugins $as_me 1.4.8, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1532,17 +1534,28 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu +gt_needs="$gt_needs need-ngettext" +gl_header_list="$gl_header_list arpa/inet.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 netinet/in.h" +gl_header_list="$gl_header_list netdb.h" +gl_header_list="$gl_header_list sys/statvfs.h" gl_header_list="$gl_header_list locale.h" -gl_header_list="$gl_header_list wchar.h" -gl_header_list="$gl_header_list wctype.h" -gl_func_list="$gl_func_list isblank" +gl_func_list="$gl_func_list iswctype" gl_func_list="$gl_func_list mbrtowc" gl_func_list="$gl_func_list mempcpy" gl_func_list="$gl_func_list wcrtomb" gl_func_list="$gl_func_list wcscoll" +gl_header_list="$gl_header_list stdint.h" +gl_header_list="$gl_header_list unistd.h" +gl_func_list="$gl_func_list pipe" +gl_header_list="$gl_header_list wchar.h" +gl_func_list="$gl_func_list iswcntrl" +gl_header_list="$gl_header_list wctype.h" +gl_func_list="$gl_func_list wcwidth" @@ -1569,9 +1582,10 @@ gl_func_list="$gl_func_list wcscoll" -am__api_version="1.9" + ac_config_files="$ac_config_files gl/Makefile" + ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do +for ac_dir in build-aux $srcdir/build-aux; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" @@ -1587,14 +1601,15 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 -echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in build-aux $srcdir/build-aux" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in build-aux $srcdir/build-aux" >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. +am__api_version="1.9" # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: @@ -1876,7 +1891,7 @@ fi # Define the identity of the package. PACKAGE='nagios-plugins' - VERSION='1.4.5' + VERSION='1.4.8' cat >>confdefs.h <<_ACEOF @@ -2069,172 +2084,33 @@ RELEASE=1 + +extra_install_args="" + # Check whether --with-nagios_user or --without-nagios_user was given. if test "${with_nagios_user+set}" = set; then withval="$with_nagios_user" - { { echo "$as_me:$LINENO: error: --with-nagios-user is a deprecated option" >&5 -echo "$as_me: error: --with-nagios-user is a deprecated option" >&2;} - { (exit 1); exit 1; }; } + extra_install_args="-o $withval" fi; # Check whether --with-nagios_group or --without-nagios_group was given. if test "${with_nagios_group+set}" = set; then withval="$with_nagios_group" - { { echo "$as_me:$LINENO: error: --with-nagios-group is a deprecated option" >&5 -echo "$as_me: error: --with-nagios-group is a deprecated option" >&2;} - { (exit 1); exit 1; }; } + extra_install_args="$extra_install_args -g $withval" fi; -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_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. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - done - done - ;; -esac -done - - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL=$ac_install_sh - fi -fi -echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6 - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - - - - -cat >>confdefs.h <<\_ACEOF -#define _GNU_SOURCE 1 -_ACEOF - - -DEPDIR="${am__leading_dot}deps" - - ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo done -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 -echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi -fi - - -echo "$as_me:$LINENO: result: $_am_result" >&5 -echo "${ECHO_T}$_am_result" >&6 -rm -f confinc confmf - -# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then - enableval="$enable_dependency_tracking" +# Check whether --with-world_permissions or --without-world_permissions was given. +if test "${with_world_permissions+set}" = set; then + withval="$with_world_permissions" fi; -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi - - -if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= + +if test "x$with_world_permissions" = xno ; then + extra_install_args="$extra_install_args -m 0550" fi +INSTALL="$INSTALL $extra_install_args" +INSTALL_STRIP_PROGRAM="$INSTALL_STRIP_PROGRAM $extra_install_args" ac_ext=c @@ -2805,8 +2681,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2864,8 +2739,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2981,8 +2855,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3036,8 +2909,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3082,8 +2954,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3127,8 +2998,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3166,6 +3036,71 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +DEPDIR="${am__leading_dot}deps" + + ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi + + +echo "$as_me:$LINENO: result: $_am_result" >&5 +echo "${ECHO_T}$_am_result" >&6 +rm -f confinc confmf + +# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then + enableval="$enable_dependency_tracking" + +fi; +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + + +if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + depcc="$CC" am_compiler_list= @@ -3276,6 +3211,92 @@ 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 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + RANLIB=$ac_ct_RANLIB +else + RANLIB="$ac_cv_prog_RANLIB" +fi + + +cat >>confdefs.h <<\_ACEOF +#define _GNU_SOURCE 1 +_ACEOF + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -3589,8 +3610,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3760,8 +3780,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3824,8 +3843,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3966,7 +3984,62 @@ fi - cat >>confdefs.h <<\_ACEOF + echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5 +echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6 +if test "${ac_cv_safe_to_define___extensions__+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +# define __EXTENSIONS__ 1 + $ac_includes_default +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_safe_to_define___extensions__=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_safe_to_define___extensions__=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5 +echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6 + test $ac_cv_safe_to_define___extensions__ = yes && + cat >>confdefs.h <<\_ACEOF #define __EXTENSIONS__ 1 _ACEOF @@ -3974,1079 +4047,56 @@ _ACEOF #define _POSIX_PTHREAD_SEMANTICS 1 _ACEOF - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi - -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -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_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 - fi - ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$ac_ct_CC" && break -done - - CC=$ac_ct_CC -fi - -fi - - -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - -# Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + cat >>confdefs.h <<\_ACEOF +#define _TANDEM_SOURCE 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_compiler_gnu=yes + + + + + # Check whether --enable-threads or --disable-threads was given. +if test "${enable_threads+set}" = set; then + enableval="$enable_threads" + gl_use_threads=$enableval else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + case "$host_os" in + osf*) gl_use_threads=no ;; + *) gl_use_threads=yes ;; + esac -ac_compiler_gnu=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 -GCC=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_prog_cc_g=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_prog_cc_stdc=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -/* 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); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext -done -rm -f conftest.$ac_ext conftest.$ac_objext -CC=$ac_save_CC - -fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; - *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; -esac - -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CC" am_compiler_list= - -echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > 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 - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # 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 - ;; - none) break ;; +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_TRY_LINK 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 - # 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. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - - -if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - done - ac_cv_prog_CPP=$CPP -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu if test $ac_cv_c_compiler_gnu = yes; then echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 @@ -5195,7 +4245,7 @@ lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && break + test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in @@ -5285,7 +4335,7 @@ else if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_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 `"$lt_cv_path_LD" -v 2>&1 &6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 &1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" break ;; *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac ;; esac - esac - fi + fi + done + IFS="$lt_save_ifs" done - IFS="$lt_save_ifs" test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi @@ -5467,13 +4524,13 @@ darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; -freebsd* | kfreebsd*-gnu) +freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; @@ -5489,7 +4546,7 @@ gnu*) hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file - case "$host_cpu" in + case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so @@ -5505,6 +4562,11 @@ hpux10.20* | hpux11*) esac ;; +interix3*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; @@ -5516,11 +4578,11 @@ irix5* | irix6* | nonstopux*) ;; # This must be Linux ELF. -linux*) +linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; -netbsd*) +netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else @@ -5550,15 +4612,11 @@ osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; -sco3.2v5*) - lt_cv_deplibs_check_method=pass_all - ;; - solaris*) lt_cv_deplibs_check_method=pass_all ;; -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) +sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' @@ -5579,10 +4637,13 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) siemens) lt_cv_deplibs_check_method=pass_all ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; esac ;; -sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*) +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac @@ -5600,6 +4661,9 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + # Allow CC to be a program name with arguments. compiler=$CC @@ -5634,7 +4698,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5637 "configure"' > conftest.$ac_ext + echo '#line 4701 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5677,7 +4741,7 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - case "`/usr/bin/file conftest.o`" in + case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*linux*) @@ -5754,8 +4818,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5790,6 +4853,26 @@ echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 CFLAGS="$SAVE_CFLAGS" fi ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + esac @@ -5830,8 +4913,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6091,8 +5173,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6150,8 +5231,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6222,8 +5302,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6267,8 +5346,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6740,7 +5818,7 @@ fi # Provide some information about the compiler. -echo "$as_me:6743:" \ +echo "$as_me:5821:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6786,8 +5864,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6836,8 +5913,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6930,20 +6006,50 @@ else lt_cv_sys_max_cmd_len=8192; ;; - netbsd* | freebsd* | openbsd* | darwin* ) + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else - lt_cv_sys_max_cmd_len=65536 # usable default for *BSD + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; - *) + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. @@ -6994,9 +6100,6 @@ symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' -# Transform the above into a raw symbol and a C symbol. -symxfrm='\1 \2\3 \3' - # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" @@ -7018,7 +6121,7 @@ hpux*) # Its linker distinguishes data from code symbols lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; -linux*) +linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[ABCDGIRSTW]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" @@ -7031,9 +6134,18 @@ irix* | nonstopux*) osf*) symcode='[BCDEGQRST]' ;; -solaris* | sysv5*) +solaris*) symcode='[BDRT]' ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; sysv4) symcode='[DFNSTU]' ;; @@ -7056,8 +6168,11 @@ esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + # Write the raw and C identifiers. - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no @@ -7219,7 +6334,7 @@ esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. -Xsed='sed -e s/^X//' +Xsed='sed -e 1s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. @@ -7239,7 +6354,7 @@ rm="rm -f" default_ofile=libtool can_build_shared=yes -# All known linkers require a `.a' archive for static linking (except M$VC, +# All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" @@ -7496,6 +6611,7 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" @@ -7515,16 +6631,25 @@ old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) - old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) - old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi -cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + # Only perform the check for file, if the check method requires it case $deplibs_check_method in @@ -7551,7 +6676,7 @@ else if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) - file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then @@ -7613,7 +6738,7 @@ else if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) - file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then @@ -7708,68 +6833,25 @@ lt_simple_link_test_code='int main(){return(0);}\n' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + # Allow CC to be a program name with arguments. compiler=$CC -# -# Check for any special shared library compilation flags. -# -lt_prog_cc_shlib= -if test "$GCC" = no; then - case $host_os in - sco3.2v5*) - lt_prog_cc_shlib='-belf' - ;; - esac -fi -if test -n "$lt_prog_cc_shlib"; then - { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5 -echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;} - if echo "$old_CC $old_CFLAGS " | grep "[ ]$lt_prog_cc_shlib[ ]" >/dev/null; then : - else - { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5 -echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;} - lt_cv_prog_cc_can_build_shared=no - fi -fi - - -# -# Check to make sure the static flag actually works. -# -echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6 -if test "${lt_prog_compiler_static_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_prog_compiler_static" - printf "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - else - lt_prog_compiler_static_works=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 - -if test x"$lt_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* @@ -7794,18 +6876,20 @@ else # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -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:7800: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6882: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7804: \$? = $ac_status" >&5 + echo "$as_me:6886: \$? = $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 - if test ! -s conftest.err; then + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi @@ -7866,6 +6950,11 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_pic='-fno-common' ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. @@ -7882,7 +6971,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -7911,7 +7000,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files - case "$cc_basename" in + case $cc_basename in xlc*) lt_prog_compiler_pic='-qnocommon' lt_prog_compiler_wl='-Wl,' @@ -7929,7 +7018,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -7952,13 +7041,20 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_static='-Bstatic' ;; - linux*) - case $CC in + linux* | k*bsd*-gnu) + case $cc_basename in icc* | ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. @@ -7973,15 +7069,15 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_static='-non_shared' ;; - sco3.2v5*) - lt_prog_compiler_pic='-Kpic' - lt_prog_compiler_static='-dn' - ;; - solaris*) - lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac ;; sunos4*) @@ -7990,7 +7086,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_static='-Bstatic' ;; - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' @@ -8003,6 +7099,17 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 fi ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' @@ -8037,18 +7144,20 @@ else # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -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:8043: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7150: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8047: \$? = $ac_status" >&5 + echo "$as_me:7154: \$? = $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 - if test ! -s conftest.err; then + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works=yes fi fi @@ -8069,7 +7178,7 @@ else fi fi -case "$host_os" in +case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= @@ -8079,6 +7188,48 @@ case "$host_os" in ;; esac +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +if test "${lt_prog_compiler_static_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works=yes + fi + else + lt_prog_compiler_static_works=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 + +if test x"$lt_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o+set}" = set; then @@ -8097,23 +7248,25 @@ else # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -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:8103: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7254: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8107: \$? = $ac_status" >&5 + echo "$as_me:7258: \$? = $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 # So say no if there are warnings - if test ! -s out/conftest.err; then + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi - chmod u+w . + chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation @@ -8189,6 +7342,16 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) @@ -8199,6 +7362,10 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar with_gnu_ld=no fi ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; openbsd*) with_gnu_ld=no ;; @@ -8209,6 +7376,27 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) @@ -8259,10 +7447,10 @@ EOF allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then @@ -8271,13 +7459,60 @@ EOF echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; - netbsd*) + interix3*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + link_all_deplibs=no + else + ld_shlibs=no + fi + ;; + + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= @@ -8287,7 +7522,7 @@ EOF fi ;; - solaris* | sysv5*) + solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 @@ -8308,6 +7543,33 @@ EOF fi ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= @@ -8315,31 +7577,6 @@ EOF hardcode_shlibpath_var=no ;; - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_cmds="$tmp_archive_cmds" - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - if test $supports_anon_versioning = yes; then - archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ -cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -$echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - else - archive_expsym_cmds="$tmp_archive_cmds" - fi - else - ld_shlibs=no - fi - ;; - *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' @@ -8350,16 +7587,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ ;; esac - if test "$ld_shlibs" = yes; then - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) @@ -8371,7 +7603,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$link_static_flag"; then + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported @@ -8405,6 +7637,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ break fi done + ;; esac exp_sym_flag='-bexport' @@ -8423,7 +7656,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ link_all_deplibs=yes if test "$GCC" = yes; then - case $host_os in aix4.012|aix4.012.*) + case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` @@ -8442,8 +7675,12 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi + ;; esac shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi else # not using gcc if test "$host_cpu" = ia64; then @@ -8451,11 +7688,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then + if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' - fi + fi fi fi @@ -8491,8 +7728,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8520,12 +7756,12 @@ rm -f conftest.err conftest.$ac_objext \ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF @@ -8552,8 +7788,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8585,13 +7820,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - always_export_symbols=yes # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec=' ' + whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds it's shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; @@ -8630,7 +7863,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; darwin* | rhapsody*) - case "$host_os" in + case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag='${wl}-undefined ${wl}suppress' ;; @@ -8659,16 +7892,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi output_verbose_link_cmd='echo' archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else - case "$cc_basename" in + case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; @@ -8709,7 +7942,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu) + freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes @@ -8732,47 +7965,62 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi export_dynamic_flag_spec='${wl}-E' ;; - hpux10* | hpux11*) + hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*|ia64*) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + hardcode_direct=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; + ia64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else - case "$host_cpu" in - hppa*64*|ia64*) - archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*) - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_libdir_separator=: - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - ia64*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=no - hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld='+b $libdir' + hardcode_direct=no + hardcode_shlibpath_var=no ;; *) - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' @@ -8796,7 +8044,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi link_all_deplibs=yes ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else @@ -8866,7 +8114,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' @@ -8874,21 +8122,15 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_separator=: ;; - sco3.2v5*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ;; - solaris*) no_undefined_flag=' -z text' if test "$GCC" = yes; then + wlarc='${wl}' archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else + wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' @@ -8897,8 +8139,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; - *) # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; esac link_all_deplibs=yes ;; @@ -8955,36 +8207,45 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi fi ;; - sysv4.2uw2*) - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=no + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no hardcode_shlibpath_var=no - hardcode_runpath_var=yes - runpath_var=LD_RUN_PATH - ;; + runpath_var='LD_RUN_PATH' - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) - no_undefined_flag='${wl}-z ${wl}text' if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no ;; - sysv5*) - no_undefined_flag=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - hardcode_libdir_flag_spec= + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' + archive_cmds_need_lc=no hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi ;; uts4*) @@ -9003,11 +8264,6 @@ echo "$as_me:$LINENO: result: $ld_shlibs" >&5 echo "${ECHO_T}$ld_shlibs" >&6 test "$ld_shlibs" = no && can_build_shared=no -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - # # Do we need to explicitly link libc? # @@ -9040,6 +8296,7 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >& libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= @@ -9200,7 +8457,8 @@ cygwin* | mingw* | pw32*) dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' @@ -9230,7 +8488,7 @@ cygwin* | mingw* | pw32*) ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; @@ -9253,7 +8511,7 @@ darwin* | rhapsody*) soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -9276,20 +8534,17 @@ freebsd1*) dynamic_linker=no ;; -kfreebsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - -freebsd*) - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) @@ -9307,14 +8562,19 @@ freebsd*) freebsd2*) shlibpath_overrides_runpath=yes ;; - freebsd3.01* | freebsdelf3.01*) + freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; - *) # from 3.2 on + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; esac ;; @@ -9334,7 +8594,7 @@ hpux9* | hpux10* | hpux11*) version_type=sunos need_lib_prefix=no need_version=no - case "$host_cpu" in + case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes @@ -9374,6 +8634,18 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; @@ -9417,7 +8689,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be Linux ELF. -linux*) +linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -9433,7 +8705,7 @@ linux*) # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -9446,7 +8718,7 @@ linux*) dynamic_linker='GNU/Linux ld.so' ;; -knetbsd*-gnu) +netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -9455,7 +8727,7 @@ knetbsd*-gnu) shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes - dynamic_linker='GNU ld.so' + dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) @@ -9495,8 +8767,13 @@ nto-qnx*) openbsd*) version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no - need_version=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH @@ -9534,13 +8811,6 @@ osf3* | osf4* | osf5*) sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - ;; - solaris*) version_type=linux need_lib_prefix=no @@ -9566,7 +8836,7 @@ sunos4*) need_version=yes ;; -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) +sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -9599,6 +8869,29 @@ sysv4*MP*) fi ;; +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -9614,6 +8907,11 @@ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action= @@ -9745,8 +9043,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9849,8 +9146,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9915,8 +9211,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10009,8 +9304,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10075,8 +9369,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10142,8 +9435,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10209,8 +9501,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10269,7 +9560,7 @@ fi test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" - eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" @@ -10285,7 +9576,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null + (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self=no ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed @@ -10371,7 +9664,7 @@ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6 if test "x$lt_cv_dlopen_self" = xyes; then - LDFLAGS="$LDFLAGS $link_static_flag" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self_static+set}" = set; then @@ -10383,7 +9676,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null + (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed @@ -10487,7 +9782,7 @@ echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 fi -# Report which librarie types wil actually be built +# Report which library types will actually be built echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $can_build_shared" >&5 @@ -10499,7 +9794,7 @@ test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. -case "$host_os" in +case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then @@ -10537,7 +9832,7 @@ if test -f "$ltmain"; then # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ @@ -10641,7 +9936,7 @@ echo "$as_me: creating $ofile" >&6;} # # 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. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -10652,7 +9947,7 @@ echo "$as_me: creating $ofile" >&6;} SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="$SED -e s/^X//" +Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. @@ -10686,6 +9981,12 @@ fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo @@ -10697,6 +9998,9 @@ AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + # A language-specific compiler. CC=$lt_compiler @@ -10762,7 +10066,7 @@ max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o -# Must we lock files when doing compilation ? +# Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? @@ -11027,6 +10331,9 @@ echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} fi fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. @@ -11079,6 +10386,7 @@ hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no +hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= @@ -11096,7 +10404,7 @@ postdeps_CXX= compiler_lib_search_path_CXX= # Source file extension for C++ test sources. -ac_ext=cc +ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o @@ -11106,17 +10414,34 @@ objext_CXX=$objext lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *) { return(0); }\n' +lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + # Allow CC to be a program name with arguments. compiler=$CC +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD @@ -11127,18 +10452,27 @@ lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else - unset lt_cv_prog_gnu_ld + $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else - unset lt_cv_path_LD + $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC -cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately @@ -11209,7 +10543,7 @@ else if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_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 `"$lt_cv_path_LD" -v 2>&1 &6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11450,12 +10788,12 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF @@ -11482,8 +10820,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11515,16 +10852,26 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - always_export_symbols_CXX=yes # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX=' ' + whole_archive_flag_spec_CXX='$convenience' archive_cmds_need_lc_CXX=yes - # This is similar to how AIX traditionally builds it's shared libraries. - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_CXX=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_CXX=no + fi + ;; + chorus*) case $cc_basename in *) @@ -11534,7 +10881,6 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi esac ;; - cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. @@ -11544,7 +10890,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then @@ -11553,13 +10899,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) - case "$host_os" in + case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' ;; @@ -11597,7 +10943,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else @@ -11605,12 +10951,12 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi fi module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else - case "$cc_basename" in + case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; @@ -11623,11 +10969,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi dgux*) case $cc_basename in - ec++) + ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; - ghcx) + ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no @@ -11638,14 +10984,14 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; esac ;; - freebsd12*) + freebsd[12]*) # C++ shared libraries reported to be fairly broken before switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; - freebsd* | kfreebsd*-gnu) + freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes @@ -11662,11 +11008,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # location of the library. case $cc_basename in - CC) + CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; - aCC) + aCC*) archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when @@ -11676,7 +11022,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then @@ -11690,34 +11036,23 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then - case "$host_cpu" in - hppa*64*) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + case $host_cpu in + hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_CXX='+b $libdir' - hardcode_libdir_separator_CXX=: - ;; - ia64*) - hardcode_libdir_flag_spec_CXX='-L$libdir' ;; *) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi - case "$host_cpu" in - hppa*64*) + case $host_cpu in + hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; - ia64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; *) hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, @@ -11727,14 +11062,17 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi esac case $cc_basename in - CC) + CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; - aCC) - case "$host_cpu" in - hppa*64*|ia64*) - archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + aCC*) + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' @@ -11753,9 +11091,12 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then - case "$host_cpu" in - ia64*|hppa*64*) - archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' @@ -11769,11 +11110,25 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; esac ;; + interix3*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; irix5* | irix6*) case $cc_basename in - CC) + CC*) # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is @@ -11784,7 +11139,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi @@ -11795,9 +11150,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: ;; - linux*) + linux* | k*bsd*-gnu) case $cc_basename in - KCC) + KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file @@ -11822,7 +11177,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; - icpc) + icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols @@ -11834,8 +11189,12 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer - archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no @@ -11843,7 +11202,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; - cxx) + pgCC*) + # Portland Group C++ compiler + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' @@ -11874,7 +11242,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; mvs*) case $cc_basename in - cxx) + cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; @@ -11884,7 +11252,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; esac ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= @@ -11913,7 +11281,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; osf3*) case $cc_basename in - KCC) + KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file @@ -11929,14 +11297,14 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; - RCC) + RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; - cxx) + cxx*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: @@ -11954,7 +11322,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: @@ -11973,7 +11341,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; osf4* | osf5*) case $cc_basename in - KCC) + KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file @@ -11988,17 +11356,17 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # the KAI C++ compiler. old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; - RCC) + RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; - cxx) + cxx*) allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' @@ -12017,7 +11385,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: @@ -12038,27 +11406,14 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; - sco*) - archive_cmds_need_lc_CXX=no - case $cc_basename in - CC) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; sunos4*) case $cc_basename in - CC) + CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; - lcc) + lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no @@ -12071,36 +11426,33 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; solaris*) case $cc_basename in - CC) + CC*) # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in - solaris2.0-5 | solaris2.0-5.*) ;; + solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system - # linker. + # linker. We must also pass each convience library through + # to the system linker between allextract/defaultextract. + # The C++ compiler will combine linker options so we + # cannot just pass the convience library names through + # without $wl. # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac link_all_deplibs_CXX=yes - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[LR]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is @@ -12108,7 +11460,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; - gcx) + gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' @@ -12146,12 +11498,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; esac ;; - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + no_undefined_flag_CXX='${wl}-z,text' + allow_undefined_flag_CXX='${wl}-z,nodefs' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + export_dynamic_flag_spec_CXX='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac ;; tandem*) case $cc_basename in - NCC) + NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no @@ -12204,7 +11607,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. - output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`" + output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` for p in `eval $output_verbose_link_cmd`; do case $p in @@ -12280,6 +11683,29 @@ fi $rm -f confest.$objext +# PORTME: override above test on systems where it is broken +case $host_os in +interix3*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + predep_objects_CXX= + postdep_objects_CXX= + postdeps_CXX= + ;; + +solaris*) + case $cc_basename in + CC*) + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + postdeps_CXX='-lCstd -lCrun' + ;; + esac + ;; +esac + + case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac @@ -12327,6 +11753,10 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic @@ -12335,7 +11765,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) ;; *) @@ -12360,7 +11790,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; chorus*) case $cc_basename in - cxch68) + cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; @@ -12369,7 +11799,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files - case "$cc_basename" in + case $cc_basename in xlc*) lt_prog_compiler_pic_CXX='-qnocommon' lt_prog_compiler_wl_CXX='-Wl,' @@ -12378,10 +11808,10 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; dgux*) case $cc_basename in - ec++) + ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; - ghcx) + ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; @@ -12389,22 +11819,22 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; esac ;; - freebsd* | kfreebsd*-gnu) + freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in - CC) + CC*) lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; - aCC) + aCC*) lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" - case "$host_cpu" in + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -12417,9 +11847,13 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; esac ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; irix5* | irix6* | nonstopux*) case $cc_basename in - CC) + CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. @@ -12428,20 +11862,26 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; esac ;; - linux*) + linux* | k*bsd*-gnu) case $cc_basename in - KCC) + KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; - icpc) + icpc* | ecpc*) # Intel C++ lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; - cxx) + pgCC*) + # Portland Group C++ compiler. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fpic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. @@ -12458,25 +11898,25 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; mvs*) case $cc_basename in - cxx) + cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; - netbsd*) + netbsd* | netbsdelf*-gnu) ;; osf3* | osf4* | osf5*) case $cc_basename in - KCC) + KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; - RCC) + RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; - cxx) + cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha @@ -12490,24 +11930,15 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; psos*) ;; - sco*) - case $cc_basename in - CC) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - *) - ;; - esac - ;; solaris*) case $cc_basename in - CC) + CC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; - gcx) + gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; @@ -12517,12 +11948,12 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; sunos4*) case $cc_basename in - CC) + CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; - lcc) + lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; @@ -12532,7 +11963,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; tandem*) case $cc_basename in - NCC) + NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; @@ -12540,7 +11971,14 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; esac ;; - unixware*) + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + esac ;; vxworks*) ;; @@ -12573,18 +12011,20 @@ else # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -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:12579: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12017: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12583: \$? = $ac_status" >&5 + echo "$as_me:12021: \$? = $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 - if test ! -s conftest.err; then + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_CXX=yes fi fi @@ -12605,7 +12045,7 @@ else fi fi -case "$host_os" in +case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= @@ -12615,6 +12055,48 @@ case "$host_os" in ;; esac +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" +echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +if test "${lt_prog_compiler_static_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_CXX=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_CXX=yes + fi + else + lt_prog_compiler_static_works_CXX=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6 + +if test x"$lt_prog_compiler_static_works_CXX" = xyes; then + : +else + lt_prog_compiler_static_CXX= +fi + + echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then @@ -12633,23 +12115,25 @@ else # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -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:12639: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12121: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12643: \$? = $ac_status" >&5 + echo "$as_me:12125: \$? = $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 # So say no if there are warnings - if test ! -s out/conftest.err; then + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi - chmod u+w . + chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation @@ -12704,7 +12188,10 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw*) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + ;; + linux* | k*bsd*-gnu) + link_all_deplibs_CXX=no ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' @@ -12715,11 +12202,6 @@ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6 test "$ld_shlibs_CXX" = no && can_build_shared=no -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - # # Do we need to explicitly link libc? # @@ -12752,6 +12234,7 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >& libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= @@ -12912,7 +12395,8 @@ cygwin* | mingw* | pw32*) dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' @@ -12942,7 +12426,7 @@ cygwin* | mingw* | pw32*) ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; @@ -12965,7 +12449,7 @@ darwin* | rhapsody*) soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -12988,20 +12472,17 @@ freebsd1*) dynamic_linker=no ;; -kfreebsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - -freebsd*) - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) @@ -13019,14 +12500,19 @@ freebsd*) freebsd2*) shlibpath_overrides_runpath=yes ;; - freebsd3.01* | freebsdelf3.01*) + freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; - *) # from 3.2 on + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; esac ;; @@ -13046,7 +12532,7 @@ hpux9* | hpux10* | hpux11*) version_type=sunos need_lib_prefix=no need_version=no - case "$host_cpu" in + case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes @@ -13086,6 +12572,18 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; @@ -13129,7 +12627,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be Linux ELF. -linux*) +linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -13145,7 +12643,7 @@ linux*) # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -13158,7 +12656,7 @@ linux*) dynamic_linker='GNU/Linux ld.so' ;; -knetbsd*-gnu) +netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -13167,7 +12665,7 @@ knetbsd*-gnu) shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes - dynamic_linker='GNU ld.so' + dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) @@ -13207,8 +12705,13 @@ nto-qnx*) openbsd*) version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no - need_version=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH @@ -13246,13 +12749,6 @@ osf3* | osf4* | osf5*) sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - ;; - solaris*) version_type=linux need_lib_prefix=no @@ -13278,7 +12774,7 @@ sunos4*) need_version=yes ;; -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) +sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -13311,6 +12807,29 @@ sysv4*MP*) fi ;; +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -13326,6 +12845,11 @@ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_CXX= @@ -13363,841 +12887,6 @@ elif test "$shlibpath_overrides_runpath" = yes || enable_fast_install=needless fi -striplib= -old_striplib= -echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - ;; - *) - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - ;; - esac -fi - -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dl_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - echo "$as_me:$LINENO: checking for shl_load" >&5 -echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 -if test "${ac_cv_func_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ -#define shl_load innocuous_shl_load - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef shl_load - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shl_load (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_shl_load) || defined (__stub___shl_load) -choke me -#else -char (*f) () = shl_load; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != shl_load; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_func_shl_load=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -echo "${ECHO_T}$ac_cv_func_shl_load" >&6 -if test $ac_cv_func_shl_load = yes; then - lt_cv_dlopen="shl_load" -else - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 -if test "${ac_cv_lib_dld_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shl_load (); -int -main () -{ -shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dld_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dld_shl_load=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 -if test $ac_cv_lib_dld_shl_load = yes; then - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" -else - echo "$as_me:$LINENO: checking for dlopen" >&5 -echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 -if test "${ac_cv_func_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef dlopen - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_dlopen) || defined (__stub___dlopen) -choke me -#else -char (*f) () = dlopen; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != dlopen; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_func_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -echo "${ECHO_T}$ac_cv_func_dlopen" >&6 -if test $ac_cv_func_dlopen = yes; then - lt_cv_dlopen="dlopen" -else - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dl_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 -echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 -if test "${ac_cv_lib_svld_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_svld_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_svld_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 -if test $ac_cv_lib_svld_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 -echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 -if test "${ac_cv_lib_dld_dld_link+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dld_link (); -int -main () -{ -dld_link (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dld_dld_link=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dld_dld_link=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 -if test $ac_cv_lib_dld_dld_link = yes; then - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 -echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 -if test "${lt_cv_dlopen_self+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - - exit (status); -} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self" >&6 - - if test "x$lt_cv_dlopen_self" = xyes; then - LDFLAGS="$LDFLAGS $link_static_flag" - echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 -echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 -if test "${lt_cv_dlopen_self_static+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - - exit (status); -} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh @@ -14212,7 +12901,7 @@ if test -f "$ltmain"; then # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ @@ -14313,6 +13002,12 @@ fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo @@ -14324,6 +13019,9 @@ AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + # A language-specific compiler. CC=$lt_compiler_CXX @@ -14389,7 +13087,7 @@ max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX -# Must we lock files when doing compilation ? +# Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? @@ -14666,16 +13364,42 @@ lt_simple_link_test_code=" program t\n end\n" # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + # Allow CC to be a program name with arguments. compiler=$CC +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC compiler_F77=$CC -cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 @@ -14688,7 +13412,7 @@ test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. -case "$host_os" in +case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then @@ -14697,7 +13421,9 @@ aix3*) fi ;; aix4* | aix5*) - test "$enable_shared" = yes && enable_static=no + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi ;; esac echo "$as_me:$LINENO: result: $enable_shared" >&5 @@ -14710,8 +13436,6 @@ test "$enable_shared" = yes || enable_static=yes echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6 -test "$ld_shlibs_F77" = no && can_build_shared=no - GCC_F77="$G77" LD_F77="$LD" @@ -14758,6 +13482,11 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_pic_F77='-fno-common' ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. @@ -14774,7 +13503,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -14803,7 +13532,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files - case "$cc_basename" in + case $cc_basename in xlc*) lt_prog_compiler_pic_F77='-qnocommon' lt_prog_compiler_wl_F77='-Wl,' @@ -14821,7 +13550,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_wl_F77='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -14844,13 +13573,20 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_static_F77='-Bstatic' ;; - linux*) - case $CC in + linux* | k*bsd*-gnu) + case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fpic' + lt_prog_compiler_static_F77='-Bstatic' + ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. @@ -14865,15 +13601,15 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_static_F77='-non_shared' ;; - sco3.2v5*) - lt_prog_compiler_pic_F77='-Kpic' - lt_prog_compiler_static_F77='-dn' - ;; - solaris*) - lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_F77='-Qoption ld ';; + *) + lt_prog_compiler_wl_F77='-Wl,';; + esac ;; sunos4*) @@ -14882,7 +13618,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_static_F77='-Bstatic' ;; - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' @@ -14895,6 +13631,17 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 fi ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_can_build_shared_F77=no + ;; + uts4*) lt_prog_compiler_pic_F77='-pic' lt_prog_compiler_static_F77='-Bstatic' @@ -14929,18 +13676,20 @@ else # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -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:14935: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13682: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14939: \$? = $ac_status" >&5 + echo "$as_me:13686: \$? = $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 - if test ! -s conftest.err; then + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_F77=yes fi fi @@ -14961,7 +13710,7 @@ else fi fi -case "$host_os" in +case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= @@ -14971,6 +13720,48 @@ case "$host_os" in ;; esac +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" +echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +if test "${lt_prog_compiler_static_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_F77=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_F77=yes + fi + else + lt_prog_compiler_static_works_F77=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6 + +if test x"$lt_prog_compiler_static_works_F77" = xyes; then + : +else + lt_prog_compiler_static_F77= +fi + + echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then @@ -14989,23 +13780,25 @@ else # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -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:14995: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13786: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14999: \$? = $ac_status" >&5 + echo "$as_me:13790: \$? = $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 # So say no if there are warnings - if test ! -s out/conftest.err; then + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes fi fi - chmod u+w . + chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation @@ -15081,6 +13874,16 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) @@ -15091,6 +13894,10 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar with_gnu_ld=no fi ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; openbsd*) with_gnu_ld=no ;; @@ -15101,6 +13908,27 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_F77='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_F77= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) @@ -15151,10 +13979,10 @@ EOF allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then @@ -15163,13 +13991,60 @@ EOF echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else - ld_shlibs=no + ld_shlibs_F77=no fi ;; - netbsd*) + interix3*) + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + link_all_deplibs_F77=no + else + ld_shlibs_F77=no + fi + ;; + + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= @@ -15179,7 +14054,7 @@ EOF fi ;; - solaris* | sysv5*) + solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_F77=no cat <&2 @@ -15200,6 +14075,33 @@ EOF fi ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_F77=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + ;; + sunos4*) archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= @@ -15207,31 +14109,6 @@ EOF hardcode_shlibpath_var_F77=no ;; - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_cmds_F77="$tmp_archive_cmds" - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - if test $supports_anon_versioning = yes; then - archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ -cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -$echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - else - archive_expsym_cmds_F77="$tmp_archive_cmds" - fi - else - ld_shlibs_F77=no - fi - ;; - *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' @@ -15242,16 +14119,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ ;; esac - if test "$ld_shlibs_F77" = yes; then - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_F77='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_F77= - fi + if test "$ld_shlibs_F77" = no; then + runpath_var= + hardcode_libdir_flag_spec_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= fi else # PORTME fill in a description of your system's linker (not GNU ld) @@ -15263,7 +14135,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_F77=yes - if test "$GCC" = yes && test -z "$link_static_flag"; then + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_F77=unsupported @@ -15297,6 +14169,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ break fi done + ;; esac exp_sym_flag='-bexport' @@ -15315,7 +14188,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ link_all_deplibs_F77=yes if test "$GCC" = yes; then - case $host_os in aix4.012|aix4.012.*) + case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` @@ -15334,8 +14207,12 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_libdir_separator_F77= fi + ;; esac shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi else # not using gcc if test "$host_cpu" = ia64; then @@ -15343,11 +14220,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then + if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' - fi + fi fi fi @@ -15373,8 +14250,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15402,12 +14278,12 @@ rm -f conftest.err conftest.$ac_objext \ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_F77="-z nodefs" - archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF @@ -15424,8 +14300,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15457,13 +14332,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - always_export_symbols_F77=yes # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_F77=' ' + whole_archive_flag_spec_F77='$convenience' archive_cmds_need_lc_F77=yes - # This is similar to how AIX traditionally builds it's shared libraries. - archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; @@ -15497,12 +14370,12 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' + fix_srcfile_path_F77='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) - case "$host_os" in + case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' ;; @@ -15531,16 +14404,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi output_verbose_link_cmd='echo' archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else - case "$cc_basename" in + case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; @@ -15581,7 +14454,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu) + freebsd* | dragonfly*) archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes @@ -15604,47 +14477,62 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi export_dynamic_flag_spec_F77='${wl}-E' ;; - hpux10* | hpux11*) + hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*|ia64*) + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; + ia64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; *) archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else - case "$host_cpu" in - hppa*64*|ia64*) - archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*) - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld_F77='+b $libdir' - hardcode_libdir_separator_F77=: - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - ;; - ia64*) - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_F77='+b $libdir' + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no ;; *) - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' @@ -15668,7 +14556,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi link_all_deplibs_F77=yes ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else @@ -15738,7 +14626,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' @@ -15746,21 +14634,15 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_separator_F77=: ;; - sco3.2v5*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - export_dynamic_flag_spec_F77='${wl}-Bexport' - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ;; - solaris*) no_undefined_flag_F77=' -z text' if test "$GCC" = yes; then + wlarc='${wl}' archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else + wlarc='' archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' @@ -15769,8 +14651,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_shlibpath_var_F77=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; - *) # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; esac link_all_deplibs_F77=yes ;; @@ -15827,36 +14719,45 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi fi ;; - sysv4.2uw2*) - archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_minus_L_F77=no + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + no_undefined_flag_F77='${wl}-z,text' + archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no - hardcode_runpath_var=yes - runpath_var=LD_RUN_PATH - ;; + runpath_var='LD_RUN_PATH' - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) - no_undefined_flag_F77='${wl}-z ${wl}text' if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_F77=no ;; - sysv5*) - no_undefined_flag_F77=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - hardcode_libdir_flag_spec_F77= + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_F77='${wl}-z,text' + allow_undefined_flag_F77='${wl}-z,nodefs' + archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + export_dynamic_flag_spec_F77='${wl}-Bexport' runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi ;; uts4*) @@ -15875,11 +14776,6 @@ echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 echo "${ECHO_T}$ld_shlibs_F77" >&6 test "$ld_shlibs_F77" = no && can_build_shared=no -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - # # Do we need to explicitly link libc? # @@ -15912,6 +14808,7 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >& libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_F77 + pic_flag=$lt_prog_compiler_pic_F77 compiler_flags=-v linker_flags=-v verstring= @@ -16072,7 +14969,8 @@ cygwin* | mingw* | pw32*) dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' @@ -16102,7 +15000,7 @@ cygwin* | mingw* | pw32*) ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; @@ -16125,7 +15023,7 @@ darwin* | rhapsody*) soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -16148,20 +15046,17 @@ freebsd1*) dynamic_linker=no ;; -kfreebsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - -freebsd*) - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) @@ -16179,14 +15074,19 @@ freebsd*) freebsd2*) shlibpath_overrides_runpath=yes ;; - freebsd3.01* | freebsdelf3.01*) + freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; - *) # from 3.2 on + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; esac ;; @@ -16206,7 +15106,7 @@ hpux9* | hpux10* | hpux11*) version_type=sunos need_lib_prefix=no need_version=no - case "$host_cpu" in + case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes @@ -16246,6 +15146,18 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; @@ -16289,7 +15201,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be Linux ELF. -linux*) +linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -16305,7 +15217,7 @@ linux*) # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -16318,7 +15230,7 @@ linux*) dynamic_linker='GNU/Linux ld.so' ;; -knetbsd*-gnu) +netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -16327,7 +15239,7 @@ knetbsd*-gnu) shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes - dynamic_linker='GNU ld.so' + dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) @@ -16367,8 +15279,13 @@ nto-qnx*) openbsd*) version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no - need_version=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH @@ -16406,13 +15323,6 @@ osf3* | osf4* | osf5*) sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - ;; - solaris*) version_type=linux need_lib_prefix=no @@ -16438,7 +15348,7 @@ sunos4*) need_version=yes ;; -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) +sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -16471,6 +15381,29 @@ sysv4*MP*) fi ;; +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -16486,6 +15419,11 @@ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_F77= @@ -16523,36 +15461,6 @@ elif test "$shlibpath_overrides_runpath" = yes || enable_fast_install=needless fi -striplib= -old_striplib= -echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - ;; - *) - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - ;; - esac -fi - - # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh @@ -16567,7 +15475,7 @@ if test -f "$ltmain"; then # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ @@ -16668,6 +15576,12 @@ fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo @@ -16679,6 +15593,9 @@ AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + # A language-specific compiler. CC=$lt_compiler_F77 @@ -16744,7 +15661,7 @@ max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 -# Must we lock files when doing compilation ? +# Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? @@ -16982,26 +15899,55 @@ objext_GCJ=$objext lt_simple_compile_test_code="class foo {}\n" # Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String argv) {}; }\n' +lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + # Allow CC to be a program name with arguments. compiler=$CC +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC compiler_GCJ=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + # GCJ did not exist at the time GCC didn't implicitly link libc in. archive_cmds_need_lc_GCJ=no +old_archive_cmds_GCJ=$old_archive_cmds + lt_prog_compiler_no_builtin_flag_GCJ= @@ -17024,18 +15970,20 @@ else # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -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:17030: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15976: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17034: \$? = $ac_status" >&5 + echo "$as_me:15980: \$? = $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 - if test ! -s conftest.err; then + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi @@ -17096,6 +16044,11 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_pic_GCJ='-fno-common' ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. @@ -17112,7 +16065,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -17141,7 +16094,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files - case "$cc_basename" in + case $cc_basename in xlc*) lt_prog_compiler_pic_GCJ='-qnocommon' lt_prog_compiler_wl_GCJ='-Wl,' @@ -17159,7 +16112,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_wl_GCJ='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -17182,13 +16135,20 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_static_GCJ='-Bstatic' ;; - linux*) - case $CC in + linux* | k*bsd*-gnu) + case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-fpic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. @@ -17203,15 +16163,15 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_static_GCJ='-non_shared' ;; - sco3.2v5*) - lt_prog_compiler_pic_GCJ='-Kpic' - lt_prog_compiler_static_GCJ='-dn' - ;; - solaris*) - lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_GCJ='-Qoption ld ';; + *) + lt_prog_compiler_wl_GCJ='-Wl,';; + esac ;; sunos4*) @@ -17220,7 +16180,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_static_GCJ='-Bstatic' ;; - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' @@ -17233,6 +16193,17 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 fi ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_can_build_shared_GCJ=no + ;; + uts4*) lt_prog_compiler_pic_GCJ='-pic' lt_prog_compiler_static_GCJ='-Bstatic' @@ -17267,18 +16238,20 @@ else # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -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:17273: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16244: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17277: \$? = $ac_status" >&5 + echo "$as_me:16248: \$? = $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 - if test ! -s conftest.err; then + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_GCJ=yes fi fi @@ -17299,7 +16272,7 @@ else fi fi -case "$host_os" in +case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= @@ -17309,6 +16282,48 @@ case "$host_os" in ;; esac +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" +echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_GCJ=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_GCJ=yes + fi + else + lt_prog_compiler_static_works_GCJ=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6 + +if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then + : +else + lt_prog_compiler_static_GCJ= +fi + + echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then @@ -17327,23 +16342,25 @@ else # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -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:17333: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16348: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17337: \$? = $ac_status" >&5 + echo "$as_me:16352: \$? = $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 # So say no if there are warnings - if test ! -s out/conftest.err; then + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_GCJ=yes fi fi - chmod u+w . + chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation @@ -17419,6 +16436,16 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) @@ -17429,6 +16456,10 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar with_gnu_ld=no fi ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; openbsd*) with_gnu_ld=no ;; @@ -17439,6 +16470,27 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_GCJ= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) @@ -17489,10 +16541,10 @@ EOF allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes - export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then @@ -17501,13 +16553,60 @@ EOF echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else - ld_shlibs=no + ld_shlibs_GCJ=no fi ;; - netbsd*) + interix3*) + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + link_all_deplibs_GCJ=no + else + ld_shlibs_GCJ=no + fi + ;; + + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= @@ -17517,7 +16616,7 @@ EOF fi ;; - solaris* | sysv5*) + solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_GCJ=no cat <&2 @@ -17538,6 +16637,33 @@ EOF fi ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_GCJ=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + ;; + sunos4*) archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= @@ -17545,31 +16671,6 @@ EOF hardcode_shlibpath_var_GCJ=no ;; - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_cmds_GCJ="$tmp_archive_cmds" - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - if test $supports_anon_versioning = yes; then - archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ -cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -$echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - else - archive_expsym_cmds_GCJ="$tmp_archive_cmds" - fi - else - ld_shlibs_GCJ=no - fi - ;; - *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' @@ -17580,16 +16681,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ ;; esac - if test "$ld_shlibs_GCJ" = yes; then - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_GCJ= - fi + if test "$ld_shlibs_GCJ" = no; then + runpath_var= + hardcode_libdir_flag_spec_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= fi else # PORTME fill in a description of your system's linker (not GNU ld) @@ -17601,7 +16697,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_GCJ=yes - if test "$GCC" = yes && test -z "$link_static_flag"; then + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_GCJ=unsupported @@ -17635,6 +16731,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ break fi done + ;; esac exp_sym_flag='-bexport' @@ -17653,7 +16750,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ link_all_deplibs_GCJ=yes if test "$GCC" = yes; then - case $host_os in aix4.012|aix4.012.*) + case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` @@ -17672,8 +16769,12 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_libdir_separator_GCJ= fi + ;; esac shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi else # not using gcc if test "$host_cpu" = ia64; then @@ -17681,11 +16782,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then + if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' - fi + fi fi fi @@ -17721,8 +16822,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17750,12 +16850,12 @@ rm -f conftest.err conftest.$ac_objext \ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_GCJ="-z nodefs" - archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF @@ -17782,8 +16882,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17815,13 +16914,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # -berok will link without error, but may produce a broken library. no_undefined_flag_GCJ=' ${wl}-bernotok' allow_undefined_flag_GCJ=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - always_export_symbols_GCJ=yes # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_GCJ=' ' + whole_archive_flag_spec_GCJ='$convenience' archive_cmds_need_lc_GCJ=yes - # This is similar to how AIX traditionally builds it's shared libraries. - archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; @@ -17855,12 +16952,12 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' + fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; darwin* | rhapsody*) - case "$host_os" in + case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' ;; @@ -17889,16 +16986,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else - case "$cc_basename" in + case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; @@ -17939,7 +17036,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu) + freebsd* | dragonfly*) archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes @@ -17962,47 +17059,62 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi export_dynamic_flag_spec_GCJ='${wl}-E' ;; - hpux10* | hpux11*) + hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*|ia64*) + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; + ia64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; *) archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else - case "$host_cpu" in - hppa*64*|ia64*) - archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + case $host_cpu in + hppa*64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*) - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' - hardcode_libdir_separator_GCJ=: - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no - ;; - ia64*) - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no ;; *) - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' @@ -18026,7 +17138,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi link_all_deplibs_GCJ=yes ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else @@ -18096,7 +17208,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_GCJ='-rpath $libdir' @@ -18104,21 +17216,15 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_separator_GCJ=: ;; - sco3.2v5*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_GCJ=no - export_dynamic_flag_spec_GCJ='${wl}-Bexport' - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ;; - solaris*) no_undefined_flag_GCJ=' -z text' if test "$GCC" = yes; then + wlarc='${wl}' archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else + wlarc='' archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' @@ -18127,8 +17233,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_shlibpath_var_GCJ=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; - *) # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; esac link_all_deplibs_GCJ=yes ;; @@ -18185,36 +17301,45 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi fi ;; - sysv4.2uw2*) - archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes - hardcode_minus_L_GCJ=no + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + no_undefined_flag_GCJ='${wl}-z,text' + archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no - hardcode_runpath_var=yes - runpath_var=LD_RUN_PATH - ;; + runpath_var='LD_RUN_PATH' - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) - no_undefined_flag_GCJ='${wl}-z ${wl}text' if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_GCJ=no ;; - sysv5*) - no_undefined_flag_GCJ=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - hardcode_libdir_flag_spec_GCJ= + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_GCJ='${wl}-z,text' + allow_undefined_flag_GCJ='${wl}-z,nodefs' + archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-Bexport' runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi ;; uts4*) @@ -18233,11 +17358,6 @@ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 echo "${ECHO_T}$ld_shlibs_GCJ" >&6 test "$ld_shlibs_GCJ" = no && can_build_shared=no -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - # # Do we need to explicitly link libc? # @@ -18270,6 +17390,7 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >& libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_GCJ + pic_flag=$lt_prog_compiler_pic_GCJ compiler_flags=-v linker_flags=-v verstring= @@ -18430,7 +17551,8 @@ cygwin* | mingw* | pw32*) dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' @@ -18460,7 +17582,7 @@ cygwin* | mingw* | pw32*) ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; @@ -18483,7 +17605,7 @@ darwin* | rhapsody*) soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -18506,20 +17628,17 @@ freebsd1*) dynamic_linker=no ;; -kfreebsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - -freebsd*) - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) @@ -18537,14 +17656,19 @@ freebsd*) freebsd2*) shlibpath_overrides_runpath=yes ;; - freebsd3.01* | freebsdelf3.01*) + freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; - *) # from 3.2 on + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; esac ;; @@ -18564,7 +17688,7 @@ hpux9* | hpux10* | hpux11*) version_type=sunos need_lib_prefix=no need_version=no - case "$host_cpu" in + case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes @@ -18604,6 +17728,18 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; @@ -18647,7 +17783,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be Linux ELF. -linux*) +linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -18663,7 +17799,7 @@ linux*) # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -18676,7 +17812,7 @@ linux*) dynamic_linker='GNU/Linux ld.so' ;; -knetbsd*-gnu) +netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -18685,7 +17821,7 @@ knetbsd*-gnu) shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes - dynamic_linker='GNU ld.so' + dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) @@ -18725,8 +17861,13 @@ nto-qnx*) openbsd*) version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no - need_version=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH @@ -18764,13 +17905,6 @@ osf3* | osf4* | osf5*) sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - ;; - solaris*) version_type=linux need_lib_prefix=no @@ -18796,7 +17930,7 @@ sunos4*) need_version=yes ;; -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) +sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -18829,6 +17963,29 @@ sysv4*MP*) fi ;; +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -18844,6 +18001,11 @@ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_GCJ= @@ -18881,841 +18043,6 @@ elif test "$shlibpath_overrides_runpath" = yes || enable_fast_install=needless fi -striplib= -old_striplib= -echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - ;; - *) - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - ;; - esac -fi - -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dl_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - echo "$as_me:$LINENO: checking for shl_load" >&5 -echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 -if test "${ac_cv_func_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ -#define shl_load innocuous_shl_load - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef shl_load - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shl_load (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_shl_load) || defined (__stub___shl_load) -choke me -#else -char (*f) () = shl_load; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != shl_load; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_func_shl_load=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -echo "${ECHO_T}$ac_cv_func_shl_load" >&6 -if test $ac_cv_func_shl_load = yes; then - lt_cv_dlopen="shl_load" -else - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 -if test "${ac_cv_lib_dld_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shl_load (); -int -main () -{ -shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dld_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dld_shl_load=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 -if test $ac_cv_lib_dld_shl_load = yes; then - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" -else - echo "$as_me:$LINENO: checking for dlopen" >&5 -echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 -if test "${ac_cv_func_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef dlopen - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_dlopen) || defined (__stub___dlopen) -choke me -#else -char (*f) () = dlopen; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != dlopen; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_func_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -echo "${ECHO_T}$ac_cv_func_dlopen" >&6 -if test $ac_cv_func_dlopen = yes; then - lt_cv_dlopen="dlopen" -else - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dl_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 -echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 -if test "${ac_cv_lib_svld_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_svld_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_svld_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 -if test $ac_cv_lib_svld_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 -echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 -if test "${ac_cv_lib_dld_dld_link+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dld_link (); -int -main () -{ -dld_link (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dld_dld_link=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dld_dld_link=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 -if test $ac_cv_lib_dld_dld_link = yes; then - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 -echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 -if test "${lt_cv_dlopen_self+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - - exit (status); -} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self" >&6 - - if test "x$lt_cv_dlopen_self" = xyes; then - LDFLAGS="$LDFLAGS $link_static_flag" - echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 -echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 -if test "${lt_cv_dlopen_self_static+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - - exit (status); -} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh @@ -19730,7 +18057,7 @@ if test -f "$ltmain"; then # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ @@ -19831,6 +18158,12 @@ fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo @@ -19842,6 +18175,9 @@ AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + # A language-specific compiler. CC=$lt_compiler_GCJ @@ -19907,7 +18243,7 @@ max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ -# Must we lock files when doing compilation ? +# Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? @@ -20151,15 +18487,42 @@ lt_simple_link_test_code="$lt_simple_compile_test_code" # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + # Allow CC to be a program name with arguments. compiler=$CC +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC compiler_RC=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + lt_cv_prog_compiler_c_o_RC=yes # The else clause should only fire when bootstrapping the @@ -20175,7 +18538,7 @@ if test -f "$ltmain"; then # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ @@ -20276,6 +18639,12 @@ fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo @@ -20287,6 +18656,9 @@ AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + # A language-specific compiler. CC=$lt_compiler_RC @@ -20352,7 +18724,7 @@ max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC -# Must we lock files when doing compilation ? +# Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? @@ -20628,536 +19000,108 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' -echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then +if test "x$CC" != xcc; then + echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 +echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6 +else + echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 +echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6 +fi +set dummy $CC; ac_cc=`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 echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.make <<\_ACEOF -all: - @echo 'ac_maketemp="$(MAKE)"' + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 conftest.$ac_objext >&5' +if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; +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' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5' + if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; + 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_make_${ac_make}_set=no + eval ac_cv_prog_cc_${ac_cc}_c_o=no fi -rm -f conftest.make +rm -f conftest* + fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then +if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - SET_MAKE="MAKE=${MAKE-make}" -fi - -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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_AWK+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AWK="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - echo "$as_me:$LINENO: result: $AWK" >&5 -echo "${ECHO_T}$AWK" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$AWK" && break -done - - - -for ac_header in stdlib.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ----------------------------------------- ## -## Report this to the nagios-plugins lists. ## -## ----------------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 -echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6 -if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_malloc_0_nonnull=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#if STDC_HEADERS || HAVE_STDLIB_H -# include -#else -char *malloc (); -#endif - -int -main () -{ -exit (malloc (0) ? 0 : 1); - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_malloc_0_nonnull=yes -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_func_malloc_0_nonnull=no -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 -echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6 -if test $ac_cv_func_malloc_0_nonnull = yes; then cat >>confdefs.h <<\_ACEOF -#define HAVE_MALLOC 1 -_ACEOF - -else - cat >>confdefs.h <<\_ACEOF -#define HAVE_MALLOC 0 -_ACEOF - - case $LIBOBJS in - "malloc.$ac_objext" | \ - *" malloc.$ac_objext" | \ - "malloc.$ac_objext "* | \ - *" malloc.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;; -esac - - -cat >>confdefs.h <<\_ACEOF -#define malloc rpl_malloc +#define NO_MINUS_C_MINUS_O 1 _ACEOF fi - - - -for ac_header in stdlib.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +# FIXME: we rely on the cache variable name because +# there is no other way. +set dummy $CC +ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` +if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != 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 -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ----------------------------------------- ## -## Report this to the nagios-plugins lists. ## -## ----------------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -echo "$as_me:$LINENO: checking for GNU libc compatible realloc" >&5 -echo $ECHO_N "checking for GNU libc compatible realloc... $ECHO_C" >&6 -if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_realloc_0_nonnull=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#if STDC_HEADERS || HAVE_STDLIB_H -# include -#else -char *realloc (); -#endif - -int -main () -{ -exit (realloc (0, 0) ? 0 : 1); - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_realloc_0_nonnull=yes -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_func_realloc_0_nonnull=no -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_func_realloc_0_nonnull" >&5 -echo "${ECHO_T}$ac_cv_func_realloc_0_nonnull" >&6 -if test $ac_cv_func_realloc_0_nonnull = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_REALLOC 1 -_ACEOF - -else - cat >>confdefs.h <<\_ACEOF -#define HAVE_REALLOC 0 -_ACEOF - - case $LIBOBJS in - "realloc.$ac_objext" | \ - *" realloc.$ac_objext" | \ - "realloc.$ac_objext "* | \ - *" realloc.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS realloc.$ac_objext" ;; -esac - - -cat >>confdefs.h <<\_ACEOF -#define realloc rpl_realloc -_ACEOF - -fi - echo "$as_me:$LINENO: checking for error_at_line" >&5 @@ -21189,8 +19133,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -21226,1974 +19169,6 @@ esac fi - -ac_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/$ac_config_libobj_dir/getloadavg.c" || - { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5 -echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;} - { (exit 1); exit 1; }; } - -ac_save_LIBS=$LIBS - -# Check for getloadavg, but be sure not to touch the cache variable. -(echo "$as_me:$LINENO: checking for getloadavg" >&5 -echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6 -if test "${ac_cv_func_getloadavg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define getloadavg to an innocuous variant, in case declares getloadavg. - For example, HP-UX 11i declares gettimeofday. */ -#define getloadavg innocuous_getloadavg - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char getloadavg (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef getloadavg - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char getloadavg (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_getloadavg) || defined (__stub___getloadavg) -choke me -#else -char (*f) () = getloadavg; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != getloadavg; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_getloadavg=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_func_getloadavg=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5 -echo "${ECHO_T}$ac_cv_func_getloadavg" >&6 -if test $ac_cv_func_getloadavg = yes; then - exit 0 -else - exit 1 -fi -) && ac_have_func=yes - -# On HPUX9, an unprivileged user can get load averages through this function. - -for ac_func in pstat_getdynamic -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_var=no" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -# Solaris has libkstat which does not require root. - -echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5 -echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6 -if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lkstat $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char kstat_open (); -int -main () -{ -kstat_open (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_kstat_kstat_open=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_kstat_kstat_open=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5 -echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6 -if test $ac_cv_lib_kstat_kstat_open = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBKSTAT 1 -_ACEOF - - LIBS="-lkstat $LIBS" - -fi - -test $ac_cv_lib_kstat_kstat_open = yes && ac_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 $ac_have_func = no; then - echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5 -echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6 -if test "${ac_cv_lib_elf_elf_begin+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lelf $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char elf_begin (); -int -main () -{ -elf_begin (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_elf_elf_begin=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_elf_elf_begin=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5 -echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6 -if test $ac_cv_lib_elf_elf_begin = yes; then - LIBS="-lelf $LIBS" -fi - -fi -if test $ac_have_func = no; then - echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5 -echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6 -if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lkvm $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char kvm_open (); -int -main () -{ -kvm_open (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_kvm_kvm_open=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_kvm_kvm_open=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5 -echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6 -if test $ac_cv_lib_kvm_kvm_open = yes; then - LIBS="-lkvm $LIBS" -fi - - # Check for the 4.4BSD definition of getloadavg. - echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5 -echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6 -if test "${ac_cv_lib_util_getloadavg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lutil $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char getloadavg (); -int -main () -{ -getloadavg (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_util_getloadavg=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_util_getloadavg=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5 -echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6 -if test $ac_cv_lib_util_getloadavg = yes; then - LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes -fi - -fi - -if test $ac_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. - ac_getloadavg_LIBS=$LIBS - LIBS="-L/usr/local/lib $LIBS" - echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5 -echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6 -if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgetloadavg $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char getloadavg (); -int -main () -{ -getloadavg (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_getloadavg_getloadavg=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_getloadavg_getloadavg=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5 -echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6 -if test $ac_cv_lib_getloadavg_getloadavg = yes; then - LIBS="-lgetloadavg $LIBS" -else - LIBS=$ac_getloadavg_LIBS -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 -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_var=no" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -else - case $LIBOBJS in - "getloadavg.$ac_objext" | \ - *" getloadavg.$ac_objext" | \ - "getloadavg.$ac_objext "* | \ - *" getloadavg.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext" ;; -esac - - -cat >>confdefs.h <<\_ACEOF -#define C_GETLOADAVG 1 -_ACEOF - -# Figure out what our getloadavg.c needs. -ac_have_func=no -if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5 -echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6 -if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5 -echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5 -echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ----------------------------------------- ## -## Report this to the nagios-plugins lists. ## -## ----------------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5 -echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6 -if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc -fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6 - -fi -if test $ac_cv_header_sys_dg_sys_info_h = yes; then - ac_have_func=yes - -cat >>confdefs.h <<\_ACEOF -#define DGUX 1 -_ACEOF - - -echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5 -echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6 -if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldgc $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dg_sys_info (); -int -main () -{ -dg_sys_info (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dgc_dg_sys_info=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dgc_dg_sys_info=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5 -echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6 -if test $ac_cv_lib_dgc_dg_sys_info = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBDGC 1 -_ACEOF - - LIBS="-ldgc $LIBS" - -fi - -fi - - - -if test "${ac_cv_header_locale_h+set}" = set; then - echo "$as_me:$LINENO: checking for locale.h" >&5 -echo $ECHO_N "checking for locale.h... $ECHO_C" >&6 -if test "${ac_cv_header_locale_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5 -echo "${ECHO_T}$ac_cv_header_locale_h" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking locale.h usability" >&5 -echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking locale.h presence" >&5 -echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ----------------------------------------- ## -## Report this to the nagios-plugins lists. ## -## ----------------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for locale.h" >&5 -echo $ECHO_N "checking for locale.h... $ECHO_C" >&6 -if test "${ac_cv_header_locale_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_locale_h=$ac_header_preproc -fi -echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5 -echo "${ECHO_T}$ac_cv_header_locale_h" >&6 - -fi - - - -for ac_func in setlocale -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_var=no" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -# 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 $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then - ac_have_func=yes - -cat >>confdefs.h <<\_ACEOF -#define SVR4 1 -_ACEOF - -fi - -if test $ac_have_func = no; then - if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then - echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5 -echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6 -if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5 -echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5 -echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5 -echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ----------------------------------------- ## -## Report this to the nagios-plugins lists. ## -## ----------------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5 -echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6 -if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc -fi -echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5 -echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6 - -fi -if test $ac_cv_header_inq_stats_cpustats_h = yes; then - ac_have_func=yes - -cat >>confdefs.h <<\_ACEOF -#define UMAX 1 -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define UMAX4_3 1 -_ACEOF - -fi - - -fi - -if test $ac_have_func = no; then - if test "${ac_cv_header_sys_cpustats_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5 -echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6 -if test "${ac_cv_header_sys_cpustats_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5 -echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5 -echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ----------------------------------------- ## -## Report this to the nagios-plugins lists. ## -## ----------------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5 -echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6 -if test "${ac_cv_header_sys_cpustats_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_sys_cpustats_h=$ac_header_preproc -fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6 - -fi -if test $ac_cv_header_sys_cpustats_h = yes; then - ac_have_func=yes; cat >>confdefs.h <<\_ACEOF -#define UMAX 1 -_ACEOF - -fi - - -fi - -if test $ac_have_func = no; then - -for ac_header in mach/mach.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ----------------------------------------- ## -## Report this to the nagios-plugins lists. ## -## ----------------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -fi - - -for ac_header in nlist.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ----------------------------------------- ## -## Report this to the nagios-plugins lists. ## -## ----------------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5 -echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6 -if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -int -main () -{ -static struct nlist ac_aggr; -if (ac_aggr.n_un.n_name) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_member_struct_nlist_n_un_n_name=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -int -main () -{ -static struct nlist ac_aggr; -if (sizeof ac_aggr.n_un.n_name) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_member_struct_nlist_n_un_n_name=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_member_struct_nlist_n_un_n_name=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5 -echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6 -if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1 -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define NLIST_NAME_UNION 1 -_ACEOF - -fi - - -fi - -done - -fi -done - - -# Some definitions of getloadavg require that the program be installed setgid. -echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5 -echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6 -if test "${ac_cv_func_getloadavg_setgid+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include "$srcdir/$ac_config_libobj_dir/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 - ac_cv_func_getloadavg_setgid=yes -else - ac_cv_func_getloadavg_setgid=no -fi -rm -f conftest* - -fi -echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5 -echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6 -if test $ac_cv_func_getloadavg_setgid = yes; then - NEED_SETGID=true - -cat >>confdefs.h <<\_ACEOF -#define GETLOADAVG_PRIVILEGED 1 -_ACEOF - -else - NEED_SETGID=false -fi - -if test $ac_cv_func_getloadavg_setgid = yes; then - echo "$as_me:$LINENO: checking group of /dev/kmem" >&5 -echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6 -if test "${ac_cv_group_kmem+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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` - ac_cv_group_kmem=`echo $ac_ls_output \ - | sed -ne 's/[ ][ ]*/ /g; - s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/; - / /s/.* //;p;'` - -fi -echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5 -echo "${ECHO_T}$ac_cv_group_kmem" >&6 - KMEM_GROUP=$ac_cv_group_kmem -fi -if test "x$ac_save_LIBS" = x; then - GETLOADAVG_LIBS=$LIBS -else - GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"` -fi -LIBS=$ac_save_LIBS - - - echo "$as_me:$LINENO: checking for working strtod" >&5 echo $ECHO_N "checking for working strtod... $ECHO_C" >&6 if test "${ac_cv_func_strtod+set}" = set; then @@ -23335,8 +19310,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -23400,8 +19374,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -23762,16 +19735,6 @@ OPENSSL_DIRS="/usr /usr/local /usr/slocal /usr/local/openssl /usr/local/ssl \ /opt /opt/openssl" -case $host_vender-$host_os in -osf*) - -cat >>confdefs.h <<\_ACEOF -#define _OSF_SOURCE 1 -_ACEOF - - ;; -esac - echo "$as_me:$LINENO: checking for main in -ldce" >&5 echo $ECHO_N "checking for main in -ldce... $ECHO_C" >&6 @@ -23805,8 +19768,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -23867,8 +19829,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -23935,8 +19896,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -23997,8 +19957,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -24063,8 +20022,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -24217,8 +20175,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -24287,8 +20244,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -24314,7 +20270,7 @@ fi echo "$as_me:$LINENO: result: $ac_cv_lib_tap_plan_tests" >&5 echo "${ECHO_T}$ac_cv_lib_tap_plan_tests" >&6 if test $ac_cv_lib_tap_plan_tests = yes; then - EXTRA_TEST=test_utils + EXTRA_TEST="test_utils test_disk" fi @@ -24361,8 +20317,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -24440,8 +20395,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -24510,8 +20464,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -24660,8 +20613,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -24810,8 +20762,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -25006,8 +20957,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -25087,8 +21037,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -25196,8 +21145,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -25302,8 +21250,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -25344,6 +21291,7 @@ fi LIBS="$_SAVEDLIBS" + # Check whether --with-mysql or --without-mysql was given. if test "${with_mysql+set}" = set; then withval="$with_mysql" @@ -25351,20 +21299,19 @@ if test "${with_mysql+set}" = set; then else with_mysql=yes fi; -if test $with_mysql != "no" ; then - if test -x $with_mysql/bin/mysql_config ; then - MYSQLCONFIG="$with_mysql/bin/mysql_config" - else - # Extract the first word of "mysql_config", so it can be a program name with args. + + if test "x$with_mysql" != "xno" ; then + if test "x$with_mysql" = "xyes" ; then + # Extract the first word of "mysql_config", so it can be a program name with args. set dummy mysql_config; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_MYSQLCONFIG+set}" = set; then +if test "${ac_cv_path_np_mysql_config+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - case $MYSQLCONFIG in + case $np_mysql_config in [\\/]* | ?:[\\/]*) - ac_cv_path_MYSQLCONFIG="$MYSQLCONFIG" # Let the user override the test with a path. + ac_cv_path_np_mysql_config="$np_mysql_config" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -25374,7 +21321,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_MYSQLCONFIG="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_np_mysql_config="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -25384,189 +21331,130 @@ done ;; esac fi -MYSQLCONFIG=$ac_cv_path_MYSQLCONFIG +np_mysql_config=$ac_cv_path_np_mysql_config -if test -n "$MYSQLCONFIG"; then - echo "$as_me:$LINENO: result: $MYSQLCONFIG" >&5 -echo "${ECHO_T}$MYSQLCONFIG" >&6 +if test -n "$np_mysql_config"; then + echo "$as_me:$LINENO: result: $np_mysql_config" >&5 +echo "${ECHO_T}$np_mysql_config" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi - fi - if test -z "$MYSQLCONFIG"; then - with_mysql="not found" - { echo "$as_me:$LINENO: WARNING: Skipping mysql plugin" >&5 -echo "$as_me: WARNING: Skipping mysql plugin" >&2;} - { echo "$as_me:$LINENO: WARNING: install mysql client libs to compile this plugin (see REQUIREMENTS)." >&5 -echo "$as_me: WARNING: install mysql client libs to compile this plugin (see REQUIREMENTS)." >&2;} - else - with_mysql=$MYSQLCONFIG - EXTRAS="$EXTRAS check_mysql check_mysql_query" - MYSQLINCLUDE=`$MYSQLCONFIG --include` - # Mysql 3 does not support --include. --cflags should be sufficient - if test $? -ne 0 ; then - MYSQLINCLUDE="" + else + if test -x $with_mysql/bin/mysql_config ; then + np_mysql_config="$with_mysql/bin/mysql_config" + fi fi - MYSQLLIBS=`$MYSQLCONFIG --libs` - MYSQLCFLAGS=`$MYSQLCONFIG --cflags` + if test -z "$np_mysql_config"; then + with_mysql="no" + else + np_mysql_include="`$np_mysql_config --include`" + # Mysql 3 does not support --include. --cflags should be sufficient + if test $? -ne 0; then + np_mysql_include="-I$with_mysql/include" # Guessed location + fi + np_mysql_libs="`$np_mysql_config --libs`" + np_mysql_cflags="`$np_mysql_config --cflags`" + _savedcppflags="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $np_mysql_include" - - fi -fi - - -for ac_header in unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for mysql_init in -lmysqlclient" >&5 +echo $ECHO_N "checking for mysql_init in -lmysqlclient... $ECHO_C" >&6 +if test "${ac_cv_lib_mysqlclient_mysql_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmysqlclient $np_mysql_libs $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char mysql_init (); +int +main () +{ +mysql_init (); + ; + return 0; +} _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_header_compiler=yes + ac_cv_lib_mysqlclient_mysql_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no +ac_cv_lib_mysqlclient_mysql_init=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_mysqlclient_mysql_init" >&5 +echo "${ECHO_T}$ac_cv_lib_mysqlclient_mysql_init" >&6 +if test $ac_cv_lib_mysqlclient_mysql_init = yes; then -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + with_mysql=$np_mysql_config + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MYSQLCLIENT 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= + + +else + with_mysql=no +fi + + CPPFLAGS=$_savedcppflags + + fi fi + +if test $with_mysql = "no" ; then + { echo "$as_me:$LINENO: WARNING: Skipping mysql plugin" >&5 +echo "$as_me: WARNING: Skipping mysql plugin" >&2;} + { echo "$as_me:$LINENO: WARNING: install mysql client libs to compile this plugin (see REQUIREMENTS)." >&5 +echo "$as_me: WARNING: install mysql client libs to compile this plugin (see REQUIREMENTS)." >&2;} else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + EXTRAS="$EXTRA check_mysql check_mysql_query" + MYSQLINCLUDE="$np_mysql_include" + MYSQLLIBS="$np_mysql_libs" + MYSQLCFLAGS="$np_mysql_cflags" - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ----------------------------------------- ## -## Report this to the nagios-plugins lists. ## -## ----------------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - echo "$as_me:$LINENO: checking for IPv6 support" >&5 echo $ECHO_N "checking for IPv6 support... $ECHO_C" >&6 @@ -25607,8 +21495,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -25641,1076 +21528,6 @@ _ACEOF fi -# Check whether --enable-emulate-getaddrinfo or --disable-emulate-getaddrinfo was given. -if test "${enable_emulate_getaddrinfo+set}" = set; then - enableval="$enable_emulate_getaddrinfo" - -else - enable_emulate_getaddrinfo=no -fi; - - -# Check whether --with-lwres or --without-lwres was given. -if test "${with_lwres+set}" = set; then - withval="$with_lwres" - -else - with_lwres=no -fi; - -if test x$enable_emulate_getaddrinfo = xforce ; then - enable_emulate_getaddrinfo=yes - have_getaddrinfo=no -else - -have_getaddrinfo=no -if test x$with_lwres != xno ; then - if test "$with_lwres" != yes ; then - CPPFLAGS="-I${with_lwres}/include $CPPFLAGS" - LDFLAGS="-L${with_lwres}/lib $LDFLAGS" - fi - -for ac_header in lwres/netdb.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ----------------------------------------- ## -## Report this to the nagios-plugins lists. ## -## ----------------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -else - { { echo "$as_me:$LINENO: error: cannot find " >&5 -echo "$as_me: error: cannot find " >&2;} - { (exit 1); exit 1; }; } -fi - -done - - -echo "$as_me:$LINENO: checking for lwres_getaddrinfo in -llwres" >&5 -echo $ECHO_N "checking for lwres_getaddrinfo in -llwres... $ECHO_C" >&6 -if test "${ac_cv_lib_lwres_lwres_getaddrinfo+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-llwres -lnsl -lpthread $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char lwres_getaddrinfo (); -int -main () -{ -lwres_getaddrinfo (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_lwres_lwres_getaddrinfo=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_lwres_lwres_getaddrinfo=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_lwres_lwres_getaddrinfo" >&5 -echo "${ECHO_T}$ac_cv_lib_lwres_lwres_getaddrinfo" >&6 -if test $ac_cv_lib_lwres_lwres_getaddrinfo = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBLWRES 1 -_ACEOF - - LIBS="-llwres $LIBS" - -else - { { echo "$as_me:$LINENO: error: cannot find the lwres library" >&5 -echo "$as_me: error: cannot find the lwres library" >&2;} - { (exit 1); exit 1; }; } -fi - - have_getaddrinfo=yes -fi - -if test x$have_getaddrinfo != xyes ; then - echo "$as_me:$LINENO: checking for library containing getaddrinfo" >&5 -echo $ECHO_N "checking for library containing getaddrinfo... $ECHO_C" >&6 -if test "${ac_cv_search_getaddrinfo+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_func_search_save_LIBS=$LIBS -ac_cv_search_getaddrinfo=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char getaddrinfo (); -int -main () -{ -getaddrinfo (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_getaddrinfo="none required" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_getaddrinfo" = no; then - for ac_lib in socket resolv bind nsl c_r cr; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char getaddrinfo (); -int -main () -{ -getaddrinfo (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_getaddrinfo="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done -fi -LIBS=$ac_func_search_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_search_getaddrinfo" >&5 -echo "${ECHO_T}$ac_cv_search_getaddrinfo" >&6 -if test "$ac_cv_search_getaddrinfo" != no; then - test "$ac_cv_search_getaddrinfo" = "none required" || LIBS="$ac_cv_search_getaddrinfo $LIBS" - have_getaddrinfo=yes -fi - -fi - -if test x$have_getaddrinfo != xyes ; then - echo "$as_me:$LINENO: checking if getaddrinfo is redefined in netdb.h" >&5 -echo $ECHO_N "checking if getaddrinfo is redefined in netdb.h... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -# include - -int -main () -{ - - struct addrinfo hints, *res; - int err; - - err = getaddrinfo ("host", "service", &hints, &res); - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - have_getaddrinfo=yes - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi - -fi - -if test x$have_getaddrinfo != xno ; then - if test x$enable_emulate_getaddrinfo != xno ; then - { { echo "$as_me:$LINENO: error: getaddrinfo found but emulate-getaddrinfo was enabled" >&5 -echo "$as_me: error: getaddrinfo found but emulate-getaddrinfo was enabled" >&2;} - { (exit 1); exit 1; }; } - fi - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETADDRINFO 1 -_ACEOF - -else - if test x$enable_emulate_getaddrinfo != xyes ; then - enable_emulate_getaddrinfo=yes - { echo "$as_me:$LINENO: WARNING: enabling getaddrinfo emulation" >&5 -echo "$as_me: WARNING: enabling getaddrinfo emulation" >&2;} - fi - EXTRA_NETOBJS="$EXTRA_NETOBJS getaddrinfo.o" -fi - -if test x"$enable_emulate_getaddrinfo" != xno ; then - have_resolver=no - - echo "$as_me:$LINENO: checking for library containing getipnodebyname" >&5 -echo $ECHO_N "checking for library containing getipnodebyname... $ECHO_C" >&6 -if test "${ac_cv_search_getipnodebyname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_func_search_save_LIBS=$LIBS -ac_cv_search_getipnodebyname=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char getipnodebyname (); -int -main () -{ -getipnodebyname (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_getipnodebyname="none required" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_getipnodebyname" = no; then - for ac_lib in resolv bind nsl c_r cr; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char getipnodebyname (); -int -main () -{ -getipnodebyname (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_getipnodebyname="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done -fi -LIBS=$ac_func_search_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_search_getipnodebyname" >&5 -echo "${ECHO_T}$ac_cv_search_getipnodebyname" >&6 -if test "$ac_cv_search_getipnodebyname" != no; then - test "$ac_cv_search_getipnodebyname" = "none required" || LIBS="$ac_cv_search_getipnodebyname $LIBS" - have_resolver=yes -fi - - if test x"$have_resolver" != xno ; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETIPNODEBYNAME 1 -_ACEOF - - fi - - if test x"$have_resolver" = xno ; then - echo "$as_me:$LINENO: checking for library containing gethostbyname_r" >&5 -echo $ECHO_N "checking for library containing gethostbyname_r... $ECHO_C" >&6 -if test "${ac_cv_search_gethostbyname_r+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_func_search_save_LIBS=$LIBS -ac_cv_search_gethostbyname_r=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char gethostbyname_r (); -int -main () -{ -gethostbyname_r (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_gethostbyname_r="none required" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_gethostbyname_r" = no; then - for ac_lib in resolv bind nsl c_r cr; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char gethostbyname_r (); -int -main () -{ -gethostbyname_r (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_gethostbyname_r="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done -fi -LIBS=$ac_func_search_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname_r" >&5 -echo "${ECHO_T}$ac_cv_search_gethostbyname_r" >&6 -if test "$ac_cv_search_gethostbyname_r" != no; then - test "$ac_cv_search_gethostbyname_r" = "none required" || LIBS="$ac_cv_search_gethostbyname_r $LIBS" - have_resolver=yes - echo "$as_me:$LINENO: checking number of arguments to gethostbyname_r" >&5 -echo $ECHO_N "checking number of arguments to gethostbyname_r... $ECHO_C" >&6 -if test "${acx_which_gethostbyname_r+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -# include - -int -main () -{ - - - char *name; - struct hostent *he; - struct hostent_data data; - (void) gethostbyname_r(name, he, &data); - - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - acx_which_gethostbyname_r=3 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -# include - -int -main () -{ - - char *name; - struct hostent *he, *res; - char *buffer = NULL; - int buflen = 2048; - int h_errnop; - (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop) - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - acx_which_gethostbyname_r=6 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -# include - -int -main () -{ - - char *name; - struct hostent *he; - char *buffer = NULL; - int buflen = 2048; - int h_errnop; - (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop) - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - acx_which_gethostbyname_r=5 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -acx_which_gethostbyname_r=0 -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - - - - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -echo "$as_me:$LINENO: result: $acx_which_gethostbyname_r" >&5 -echo "${ECHO_T}$acx_which_gethostbyname_r" >&6 - -if test $acx_which_gethostbyname_r -gt 0 ; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_GETHOSTBYNAME_R $acx_which_gethostbyname_r -_ACEOF - -fi - - -fi - - fi - - if test x"$have_resolver" = xno ; then - if test x"$enable_pthreads" != xno ; then - { echo "$as_me:$LINENO: WARNING: using threads but cannot find gethostbyname_r or getipnodebyname" >&5 -echo "$as_me: WARNING: using threads but cannot find gethostbyname_r or getipnodebyname" >&2;} - fi - echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5 -echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6 -if test "${ac_cv_search_gethostbyname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_func_search_save_LIBS=$LIBS -ac_cv_search_gethostbyname=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char gethostbyname (); -int -main () -{ -gethostbyname (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_gethostbyname="none required" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_gethostbyname" = no; then - for ac_lib in resolv bind nsl; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char gethostbyname (); -int -main () -{ -gethostbyname (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_gethostbyname="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done -fi -LIBS=$ac_func_search_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_search_gethostbyname" >&6 -if test "$ac_cv_search_gethostbyname" != no; then - test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS" - -else - { { echo "$as_me:$LINENO: error: cannot find gethostbyname" >&5 -echo "$as_me: error: cannot find gethostbyname" >&2;} - { (exit 1); exit 1; }; } -fi - - fi - EXTRA_NETOBJS="$EXTRA_NETOBJS gethostbyname.o" - -fi for ac_header in krb5.h @@ -26746,8 +21563,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -26902,8 +21718,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -27084,8 +21899,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -27243,8 +22057,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -27410,8 +22223,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -27478,8 +22290,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -27561,8 +22372,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -27710,8 +22520,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -27777,172 +22586,6 @@ echo "$as_me: WARNING: OpenSSL or GnuTLS libs could not be found or were disable fi -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_header_stdc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_header_stdc=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF - -fi - echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 if test "${ac_cv_header_time+set}" = set; then @@ -27976,8 +22619,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -28047,8 +22689,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -28087,11 +22728,7 @@ fi - - - - -for ac_header in signal.h strings.h string.h syslog.h uio.h errno.h sys/types.h sys/time.h sys/socket.h sys/loadavg.h sys/un.h sys/poll.h +for ac_header in signal.h syslog.h uio.h errno.h sys/time.h sys/socket.h sys/un.h sys/poll.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then @@ -28124,8 +22761,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -28244,8 +22880,7 @@ done - -for ac_header in features.h stdarg.h sys/unistd.h ctype.h stdlib.h +for ac_header in features.h stdarg.h sys/unistd.h ctype.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then @@ -28278,8 +22913,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -28470,8 +23104,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -28533,8 +23166,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -28597,8 +23229,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -28663,8 +23294,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -28736,8 +23366,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -28798,8 +23427,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -28861,8 +23489,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -28895,184 +23522,6 @@ _ACEOF fi fi - - - - -for ac_func in vsnprintf snprintf asprintf vasprintf -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_var=no" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -echo "$as_me:$LINENO: checking for C99 vsnprintf" >&5 -echo $ECHO_N "checking for C99 vsnprintf... $ECHO_C" >&6 -if test "${ac_cv_HAVE_C99_VSNPRINTF+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - -if test "$cross_compiling" = yes; then - ac_cv_HAVE_C99_VSNPRINTF=cross -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include -void foo(const char *format, ...) { - va_list ap; - int len; - char buf[5]; - - va_start(ap, format); - len = vsnprintf(buf, 0, format, ap); - va_end(ap); - if (len != 5) exit(1); - - va_start(ap, format); - len = vsnprintf(0, 0, format, ap); - va_end(ap); - if (len != 5) exit(1); - - if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1); - - exit(0); -} -main() { foo("hello"); } - -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_HAVE_C99_VSNPRINTF=yes -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_HAVE_C99_VSNPRINTF=no -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_HAVE_C99_VSNPRINTF" >&5 -echo "${ECHO_T}$ac_cv_HAVE_C99_VSNPRINTF" >&6 -if test x"$ac_cv_HAVE_C99_VSNPRINTF" = x"yes"; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_C99_VSNPRINTF 1 -_ACEOF - -fi - cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -29098,8 +23547,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -29142,8 +23590,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -29186,8 +23633,7 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - -for ac_func in memmove select socket strdup strstr strtod strtol strtoul floor +for ac_func in memmove select socket strdup strstr strtol strtoul floor do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -29255,8 +23701,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -29357,8 +23802,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -29419,8 +23863,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -29452,38 +23895,6 @@ _ACEOF -# Check whether --with-proc-loadavg or --without-proc-loadavg was given. -if test "${with_proc_loadavg+set}" = set; then - withval="$with_proc_loadavg" - ac_cv_proc_loadavg=$withval -fi; -echo "$as_me:$LINENO: checking for /proc/loadavg" >&5 -echo $ECHO_N "checking for /proc/loadavg... $ECHO_C" >&6 -if test -n "$ac_cv_proc_loadavg"; then - echo "$as_me:$LINENO: result: (command line) $ac_cv_proc_loadavg" >&5 -echo "${ECHO_T}(command line) $ac_cv_proc_loadavg" >&6 -elif test -f "/proc/loadavg"; then - echo "$as_me:$LINENO: result: found /proc/loadavg" >&5 -echo "${ECHO_T}found /proc/loadavg" >&6 - ac_cv_proc_loadavg="/proc/loadavg" -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -if test -n "$ac_cv_proc_loadavg"; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_PROC_LOADAVG 1 -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PROC_LOADAVG "/proc/loadavg" -_ACEOF - -fi - # Extract the first word of "ps", so it can be a program name with args. set dummy ps; ac_word=$2 @@ -29560,30 +23971,15 @@ if test -n "$PS_COMMAND" && test -n "$PS_FORMAT" && test -n "$PS_COLS" && test - echo "$as_me:$LINENO: result: (command-line) $ac_cv_ps_command" >&5 echo "${ECHO_T}(command-line) $ac_cv_ps_command" >&6 -elif test "$ac_cv_uname_s" = "SunOS"; then - # - # this is a very, very ugly hack, to hardcode the location for plugins - # - if test "$libexecdir" = '${exec_prefix}/libexec'; then - if test "$exec_prefix" = "NONE"; then - if test "$prefix" = "NONE"; then - pst3="$ac_default_prefix/libexec/pst3" - else - pst3="$prefix/libexec/pst3" - fi - else - pst3="$exec_prefix/libexec/pst3" - fi - else - pst3="$libexecdir/pst3" - fi - ac_cv_ps_command="$pst3" - ac_cv_ps_format="%s %d %d %d %d %f %s %n" - ac_cv_ps_varlist="procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos" +elif test "$ac_cv_uname_s" = "SunOS" && /usr/ucb/ps -alxwwn 2>/dev/null | \ + egrep -i "^ *F +UID +PID +PPID +%C +PRI +NI +SZ +RSS +WCHAN +S +TT +TIME +COMMAND" > /dev/null +then + ac_cv_ps_varlist="&procuid,&procpid,&procppid,&procpcpu,&procvsz,&procrss,procstat,&pos" + ac_cv_ps_command="/usr/ucb/ps -alxwwn" + ac_cv_ps_format="%*s %d %d %d %d %*d %*d %d %d%*[ 0123456789abcdef]%[OSRZT]%*s %*s %n" ac_cv_ps_cols=8 - echo "$as_me:$LINENO: result: using nagios-plugins internal ps for solaris" >&5 -echo "${ECHO_T}using nagios-plugins internal ps for solaris" >&6 - EXTRAS_ROOT="$EXTRAS_ROOT pst3" + echo "$as_me:$LINENO: result: $ac_cv_ps_command" >&5 +echo "${ECHO_T}$ac_cv_ps_command" >&6 elif ps axwo 'stat comm vsz rss user uid pid ppid args' 2>/dev/null | \ egrep -i "^ *STAT +[UCOMAND]+ +VSZ +RSS +USER +UID +PID +PPID +COMMAND" > /dev/null @@ -29834,7 +24230,7 @@ cat >>confdefs.h <<_ACEOF _ACEOF EXTRAS="$EXTRAS check_procs check_nagios" - if echo "$ac_cv_ps_varlist" | grep -q "procetime"; then + if echo "$ac_cv_ps_varlist" | grep "procetime" >/dev/null; then cat >>confdefs.h <<\_ACEOF #define PS_USES_PROCETIME "yes" @@ -31174,7 +25570,7 @@ echo "${ECHO_T}using FreeBSD format swapinfo" >&6 elif $PATH_TO_SWAPINFO -dfM 2>/dev/null | egrep -i "^TYPE +AVAIL +USED +FREE" >/dev/null then ac_cv_have_swap=yes - ac_cv_swap_command="$PATH_TO_SWAPINFO -dfM", + ac_cv_swap_command="$PATH_TO_SWAPINFO -dfM" ac_cv_swap_format="%*s %f %*d %f" ac_cv_swap_conv=1024 echo "$as_me:$LINENO: result: using HP-UX format swapinfo" >&5 @@ -31272,8 +25668,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -31420,8 +25815,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -31492,8 +25886,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -31570,8 +25963,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -31640,8 +26032,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -31711,8 +26102,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -31762,8 +26152,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -31871,8 +26260,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -32115,65 +26503,6 @@ elif test -f ../plugins/check_nt.c ; then EXTRAS="$EXTRAS check_nt" fi -echo "$as_me:$LINENO: checking for va_list" >&5 -echo $ECHO_N "checking for va_list... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ - #include - #include - #include - #else - #include - #include - #include - #endif -int -main () -{ -va_list args; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -NEED_VA_LIST=-DNEED_VA_LIST - - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext case $host in *bsd*) @@ -32212,20 +26541,6 @@ esac - - MKINSTALLDIRS= - if test -n "$ac_aux_dir"; then - case "$ac_aux_dir" in - /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;; - *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;; - esac - fi - if test -z "$MKINSTALLDIRS"; then - MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" - fi - - - echo "$as_me:$LINENO: checking whether NLS is requested" >&5 echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 # Check whether --enable-nls or --disable-nls was given. @@ -32353,6 +26668,17 @@ echo "${ECHO_T}no" >&6 fi + case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; + *) MSGFMT_015=$MSGFMT ;; + esac + + case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; + *) GMSGFMT_015=$GMSGFMT ;; + esac + + # Prepare PATH_SEPARATOR. # The user is always right. @@ -32425,6 +26751,12 @@ fi rm -f messages.po + case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; + *) XGETTEXT_015=$XGETTEXT ;; + esac + + # Prepare PATH_SEPARATOR. # The user is always right. @@ -32495,31 +26827,10 @@ echo "${ECHO_T}no" >&6 fi - if test "$GMSGFMT" != ":"; then - if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && - (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then - : ; - else - GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` - echo "$as_me:$LINENO: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5 -echo "${ECHO_T}found $GMSGFMT program is not GNU msgfmt; ignore it" >&6 - GMSGFMT=":" - fi - fi + test -n "$localedir" || localedir='${datadir}/locale' - if test "$XGETTEXT" != ":"; then - if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 && - (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then - : ; - else - echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5 -echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6 - XGETTEXT=":" - fi - rm -f messages.po - fi - ac_config_commands="$ac_config_commands default-1" + ac_config_commands="$ac_config_commands po-directories" @@ -32671,12 +26982,14 @@ fi echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 echo "${ECHO_T}$acl_cv_rpath" >&6 wl="$acl_cv_wl" - libext="$acl_cv_libext" - shlibext="$acl_cv_shlibext" - hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" - hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" - hardcode_direct="$acl_cv_hardcode_direct" - hardcode_minus_L="$acl_cv_hardcode_minus_L" + acl_libext="$acl_cv_libext" + acl_shlibext="$acl_cv_shlibext" + acl_libname_spec="$acl_cv_libname_spec" + acl_library_names_spec="$acl_cv_library_names_spec" + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath or --disable-rpath was given. if test "${enable_rpath+set}" = set; then enableval="$enable_rpath" @@ -32711,6 +27024,7 @@ fi; + use_additional=yes acl_save_prefix="$prefix" @@ -32755,6 +27069,7 @@ fi; LIBICONV= LTLIBICONV= INCICONV= + LIBICONV_PREFIX= rpathdirs= ltrpathdirs= names_already_handled= @@ -32788,21 +27103,51 @@ fi; 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 - if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then - found_dir="$additional_libdir" - found_so="$additional_libdir/lib$name.$shlibext" - if test -f "$additional_libdir/lib$name.la"; then - found_la="$additional_libdir/lib$name.la" - fi - else - if test -f "$additional_libdir/lib$name.$libext"; then - found_dir="$additional_libdir" - found_a="$additional_libdir/lib$name.$libext" - if test -f "$additional_libdir/lib$name.la"; then - found_la="$additional_libdir/lib$name.la" + 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 @@ -32819,20 +27164,43 @@ fi; case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` - if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then - found_dir="$dir" - found_so="$dir/lib$name.$shlibext" - if test -f "$dir/lib$name.la"; then - found_la="$dir/lib$name.la" - fi - else - if test -f "$dir/lib$name.$libext"; then + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then found_dir="$dir" - found_a="$dir/lib$name.$libext" - if test -f "$dir/lib$name.la"; then - found_la="$dir/lib$name.la" + 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 @@ -32857,10 +27225,10 @@ fi; if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi - if test "$hardcode_direct" = yes; then + if test "$acl_hardcode_direct" = yes; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else - if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" haveit= for x in $rpathdirs; do @@ -32892,7 +27260,7 @@ fi; if test -z "$haveit"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" fi - if test "$hardcode_minus_L" != no; then + if test "$acl_hardcode_minus_L" != no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" @@ -32911,6 +27279,7 @@ fi; case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + LIBICONV_PREFIX="$basedir" additional_includedir="$basedir/include" ;; esac @@ -33061,21 +27430,21 @@ fi; done done if test "X$rpathdirs" != "X"; then - if test -n "$hardcode_libdir_separator"; then + if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do - alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" - eval flag=\"$hardcode_libdir_flag_spec\" + eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" - eval flag=\"$hardcode_libdir_flag_spec\" + eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" done @@ -33099,6 +27468,13 @@ fi; + + + + + + + @@ -33109,17 +27485,15 @@ echo $ECHO_N "checking for CFPreferencesCopyAppValue... $ECHO_C" >&6 if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - gt_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers" - gt_save_LIBS="$LIBS" - LIBS="$LIBS -framework CoreFoundation" + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include int main () { @@ -33137,8 +27511,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -33159,7 +27532,6 @@ gt_cv_func_CFPreferencesCopyAppValue=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS" fi echo "$as_me:$LINENO: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 @@ -33176,17 +27548,15 @@ echo $ECHO_N "checking for CFLocaleCopyCurrent... $ECHO_C" >&6 if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - gt_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers" - gt_save_LIBS="$LIBS" - LIBS="$LIBS -framework CoreFoundation" + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include int main () { @@ -33204,8 +27574,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -33226,7 +27595,6 @@ gt_cv_func_CFLocaleCopyCurrent=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS" fi echo "$as_me:$LINENO: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 @@ -33246,36 +27614,43 @@ _ACEOF - echo "$as_me:$LINENO: checking whether NLS is requested" >&5 -echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 - # Check whether --enable-nls or --disable-nls was given. -if test "${enable_nls+set}" = set; then - enableval="$enable_nls" - USE_NLS=$enableval -else - USE_NLS=yes -fi; - echo "$as_me:$LINENO: result: $USE_NLS" >&5 -echo "${ECHO_T}$USE_NLS" >&6 - - LIBINTL= LTLIBINTL= POSUB= + case " $gt_needs " in + *" need-formatstring-macros "*) gt_api_version=3 ;; + *" need-ngettext "*) gt_api_version=2 ;; + *) gt_api_version=1 ;; + esac + gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" + gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" + if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no - - - + if test $gt_api_version -ge 3; then + gt_revision_test_code=' +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +' + else + gt_revision_test_code= + fi + if test $gt_api_version -ge 2; then + gt_expression_test_code=' + * ngettext ("", "", 0)' + else + gt_expression_test_code= + fi echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5 echo $ECHO_N "checking for GNU gettext in libc... $ECHO_C" >&6 -if test "${gt_cv_func_gnugettext2_libc+set}" = set; then +if eval "test \"\${$gt_func_gnugettext_libc+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -33285,13 +27660,14 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +$gt_revision_test_code extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings; int main () { bindtextdomain ("", ""); -return * gettext ("") + * ngettext ("", "", 0) + _nl_msg_cat_cntr + *_nl_domain_bindings +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings ; return 0; } @@ -33305,8 +27681,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -33318,20 +27693,20 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - gt_cv_func_gnugettext2_libc=yes + eval "$gt_func_gnugettext_libc=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -gt_cv_func_gnugettext2_libc=no +eval "$gt_func_gnugettext_libc=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext2_libc" >&5 -echo "${ECHO_T}$gt_cv_func_gnugettext2_libc" >&6 +echo "$as_me:$LINENO: result: `eval echo '${'$gt_func_gnugettext_libc'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$gt_func_gnugettext_libc'}'`" >&6 - if test "$gt_cv_func_gnugettext2_libc" != "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then @@ -33397,8 +27772,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -33448,8 +27822,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -33500,6 +27873,7 @@ echo "${ECHO_T}$LIBICONV" >&6 + use_additional=yes acl_save_prefix="$prefix" @@ -33544,6 +27918,7 @@ fi; LIBINTL= LTLIBINTL= INCINTL= + LIBINTL_PREFIX= rpathdirs= ltrpathdirs= names_already_handled= @@ -33577,21 +27952,51 @@ fi; 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 - if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then - found_dir="$additional_libdir" - found_so="$additional_libdir/lib$name.$shlibext" - if test -f "$additional_libdir/lib$name.la"; then - found_la="$additional_libdir/lib$name.la" - fi - else - if test -f "$additional_libdir/lib$name.$libext"; then - found_dir="$additional_libdir" - found_a="$additional_libdir/lib$name.$libext" - if test -f "$additional_libdir/lib$name.la"; then - found_la="$additional_libdir/lib$name.la" + 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 @@ -33608,20 +28013,43 @@ fi; case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` - if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then - found_dir="$dir" - found_so="$dir/lib$name.$shlibext" - if test -f "$dir/lib$name.la"; then - found_la="$dir/lib$name.la" - fi - else - if test -f "$dir/lib$name.$libext"; then + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then found_dir="$dir" - found_a="$dir/lib$name.$libext" - if test -f "$dir/lib$name.la"; then - found_la="$dir/lib$name.la" + 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 @@ -33646,10 +28074,10 @@ fi; if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi - if test "$hardcode_direct" = yes; then + if test "$acl_hardcode_direct" = yes; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else - if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" haveit= for x in $rpathdirs; do @@ -33681,7 +28109,7 @@ fi; if test -z "$haveit"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" fi - if test "$hardcode_minus_L" != no; then + if test "$acl_hardcode_minus_L" != no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" @@ -33700,6 +28128,7 @@ fi; case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + LIBINTL_PREFIX="$basedir" additional_includedir="$basedir/include" ;; esac @@ -33850,21 +28279,21 @@ fi; done done if test "X$rpathdirs" != "X"; then - if test -n "$hardcode_libdir_separator"; then + if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do - alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" - eval flag=\"$hardcode_libdir_flag_spec\" + eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" - eval flag=\"$hardcode_libdir_flag_spec\" + eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" done @@ -33878,7 +28307,7 @@ fi; echo "$as_me:$LINENO: checking for GNU gettext in libintl" >&5 echo $ECHO_N "checking for GNU gettext in libintl... $ECHO_C" >&6 -if test "${gt_cv_func_gnugettext2_libintl+set}" = set; then +if eval "test \"\${$gt_func_gnugettext_libintl+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else gt_save_CPPFLAGS="$CPPFLAGS" @@ -33892,6 +28321,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +$gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus @@ -33902,7 +28332,7 @@ int main () { bindtextdomain ("", ""); -return * gettext ("") + * ngettext ("", "", 0) + _nl_msg_cat_cntr + *_nl_expand_alias ("") +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") ; return 0; } @@ -33916,8 +28346,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -33929,16 +28358,16 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - gt_cv_func_gnugettext2_libintl=yes + eval "$gt_func_gnugettext_libintl=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -gt_cv_func_gnugettext2_libintl=no +eval "$gt_func_gnugettext_libintl=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - if test "$gt_cv_func_gnugettext2_libintl" != yes && test -n "$LIBICONV"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -33947,6 +28376,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +$gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus @@ -33957,7 +28387,7 @@ int main () { bindtextdomain ("", ""); -return * gettext ("") + * ngettext ("", "", 0) + _nl_msg_cat_cntr + *_nl_expand_alias ("") +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") ; return 0; } @@ -33971,8 +28401,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -33986,7 +28415,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (exit $ac_status); }; }; then LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" - gt_cv_func_gnugettext2_libintl=yes + eval "$gt_func_gnugettext_libintl=yes" else echo "$as_me: failed program was:" >&5 @@ -33999,12 +28428,12 @@ rm -f conftest.err conftest.$ac_objext \ CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS" fi -echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext2_libintl" >&5 -echo "${ECHO_T}$gt_cv_func_gnugettext2_libintl" >&6 +echo "$as_me:$LINENO: result: `eval echo '${'$gt_func_gnugettext_libintl'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$gt_func_gnugettext_libintl'}'`" >&6 fi - if test "$gt_cv_func_gnugettext2_libc" = "yes" \ - || { test "$gt_cv_func_gnugettext2_libintl" = "yes" \ + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ + || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes @@ -34044,7 +28473,7 @@ echo "${ECHO_T}$USE_NLS" >&6 echo "$as_me:$LINENO: checking where the gettext function comes from" >&5 echo $ECHO_N "checking where the gettext function comes from... $ECHO_C" >&6 if test "$gt_use_preinstalled_gnugettext" = "yes"; then - if test "$gt_cv_func_gnugettext2_libintl" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" @@ -34059,7 +28488,7 @@ echo "${ECHO_T}$gt_source" >&6 if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then - if test "$gt_cv_func_gnugettext2_libintl" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then echo "$as_me:$LINENO: checking how to link with libintl" >&5 echo $ECHO_N "checking how to link with libintl... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $LIBINTL" >&5 @@ -34148,1607 +28577,6 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5 -echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6 -if test "${ac_cv_header_stdbool_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* 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 - - 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__ || __GNUC__ - /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0 - reported by James Lemley on 2005-10-05; see - . - 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. */ - char digs[] = "0123456789"; - int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1); - #endif - _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); - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_header_stdbool_h=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_header_stdbool_h=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6 - echo "$as_me:$LINENO: checking for _Bool" >&5 -echo $ECHO_N "checking for _Bool... $ECHO_C" >&6 -if test "${ac_cv_type__Bool+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if ((_Bool *) 0) - return 0; -if (sizeof (_Bool)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type__Bool=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type__Bool=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 -echo "${ECHO_T}$ac_cv_type__Bool" >&6 -if test $ac_cv_type__Bool = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE__BOOL 1 -_ACEOF - - -fi - - if test $ac_cv_header_stdbool_h = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_STDBOOL_H 1 -_ACEOF - - fi - - - - # Define two additional variables used in the Makefile substitution. - - if test "$ac_cv_header_stdbool_h" = yes; then - STDBOOL_H='' - else - STDBOOL_H='stdbool.h' - fi - - - if test "$ac_cv_type__Bool" = yes; then - HAVE__BOOL=1 - else - HAVE__BOOL=0 - fi - - - - echo "$as_me:$LINENO: checking whether system is Windows or MSDOS" >&5 -echo $ECHO_N "checking whether system is Windows or MSDOS... $ECHO_C" >&6 -if test "${ac_cv_win_or_dos+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __CYGWIN__ -neither MSDOS nor Windows -#endif - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_win_or_dos=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_win_or_dos=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -echo "$as_me:$LINENO: result: $ac_cv_win_or_dos" >&5 -echo "${ECHO_T}$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 - else - ac_fs_accepts_drive_letter_prefix=0 - ac_fs_backslash_is_file_name_separator=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 - - - - - case $LIBOBJS in - "basename.$ac_objext" | \ - *" basename.$ac_objext" | \ - "basename.$ac_objext "* | \ - *" basename.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS basename.$ac_objext" ;; -esac - - - - - - - case $LIBOBJS in - "c-strtod.$ac_objext" | \ - *" c-strtod.$ac_objext" | \ - "c-strtod.$ac_objext "* | \ - *" c-strtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS c-strtod.$ac_objext" ;; -esac - - - - : - - - echo "$as_me:$LINENO: checking whether strtold conforms to C99" >&5 -echo $ECHO_N "checking whether strtold conforms to C99... $ECHO_C" >&6 -if test "${gl_cv_func_c99_strtold+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* On HP-UX before 11.23, strtold returns a struct instead of - long double. Reject implementations like that, by requiring - compatibility with the C99 prototype. */ - #include - static long double (*p) (char const *, char **) = strtold; - static long double - test (char const *nptr, char **endptr) - { - long double r; - r = strtold (nptr, endptr); - return r; - } -int -main () -{ -return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - gl_cv_func_c99_strtold=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -gl_cv_func_c99_strtold=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $gl_cv_func_c99_strtold" >&5 -echo "${ECHO_T}$gl_cv_func_c99_strtold" >&6 - if test $gl_cv_func_c99_strtold = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_C99_STRTOLD 1 -_ACEOF - - fi - - - - case $LIBOBJS in - "c-strtold.$ac_objext" | \ - *" c-strtold.$ac_objext" | \ - "c-strtold.$ac_objext "* | \ - *" c-strtold.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS c-strtold.$ac_objext" ;; -esac - - - - - : - - - - case $LIBOBJS in - "exitfail.$ac_objext" | \ - *" exitfail.$ac_objext" | \ - "exitfail.$ac_objext "* | \ - *" exitfail.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS exitfail.$ac_objext" ;; -esac - - - : - - - - case $LIBOBJS in - "open-safer.$ac_objext" | \ - *" open-safer.$ac_objext" | \ - "open-safer.$ac_objext "* | \ - *" open-safer.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS open-safer.$ac_objext" ;; -esac - - case $LIBOBJS in - "creat-safer.$ac_objext" | \ - *" creat-safer.$ac_objext" | \ - "creat-safer.$ac_objext "* | \ - *" creat-safer.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS creat-safer.$ac_objext" ;; -esac - - - - - - - -for ac_header in $gl_header_list -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ----------------------------------------- ## -## Report this to the nagios-plugins lists. ## -## ----------------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - - - - - - - - - - - - - - - - - echo "$as_me:$LINENO: checking for inttypes.h" >&5 -echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 -if test "${gl_cv_header_inttypes_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -int -main () -{ -uintmax_t i = (uintmax_t) -1; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - gl_cv_header_inttypes_h=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -gl_cv_header_inttypes_h=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $gl_cv_header_inttypes_h" >&5 -echo "${ECHO_T}$gl_cv_header_inttypes_h" >&6 - if test $gl_cv_header_inttypes_h = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_INTTYPES_H_WITH_UINTMAX 1 -_ACEOF - - fi - - - echo "$as_me:$LINENO: checking for stdint.h" >&5 -echo $ECHO_N "checking for stdint.h... $ECHO_C" >&6 -if test "${gl_cv_header_stdint_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -int -main () -{ -uintmax_t i = (uintmax_t) -1; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - gl_cv_header_stdint_h=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -gl_cv_header_stdint_h=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $gl_cv_header_stdint_h" >&5 -echo "${ECHO_T}$gl_cv_header_stdint_h" >&6 - if test $gl_cv_header_stdint_h = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_STDINT_H_WITH_UINTMAX 1 -_ACEOF - - fi - - - echo "$as_me:$LINENO: checking for unsigned long long" >&5 -echo $ECHO_N "checking for unsigned long long... $ECHO_C" >&6 -if test "${ac_cv_type_unsigned_long_long+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -unsigned long long ull = 1ULL; int i = 63; -int -main () -{ -unsigned long long ullmax = (unsigned long long) -1; - return ull << i | ull >> i | ullmax / ull | ullmax % ull; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_unsigned_long_long=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_unsigned_long_long=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long" >&5 -echo "${ECHO_T}$ac_cv_type_unsigned_long_long" >&6 - if test $ac_cv_type_unsigned_long_long = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_UNSIGNED_LONG_LONG 1 -_ACEOF - - fi - - - - - if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then - - test $ac_cv_type_unsigned_long_long = yes \ - && ac_type='unsigned long long' \ - || ac_type='unsigned long' - -cat >>confdefs.h <<_ACEOF -#define uintmax_t $ac_type -_ACEOF - - else - -cat >>confdefs.h <<\_ACEOF -#define HAVE_UINTMAX_T 1 -_ACEOF - - fi - - - - - - : - - - - - - - : - - - - - - - - - -for ac_header in sys/mount.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - #if HAVE_SYS_PARAM_H - #include - #endif - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_Header=no" -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - -echo "checking how to get file system space usage..." -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 -# 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 - echo "$as_me:$LINENO: checking for statvfs function (SVR4)" >&5 -echo $ECHO_N "checking for statvfs function (SVR4)... $ECHO_C" >&6 -if test "${fu_cv_sys_stat_statvfs+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#ifdef __GLIBC__ -Do not use statvfs on systems with GNU libc, 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. -#endif -#include -int -main () -{ -struct statvfs fsd; statvfs (0, &fsd); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - fu_cv_sys_stat_statvfs=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fu_cv_sys_stat_statvfs=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statvfs" >&5 -echo "${ECHO_T}$fu_cv_sys_stat_statvfs" >&6 - if test $fu_cv_sys_stat_statvfs = yes; then - ac_fsusage_space=yes - -cat >>confdefs.h <<\_ACEOF -#define STAT_STATVFS 1 -_ACEOF - - fi -fi - -if test $ac_fsusage_space = no; then - # DEC Alpha running OSF/1 - echo "$as_me:$LINENO: checking for 3-argument statfs function (DEC OSF/1)" >&5 -echo $ECHO_N "checking for 3-argument statfs function (DEC OSF/1)... $ECHO_C" >&6 - if test "${fu_cv_sys_stat_statfs3_osf1+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - fu_cv_sys_stat_statfs3_osf1=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include -#include - main () - { - struct statfs fsd; - fsd.f_fsize = 0; - exit (statfs (".", &fsd, sizeof (struct statfs))); - } -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - fu_cv_sys_stat_statfs3_osf1=yes -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -fu_cv_sys_stat_statfs3_osf1=no -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi - - echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs3_osf1" >&5 -echo "${ECHO_T}$fu_cv_sys_stat_statfs3_osf1" >&6 - if test $fu_cv_sys_stat_statfs3_osf1 = yes; then - ac_fsusage_space=yes - -cat >>confdefs.h <<\_ACEOF -#define STAT_STATFS3_OSF1 1 -_ACEOF - - fi -fi - -if test $ac_fsusage_space = no; then -# AIX - echo "$as_me:$LINENO: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 -echo $ECHO_N "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)... $ECHO_C" >&6 - if test "${fu_cv_sys_stat_statfs2_bsize+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - fu_cv_sys_stat_statfs2_bsize=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#ifdef HAVE_SYS_PARAM_H -#include -#endif -#ifdef HAVE_SYS_MOUNT_H -#include -#endif -#ifdef HAVE_SYS_VFS_H -#include -#endif - main () - { - struct statfs fsd; - fsd.f_bsize = 0; - exit (statfs (".", &fsd)); - } -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - fu_cv_sys_stat_statfs2_bsize=yes -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -fu_cv_sys_stat_statfs2_bsize=no -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi - - echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs2_bsize" >&5 -echo "${ECHO_T}$fu_cv_sys_stat_statfs2_bsize" >&6 - if test $fu_cv_sys_stat_statfs2_bsize = yes; then - ac_fsusage_space=yes - -cat >>confdefs.h <<\_ACEOF -#define STAT_STATFS2_BSIZE 1 -_ACEOF - - fi -fi - -if test $ac_fsusage_space = no; then -# SVR3 - echo "$as_me:$LINENO: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 -echo $ECHO_N "checking for four-argument statfs (AIX-3.2.5, SVR3)... $ECHO_C" >&6 - if test "${fu_cv_sys_stat_statfs4+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - fu_cv_sys_stat_statfs4=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include - main () - { - struct statfs fsd; - exit (statfs (".", &fsd, sizeof fsd, 0)); - } -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - fu_cv_sys_stat_statfs4=yes -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -fu_cv_sys_stat_statfs4=no -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi - - echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs4" >&5 -echo "${ECHO_T}$fu_cv_sys_stat_statfs4" >&6 - if test $fu_cv_sys_stat_statfs4 = yes; then - ac_fsusage_space=yes - -cat >>confdefs.h <<\_ACEOF -#define STAT_STATFS4 1 -_ACEOF - - fi -fi - -if test $ac_fsusage_space = no; then -# 4.4BSD and NetBSD - echo "$as_me:$LINENO: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 -echo $ECHO_N "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)... $ECHO_C" >&6 - if test "${fu_cv_sys_stat_statfs2_fsize+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - fu_cv_sys_stat_statfs2_fsize=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#ifdef HAVE_SYS_PARAM_H -#include -#endif -#ifdef HAVE_SYS_MOUNT_H -#include -#endif - main () - { - struct statfs fsd; - fsd.f_fsize = 0; - exit (statfs (".", &fsd)); - } -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - fu_cv_sys_stat_statfs2_fsize=yes -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -fu_cv_sys_stat_statfs2_fsize=no -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi - - echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs2_fsize" >&5 -echo "${ECHO_T}$fu_cv_sys_stat_statfs2_fsize" >&6 - if test $fu_cv_sys_stat_statfs2_fsize = yes; then - ac_fsusage_space=yes - -cat >>confdefs.h <<\_ACEOF -#define STAT_STATFS2_FSIZE 1 -_ACEOF - - fi -fi - -if test $ac_fsusage_space = no; then - # Ultrix - echo "$as_me:$LINENO: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 -echo $ECHO_N "checking for two-argument statfs with struct fs_data (Ultrix)... $ECHO_C" >&6 - if test "${fu_cv_sys_stat_fs_data+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - fu_cv_sys_stat_fs_data=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#ifdef HAVE_SYS_PARAM_H -#include -#endif -#ifdef HAVE_SYS_MOUNT_H -#include -#endif -#ifdef HAVE_SYS_FS_TYPES_H -#include -#endif - main () - { - struct fs_data fsd; - /* Ultrix's statfs returns 1 for success, - 0 for not mounted, -1 for failure. */ - exit (statfs (".", &fsd) != 1); - } -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - fu_cv_sys_stat_fs_data=yes -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -fu_cv_sys_stat_fs_data=no -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi - - echo "$as_me:$LINENO: result: $fu_cv_sys_stat_fs_data" >&5 -echo "${ECHO_T}$fu_cv_sys_stat_fs_data" >&6 - if test $fu_cv_sys_stat_fs_data = yes; then - ac_fsusage_space=yes - -cat >>confdefs.h <<\_ACEOF -#define STAT_STATFS2_FS_DATA 1 -_ACEOF - - fi -fi - -if test $ac_fsusage_space = no; then - # SVR2 - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - -cat >>confdefs.h <<\_ACEOF -#define STAT_READ_FILSYS 1 -_ACEOF - - ac_fsusage_space=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi -rm -f conftest.err conftest.$ac_ext -fi - -if test $ac_fsusage_space = yes; then - gl_cv_fs_space=yes -else - gl_cv_fs_space=no -fi - - - - if test $gl_cv_fs_space = yes; then - case $LIBOBJS in - "fsusage.$ac_objext" | \ - *" fsusage.$ac_objext" | \ - "fsusage.$ac_objext "* | \ - *" fsusage.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS fsusage.$ac_objext" ;; -esac - - - - - - - - -for ac_header in dustat.h sys/fs/s5param.h sys/filsys.h sys/statfs.h sys/statvfs.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ----------------------------------------- ## -## Report this to the nagios-plugins lists. ## -## ----------------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - echo "$as_me:$LINENO: checking for statfs that truncates block counts" >&5 -echo $ECHO_N "checking for statfs that truncates block counts... $ECHO_C" >&6 - if test "${fu_cv_sys_truncating_statfs+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#if !defined(sun) && !defined(__sun) -choke -- this is a workaround for a Sun-specific problem -#endif -#include -#include -int -main () -{ -struct statfs t; long c = *(t.f_spare); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - fu_cv_sys_truncating_statfs=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fu_cv_sys_truncating_statfs=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - if test $fu_cv_sys_truncating_statfs = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STATFS_TRUNCATES_BLOCK_COUNTS 1 -_ACEOF - - fi - echo "$as_me:$LINENO: result: $fu_cv_sys_truncating_statfs" >&5 -echo "${ECHO_T}$fu_cv_sys_truncating_statfs" >&6 - - - fi - # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo "$as_me:$LINENO: checking for working alloca.h" >&5 @@ -35780,8 +28608,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -35862,8 +28689,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -36004,8 +28830,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -36113,46 +28938,1121 @@ fi - if test $ac_cv_func_alloca_works = no; then - : - fi +for ac_header in $gl_header_list +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - # Define an additional variable used in the Makefile substitution. - if test $ac_cv_working_alloca_h = yes; then - cat >conftest.$ac_ext <<_ACEOF +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ----------------------------------------- ## +## Report this to the nagios-plugins lists. ## +## ----------------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + + + echo "$as_me:$LINENO: checking whether system is Windows or MSDOS" >&5 +echo $ECHO_N "checking whether system is Windows or MSDOS... $ECHO_C" >&6 +if test "${ac_cv_win_or_dos+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#if defined __GNUC__ || defined _AIX || defined _MSC_VER - Need own alloca +int +main () +{ +#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __CYGWIN__ +neither MSDOS nor Windows #endif - + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Need own alloca" >/dev/null 2>&1; then +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_win_or_dos=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_win_or_dos=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $ac_cv_win_or_dos" >&5 +echo "${ECHO_T}$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 + echo "$as_me:$LINENO: checking whether drive letter can start relative path" >&5 +echo $ECHO_N "checking whether drive letter can start relative path... $ECHO_C" >&6 +if test "${ac_cv_drive_letter_can_be_relative+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#if defined __CYGWIN__ +drive letters are always absolute +#endif + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_drive_letter_can_be_relative=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_drive_letter_can_be_relative=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $ac_cv_drive_letter_can_be_relative" >&5 +echo "${ECHO_T}$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 + + + + + echo "$as_me:$LINENO: checking whether // is distinct from /" >&5 +echo $ECHO_N "checking whether // is distinct from /... $ECHO_C" >&6 +if test "${gl_cv_double_slash_root+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test x"$cross_compiling" = xyes ; then + # When cross-compiling, there is no way to tell whether // is special + # short of a list of hosts. However, the only known hosts to date + # that have a distinct // are Apollo DomainOS (too old to port to), + # Cygwin, and z/OS. If anyone knows of another system for which // has + # special semantics and is distinct from /, please report it to + # . + case $host in + *-cygwin | i370-ibm-openedition) + gl_cv_double_slash_root=yes ;; + *) + # Be optimistic and assume that / and // are the same when we + # don't know. + gl_cv_double_slash_root='unknown, assuming no' ;; + esac + else + set x `ls -di / //` + if test $2 = $4 && wc //dev/null >/dev/null 2>&1; then + gl_cv_double_slash_root=no + else + gl_cv_double_slash_root=yes + fi + fi +fi +echo "$as_me:$LINENO: result: $gl_cv_double_slash_root" >&5 +echo "${ECHO_T}$gl_cv_double_slash_root" >&6 + if test "$gl_cv_double_slash_root" = yes; then cat >>confdefs.h <<\_ACEOF -#define HAVE_ALLOCA 1 +#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1 _ACEOF - ALLOCA_H=alloca.h -else - ALLOCA_H= -fi -rm -f conftest* + fi +echo "$as_me:$LINENO: checking whether strerror_r is declared" >&5 +echo $ECHO_N "checking whether strerror_r is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl_strerror_r+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef strerror_r + char *p = (char *) strerror_r; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_decl_strerror_r=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_have_decl_strerror_r=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror_r" >&5 +echo "${ECHO_T}$ac_cv_have_decl_strerror_r" >&6 +if test $ac_cv_have_decl_strerror_r = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRERROR_R 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRERROR_R 0 +_ACEOF + + +fi + + + +for ac_func in strerror_r +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +echo "$as_me:$LINENO: checking whether strerror_r returns char *" >&5 +echo $ECHO_N "checking whether strerror_r returns char *... $ECHO_C" >&6 +if test "${ac_cv_func_strerror_r_char_p+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + ac_cv_func_strerror_r_char_p=no + if test $ac_cv_have_decl_strerror_r = yes; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + char buf[100]; + char x = *strerror_r (0, buf, sizeof buf); + char *p = strerror_r (0, buf, sizeof buf); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_strerror_r_char_p=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + else + # strerror_r is not declared. Choose between + # systems that have relatively inaccessible declarations for the + # function. BeOS and DEC UNIX 4.0 fall in this category, but the + # former has a strerror_r that returns char*, while the latter + # has a strerror_r that returns `int'. + # This test should segfault on the DEC system. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + extern char *strerror_r (); +int +main () +{ +char buf[100]; + char x = *strerror_r (0, buf, sizeof buf); + exit (!isalpha (x)); + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_strerror_r_char_p=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + fi + +fi +echo "$as_me:$LINENO: result: $ac_cv_func_strerror_r_char_p" >&5 +echo "${ECHO_T}$ac_cv_func_strerror_r_char_p" >&6 +if test $ac_cv_func_strerror_r_char_p = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STRERROR_R_CHAR_P 1 +_ACEOF + +fi + + + + + + + + + + + + + + + + + + + +echo "$as_me:$LINENO: checking for C/C++ restrict keyword" >&5 +echo $ECHO_N "checking for C/C++ restrict keyword... $ECHO_C" >&6 +if test "${ac_cv_c_restrict+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_restrict=no + # Try the official restrict keyword, then gcc's __restrict, and + # the less common variants. + for ac_kw in restrict __restrict __restrict__ _Restrict; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +float * $ac_kw x; +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_restrict=$ac_kw; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_restrict" >&5 +echo "${ECHO_T}$ac_cv_c_restrict" >&6 + case $ac_cv_c_restrict in + restrict) ;; + no) +cat >>confdefs.h <<\_ACEOF +#define restrict +_ACEOF + ;; + *) cat >>confdefs.h <<_ACEOF +#define restrict $ac_cv_c_restrict +_ACEOF + ;; + esac + + + + + + + + + + : + + + + + + if test $ac_cv_header_sys_socket_h = yes; then + SYS_SOCKET_H='' else - ALLOCA_H=alloca.h + + +for ac_header in winsock2.h ws2tcpip.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ----------------------------------------- ## +## Report this to the nagios-plugins lists. ## +## ----------------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + SYS_SOCKET_H='sys/socket.h' fi -cat >>confdefs.h <<\_ACEOF -#define HAVE_ALLOCA_H 1 + + + + + + + + + : + + + + + + + echo "$as_me:$LINENO: checking for IPv4 sockets" >&5 +echo $ECHO_N "checking for IPv4 sockets... $ECHO_C" >&6 + if test "${gl_cv_socket_ipv4+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_WINSOCK2_H +#include +#endif +int +main () +{ +int x = AF_INET; struct in_addr y; struct sockaddr_in z; + if (&x && &y && &z) return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gl_cv_socket_ipv4=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gl_cv_socket_ipv4=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + echo "$as_me:$LINENO: result: $gl_cv_socket_ipv4" >&5 +echo "${ECHO_T}$gl_cv_socket_ipv4" >&6 + if test $gl_cv_socket_ipv4 = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_IPV4 1 +_ACEOF + + fi + + echo "$as_me:$LINENO: checking for IPv6 sockets" >&5 +echo $ECHO_N "checking for IPv6 sockets... $ECHO_C" >&6 + if test "${gl_cv_socket_ipv6+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_WINSOCK2_H +#include +#endif +int +main () +{ +int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z; + if (&x && &y && &z) return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gl_cv_socket_ipv6=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gl_cv_socket_ipv6=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + echo "$as_me:$LINENO: result: $gl_cv_socket_ipv6" >&5 +echo "${ECHO_T}$gl_cv_socket_ipv6" >&6 + if test $gl_cv_socket_ipv6 = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_IPV6 1 +_ACEOF + + fi + +echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6 +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_inline=$ac_kw; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$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 + + + + + @@ -36191,8 +30091,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -36381,8 +30280,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -36452,8 +30350,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -36522,8 +30419,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -36605,25 +30501,6424 @@ echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6 fi + echo "$as_me:$LINENO: checking whether getenv is declared" >&5 +echo $ECHO_N "checking whether getenv is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl_getenv+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef getenv + char *p = (char *) getenv; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_decl_getenv=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_have_decl_getenv=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5 +echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6 +if test $ac_cv_have_decl_getenv = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETENV 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETENV 0 +_ACEOF + + +fi + + + +echo "$as_me:$LINENO: checking for mbstate_t" >&5 +echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6 +if test "${ac_cv_type_mbstate_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +# include +int +main () +{ +mbstate_t x; return sizeof x; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_mbstate_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_mbstate_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5 +echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6 + if test $ac_cv_type_mbstate_t = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MBSTATE_T 1 +_ACEOF + + else + +cat >>confdefs.h <<\_ACEOF +#define mbstate_t int +_ACEOF + + fi + + echo "$as_me:$LINENO: checking whether mbrtowc and mbstate_t are properly declared" >&5 +echo $ECHO_N "checking whether mbrtowc and mbstate_t are properly declared... $ECHO_C" >&6 +if test "${gl_cv_func_mbrtowc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +wchar_t wc; + char const s[] = ""; + size_t n = 1; + mbstate_t state; + return ! (sizeof state && (mbrtowc) (&wc, s, n, &state)); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gl_cv_func_mbrtowc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gl_cv_func_mbrtowc=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc" >&5 +echo "${ECHO_T}$gl_cv_func_mbrtowc" >&6 + if test $gl_cv_func_mbrtowc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MBRTOWC 1 +_ACEOF + + fi + + + + + + echo "$as_me:$LINENO: checking whether defines MIN and MAX" >&5 +echo $ECHO_N "checking whether defines MIN and MAX... $ECHO_C" >&6 +if test "${gl_cv_minmax_in_limits_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int x = MIN (42, 17); +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gl_cv_minmax_in_limits_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gl_cv_minmax_in_limits_h=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $gl_cv_minmax_in_limits_h" >&5 +echo "${ECHO_T}$gl_cv_minmax_in_limits_h" >&6 + if test $gl_cv_minmax_in_limits_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MINMAX_IN_LIMITS_H 1 +_ACEOF + + fi + + + + + + + echo "$as_me:$LINENO: checking whether defines MIN and MAX" >&5 +echo $ECHO_N "checking whether defines MIN and MAX... $ECHO_C" >&6 +if test "${gl_cv_minmax_in_sys_param_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int x = MIN (42, 17); +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gl_cv_minmax_in_sys_param_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gl_cv_minmax_in_sys_param_h=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $gl_cv_minmax_in_sys_param_h" >&5 +echo "${ECHO_T}$gl_cv_minmax_in_sys_param_h" >&6 + if test $gl_cv_minmax_in_sys_param_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MINMAX_IN_SYS_PARAM_H 1 +_ACEOF + + fi + + + + + + + + + + + + + + + + + + echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 +echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 +if test "${am_cv_langinfo_codeset+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +char* cs = nl_langinfo(CODESET); return !cs; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + am_cv_langinfo_codeset=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +am_cv_langinfo_codeset=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 +echo "${ECHO_T}$am_cv_langinfo_codeset" >&6 + if test $am_cv_langinfo_codeset = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LANGINFO_CODESET 1 +_ACEOF + + fi + + + + + + +for ac_func in $gl_func_list +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + echo "$as_me:$LINENO: checking for ssize_t" >&5 +echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 +if test "${gt_cv_ssize_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +int x = sizeof (ssize_t *) + sizeof (ssize_t); + return !x; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gt_cv_ssize_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gt_cv_ssize_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $gt_cv_ssize_t" >&5 +echo "${ECHO_T}$gt_cv_ssize_t" >&6 + if test $gt_cv_ssize_t = no; then + +cat >>confdefs.h <<\_ACEOF +#define ssize_t int +_ACEOF + + fi + + + echo "$as_me:$LINENO: checking whether snprintf is declared" >&5 +echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl_snprintf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef snprintf + char *p = (char *) snprintf; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_decl_snprintf=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_have_decl_snprintf=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5 +echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6 +if test $ac_cv_have_decl_snprintf = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SNPRINTF 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SNPRINTF 0 +_ACEOF + + +fi + + + +echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5 +echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6 +if test "${ac_cv_header_stdbool_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 + + 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; + +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); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_stdbool_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_stdbool_h=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6 + echo "$as_me:$LINENO: checking for _Bool" >&5 +echo $ECHO_N "checking for _Bool... $ECHO_C" >&6 +if test "${ac_cv_type__Bool+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((_Bool *) 0) + return 0; +if (sizeof (_Bool)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type__Bool=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type__Bool=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 +echo "${ECHO_T}$ac_cv_type__Bool" >&6 +if test $ac_cv_type__Bool = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE__BOOL 1 +_ACEOF + + +fi + + if test $ac_cv_header_stdbool_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_STDBOOL_H 1 +_ACEOF + + fi + + echo "$as_me:$LINENO: checking for long long int" >&5 +echo $ECHO_N "checking for long long int... $ECHO_C" >&6 +if test "${ac_cv_type_long_long_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +long long int ll = 9223372036854775807ll; + long long int nll = -9223372036854775807LL; + typedef int a[((-9223372036854775807LL < 0 + && 0 < 9223372036854775807ll) + ? 1 : -1)]; + int i = 63; +int +main () +{ +long long int llmax = 9223372036854775807ll; + return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) + | (llmax / ll) | (llmax % ll)); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + if test "$cross_compiling" = yes; then + ac_cv_type_long_long_int=yes +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + #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; + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_long_long_int=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_type_long_long_int=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_long_long_int=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5 +echo "${ECHO_T}$ac_cv_type_long_long_int" >&6 + if test $ac_cv_type_long_long_int = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LONG_LONG_INT 1 +_ACEOF + + fi + + + echo "$as_me:$LINENO: checking for unsigned long long int" >&5 +echo $ECHO_N "checking for unsigned long long int... $ECHO_C" >&6 +if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +unsigned long long int ull = 18446744073709551615ULL; + typedef int a[(18446744073709551615ULL <= (unsigned long long int) -1 + ? 1 : -1)]; + int i = 63; +int +main () +{ +unsigned long long int ullmax = 18446744073709551615ull; + return (ull << 63 | ull >> 63 | ull << i | ull >> i + | ullmax / ull | ullmax % ull); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_unsigned_long_long_int=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_unsigned_long_long_int=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long_int" >&5 +echo "${ECHO_T}$ac_cv_type_unsigned_long_long_int" >&6 + if test $ac_cv_type_unsigned_long_long_int = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_UNSIGNED_LONG_LONG_INT 1 +_ACEOF + + fi + + + + + + + + + echo "$as_me:$LINENO: checking whether strdup is declared" >&5 +echo $ECHO_N "checking whether strdup is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl_strdup+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef strdup + char *p = (char *) strdup; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_decl_strdup=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_have_decl_strdup=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_have_decl_strdup" >&5 +echo "${ECHO_T}$ac_cv_have_decl_strdup" >&6 +if test $ac_cv_have_decl_strdup = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRDUP 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRDUP 0 +_ACEOF + + +fi + + + + + echo "$as_me:$LINENO: checking whether strndup is declared" >&5 +echo $ECHO_N "checking whether strndup is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl_strndup+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef strndup + char *p = (char *) strndup; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_decl_strndup=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_have_decl_strndup=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_have_decl_strndup" >&5 +echo "${ECHO_T}$ac_cv_have_decl_strndup" >&6 +if test $ac_cv_have_decl_strndup = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRNDUP 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRNDUP 0 +_ACEOF + + +fi + + + + + echo "$as_me:$LINENO: checking whether strnlen is declared" >&5 +echo $ECHO_N "checking whether strnlen is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl_strnlen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef strnlen + char *p = (char *) strnlen; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_decl_strnlen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_have_decl_strnlen=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_have_decl_strnlen" >&5 +echo "${ECHO_T}$ac_cv_have_decl_strnlen" >&6 +if test $ac_cv_have_decl_strnlen = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRNLEN 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRNLEN 0 +_ACEOF + + +fi + + + + + + + + + + + + + + + + + + echo "$as_me:$LINENO: checking for EOVERFLOW" >&5 +echo $ECHO_N "checking for EOVERFLOW... $ECHO_C" >&6 +if test "${ac_cv_decl_EOVERFLOW+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#ifdef EOVERFLOW +yes +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then + have_eoverflow=1 +fi +rm -f conftest* + + if test -n "$have_eoverflow"; then + ac_cv_decl_EOVERFLOW=yes + else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#define _XOPEN_SOURCE_EXTENDED 1 +#include +#ifdef EOVERFLOW +yes +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then + have_eoverflow=1 +fi +rm -f conftest* + + if test -n "$have_eoverflow"; then + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#define _XOPEN_SOURCE_EXTENDED 1 +#include +/* The following two lines are a workaround against an autoconf-2.52 bug. */ +#include +#include + +int +main () +{ +static int test_array [1 - 2 * !((EOVERFLOW) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#define _XOPEN_SOURCE_EXTENDED 1 +#include +/* The following two lines are a workaround against an autoconf-2.52 bug. */ +#include +#include + +int +main () +{ +static int test_array [1 - 2 * !((EOVERFLOW) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#define _XOPEN_SOURCE_EXTENDED 1 +#include +/* The following two lines are a workaround against an autoconf-2.52 bug. */ +#include +#include + +int +main () +{ +static int test_array [1 - 2 * !((EOVERFLOW) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#define _XOPEN_SOURCE_EXTENDED 1 +#include +/* The following two lines are a workaround against an autoconf-2.52 bug. */ +#include +#include + +int +main () +{ +static int test_array [1 - 2 * !((EOVERFLOW) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo= ac_hi= +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#define _XOPEN_SOURCE_EXTENDED 1 +#include +/* The following two lines are a workaround against an autoconf-2.52 bug. */ +#include +#include + +int +main () +{ +static int test_array [1 - 2 * !((EOVERFLOW) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_decl_EOVERFLOW=$ac_lo;; +'') ;; +esac +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 +echo "$as_me: error: internal error: not reached in cross-compile" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#define _XOPEN_SOURCE_EXTENDED 1 +#include +/* The following two lines are a workaround against an autoconf-2.52 bug. */ +#include +#include + +long longval () { return EOVERFLOW; } +unsigned long ulongval () { return EOVERFLOW; } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if ((EOVERFLOW) < 0) + { + long i = longval (); + if (i != (EOVERFLOW)) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != (EOVERFLOW)) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_decl_EOVERFLOW=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val + else + ac_cv_decl_EOVERFLOW=E2BIG + fi + fi + +fi +echo "$as_me:$LINENO: result: $ac_cv_decl_EOVERFLOW" >&5 +echo "${ECHO_T}$ac_cv_decl_EOVERFLOW" >&6 + if test "$ac_cv_decl_EOVERFLOW" != yes; then + +cat >>confdefs.h <<_ACEOF +#define EOVERFLOW $ac_cv_decl_EOVERFLOW +_ACEOF + + EOVERFLOW="$ac_cv_decl_EOVERFLOW" + + fi + + + echo "$as_me:$LINENO: checking for long double" >&5 +echo $ECHO_N "checking for long double... $ECHO_C" >&6 +if test "${gt_cv_c_long_double+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$GCC" = yes; then + gt_cv_c_long_double=yes + else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + /* The Stardent Vistra knows sizeof(long double), but does not support it. */ + long double foo = 0.0; + /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ + int array [2*(sizeof(long double) >= sizeof(double)) - 1]; + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gt_cv_c_long_double=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gt_cv_c_long_double=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + fi +fi +echo "$as_me:$LINENO: result: $gt_cv_c_long_double" >&5 +echo "${ECHO_T}$gt_cv_c_long_double" >&6 + if test $gt_cv_c_long_double = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LONG_DOUBLE 1 +_ACEOF + + fi + + + echo "$as_me:$LINENO: checking for wchar_t" >&5 +echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6 +if test "${gt_cv_c_wchar_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + wchar_t foo = (wchar_t)'\0'; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gt_cv_c_wchar_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gt_cv_c_wchar_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $gt_cv_c_wchar_t" >&5 +echo "${ECHO_T}$gt_cv_c_wchar_t" >&6 + if test $gt_cv_c_wchar_t = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_WCHAR_T 1 +_ACEOF + + fi + + + echo "$as_me:$LINENO: checking for wint_t" >&5 +echo $ECHO_N "checking for wint_t... $ECHO_C" >&6 +if test "${gt_cv_c_wint_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 + wint_t foo = (wchar_t)'\0'; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gt_cv_c_wint_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gt_cv_c_wint_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $gt_cv_c_wint_t" >&5 +echo "${ECHO_T}$gt_cv_c_wint_t" >&6 + if test $gt_cv_c_wint_t = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_WINT_T 1 +_ACEOF + + fi + + + echo "$as_me:$LINENO: checking for inttypes.h" >&5 +echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 +if test "${gl_cv_header_inttypes_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ +uintmax_t i = (uintmax_t) -1; return !i; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gl_cv_header_inttypes_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gl_cv_header_inttypes_h=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $gl_cv_header_inttypes_h" >&5 +echo "${ECHO_T}$gl_cv_header_inttypes_h" >&6 + if test $gl_cv_header_inttypes_h = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_INTTYPES_H_WITH_UINTMAX 1 +_ACEOF + + fi + + + echo "$as_me:$LINENO: checking for stdint.h" >&5 +echo $ECHO_N "checking for stdint.h... $ECHO_C" >&6 +if test "${gl_cv_header_stdint_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ +uintmax_t i = (uintmax_t) -1; return !i; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gl_cv_header_stdint_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gl_cv_header_stdint_h=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $gl_cv_header_stdint_h" >&5 +echo "${ECHO_T}$gl_cv_header_stdint_h" >&6 + if test $gl_cv_header_stdint_h = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STDINT_H_WITH_UINTMAX 1 +_ACEOF + + fi + + + + ac_cv_type_long_long=$ac_cv_type_long_long_int + if test $ac_cv_type_long_long = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LONG_LONG 1 +_ACEOF + + fi + + + + + echo "$as_me:$LINENO: checking for intmax_t" >&5 +echo $ECHO_N "checking for intmax_t... $ECHO_C" >&6 +if test "${gt_cv_c_intmax_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +#if HAVE_STDINT_H_WITH_UINTMAX +#include +#endif +#if HAVE_INTTYPES_H_WITH_UINTMAX +#include +#endif + +int +main () +{ +intmax_t x = -1; return !x; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gt_cv_c_intmax_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gt_cv_c_intmax_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $gt_cv_c_intmax_t" >&5 +echo "${ECHO_T}$gt_cv_c_intmax_t" >&6 + if test $gt_cv_c_intmax_t = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_INTMAX_T 1 +_ACEOF + + else + + test $ac_cv_type_long_long = yes \ + && ac_type='long long' \ + || ac_type='long' + +cat >>confdefs.h <<_ACEOF +#define intmax_t $ac_type +_ACEOF + + fi + + + echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5 +echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl_vsnprintf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef vsnprintf + char *p = (char *) vsnprintf; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_decl_vsnprintf=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_have_decl_vsnprintf=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5 +echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6 +if test $ac_cv_have_decl_vsnprintf = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_VSNPRINTF 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_VSNPRINTF 0 +_ACEOF + + +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +if false; then + GL_COND_LIBTOOL_TRUE= + GL_COND_LIBTOOL_FALSE='#' +else + GL_COND_LIBTOOL_TRUE='#' + GL_COND_LIBTOOL_FALSE= +fi + + gl_cond_libtool=false + gl_libdeps= + gl_ltlibdeps= + gl_source_base='gl' + + + + + + if test $ac_cv_func_alloca_works = no; then + : + fi + + # Define an additional variable used in the Makefile substitution. + if test $ac_cv_working_alloca_h = yes; then + echo "$as_me:$LINENO: checking for alloca as a compiler built-in" >&5 +echo $ECHO_N "checking for alloca as a compiler built-in... $ECHO_C" >&6 +if test "${gl_cv_rpl_alloca+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#if defined __GNUC__ || defined _AIX || defined _MSC_VER + Need own alloca +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Need own alloca" >/dev/null 2>&1; then + gl_cv_rpl_alloca=yes +else + gl_cv_rpl_alloca=no +fi +rm -f conftest* + + +fi +echo "$as_me:$LINENO: result: $gl_cv_rpl_alloca" >&5 +echo "${ECHO_T}$gl_cv_rpl_alloca" >&6 + if test $gl_cv_rpl_alloca = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ALLOCA 1 +_ACEOF + + ALLOCA_H=alloca.h + else + ALLOCA_H= + fi + else + ALLOCA_H=alloca.h + fi + + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ALLOCA_H 1 +_ACEOF + + + + + : + + + + + + if test $ac_cv_header_arpa_inet_h = yes; then + ARPA_INET_H='' + else + ARPA_INET_H='arpa/inet.h' + fi + + + + gl_LIBOBJS="$gl_LIBOBJS c-strtod.$ac_objext" + + + : + + + gl_LIBOBJS="$gl_LIBOBJS cloexec.$ac_objext" + + + gl_LIBOBJS="$gl_LIBOBJS basename.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS dirname.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS stripslash.$ac_objext" + + + + + + + + echo "$as_me:$LINENO: checking whether // is distinct from /" >&5 +echo $ECHO_N "checking whether // is distinct from /... $ECHO_C" >&6 +if test "${gl_cv_double_slash_root+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test x"$cross_compiling" = xyes ; then + # When cross-compiling, there is no way to tell whether // is special + # short of a list of hosts. However, the only known hosts to date + # that have a distinct // are Apollo DomainOS (too old to port to), + # Cygwin, and z/OS. If anyone knows of another system for which // has + # special semantics and is distinct from /, please report it to + # . + case $host in + *-cygwin | i370-ibm-openedition) + gl_cv_double_slash_root=yes ;; + *) + # Be optimistic and assume that / and // are the same when we + # don't know. + gl_cv_double_slash_root='unknown, assuming no' ;; + esac + else + set x `ls -di / //` + if test $2 = $4 && wc //dev/null >/dev/null 2>&1; then + gl_cv_double_slash_root=no + else + gl_cv_double_slash_root=yes + fi + fi +fi +echo "$as_me:$LINENO: result: $gl_cv_double_slash_root" >&5 +echo "${ECHO_T}$gl_cv_double_slash_root" >&6 + if test "$gl_cv_double_slash_root" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1 +_ACEOF + + fi + + + echo "$as_me:$LINENO: checking for error_at_line" >&5 +echo $ECHO_N "checking for error_at_line... $ECHO_C" >&6 +if test "${ac_cv_lib_error_at_line+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +error_at_line (0, 0, "", 0, ""); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_error_at_line=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_error_at_line=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_error_at_line" >&5 +echo "${ECHO_T}$ac_cv_lib_error_at_line" >&6 +if test $ac_cv_lib_error_at_line = no; then + gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext" +fi + + + + : + + + + gl_LIBOBJS="$gl_LIBOBJS exitfail.$ac_objext" + + : + + + gl_LIBOBJS="$gl_LIBOBJS open-safer.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS creat-safer.$ac_objext" + + + +cat >>confdefs.h <<\_ACEOF +#define GNULIB_FCNTL_SAFER 1 +_ACEOF + + + + + : + + + + + + + : + + + + + + + + + +for ac_header in sys/mount.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + #if HAVE_SYS_PARAM_H + #include + #endif + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +{ echo "$as_me:$LINENO: checking how to get file system space usage" >&5 +echo "$as_me: checking how to get file system space usage" >&6;} +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 +# 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 + echo "$as_me:$LINENO: checking for statvfs function (SVR4)" >&5 +echo $ECHO_N "checking for statvfs function (SVR4)... $ECHO_C" >&6 +if test "${fu_cv_sys_stat_statvfs+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#if defined __GLIBC__ && !defined __BEOS__ +Do not use statvfs on systems with GNU libc, 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 BeOS operates differently: it only makes a system +call. +#endif +#include +int +main () +{ +struct statvfs fsd; statvfs (0, &fsd); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + fu_cv_sys_stat_statvfs=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fu_cv_sys_stat_statvfs=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statvfs" >&5 +echo "${ECHO_T}$fu_cv_sys_stat_statvfs" >&6 + if test $fu_cv_sys_stat_statvfs = yes; then + ac_fsusage_space=yes + +cat >>confdefs.h <<\_ACEOF +#define STAT_STATVFS 1 +_ACEOF + + fi +fi + +if test $ac_fsusage_space = no; then + # DEC Alpha running OSF/1 + echo "$as_me:$LINENO: checking for 3-argument statfs function (DEC OSF/1)" >&5 +echo $ECHO_N "checking for 3-argument statfs function (DEC OSF/1)... $ECHO_C" >&6 + if test "${fu_cv_sys_stat_statfs3_osf1+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + fu_cv_sys_stat_statfs3_osf1=no +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +#include + int + main () + { + struct statfs fsd; + fsd.f_fsize = 0; + return statfs (".", &fsd, sizeof (struct statfs)) != 0; + } +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + fu_cv_sys_stat_statfs3_osf1=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +fu_cv_sys_stat_statfs3_osf1=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi + + echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs3_osf1" >&5 +echo "${ECHO_T}$fu_cv_sys_stat_statfs3_osf1" >&6 + if test $fu_cv_sys_stat_statfs3_osf1 = yes; then + ac_fsusage_space=yes + +cat >>confdefs.h <<\_ACEOF +#define STAT_STATFS3_OSF1 1 +_ACEOF + + fi +fi + +if test $ac_fsusage_space = no; then +# AIX + echo "$as_me:$LINENO: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 +echo $ECHO_N "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)... $ECHO_C" >&6 + if test "${fu_cv_sys_stat_statfs2_bsize+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + fu_cv_sys_stat_statfs2_bsize=no +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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_bsize = 0; + return statfs (".", &fsd) != 0; + } +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + fu_cv_sys_stat_statfs2_bsize=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +fu_cv_sys_stat_statfs2_bsize=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi + + echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs2_bsize" >&5 +echo "${ECHO_T}$fu_cv_sys_stat_statfs2_bsize" >&6 + if test $fu_cv_sys_stat_statfs2_bsize = yes; then + ac_fsusage_space=yes + +cat >>confdefs.h <<\_ACEOF +#define STAT_STATFS2_BSIZE 1 +_ACEOF + + fi +fi + +if test $ac_fsusage_space = no; then +# SVR3 + echo "$as_me:$LINENO: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 +echo $ECHO_N "checking for four-argument statfs (AIX-3.2.5, SVR3)... $ECHO_C" >&6 + if test "${fu_cv_sys_stat_statfs4+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + fu_cv_sys_stat_statfs4=no +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + int + main () + { + struct statfs fsd; + return statfs (".", &fsd, sizeof fsd, 0) != 0; + } +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + fu_cv_sys_stat_statfs4=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +fu_cv_sys_stat_statfs4=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi + + echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs4" >&5 +echo "${ECHO_T}$fu_cv_sys_stat_statfs4" >&6 + if test $fu_cv_sys_stat_statfs4 = yes; then + ac_fsusage_space=yes + +cat >>confdefs.h <<\_ACEOF +#define STAT_STATFS4 1 +_ACEOF + + fi +fi + +if test $ac_fsusage_space = no; then +# 4.4BSD and NetBSD + echo "$as_me:$LINENO: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 +echo $ECHO_N "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)... $ECHO_C" >&6 + if test "${fu_cv_sys_stat_statfs2_fsize+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + fu_cv_sys_stat_statfs2_fsize=no +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_MOUNT_H +#include +#endif + int + main () + { + struct statfs fsd; + fsd.f_fsize = 0; + return statfs (".", &fsd) != 0; + } +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + fu_cv_sys_stat_statfs2_fsize=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +fu_cv_sys_stat_statfs2_fsize=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi + + echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs2_fsize" >&5 +echo "${ECHO_T}$fu_cv_sys_stat_statfs2_fsize" >&6 + if test $fu_cv_sys_stat_statfs2_fsize = yes; then + ac_fsusage_space=yes + +cat >>confdefs.h <<\_ACEOF +#define STAT_STATFS2_FSIZE 1 +_ACEOF + + fi +fi + +if test $ac_fsusage_space = no; then + # Ultrix + echo "$as_me:$LINENO: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 +echo $ECHO_N "checking for two-argument statfs with struct fs_data (Ultrix)... $ECHO_C" >&6 + if test "${fu_cv_sys_stat_fs_data+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + fu_cv_sys_stat_fs_data=no +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_MOUNT_H +#include +#endif +#ifdef HAVE_SYS_FS_TYPES_H +#include +#endif + int + main () + { + struct fs_data fsd; + /* Ultrix's statfs returns 1 for success, + 0 for not mounted, -1 for failure. */ + return statfs (".", &fsd) != 1; + } +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + fu_cv_sys_stat_fs_data=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +fu_cv_sys_stat_fs_data=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi + + echo "$as_me:$LINENO: result: $fu_cv_sys_stat_fs_data" >&5 +echo "${ECHO_T}$fu_cv_sys_stat_fs_data" >&6 + if test $fu_cv_sys_stat_fs_data = yes; then + ac_fsusage_space=yes + +cat >>confdefs.h <<\_ACEOF +#define STAT_STATFS2_FS_DATA 1 +_ACEOF + + fi +fi + +if test $ac_fsusage_space = no; then + # SVR2 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + +cat >>confdefs.h <<\_ACEOF +#define STAT_READ_FILSYS 1 +_ACEOF + + ac_fsusage_space=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi +rm -f conftest.err conftest.$ac_ext +fi + +if test $ac_fsusage_space = yes; then + gl_cv_fs_space=yes +else + gl_cv_fs_space=no +fi + + + + if test $gl_cv_fs_space = yes; then + gl_LIBOBJS="$gl_LIBOBJS fsusage.$ac_objext" + + + + + +for ac_header in dustat.h sys/fs/s5param.h sys/filsys.h sys/statfs.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ----------------------------------------- ## +## Report this to the nagios-plugins lists. ## +## ----------------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + echo "$as_me:$LINENO: checking for statfs that truncates block counts" >&5 +echo $ECHO_N "checking for statfs that truncates block counts... $ECHO_C" >&6 + if test "${fu_cv_sys_truncating_statfs+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#if !defined(sun) && !defined(__sun) +choke -- this is a workaround for a Sun-specific problem +#endif +#include +#include +int +main () +{ +struct statfs t; long c = *(t.f_spare); + if (c) return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + fu_cv_sys_truncating_statfs=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fu_cv_sys_truncating_statfs=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + if test $fu_cv_sys_truncating_statfs = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STATFS_TRUNCATES_BLOCK_COUNTS 1 +_ACEOF + + fi + echo "$as_me:$LINENO: result: $fu_cv_sys_truncating_statfs" >&5 +echo "${ECHO_T}$fu_cv_sys_truncating_statfs" >&6 + + + fi + + + { echo "$as_me:$LINENO: checking how to do getaddrinfo, freeaddrinfo and getnameinfo" >&5 +echo "$as_me: checking how to do getaddrinfo, freeaddrinfo and getnameinfo" >&6;} + + echo "$as_me:$LINENO: checking for library containing getaddrinfo" >&5 +echo $ECHO_N "checking for library containing getaddrinfo... $ECHO_C" >&6 +if test "${ac_cv_search_getaddrinfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +ac_cv_search_getaddrinfo=no +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char getaddrinfo (); +int +main () +{ +getaddrinfo (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_getaddrinfo="none required" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_getaddrinfo" = no; then + for ac_lib in nsl socket; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char getaddrinfo (); +int +main () +{ +getaddrinfo (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_getaddrinfo="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_getaddrinfo" >&5 +echo "${ECHO_T}$ac_cv_search_getaddrinfo" >&6 +if test "$ac_cv_search_getaddrinfo" != no; then + test "$ac_cv_search_getaddrinfo" = "none required" || LIBS="$ac_cv_search_getaddrinfo $LIBS" + +fi + + +for ac_func in getaddrinfo +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + + echo "$as_me:$LINENO: checking for getaddrinfo in ws2tcpip.h and -lws2_32" >&5 +echo $ECHO_N "checking for getaddrinfo in ws2tcpip.h and -lws2_32... $ECHO_C" >&6 +if test "${gl_cv_w32_getaddrinfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + gl_cv_w32_getaddrinfo=no + am_save_LIBS="$LIBS" + LIBS="$LIBS -lws2_32" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_WS2TCPIP_H +#include +#endif + +int +main () +{ +getaddrinfo(0, 0, 0, 0); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gl_cv_w32_getaddrinfo=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$am_save_LIBS" +fi +echo "$as_me:$LINENO: result: $gl_cv_w32_getaddrinfo" >&5 +echo "${ECHO_T}$gl_cv_w32_getaddrinfo" >&6 + if test "$gl_cv_w32_getaddrinfo" = "yes"; then + LIBS="$LIBS -lws2_32" + else + gl_LIBOBJS="$gl_LIBOBJS getaddrinfo.$ac_objext" + fi + +fi +done + + + +for ac_func in gai_strerror +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" +fi +done + + + echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5 +echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6 +if test "${ac_cv_search_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +ac_cv_search_gethostbyname=no +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +int +main () +{ +gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_gethostbyname="none required" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_gethostbyname" = no; then + for ac_lib in inet nsl; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +int +main () +{ +gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_gethostbyname="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_search_gethostbyname" >&6 +if test "$ac_cv_search_gethostbyname" != no; then + test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS" + +fi + + echo "$as_me:$LINENO: checking for library containing getservbyname" >&5 +echo $ECHO_N "checking for library containing getservbyname... $ECHO_C" >&6 +if test "${ac_cv_search_getservbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +ac_cv_search_getservbyname=no +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char getservbyname (); +int +main () +{ +getservbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_getservbyname="none required" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_getservbyname" = no; then + for ac_lib in inet nsl socket xnet; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char getservbyname (); +int +main () +{ +getservbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_getservbyname="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_getservbyname" >&5 +echo "${ECHO_T}$ac_cv_search_getservbyname" >&6 +if test "$ac_cv_search_getservbyname" != no; then + test "$ac_cv_search_getservbyname" = "none required" || LIBS="$ac_cv_search_getservbyname $LIBS" + +fi + + +for ac_func in gethostbyname +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + + echo "$as_me:$LINENO: checking for gethostbyname in winsock2.h and -lws2_32" >&5 +echo $ECHO_N "checking for gethostbyname in winsock2.h and -lws2_32... $ECHO_C" >&6 +if test "${gl_cv_w32_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + gl_cv_w32_gethostbyname=no + am_save_LIBS="$LIBS" + LIBS="$LIBS -lws2_32" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_WINSOCK2_H +#include +#endif + +int +main () +{ +gethostbyname(0); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gl_cv_w32_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$am_save_LIBS" +fi +echo "$as_me:$LINENO: result: $gl_cv_w32_gethostbyname" >&5 +echo "${ECHO_T}$gl_cv_w32_gethostbyname" >&6 + if test "$gl_cv_w32_gethostbyname" = "yes"; then + LIBS="$LIBS -lws2_32" + fi + +fi +done + + + + + + + + : + + + + + + + + + echo "$as_me:$LINENO: checking whether getaddrinfo is declared" >&5 +echo $ECHO_N "checking whether getaddrinfo is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl_getaddrinfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + /* 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 + + +int +main () +{ +#ifndef getaddrinfo + char *p = (char *) getaddrinfo; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_decl_getaddrinfo=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_have_decl_getaddrinfo=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_have_decl_getaddrinfo" >&5 +echo "${ECHO_T}$ac_cv_have_decl_getaddrinfo" >&6 +if test $ac_cv_have_decl_getaddrinfo = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETADDRINFO 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETADDRINFO 0 +_ACEOF + + +fi +echo "$as_me:$LINENO: checking whether freeaddrinfo is declared" >&5 +echo $ECHO_N "checking whether freeaddrinfo is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl_freeaddrinfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + /* 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 + + +int +main () +{ +#ifndef freeaddrinfo + char *p = (char *) freeaddrinfo; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_decl_freeaddrinfo=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_have_decl_freeaddrinfo=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_have_decl_freeaddrinfo" >&5 +echo "${ECHO_T}$ac_cv_have_decl_freeaddrinfo" >&6 +if test $ac_cv_have_decl_freeaddrinfo = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FREEADDRINFO 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FREEADDRINFO 0 +_ACEOF + + +fi +echo "$as_me:$LINENO: checking whether gai_strerror is declared" >&5 +echo $ECHO_N "checking whether gai_strerror is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl_gai_strerror+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + /* 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 + + +int +main () +{ +#ifndef gai_strerror + char *p = (char *) gai_strerror; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_decl_gai_strerror=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_have_decl_gai_strerror=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_have_decl_gai_strerror" >&5 +echo "${ECHO_T}$ac_cv_have_decl_gai_strerror" >&6 +if test $ac_cv_have_decl_gai_strerror = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GAI_STRERROR 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GAI_STRERROR 0 +_ACEOF + + +fi +echo "$as_me:$LINENO: checking whether getnameinfo is declared" >&5 +echo $ECHO_N "checking whether getnameinfo is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl_getnameinfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + /* 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 + + +int +main () +{ +#ifndef getnameinfo + char *p = (char *) getnameinfo; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_decl_getnameinfo=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_have_decl_getnameinfo=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_have_decl_getnameinfo" >&5 +echo "${ECHO_T}$ac_cv_have_decl_getnameinfo" >&6 +if test $ac_cv_have_decl_getnameinfo = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETNAMEINFO 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETNAMEINFO 0 +_ACEOF + + +fi + + + echo "$as_me:$LINENO: checking for struct addrinfo" >&5 +echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6 +if test "${ac_cv_type_struct_addrinfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETDB_H +#include +#endif +#ifdef HAVE_WS2TCPIP_H +#include +#endif + + +int +main () +{ +if ((struct addrinfo *) 0) + return 0; +if (sizeof (struct addrinfo)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_struct_addrinfo=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_struct_addrinfo=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5 +echo "${ECHO_T}$ac_cv_type_struct_addrinfo" >&6 +if test $ac_cv_type_struct_addrinfo = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_ADDRINFO 1 +_ACEOF + + +fi + + + + + +for ac_func in gethostname +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" +fi +done + + if test $ac_cv_func_gethostname = no; then + + +for ac_func in uname +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + fi + + 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" || + { { echo "$as_me:$LINENO: error: $srcdir/$gl_source_base/getloadavg.c is missing" >&5 +echo "$as_me: error: $srcdir/$gl_source_base/getloadavg.c is missing" >&2;} + { (exit 1); exit 1; }; } + +gl_save_LIBS=$LIBS + +# Check for getloadavg, but be sure not to touch the cache variable. +(echo "$as_me:$LINENO: checking for getloadavg" >&5 +echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6 +if test "${ac_cv_func_getloadavg+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define getloadavg to an innocuous variant, in case declares getloadavg. + For example, HP-UX 11i declares gettimeofday. */ +#define getloadavg innocuous_getloadavg + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char getloadavg (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef getloadavg + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char getloadavg (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_getloadavg) || defined (__stub___getloadavg) +choke me +#else +char (*f) () = getloadavg; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != getloadavg; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_getloadavg=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_getloadavg=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5 +echo "${ECHO_T}$ac_cv_func_getloadavg" >&6 +if test $ac_cv_func_getloadavg = yes; then + exit 0 +else + exit 1 +fi +) && gl_have_func=yes + +# On HPUX9, an unprivileged user can get load averages through this function. + +for ac_func in pstat_getdynamic +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +# Solaris has libkstat which does not require root. + +echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5 +echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6 +if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lkstat $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char kstat_open (); +int +main () +{ +kstat_open (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_kstat_kstat_open=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_kstat_kstat_open=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5 +echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6 +if test $ac_cv_lib_kstat_kstat_open = 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 + +# 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 + echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5 +echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6 +if test "${ac_cv_lib_elf_elf_begin+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lelf $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char elf_begin (); +int +main () +{ +elf_begin (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_elf_elf_begin=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_elf_elf_begin=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5 +echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6 +if test $ac_cv_lib_elf_elf_begin = yes; then + LIBS="-lelf $LIBS" +fi + +fi +if test $gl_have_func = no; then + echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5 +echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6 +if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lkvm $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char kvm_open (); +int +main () +{ +kvm_open (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_kvm_kvm_open=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_kvm_kvm_open=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5 +echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6 +if test $ac_cv_lib_kvm_kvm_open = yes; then + LIBS="-lkvm $LIBS" +fi + + # Check for the 4.4BSD definition of getloadavg. + echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5 +echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6 +if test "${ac_cv_lib_util_getloadavg+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lutil $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char getloadavg (); +int +main () +{ +getloadavg (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_util_getloadavg=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_util_getloadavg=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5 +echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6 +if test $ac_cv_lib_util_getloadavg = yes; then + LIBS="-lutil $LIBS" gl_have_func=yes gl_cv_func_getloadavg_setgid=yes +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" + echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5 +echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6 +if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgetloadavg $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char getloadavg (); +int +main () +{ +getloadavg (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_getloadavg_getloadavg=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_getloadavg_getloadavg=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5 +echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6 +if test $ac_cv_lib_getloadavg_getloadavg = yes; then + LIBS="-lgetloadavg $LIBS" +else + LIBS=$gl_getloadavg_LIBS +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 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext" + +cat >>confdefs.h <<\_ACEOF +#define C_GETLOADAVG 1 +_ACEOF + +# Figure out what our getloadavg.c needs. +gl_have_func=no +if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then + echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5 +echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6 +if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5 +echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5 +echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ----------------------------------------- ## +## Report this to the nagios-plugins lists. ## +## ----------------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5 +echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6 +if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6 + +fi +if test $ac_cv_header_sys_dg_sys_info_h = yes; then + gl_have_func=yes + +cat >>confdefs.h <<\_ACEOF +#define DGUX 1 +_ACEOF + + +echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5 +echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6 +if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldgc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dg_sys_info (); +int +main () +{ +dg_sys_info (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dgc_dg_sys_info=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dgc_dg_sys_info=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5 +echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6 +if test $ac_cv_lib_dgc_dg_sys_info = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBDGC 1 +_ACEOF + + LIBS="-ldgc $LIBS" + +fi + +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 + +cat >>confdefs.h <<\_ACEOF +#define SVR4 1 +_ACEOF + +fi + +if test $gl_have_func = no; then + if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then + echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5 +echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6 +if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5 +echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5 +echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5 +echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ----------------------------------------- ## +## Report this to the nagios-plugins lists. ## +## ----------------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5 +echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6 +if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5 +echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6 + +fi +if test $ac_cv_header_inq_stats_cpustats_h = yes; then + gl_have_func=yes + +cat >>confdefs.h <<\_ACEOF +#define UMAX 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define UMAX4_3 1 +_ACEOF + +fi + + +fi + +if test $gl_have_func = no; then + if test "${ac_cv_header_sys_cpustats_h+set}" = set; then + echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5 +echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6 +if test "${ac_cv_header_sys_cpustats_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5 +echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5 +echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ----------------------------------------- ## +## Report this to the nagios-plugins lists. ## +## ----------------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5 +echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6 +if test "${ac_cv_header_sys_cpustats_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_sys_cpustats_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6 + +fi +if test $ac_cv_header_sys_cpustats_h = yes; then + gl_have_func=yes; cat >>confdefs.h <<\_ACEOF +#define UMAX 1 +_ACEOF + +fi + + +fi + +if test $gl_have_func = no; then + +for ac_header in mach/mach.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ----------------------------------------- ## +## Report this to the nagios-plugins lists. ## +## ----------------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +fi + + +for ac_header in nlist.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ----------------------------------------- ## +## Report this to the nagios-plugins lists. ## +## ----------------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5 +echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6 +if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +static struct nlist ac_aggr; +if (ac_aggr.n_un.n_name) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_member_struct_nlist_n_un_n_name=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +static struct nlist ac_aggr; +if (sizeof ac_aggr.n_un.n_name) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_member_struct_nlist_n_un_n_name=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_member_struct_nlist_n_un_n_name=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5 +echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6 +if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define NLIST_NAME_UNION 1 +_ACEOF + +fi + + +fi + +done + +fi +done + + +# Some definitions of getloadavg require that the program be installed setgid. +echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5 +echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6 +if test "${gl_cv_func_getloadavg_setgid+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +echo "$as_me:$LINENO: result: $gl_cv_func_getloadavg_setgid" >&5 +echo "${ECHO_T}$gl_cv_func_getloadavg_setgid" >&6 +if test $gl_cv_func_getloadavg_setgid = yes; then + NEED_SETGID=true + +cat >>confdefs.h <<\_ACEOF +#define GETLOADAVG_PRIVILEGED 1 +_ACEOF + +else + NEED_SETGID=false +fi + +if test $gl_cv_func_getloadavg_setgid = yes; then + echo "$as_me:$LINENO: checking group of /dev/kmem" >&5 +echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6 +if test "${gl_cv_group_kmem+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 +echo "$as_me:$LINENO: result: $gl_cv_group_kmem" >&5 +echo "${ECHO_T}$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 + + + if test -n "$GETOPT_H"; then - case $LIBOBJS in - "getopt.$ac_objext" | \ - *" getopt.$ac_objext" | \ - "getopt.$ac_objext "* | \ - *" getopt.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS getopt.$ac_objext" ;; -esac - - case $LIBOBJS in - "getopt1.$ac_objext" | \ - *" getopt1.$ac_objext" | \ - "getopt1.$ac_objext "* | \ - *" getopt1.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS getopt1.$ac_objext" ;; -esac - + gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" GETOPT_H=getopt.h @@ -36633,14 +36928,774 @@ _ACEOF + + : + + + + + + fi +for ac_func in inet_ntop +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" +fi +done + + + + : + + + + + + + + + echo "$as_me:$LINENO: checking whether inet_ntop is declared" >&5 +echo $ECHO_N "checking whether inet_ntop is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl_inet_ntop+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef inet_ntop + char *p = (char *) inet_ntop; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_decl_inet_ntop=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_have_decl_inet_ntop=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_have_decl_inet_ntop" >&5 +echo "${ECHO_T}$ac_cv_have_decl_inet_ntop" >&6 +if test $ac_cv_have_decl_inet_ntop = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_INET_NTOP 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_INET_NTOP 0 +_ACEOF + + +fi + + + + + + + + + echo "$as_me:$LINENO: checking whether the compiler generally respects inline" >&5 +echo $ECHO_N "checking whether the compiler generally respects inline... $ECHO_C" >&6 +if test "${gl_cv_c_inline_effective+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test $ac_cv_c_inline = no; then + gl_cv_c_inline_effective=no + else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifdef __NO_INLINE__ + #error "inline is not effective" + #endif + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gl_cv_c_inline_effective=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gl_cv_c_inline_effective=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + fi + +fi +echo "$as_me:$LINENO: result: $gl_cv_c_inline_effective" >&5 +echo "${ECHO_T}$gl_cv_c_inline_effective" >&6 + if test $gl_cv_c_inline_effective = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_INLINE 1 +_ACEOF + + fi + + +for ac_header in stdlib.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ----------------------------------------- ## +## Report this to the nagios-plugins lists. ## +## ----------------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 +echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6 +if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_malloc_0_nonnull=no +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#if STDC_HEADERS || HAVE_STDLIB_H +# include +#else +char *malloc (); +#endif + +int +main () +{ +exit (malloc (0) ? 0 : 1); + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_malloc_0_nonnull=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_func_malloc_0_nonnull=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 +echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6 +if test $ac_cv_func_malloc_0_nonnull = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MALLOC 1 +_ACEOF + +else + cat >>confdefs.h <<\_ACEOF +#define HAVE_MALLOC 0 +_ACEOF + + gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" + +cat >>confdefs.h <<\_ACEOF +#define malloc rpl_malloc +_ACEOF + +fi + + + + + + gl_LIBOBJS="$gl_LIBOBJS mbchar.$ac_objext" + + + + + : + + + +for ac_func in memchr +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" +fi +done + + if test $ac_cv_func_memchr = no; then + + +for ac_header in bp-sym.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ----------------------------------------- ## +## Report this to the nagios-plugins lists. ## +## ----------------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + fi + + + + + @@ -36712,8 +37767,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -36753,6 +37807,9 @@ done + + + # We must include grp.h before ucred.h on OSF V4.0, since ucred.h uses # NGROUPS (as the array dimension for a struct member) without a definition. @@ -36783,8 +37840,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -36848,8 +37904,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -36917,8 +37972,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -37081,8 +38135,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -37126,8 +38179,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -37207,8 +38259,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -37262,8 +38313,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -37364,8 +38414,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -37545,6 +38594,7 @@ int main () { struct mntent *mnt = 0; char *table = MOUNTED; + if (sizeof mnt && sizeof table) return 0; ; return 0; } @@ -37558,8 +38608,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -37628,6 +38677,107 @@ cat >>confdefs.h <<\_ACEOF #define MOUNTED_GETMNTENT2 1 _ACEOF + +for ac_func in hasmntopt +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + fi fi @@ -37676,8 +38826,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -37787,12 +38936,88 @@ fi echo "$as_me:$LINENO: result: $fu_cv_sys_mounted_getmntinfo" >&5 echo "${ECHO_T}$fu_cv_sys_mounted_getmntinfo" >&6 if test $fu_cv_sys_mounted_getmntinfo = yes; then - ac_list_mounted_fs=found + echo "$as_me:$LINENO: checking whether getmntinfo returns statvfs structures" >&5 +echo $ECHO_N "checking whether getmntinfo returns statvfs structures... $ECHO_C" >&6 + if test "${fu_cv_sys_mounted_getmntinfo2+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#if HAVE_SYS_PARAM_H +# include +#endif +#include +#if HAVE_SYS_MOUNT_H +# include +#endif +#if HAVE_SYS_STATVFS_H +# include +#endif +extern int getmntinfo (struct statfs **, int); + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + fu_cv_sys_mounted_getmntinfo2=no +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fu_cv_sys_mounted_getmntinfo2=yes +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + + echo "$as_me:$LINENO: result: $fu_cv_sys_mounted_getmntinfo2" >&5 +echo "${ECHO_T}$fu_cv_sys_mounted_getmntinfo2" >&6 + if test $fu_cv_sys_mounted_getmntinfo2 = no; then + ac_list_mounted_fs=found cat >>confdefs.h <<\_ACEOF #define MOUNTED_GETMNTINFO 1 _ACEOF + else + ac_list_mounted_fs=found + +cat >>confdefs.h <<\_ACEOF +#define MOUNTED_GETMNTINFO2 1 +_ACEOF + + fi fi fi @@ -37925,8 +39150,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -37992,8 +39216,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -38201,14 +39424,7 @@ fi if test $gl_cv_list_mounted_fs = yes; then - case $LIBOBJS in - "mountlist.$ac_objext" | \ - *" mountlist.$ac_objext" | \ - "mountlist.$ac_objext "* | \ - *" mountlist.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS mountlist.$ac_objext" ;; -esac - + gl_LIBOBJS="$gl_LIBOBJS mountlist.$ac_objext" for ac_header in sys/mntent.h @@ -38244,8 +39460,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -38361,218 +39576,29 @@ fi done - echo "$as_me:$LINENO: checking for f_fstypename in struct statfs" >&5 -echo $ECHO_N "checking for f_fstypename in struct statfs... $ECHO_C" >&6 -if test "${fu_cv_sys_f_fstypename_in_statfs+set}" = set; then + echo "$as_me:$LINENO: checking for struct statfs.f_fstypename" >&5 +echo $ECHO_N "checking for struct statfs.f_fstypename... $ECHO_C" >&6 +if test "${ac_cv_member_struct_statfs_f_fstypename+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include -#include - -int -main () -{ -struct statfs s; int i = sizeof s.f_fstypename; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - fu_cv_sys_f_fstypename_in_statfs=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fu_cv_sys_f_fstypename_in_statfs=no - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - - -fi -echo "$as_me:$LINENO: result: $fu_cv_sys_f_fstypename_in_statfs" >&5 -echo "${ECHO_T}$fu_cv_sys_f_fstypename_in_statfs" >&6 - - if test $fu_cv_sys_f_fstypename_in_statfs = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_F_FSTYPENAME_IN_STATFS 1 -_ACEOF - - fi - - - - fi - -# Check whether --enable-largefile or --disable-largefile was given. -if test "${enable_largefile+set}" = set; then - enableval="$enable_largefile" - -fi; -if test "$enable_largefile" != no; then - - echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 -echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6 -if test "${ac_cv_sys_largefile_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* 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 - rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext - CC="$CC -n32" - rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sys_largefile_CC=' -n32'; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext - break - done - CC=$ac_save_CC - rm -f conftest.$ac_ext - fi -fi -echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 -echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6 - if test "$ac_cv_sys_largefile_CC" != no; then - CC=$CC$ac_cv_sys_largefile_CC - fi - - echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6 -if test "${ac_cv_sys_file_offset_bits+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - while :; do - ac_cv_sys_file_offset_bits=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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]; + + #include + #include + #include + + int main () { - +static struct statfs ac_aggr; +if (ac_aggr.f_fstypename) +return 0; ; return 0; } @@ -38586,8 +39612,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -38599,33 +39624,29 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - break + ac_cv_member_struct_statfs_f_fstypename=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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]; + + #include + #include + #include + + int main () { - +static struct statfs ac_aggr; +if (sizeof ac_aggr.f_fstypename) +return 0; ; return 0; } @@ -38639,8 +39660,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -38652,532 +39672,79 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sys_file_offset_bits=64; break + ac_cv_member_struct_statfs_f_fstypename=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_member_struct_statfs_f_fstypename=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - break -done fi -echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 -echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6 -if test "$ac_cv_sys_file_offset_bits" != no; then +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_member_struct_statfs_f_fstypename" >&5 +echo "${ECHO_T}$ac_cv_member_struct_statfs_f_fstypename" >&6 +if test $ac_cv_member_struct_statfs_f_fstypename = yes; then cat >>confdefs.h <<_ACEOF -#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +#define HAVE_STRUCT_STATFS_F_FSTYPENAME 1 _ACEOF + fi -rm -f conftest* - echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 -echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6 -if test "${ac_cv_sys_large_files+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - while :; do - ac_cv_sys_large_files=no - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* 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 -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* 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 -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sys_large_files=1; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - break -done -fi -echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 -echo "${ECHO_T}$ac_cv_sys_large_files" >&6 -if test "$ac_cv_sys_large_files" != no; then - -cat >>confdefs.h <<_ACEOF -#define _LARGE_FILES $ac_cv_sys_large_files -_ACEOF - -fi -rm -f conftest* -fi - -echo "$as_me:$LINENO: checking for C/C++ restrict keyword" >&5 -echo $ECHO_N "checking for C/C++ restrict keyword... $ECHO_C" >&6 -if test "${gl_cv_c_restrict+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - gl_cv_c_restrict=no - # Try the official restrict keyword, then gcc's __restrict, and - # the less common variants. - for ac_kw in restrict __restrict __restrict__ _Restrict; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -float * $ac_kw x; -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - gl_cv_c_restrict=$ac_kw; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done - -fi -echo "$as_me:$LINENO: result: $gl_cv_c_restrict" >&5 -echo "${ECHO_T}$gl_cv_c_restrict" >&6 - case $gl_cv_c_restrict in - restrict) ;; - no) -cat >>confdefs.h <<\_ACEOF -#define restrict -_ACEOF - ;; - *) cat >>confdefs.h <<_ACEOF -#define restrict $gl_cv_c_restrict -_ACEOF - ;; - esac - echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 -echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 -if test "${am_cv_langinfo_codeset+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -char* cs = nl_langinfo(CODESET); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - am_cv_langinfo_codeset=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -am_cv_langinfo_codeset=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi -echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 -echo "${ECHO_T}$am_cv_langinfo_codeset" >&6 - if test $am_cv_langinfo_codeset = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LANGINFO_CODESET 1 -_ACEOF fi + : - - - - - - - - - - - - - - - - -for ac_func in $gl_func_list -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_var=no" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - echo "$as_me:$LINENO: checking whether off_t can be used in a switch statement" >&5 -echo $ECHO_N "checking whether off_t can be used in a switch statement... $ECHO_C" >&6 -if test "${gl_cv_type_off_t_switch+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -off_t o = -1; - switch (o) - { - case -2: - return 1; - case -1: - return 2; - default: - return 0; - } - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - gl_cv_type_off_t_switch=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -gl_cv_type_off_t_switch=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $gl_cv_type_off_t_switch" >&5 -echo "${ECHO_T}$gl_cv_type_off_t_switch" >&6 - if test $gl_cv_type_off_t_switch = yes; then - -cat >>confdefs.h <<\_ACEOF -#define _REGEX_LARGE_OFFSETS 1 -_ACEOF - + if test $ac_cv_header_netinet_in_h = yes; then + NETINET_IN_H='' + else + NETINET_IN_H='netinet/in.h' fi + : + + + + + + + # Check whether --with-included-regex or --without-included-regex was given. if test "${with_included_regex+set}" = set; then withval="$with_included_regex" fi; - case $with_included_regex in + case $with_included_regex in #( yes|no) ac_use_included_regex=$with_included_regex ;; '') - # If the system regex support is good enough that it passes the the + # If the system regex support is good enough that it passes the # 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. The first failing regular expression is from `Spencer ere # test #75' in grep-2.3. echo "$as_me:$LINENO: checking for working re_compile_pattern" >&5 echo $ECHO_N "checking for working re_compile_pattern... $ECHO_C" >&6 -if test "${gl_cv_func_re_compile_pattern_broken+set}" = set; then +if test "${gl_cv_func_re_compile_pattern_working+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then - gl_cv_func_re_compile_pattern_broken=yes + gl_cv_func_re_compile_pattern_working=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -39186,19 +39753,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + #if HAVE_LOCALE_H + #include + #endif + #include #include + int main () { static struct re_pattern_buffer regex; + unsigned char folded_chars[UCHAR_MAX + 1]; + int i; const char *s; struct re_registers regs; - /* Use the POSIX-compliant spelling with leading REG_, - rather than the traditional GNU spelling with leading RE_, - so that we reject older libc implementations. */ - re_set_syntax (REG_SYNTAX_POSIX_EGREP); + + #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")) + { + static char const pat[] = "insert into"; + static char const data[] = + "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK"; + re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE + | RE_ICASE); + 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; + } + #endif + + re_set_syntax (RE_SYNTAX_POSIX_EGREP); memset (®ex, 0, sizeof (regex)); - s = re_compile_pattern ("a[:]:]b\n", 9, ®ex); + for (i = 0; i <= UCHAR_MAX; i++) + folded_chars[i] = i; + regex.translate = folded_chars; + s = re_compile_pattern ("a[[:]:]]b\n", 11, ®ex); /* This should fail with _Invalid character class name_ error. */ if (!s) exit (1); @@ -39232,10 +39833,9 @@ static struct re_pattern_buffer regex; exit (1); /* The version of regex.c in older versions of gnulib - ignored REG_IGNORE_CASE (which was then called RE_ICASE). - Detect that problem too. */ + ignored RE_ICASE. Detect that problem too. */ memset (®ex, 0, sizeof (regex)); - re_set_syntax (REG_SYNTAX_EMACS | REG_IGNORE_CASE); + re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE); s = re_compile_pattern ("x", 1, ®ex); if (s) exit (1); @@ -39249,10 +39849,10 @@ static struct re_pattern_buffer regex; exit (1); /* Reject hosts whose regoff_t values are too narrow. - These include glibc 2.3.5 on hosts with 64-bit off_t - and 32-bit int, and Solaris 10 on hosts with 32-bit int - and _FILE_OFFSET_BITS=64. */ - if (sizeof (regoff_t) < sizeof (off_t)) + These include glibc 2.3.5 on hosts with 64-bit ptrdiff_t + and 32-bit int. */ + if (sizeof (regoff_t) < sizeof (ptrdiff_t) + || sizeof (regoff_t) < sizeof (ssize_t)) exit (1); exit (0); @@ -39271,21 +39871,24 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - gl_cv_func_re_compile_pattern_broken=no + gl_cv_func_re_compile_pattern_working=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -gl_cv_func_re_compile_pattern_broken=yes +gl_cv_func_re_compile_pattern_working=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi -echo "$as_me:$LINENO: result: $gl_cv_func_re_compile_pattern_broken" >&5 -echo "${ECHO_T}$gl_cv_func_re_compile_pattern_broken" >&6 - ac_use_included_regex=$gl_cv_func_re_compile_pattern_broken +echo "$as_me:$LINENO: result: $gl_cv_func_re_compile_pattern_working" >&5 +echo "${ECHO_T}$gl_cv_func_re_compile_pattern_working" >&6 + case $gl_cv_func_re_compile_pattern_working in #( + yes) ac_use_included_regex=no;; #( + no) ac_use_included_regex=yes;; + esac ;; *) { { echo "$as_me:$LINENO: error: Invalid value for --with-included-regex: $with_included_regex" >&5 echo "$as_me: error: Invalid value for --with-included-regex: $with_included_regex" >&2;} @@ -39295,6 +39898,11 @@ echo "$as_me: error: Invalid value for --with-included-regex: $with_included_reg if test $ac_use_included_regex = yes; then +cat >>confdefs.h <<\_ACEOF +#define _REGEX_LARGE_OFFSETS 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF #define re_syntax_options rpl_re_syntax_options _ACEOF @@ -39369,27 +39977,7 @@ cat >>confdefs.h <<\_ACEOF #define regfree rpl_regfree _ACEOF - case $LIBOBJS in - "regex.$ac_objext" | \ - *" regex.$ac_objext" | \ - "regex.$ac_objext "* | \ - *" regex.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS regex.$ac_objext" ;; -esac - - - - - - - : - - - - - - - + gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext" @@ -39413,55 +40001,122 @@ esac + echo "$as_me:$LINENO: checking whether isblank is declared" >&5 +echo $ECHO_N "checking whether isblank is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl_isblank+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef isblank + char *p = (char *) isblank; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_decl_isblank=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_have_decl_isblank=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_have_decl_isblank" >&5 +echo "${ECHO_T}$ac_cv_have_decl_isblank" >&6 +if test $ac_cv_have_decl_isblank = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_ISBLANK 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_ISBLANK 0 +_ACEOF + + +fi + + fi - - case $LIBOBJS in - "dup-safer.$ac_objext" | \ - *" dup-safer.$ac_objext" | \ - "dup-safer.$ac_objext "* | \ - *" dup-safer.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS dup-safer.$ac_objext" ;; -esac - - case $LIBOBJS in - "fd-safer.$ac_objext" | \ - *" fd-safer.$ac_objext" | \ - "fd-safer.$ac_objext "* | \ - *" fd-safer.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS fd-safer.$ac_objext" ;; -esac - - case $LIBOBJS in - "pipe-safer.$ac_objext" | \ - *" pipe-safer.$ac_objext" | \ - "pipe-safer.$ac_objext "* | \ - *" pipe-safer.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS pipe-safer.$ac_objext" ;; -esac + gl_LIBOBJS="$gl_LIBOBJS safe-read.$ac_objext" -echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6 -if test "${ac_cv_c_inline+set}" = set; then + + + + + gl_LIBOBJS="$gl_LIBOBJS safe-write.$ac_objext" + + + + + + + + + +for ac_header in stdint.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 - +$ac_includes_default +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -39472,8 +40127,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -39485,59 +40139,724 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_c_inline=$ac_kw; break + ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ----------------------------------------- ## +## Report this to the nagios-plugins lists. ## +## ----------------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + echo "$as_me:$LINENO: checking for SIZE_MAX" >&5 +echo $ECHO_N "checking for SIZE_MAX... $ECHO_C" >&6 + if test "${gl_cv_size_max+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + gl_cv_size_max= + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#if HAVE_STDINT_H +#include +#endif +#ifdef SIZE_MAX +Found it +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Found it" >/dev/null 2>&1; then + gl_cv_size_max=yes +fi +rm -f conftest* + + if test -z "$gl_cv_size_max"; then + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ +static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ +static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ +static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ +static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo= ac_hi= +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ +static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done - -fi -echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$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 - ;; +case $ac_lo in +?*) size_t_bits_minus_1=$ac_lo;; +'') size_t_bits_minus_1= ;; esac +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 +echo "$as_me: error: internal error: not reached in cross-compile" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +long longval () { return sizeof (size_t) * CHAR_BIT - 1; } +unsigned long ulongval () { return sizeof (size_t) * CHAR_BIT - 1; } +#include +#include +int +main () +{ + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if ((sizeof (size_t) * CHAR_BIT - 1) < 0) + { + long i = longval (); + if (i != (sizeof (size_t) * CHAR_BIT - 1)) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != (sizeof (size_t) * CHAR_BIT - 1)) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + size_t_bits_minus_1=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - case $LIBOBJS in - "xmalloc.$ac_objext" | \ - *" xmalloc.$ac_objext" | \ - "xmalloc.$ac_objext "* | \ - *" xmalloc.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS xmalloc.$ac_objext" ;; +( exit $ac_status ) +size_t_bits_minus_1= +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo= ac_hi= +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) fits_in_uint=$ac_lo;; +'') fits_in_uint= ;; esac - - - - : - - - - : - - - - echo "$as_me:$LINENO: checking whether clearerr_unlocked is declared" >&5 -echo $ECHO_N "checking whether clearerr_unlocked is declared... $ECHO_C" >&6 -if test "${ac_cv_have_decl_clearerr_unlocked+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 +echo "$as_me: error: internal error: not reached in cross-compile" >&2;} + { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -39545,13 +40864,77 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default +#include +long longval () { return sizeof (size_t) <= sizeof (unsigned int); } +unsigned long ulongval () { return sizeof (size_t) <= sizeof (unsigned int); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if ((sizeof (size_t) <= sizeof (unsigned int)) < 0) + { + long i = longval (); + if (i != (sizeof (size_t) <= sizeof (unsigned int))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != (sizeof (size_t) <= sizeof (unsigned int))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + fits_in_uint=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +fits_in_uint= +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val + if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then + if test $fits_in_uint = 1; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + extern size_t foo; + extern unsigned long foo; + int main () { -#ifndef clearerr_unlocked - char *p = (char *) clearerr_unlocked; -#endif ; return 0; @@ -39566,8 +40949,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -39579,1013 +40961,150 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_have_decl_clearerr_unlocked=yes + fits_in_uint=0 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_have_decl_clearerr_unlocked=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_clearerr_unlocked" >&5 -echo "${ECHO_T}$ac_cv_have_decl_clearerr_unlocked" >&6 -if test $ac_cv_have_decl_clearerr_unlocked = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_CLEARERR_UNLOCKED 1 -_ACEOF - - -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_CLEARERR_UNLOCKED 0 -_ACEOF - - -fi - - - - - echo "$as_me:$LINENO: checking whether feof_unlocked is declared" >&5 -echo $ECHO_N "checking whether feof_unlocked is declared... $ECHO_C" >&6 -if test "${ac_cv_have_decl_feof_unlocked+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef feof_unlocked - char *p = (char *) feof_unlocked; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_have_decl_feof_unlocked=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_have_decl_feof_unlocked=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_feof_unlocked" >&5 -echo "${ECHO_T}$ac_cv_have_decl_feof_unlocked" >&6 -if test $ac_cv_have_decl_feof_unlocked = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FEOF_UNLOCKED 1 -_ACEOF - - -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FEOF_UNLOCKED 0 -_ACEOF - - -fi - - - - - echo "$as_me:$LINENO: checking whether ferror_unlocked is declared" >&5 -echo $ECHO_N "checking whether ferror_unlocked is declared... $ECHO_C" >&6 -if test "${ac_cv_have_decl_ferror_unlocked+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef ferror_unlocked - char *p = (char *) ferror_unlocked; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_have_decl_ferror_unlocked=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_have_decl_ferror_unlocked=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_ferror_unlocked" >&5 -echo "${ECHO_T}$ac_cv_have_decl_ferror_unlocked" >&6 -if test $ac_cv_have_decl_ferror_unlocked = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FERROR_UNLOCKED 1 -_ACEOF - - -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FERROR_UNLOCKED 0 -_ACEOF - - -fi - - - - - echo "$as_me:$LINENO: checking whether fflush_unlocked is declared" >&5 -echo $ECHO_N "checking whether fflush_unlocked is declared... $ECHO_C" >&6 -if test "${ac_cv_have_decl_fflush_unlocked+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef fflush_unlocked - char *p = (char *) fflush_unlocked; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_have_decl_fflush_unlocked=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_have_decl_fflush_unlocked=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_fflush_unlocked" >&5 -echo "${ECHO_T}$ac_cv_have_decl_fflush_unlocked" >&6 -if test $ac_cv_have_decl_fflush_unlocked = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FFLUSH_UNLOCKED 1 -_ACEOF - - -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FFLUSH_UNLOCKED 0 -_ACEOF - - -fi - - - - - echo "$as_me:$LINENO: checking whether fgets_unlocked is declared" >&5 -echo $ECHO_N "checking whether fgets_unlocked is declared... $ECHO_C" >&6 -if test "${ac_cv_have_decl_fgets_unlocked+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef fgets_unlocked - char *p = (char *) fgets_unlocked; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_have_decl_fgets_unlocked=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_have_decl_fgets_unlocked=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_fgets_unlocked" >&5 -echo "${ECHO_T}$ac_cv_have_decl_fgets_unlocked" >&6 -if test $ac_cv_have_decl_fgets_unlocked = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FGETS_UNLOCKED 1 -_ACEOF - - -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FGETS_UNLOCKED 0 -_ACEOF - - -fi - - - - - echo "$as_me:$LINENO: checking whether fputc_unlocked is declared" >&5 -echo $ECHO_N "checking whether fputc_unlocked is declared... $ECHO_C" >&6 -if test "${ac_cv_have_decl_fputc_unlocked+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef fputc_unlocked - char *p = (char *) fputc_unlocked; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_have_decl_fputc_unlocked=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_have_decl_fputc_unlocked=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputc_unlocked" >&5 -echo "${ECHO_T}$ac_cv_have_decl_fputc_unlocked" >&6 -if test $ac_cv_have_decl_fputc_unlocked = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FPUTC_UNLOCKED 1 -_ACEOF - - -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FPUTC_UNLOCKED 0 -_ACEOF - - -fi - - - - - echo "$as_me:$LINENO: checking whether fputs_unlocked is declared" >&5 -echo $ECHO_N "checking whether fputs_unlocked is declared... $ECHO_C" >&6 -if test "${ac_cv_have_decl_fputs_unlocked+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef fputs_unlocked - char *p = (char *) fputs_unlocked; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_have_decl_fputs_unlocked=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_have_decl_fputs_unlocked=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputs_unlocked" >&5 -echo "${ECHO_T}$ac_cv_have_decl_fputs_unlocked" >&6 -if test $ac_cv_have_decl_fputs_unlocked = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FPUTS_UNLOCKED 1 -_ACEOF - - -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FPUTS_UNLOCKED 0 -_ACEOF - - -fi - - - - - echo "$as_me:$LINENO: checking whether fread_unlocked is declared" >&5 -echo $ECHO_N "checking whether fread_unlocked is declared... $ECHO_C" >&6 -if test "${ac_cv_have_decl_fread_unlocked+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef fread_unlocked - char *p = (char *) fread_unlocked; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_have_decl_fread_unlocked=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_have_decl_fread_unlocked=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_fread_unlocked" >&5 -echo "${ECHO_T}$ac_cv_have_decl_fread_unlocked" >&6 -if test $ac_cv_have_decl_fread_unlocked = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FREAD_UNLOCKED 1 -_ACEOF - - -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FREAD_UNLOCKED 0 -_ACEOF - - -fi - - - - - echo "$as_me:$LINENO: checking whether fwrite_unlocked is declared" >&5 -echo $ECHO_N "checking whether fwrite_unlocked is declared... $ECHO_C" >&6 -if test "${ac_cv_have_decl_fwrite_unlocked+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef fwrite_unlocked - char *p = (char *) fwrite_unlocked; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_have_decl_fwrite_unlocked=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_have_decl_fwrite_unlocked=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_fwrite_unlocked" >&5 -echo "${ECHO_T}$ac_cv_have_decl_fwrite_unlocked" >&6 -if test $ac_cv_have_decl_fwrite_unlocked = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FWRITE_UNLOCKED 1 -_ACEOF - - -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FWRITE_UNLOCKED 0 -_ACEOF - - -fi - - - - - echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5 -echo $ECHO_N "checking whether getc_unlocked is declared... $ECHO_C" >&6 -if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef getc_unlocked - char *p = (char *) getc_unlocked; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_have_decl_getc_unlocked=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_have_decl_getc_unlocked=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5 -echo "${ECHO_T}$ac_cv_have_decl_getc_unlocked" >&6 -if test $ac_cv_have_decl_getc_unlocked = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETC_UNLOCKED 1 -_ACEOF - - -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETC_UNLOCKED 0 -_ACEOF - - -fi - - - - - echo "$as_me:$LINENO: checking whether getchar_unlocked is declared" >&5 -echo $ECHO_N "checking whether getchar_unlocked is declared... $ECHO_C" >&6 -if test "${ac_cv_have_decl_getchar_unlocked+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef getchar_unlocked - char *p = (char *) getchar_unlocked; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_have_decl_getchar_unlocked=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_have_decl_getchar_unlocked=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_getchar_unlocked" >&5 -echo "${ECHO_T}$ac_cv_have_decl_getchar_unlocked" >&6 -if test $ac_cv_have_decl_getchar_unlocked = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETCHAR_UNLOCKED 1 -_ACEOF - - -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETCHAR_UNLOCKED 0 -_ACEOF - - -fi - - - - - echo "$as_me:$LINENO: checking whether putc_unlocked is declared" >&5 -echo $ECHO_N "checking whether putc_unlocked is declared... $ECHO_C" >&6 -if test "${ac_cv_have_decl_putc_unlocked+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef putc_unlocked - char *p = (char *) putc_unlocked; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_have_decl_putc_unlocked=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_have_decl_putc_unlocked=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_putc_unlocked" >&5 -echo "${ECHO_T}$ac_cv_have_decl_putc_unlocked" >&6 -if test $ac_cv_have_decl_putc_unlocked = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_PUTC_UNLOCKED 1 -_ACEOF - - -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_PUTC_UNLOCKED 0 -_ACEOF - - -fi - - - - - echo "$as_me:$LINENO: checking whether putchar_unlocked is declared" >&5 -echo $ECHO_N "checking whether putchar_unlocked is declared... $ECHO_C" >&6 -if test "${ac_cv_have_decl_putchar_unlocked+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef putchar_unlocked - char *p = (char *) putchar_unlocked; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_have_decl_putchar_unlocked=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_have_decl_putchar_unlocked=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_putchar_unlocked" >&5 -echo "${ECHO_T}$ac_cv_have_decl_putchar_unlocked" >&6 -if test $ac_cv_have_decl_putchar_unlocked = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_PUTCHAR_UNLOCKED 1 -_ACEOF - - -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_PUTCHAR_UNLOCKED 0 -_ACEOF - - -fi - - - - - - - -cat >>confdefs.h <<\_ACEOF -#define USE_UNLOCKED_IO 1 -_ACEOF - - - - - - : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Check whether --with-afs or --without-afs was given. -if test "${with_afs+set}" = set; then - withval="$with_afs" - test "$withval" = no || with_afs=yes -else - with_afs=no -fi; - if test "$with_afs" = yes; then - -cat >>confdefs.h <<\_ACEOF -#define AFS 1 -_ACEOF - + fi + if test $fits_in_uint = 1; then + gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" + else + gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" + fi + else + gl_cv_size_max='((size_t)~(size_t)0)' + fi fi +fi + + echo "$as_me:$LINENO: result: $gl_cv_size_max" >&5 +echo "${ECHO_T}$gl_cv_size_max" >&6 + if test "$gl_cv_size_max" != yes; then + +cat >>confdefs.h <<_ACEOF +#define SIZE_MAX $gl_cv_size_max +_ACEOF + + fi + + + +for ac_func in snprintf +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" +fi +done + + + : + : - - - - - - - - - - - - - echo "$as_me:$LINENO: checking for socklen_t" >&5 + echo "$as_me:$LINENO: checking for socklen_t" >&5 echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 if test "${ac_cv_type_socklen_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -40597,7 +41116,11 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#include + #if HAVE_SYS_SOCKET_H + # include + #elif HAVE_WS2TCPIP_H + # include + #endif int main () @@ -40619,8 +41142,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -40646,41 +41168,371 @@ echo "${ECHO_T}$ac_cv_type_socklen_t" >&6 if test $ac_cv_type_socklen_t = yes; then : else - - echo "$as_me:$LINENO: checking for socklen_t equivalent" >&5 + echo "$as_me:$LINENO: checking for socklen_t equivalent" >&5 echo $ECHO_N "checking for socklen_t equivalent... $ECHO_C" >&6 - if test "${curl_cv_socklen_t_equiv+set}" = set; then + if test "${gl_cv_gl_cv_socklen_t_equiv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - - # Systems have either "struct sockaddr *" or - # "void *" as the second argument to getpeername - curl_cv_socklen_t_equiv= - for arg2 in "struct sockaddr" void; do - for t in int size_t unsigned long "unsigned long"; do - cat >conftest.$ac_ext <<_ACEOF + # Systems have either "struct sockaddr *" or + # "void *" as the second argument to getpeername + gl_cv_socklen_t_equiv= + for arg2 in "struct sockaddr" void; do + for t in int size_t "unsigned int" "long int" "unsigned long int"; do + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#include + #include - #ifdef HAVE_SYS_TYPES_H - #include - #endif - #ifdef HAVE_SYS_SOCKET_H - #include - #endif + int getpeername (int, $arg2 *, $t *); +int +main () +{ +$t len; + getpeername (0, 0, &len); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gl_cv_socklen_t_equiv="$t" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - int getpeername (int, $arg2 *, $t *); +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + test "$gl_cv_socklen_t_equiv" != "" && break + done + test "$gl_cv_socklen_t_equiv" != "" && break + done + +fi + + if test "$gl_cv_socklen_t_equiv" = ""; then + { { echo "$as_me:$LINENO: error: Cannot find a type to use in place of socklen_t" >&5 +echo "$as_me: error: Cannot find a type to use in place of socklen_t" >&2;} + { (exit 1); exit 1; }; } + fi + echo "$as_me:$LINENO: result: $gl_cv_socklen_t_equiv" >&5 +echo "${ECHO_T}$gl_cv_socklen_t_equiv" >&6 + +cat >>confdefs.h <<_ACEOF +#define socklen_t $gl_cv_socklen_t_equiv +_ACEOF + +fi + + + echo "$as_me:$LINENO: checking for ssize_t" >&5 +echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 +if test "${gt_cv_ssize_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +int x = sizeof (ssize_t *) + sizeof (ssize_t); + return !x; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gt_cv_ssize_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gt_cv_ssize_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $gt_cv_ssize_t" >&5 +echo "${ECHO_T}$gt_cv_ssize_t" >&6 + if test $gt_cv_ssize_t = no; then + +cat >>confdefs.h <<\_ACEOF +#define ssize_t int +_ACEOF + + fi + + + + + # Define two additional variables used in the Makefile substitution. + + if test "$ac_cv_header_stdbool_h" = yes; then + STDBOOL_H='' + else + STDBOOL_H='stdbool.h' + fi + + + if test "$ac_cv_type__Bool" = yes; then + HAVE__BOOL=1 + else + HAVE__BOOL=0 + fi + + + + + + 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 + + + if test $ac_cv_header_stdint_h = yes; then + echo "$as_me:$LINENO: checking absolute name of " >&5 +echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6 +if test "${gl_cv_absolute_stdint_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + : + + + + + if test $ac_cv_header_stdint_h = yes; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF + gl_cv_absolute_stdint_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | +sed -n '\#/stdint.h#{s#.*"\(.*/stdint.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'` + fi + +fi +echo "$as_me:$LINENO: result: $gl_cv_absolute_stdint_h" >&5 +echo "${ECHO_T}$gl_cv_absolute_stdint_h" >&6 +cat >>confdefs.h <<_ACEOF +#define ABSOLUTE_STDINT_H "$gl_cv_absolute_stdint_h" +_ACEOF + + + ABSOLUTE_STDINT_H=\"$gl_cv_absolute_stdint_h\" + HAVE_STDINT_H=1 + else + ABSOLUTE_STDINT_H=\"no/such/file/stdint.h\" + HAVE_STDINT_H=0 + fi + + + + if test $ac_cv_header_stdint_h = yes; then + echo "$as_me:$LINENO: checking whether stdint.h conforms to C99" >&5 +echo $ECHO_N "checking whether stdint.h conforms to C99... $ECHO_C" >&6 +if test "${gl_cv_header_working_stdint_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + gl_cv_header_working_stdint_h=no + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#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 */ +#include ABSOLUTE_STDINT_H +#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; +struct s { + int check_PTRDIFF: PTRDIFF_MIN < 0 && 0 < PTRDIFF_MAX ? 1 : -1; + int check_SIG_ATOMIC: SIG_ATOMIC_MIN <= 0 && 0 < SIG_ATOMIC_MAX ? 1 : -1; + int check_SIZE: 0 < SIZE_MAX ? 1 : -1; + int check_WCHAR: WCHAR_MIN <= 0 && 0 < WCHAR_MAX ? 1 : -1; + int check_WINT: WINT_MIN <= 0 && 0 < WINT_MAX ? 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 () { - $t len; - getpeername(0,0,&len); - ; return 0; } @@ -40694,8 +41546,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -40707,42 +41558,2723 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - - curl_cv_socklen_t_equiv="$t" - break - + gl_cv_header_working_stdint_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done - done +fi +echo "$as_me:$LINENO: result: $gl_cv_header_working_stdint_h" >&5 +echo "${ECHO_T}$gl_cv_header_working_stdint_h" >&6 + fi + if test "$gl_cv_header_working_stdint_h" = yes; then + STDINT_H= + else - if test "x$curl_cv_socklen_t_equiv" = x; then - { { echo "$as_me:$LINENO: error: Cannot find a type to use in place of socklen_t" >&5 -echo "$as_me: error: Cannot find a type to use in place of socklen_t" >&2;} - { (exit 1); exit 1; }; } - fi + +for ac_header in sys/inttypes.h sys/bitypes.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ----------------------------------------- ## +## Report this to the nagios-plugins lists. ## +## ----------------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi - - echo "$as_me:$LINENO: result: $curl_cv_socklen_t_equiv" >&5 -echo "${ECHO_T}$curl_cv_socklen_t_equiv" >&6 - -cat >>confdefs.h <<_ACEOF -#define socklen_t $curl_cv_socklen_t_equiv +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `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 - ac_config_files="$ac_config_files Makefile lib/Makefile m4/Makefile plugins/Makefile lib/tests/Makefile plugins-root/Makefile plugins-scripts/Makefile plugins-scripts/subst plugins-scripts/utils.pm plugins-scripts/utils.sh command.cfg test.pl pkg/solaris/pkginfo po/Makefile.in" + + + + + + for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do + echo "$as_me:$LINENO: checking for bit size of $gltype" >&5 +echo $ECHO_N "checking for bit size of $gltype... $ECHO_C" >&6 +if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #include + #include + #include + +#include +int +main () +{ +static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #include + #include + #include + +#include +int +main () +{ +static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #include + #include + #include + +#include +int +main () +{ +static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #include + #include + #include + +#include +int +main () +{ +static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo= ac_hi= +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #include + #include + #include + +#include +int +main () +{ +static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) result=$ac_lo;; +'') result=unknown ;; +esac +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 +echo "$as_me: error: internal error: not reached in cross-compile" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #include + #include + #include + +#include +long longval () { return sizeof ($gltype) * CHAR_BIT; } +unsigned long ulongval () { return sizeof ($gltype) * CHAR_BIT; } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if ((sizeof ($gltype) * CHAR_BIT) < 0) + { + long i = longval (); + if (i != (sizeof ($gltype) * CHAR_BIT)) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != (sizeof ($gltype) * CHAR_BIT)) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + result=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +result=unknown +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val + eval gl_cv_bitsizeof_${gltype}=\$result + +fi +echo "$as_me:$LINENO: result: `eval echo '${'gl_cv_bitsizeof_${gltype}'}'`" >&5 +echo "${ECHO_T}`eval echo '${'gl_cv_bitsizeof_${gltype}'}'`" >&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 + echo "$as_me:$LINENO: checking whether $gltype is signed" >&5 +echo $ECHO_N "checking whether $gltype is signed... $ECHO_C" >&6 +if eval "test \"\${gl_cv_type_${gltype}_signed+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #include + #include + #include + + int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + result=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +result=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + eval gl_cv_type_${gltype}_signed=\$result + +fi +echo "$as_me:$LINENO: result: `eval echo '${'gl_cv_type_${gltype}_signed'}'`" >&5 +echo "${ECHO_T}`eval echo '${'gl_cv_type_${gltype}_signed'}'`" >&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 + + + + + + + + for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do + echo "$as_me:$LINENO: checking for $gltype integer literal suffix" >&5 +echo $ECHO_N "checking for $gltype integer literal suffix... $ECHO_C" >&6 +if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #include + #include + #include + + extern $gltype foo; + extern $gltype1 foo; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval gl_cv_type_${gltype}_suffix=\$glsuf +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + eval result=\$gl_cv_type_${gltype}_suffix + test "$result" != no && break + done +fi +echo "$as_me:$LINENO: result: `eval echo '${'gl_cv_type_${gltype}_suffix'}'`" >&5 +echo "${ECHO_T}`eval echo '${'gl_cv_type_${gltype}_suffix'}'`" >&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 + + + + + gl_LIBOBJS="$gl_LIBOBJS strcasecmp.$ac_objext" + + + : + + + + +for ac_func in strncasecmp +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" +fi +done + + echo "$as_me:$LINENO: checking whether strncasecmp is declared" >&5 +echo $ECHO_N "checking whether strncasecmp is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl_strncasecmp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef strncasecmp + char *p = (char *) strncasecmp; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_decl_strncasecmp=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_have_decl_strncasecmp=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_have_decl_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_have_decl_strncasecmp" >&6 +if test $ac_cv_have_decl_strncasecmp = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRNCASECMP 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRNCASECMP 0 +_ACEOF + + +fi + + + if test $ac_cv_func_strncasecmp = no; then + + : + + fi + + + + +for ac_func in strdup +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" +fi +done + + + : + + + + + + : + + + + + + : + + + + + + + # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'. + echo "$as_me:$LINENO: checking for working strndup" >&5 +echo $ECHO_N "checking for working strndup... $ECHO_C" >&6 +if test "${gl_cv_func_strndup+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + echo "$as_me:$LINENO: checking for strndup" >&5 +echo $ECHO_N "checking for strndup... $ECHO_C" >&6 +if test "${ac_cv_func_strndup+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define strndup to an innocuous variant, in case declares strndup. + For example, HP-UX 11i declares gettimeofday. */ +#define strndup innocuous_strndup + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char strndup (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef strndup + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char strndup (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_strndup) || defined (__stub___strndup) +choke me +#else +char (*f) () = strndup; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != strndup; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_strndup=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_strndup=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_strndup" >&5 +echo "${ECHO_T}$ac_cv_func_strndup" >&6 +if test $ac_cv_func_strndup = yes; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef _AIX + too risky +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "too risky" >/dev/null 2>&1; then + gl_cv_func_strndup=no +else + gl_cv_func_strndup=yes +fi +rm -f conftest* + +else + gl_cv_func_strndup=no +fi + +else + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + #include +int +main () +{ + +#ifndef HAVE_DECL_STRNDUP + extern char *strndup (const char *, size_t); +#endif + char *s; + s = strndup ("some longer string", 15); + free (s); + s = strndup ("shorter string", 13); + return s[13] != '\0'; + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gl_cv_func_strndup=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +gl_cv_func_strndup=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +echo "$as_me:$LINENO: result: $gl_cv_func_strndup" >&5 +echo "${ECHO_T}$gl_cv_func_strndup" >&6 + if test $gl_cv_func_strndup = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_STRNDUP 1 +_ACEOF + + else + gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext" + : + fi + + + + + echo "$as_me:$LINENO: checking for working strnlen" >&5 +echo $ECHO_N "checking for working strnlen... $ECHO_C" >&6 +if test "${ac_cv_func_strnlen_working+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_strnlen_working=no +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + +#define S "foobar" +#define S_LEN (sizeof S - 1) + + /* At least one implementation is buggy: that of AIX 4.3 would + give strnlen (S, 1) == 3. */ + + int i; + for (i = 0; i < S_LEN + 1; ++i) + { + int expected = i <= S_LEN ? i : S_LEN; + if (strnlen (S, i) != expected) + exit (1); + } + exit (0); + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_strnlen_working=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_func_strnlen_working=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_func_strnlen_working" >&5 +echo "${ECHO_T}$ac_cv_func_strnlen_working" >&6 +test $ac_cv_func_strnlen_working = no && gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext" + + if test $ac_cv_func_strnlen_working = no; then + # This is necessary because automake-1.6.1 doens't understand + # that the above use of AC_FUNC_STRNLEN means we may have to use + # lib/strnlen.c. + #AC_LIBOBJ(strnlen) + +cat >>confdefs.h <<\_ACEOF +#define strnlen rpl_strnlen +_ACEOF + + + + : + + + + + + + fi + + + + : + + + + + + if test $ac_cv_header_sys_socket_h = yes; then + SYS_SOCKET_H='' + else + + +for ac_header in winsock2.h ws2tcpip.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ----------------------------------------- ## +## Report this to the nagios-plugins lists. ## +## ----------------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + SYS_SOCKET_H='sys/socket.h' + fi + + + MKDIR_P='$(mkdir_p)' + + + +for ac_header in unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ----------------------------------------- ## +## Report this to the nagios-plugins lists. ## +## ----------------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + + UNISTD_H='' + +else + + UNISTD_H='unistd.h' + +fi + +done + + + + + : + + + + + + if test $ac_cv_header_unistd_h = yes; then + echo "$as_me:$LINENO: checking absolute name of " >&5 +echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6 +if test "${gl_cv_absolute_unistd_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + : + + + + + if test $ac_cv_header_unistd_h = yes; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF + gl_cv_absolute_unistd_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | +sed -n '\#/unistd.h#{s#.*"\(.*/unistd.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'` + fi + +fi +echo "$as_me:$LINENO: result: $gl_cv_absolute_unistd_h" >&5 +echo "${ECHO_T}$gl_cv_absolute_unistd_h" >&6 +cat >>confdefs.h <<_ACEOF +#define ABSOLUTE_UNISTD_H "$gl_cv_absolute_unistd_h" +_ACEOF + + + ABSOLUTE_UNISTD_H=\"$gl_cv_absolute_unistd_h\" + 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" + + + + +for ac_func in vasnprintf +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" +fi +done + + if test $ac_cv_func_vasnprintf = no; then + gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext" + + + + + + + + + + + + + echo "$as_me:$LINENO: checking for ptrdiff_t" >&5 +echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6 +if test "${ac_cv_type_ptrdiff_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((ptrdiff_t *) 0) + return 0; +if (sizeof (ptrdiff_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_ptrdiff_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_ptrdiff_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5 +echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6 +if test $ac_cv_type_ptrdiff_t = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_PTRDIFF_T 1 +_ACEOF + + +fi + + + + + + + + + + + +for ac_func in snprintf wcslen +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + + fi + + + +for ac_func in vasprintf +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" +fi +done + + if test $ac_cv_func_vasprintf = no; then + gl_LIBOBJS="$gl_LIBOBJS asprintf.$ac_objext" + + + + + + + + fi + + + +for ac_func in vsnprintf +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" +fi +done + + + : + + + + + + : + + + echo "$as_me:$LINENO: checking whether is standalone" >&5 +echo $ECHO_N "checking whether is standalone... $ECHO_C" >&6 +if test "${gl_cv_header_wchar_h_standalone+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#include +wchar_t w; +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gl_cv_header_wchar_h_standalone=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gl_cv_header_wchar_h_standalone=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $gl_cv_header_wchar_h_standalone" >&5 +echo "${ECHO_T}$gl_cv_header_wchar_h_standalone" >&6 + if test $gl_cv_header_wchar_h_standalone = yes; then + WCHAR_H= + else + echo "$as_me:$LINENO: checking absolute name of " >&5 +echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6 +if test "${gl_cv_absolute_wchar_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + : + + + + + if test $ac_cv_header_wchar_h = yes; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF + gl_cv_absolute_wchar_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | +sed -n '\#/wchar.h#{s#.*"\(.*/wchar.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'` + fi + +fi +echo "$as_me:$LINENO: result: $gl_cv_absolute_wchar_h" >&5 +echo "${ECHO_T}$gl_cv_absolute_wchar_h" >&6 +cat >>confdefs.h <<_ACEOF +#define ABSOLUTE_WCHAR_H "$gl_cv_absolute_wchar_h" +_ACEOF + + + ABSOLUTE_WCHAR_H=\"$gl_cv_absolute_wchar_h\" + WCHAR_H=wchar.h + fi + + + + + + : + + + + + + + : + + + + + + + + + if test $gt_cv_c_wint_t = yes; then + HAVE_WINT_T=1 + else + HAVE_WINT_T=0 + fi + + + WCTYPE_H=wctype.h + if test $ac_cv_header_wctype_h = yes; then + if test "$ac_cv_func_iswcntrl" = yes; then + WCTYPE_H= + fi + echo "$as_me:$LINENO: checking absolute name of " >&5 +echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6 +if test "${gl_cv_absolute_wctype_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + : + + + + + if test $ac_cv_header_wctype_h = yes; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF + gl_cv_absolute_wctype_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | +sed -n '\#/wctype.h#{s#.*"\(.*/wctype.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'` + fi + +fi +echo "$as_me:$LINENO: result: $gl_cv_absolute_wctype_h" >&5 +echo "${ECHO_T}$gl_cv_absolute_wctype_h" >&6 +cat >>confdefs.h <<_ACEOF +#define ABSOLUTE_WCTYPE_H "$gl_cv_absolute_wctype_h" +_ACEOF + + + ABSOLUTE_WCTYPE_H=\"$gl_cv_absolute_wctype_h\" + HAVE_WCTYPE_H=1 + else + ABSOLUTE_WCTYPE_H=\"no/such/file/wctype.h\" + HAVE_WCTYPE_H=0 + fi + + + + + + + + + + + + + : + + + + + + + : + + + + + + + echo "$as_me:$LINENO: checking whether wcwidth is declared" >&5 +echo $ECHO_N "checking whether wcwidth is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl_wcwidth+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* AIX 3.2.5 declares wcwidth in . */ +#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 () +{ +#ifndef wcwidth + char *p = (char *) wcwidth; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_decl_wcwidth=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_have_decl_wcwidth=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_have_decl_wcwidth" >&5 +echo "${ECHO_T}$ac_cv_have_decl_wcwidth" >&6 +if test $ac_cv_have_decl_wcwidth = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_WCWIDTH 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_WCWIDTH 0 +_ACEOF + + +fi + + + + gl_LIBOBJS="$gl_LIBOBJS xmalloc.$ac_objext" + + + + : + + + : + + + + + + +for ac_header in stdint.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ----------------------------------------- ## +## Report this to the nagios-plugins lists. ## +## ----------------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + : + + + LIBGNU_LIBDEPS="$gl_libdeps" + + LIBGNU_LTLIBDEPS="$gl_ltlibdeps" + + + + + + + +if test "$ac_cv_uname_s" = 'SunOS' -a "$ac_cv_prog_ac_ct_AR" = 'false' ; then + { { echo "$as_me:$LINENO: error: No ar found for Solaris - is /usr/ccs/bin in PATH?" >&5 +echo "$as_me: error: No ar found for Solaris - is /usr/ccs/bin in PATH?" >&2;} + { (exit 1); exit 1; }; } +fi + + ac_config_files="$ac_config_files 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 command.cfg test.pl pkg/solaris/pkginfo po/Makefile.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -40848,13 +44380,6 @@ echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -40862,6 +44387,29 @@ echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"GL_COND_LIBTOOL\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"GL_COND_LIBTOOL\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi + + gl_libobjs= + gl_ltlibobjs= + if test -n "$gl_LIBOBJS"; then + # Remove the extension. + sed_drop_objext='s/\.o$//;s/\.obj$//' + for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do + gl_libobjs="$gl_libobjs $i.$ac_objext" + gl_ltlibobjs="$gl_ltlibobjs $i.lo" + done + fi + gl_LIBOBJS=$gl_libobjs + + gl_LTLIBOBJS=$gl_ltlibobjs + + : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files @@ -41133,7 +44681,7 @@ _ASBOX } >&5 cat >&5 <<_CSEOF -This file was extended by nagios-plugins $as_me 1.4.5, which was +This file was extended by nagios-plugins $as_me 1.4.8, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -41196,7 +44744,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -nagios-plugins config.status 1.4.5 +nagios-plugins config.status 1.4.8 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" @@ -41298,7 +44846,7 @@ cat >>$CONFIG_STATUS <<_ACEOF AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it - # from automake. + # from automake < 1.5. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" @@ -41313,9 +44861,9 @@ for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. + "gl/Makefile" ) CONFIG_FILES="$CONFIG_FILES gl/Makefile" ;; "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; - "m4/Makefile" ) CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;; "plugins/Makefile" ) CONFIG_FILES="$CONFIG_FILES plugins/Makefile" ;; "lib/tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/tests/Makefile" ;; "plugins-root/Makefile" ) CONFIG_FILES="$CONFIG_FILES plugins-root/Makefile" ;; @@ -41328,7 +44876,7 @@ do "pkg/solaris/pkginfo" ) CONFIG_FILES="$CONFIG_FILES pkg/solaris/pkginfo" ;; "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; + "po-directories" ) CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} @@ -41463,14 +45011,14 @@ s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s,@CCDEPMODE@,$CCDEPMODE,;t t s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t s,@LN_S@,$LN_S,;t t s,@ECHO@,$ECHO,;t t s,@AR@,$AR,;t t s,@ac_ct_AR@,$ac_ct_AR,;t t -s,@RANLIB@,$RANLIB,;t t -s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@CXX@,$CXX,;t t s,@CXXFLAGS@,$CXXFLAGS,;t t s,@ac_ct_CXX@,$ac_ct_CXX,;t t @@ -41483,9 +45031,6 @@ s,@FFLAGS@,$FFLAGS,;t t s,@ac_ct_F77@,$ac_ct_F77,;t t s,@LIBTOOL@,$LIBTOOL,;t t s,@LIBOBJS@,$LIBOBJS,;t t -s,@NEED_SETGID@,$NEED_SETGID,;t t -s,@KMEM_GROUP@,$KMEM_GROUP,;t t -s,@GETLOADAVG_LIBS@,$GETLOADAVG_LIBS,;t t s,@POW_LIB@,$POW_LIB,;t t s,@PLUGIN_TEST@,$PLUGIN_TEST,;t t s,@SCRIPT_TEST@,$SCRIPT_TEST,;t t @@ -41509,7 +45054,7 @@ s,@PGINCLUDE@,$PGINCLUDE,;t t s,@RADIUSLIBS@,$RADIUSLIBS,;t t s,@LDAPLIBS@,$LDAPLIBS,;t t s,@LDAPINCLUDE@,$LDAPINCLUDE,;t t -s,@MYSQLCONFIG@,$MYSQLCONFIG,;t t +s,@np_mysql_config@,$np_mysql_config,;t t s,@MYSQLINCLUDE@,$MYSQLINCLUDE,;t t s,@MYSQLLIBS@,$MYSQLLIBS,;t t s,@MYSQLCFLAGS@,$MYSQLCFLAGS,;t t @@ -41539,17 +45084,19 @@ s,@PATH_TO_SWAPINFO@,$PATH_TO_SWAPINFO,;t t s,@PATH_TO_LSPS@,$PATH_TO_LSPS,;t t s,@PATH_TO_DIG@,$PATH_TO_DIG,;t t s,@PATH_TO_APTGET@,$PATH_TO_APTGET,;t t -s,@NEED_VA_LIST@,$NEED_VA_LIST,;t t s,@EXTRAS@,$EXTRAS,;t t s,@EXTRAS_ROOT@,$EXTRAS_ROOT,;t t s,@EXTRA_NETOBJS@,$EXTRA_NETOBJS,;t t s,@DEPLIBS@,$DEPLIBS,;t t -s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t s,@USE_NLS@,$USE_NLS,;t t s,@MSGFMT@,$MSGFMT,;t t s,@GMSGFMT@,$GMSGFMT,;t t +s,@MSGFMT_015@,$MSGFMT_015,;t t +s,@GMSGFMT_015@,$GMSGFMT_015,;t t s,@XGETTEXT@,$XGETTEXT,;t t +s,@XGETTEXT_015@,$XGETTEXT_015,;t t s,@MSGMERGE@,$MSGMERGE,;t t +s,@localedir@,$localedir,;t t s,@INTL_MACOSX_LIBS@,$INTL_MACOSX_LIBS,;t t s,@LIBICONV@,$LIBICONV,;t t s,@LTLIBICONV@,$LTLIBICONV,;t t @@ -41557,12 +45104,56 @@ s,@INTLLIBS@,$INTLLIBS,;t t s,@LIBINTL@,$LIBINTL,;t t s,@LTLIBINTL@,$LTLIBINTL,;t t s,@POSUB@,$POSUB,;t t -s,@STDBOOL_H@,$STDBOOL_H,;t t -s,@HAVE__BOOL@,$HAVE__BOOL,;t t +s,@GL_COND_LIBTOOL_TRUE@,$GL_COND_LIBTOOL_TRUE,;t t +s,@GL_COND_LIBTOOL_FALSE@,$GL_COND_LIBTOOL_FALSE,;t t s,@ALLOCA@,$ALLOCA,;t t s,@ALLOCA_H@,$ALLOCA_H,;t t +s,@ARPA_INET_H@,$ARPA_INET_H,;t t +s,@SYS_SOCKET_H@,$SYS_SOCKET_H,;t t +s,@NEED_SETGID@,$NEED_SETGID,;t t +s,@KMEM_GROUP@,$KMEM_GROUP,;t t +s,@GETLOADAVG_LIBS@,$GETLOADAVG_LIBS,;t t s,@GETOPT_H@,$GETOPT_H,;t t +s,@NETINET_IN_H@,$NETINET_IN_H,;t t +s,@STDBOOL_H@,$STDBOOL_H,;t t +s,@HAVE__BOOL@,$HAVE__BOOL,;t t +s,@HAVE_LONG_LONG_INT@,$HAVE_LONG_LONG_INT,;t t +s,@HAVE_UNSIGNED_LONG_LONG_INT@,$HAVE_UNSIGNED_LONG_LONG_INT,;t t +s,@HAVE_INTTYPES_H@,$HAVE_INTTYPES_H,;t t +s,@HAVE_SYS_TYPES_H@,$HAVE_SYS_TYPES_H,;t t +s,@ABSOLUTE_STDINT_H@,$ABSOLUTE_STDINT_H,;t t +s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t +s,@HAVE_SYS_INTTYPES_H@,$HAVE_SYS_INTTYPES_H,;t t +s,@HAVE_SYS_BITYPES_H@,$HAVE_SYS_BITYPES_H,;t t +s,@BITSIZEOF_PTRDIFF_T@,$BITSIZEOF_PTRDIFF_T,;t t +s,@BITSIZEOF_SIG_ATOMIC_T@,$BITSIZEOF_SIG_ATOMIC_T,;t t +s,@BITSIZEOF_SIZE_T@,$BITSIZEOF_SIZE_T,;t t +s,@BITSIZEOF_WCHAR_T@,$BITSIZEOF_WCHAR_T,;t t +s,@BITSIZEOF_WINT_T@,$BITSIZEOF_WINT_T,;t t +s,@HAVE_SIGNED_SIG_ATOMIC_T@,$HAVE_SIGNED_SIG_ATOMIC_T,;t t +s,@HAVE_SIGNED_WCHAR_T@,$HAVE_SIGNED_WCHAR_T,;t t +s,@HAVE_SIGNED_WINT_T@,$HAVE_SIGNED_WINT_T,;t t +s,@PTRDIFF_T_SUFFIX@,$PTRDIFF_T_SUFFIX,;t t +s,@SIG_ATOMIC_T_SUFFIX@,$SIG_ATOMIC_T_SUFFIX,;t t +s,@SIZE_T_SUFFIX@,$SIZE_T_SUFFIX,;t t +s,@WCHAR_T_SUFFIX@,$WCHAR_T_SUFFIX,;t t +s,@WINT_T_SUFFIX@,$WINT_T_SUFFIX,;t t +s,@STDINT_H@,$STDINT_H,;t t +s,@MKDIR_P@,$MKDIR_P,;t t +s,@UNISTD_H@,$UNISTD_H,;t t +s,@ABSOLUTE_UNISTD_H@,$ABSOLUTE_UNISTD_H,;t t +s,@EOVERFLOW@,$EOVERFLOW,;t t +s,@ABSOLUTE_WCHAR_H@,$ABSOLUTE_WCHAR_H,;t t +s,@WCHAR_H@,$WCHAR_H,;t t +s,@HAVE_WINT_T@,$HAVE_WINT_T,;t t +s,@ABSOLUTE_WCTYPE_H@,$ABSOLUTE_WCTYPE_H,;t t +s,@HAVE_WCTYPE_H@,$HAVE_WCTYPE_H,;t t +s,@WCTYPE_H@,$WCTYPE_H,;t t +s,@LIBGNU_LIBDEPS@,$LIBGNU_LIBDEPS,;t t +s,@LIBGNU_LTLIBDEPS@,$LIBGNU_LTLIBDEPS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t +s,@gl_LIBOBJS@,$gl_LIBOBJS,;t t +s,@gl_LTLIBOBJS@,$gl_LTLIBOBJS,;t t CEOF _ACEOF @@ -41729,11 +45320,6 @@ esac *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ @@ -41772,6 +45358,12 @@ echo "$as_me: error: cannot find input file: $f" >&2;} fi;; esac done` || { (exit 1); exit 1; } + + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub @@ -42245,7 +45837,7 @@ echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} done done ;; - default-1 ) + po-directories ) for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in @@ -42282,11 +45874,12 @@ done 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. + # Hide the ALL_LINGUAS assigment 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. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES @@ -42397,12 +45990,10 @@ echo " --with-ping6-command: $with_ping6_command" echo " --with-ping-command: $with_ping_command" -echo " --with-lwres: $with_lwres" echo " --with-ipv6: $with_ipv6" echo " --with-mysql: $with_mysql" echo " --with-openssl: $with_openssl" echo " --with-gnutls: $with_gnutls" -echo " --enable-emulate-getaddrinfo: $enable_emulate_getaddrinfo" echo " --with-perl: $with_perl" echo " --with-cgiurl: $with_cgiurl" echo " --with-trusted-path: $with_trusted_path" diff --git a/configure.in b/configure.in index c03f4c7..f1fc68e 100644 --- a/configure.in +++ b/configure.in @@ -1,8 +1,10 @@ dnl Process this file with autoconf to produce a configure script. -AC_REVISION ($Revision: 1.197 $) -AC_PREREQ(2.58) -AC_INIT(nagios-plugins,1.4.5) +AC_REVISION ($Revision: 1.213 $) +AC_PREREQ(2.59) +AC_INIT(nagios-plugins,1.4.8) AC_CONFIG_SRCDIR(NPTest.pm) +AC_CONFIG_FILES(gl/Makefile) +AC_CONFIG_AUX_DIR(build-aux) AM_INIT_AUTOMAKE([1.8.3]) AM_CONFIG_HEADER(config.h) AC_CANONICAL_HOST @@ -13,34 +15,40 @@ AC_SUBST(RELEASE) AC_PREFIX_DEFAULT(/usr/local/nagios) dnl Deprecated configure options -AC_ARG_WITH(nagios_user,, - AC_MSG_ERROR([--with-nagios-user is a deprecated option])) -AC_ARG_WITH(nagios_group,, - AC_MSG_ERROR([--with-nagios-group is a deprecated option])) -dnl Figure out how to invoke "install" and what install options to use. -AC_PROG_INSTALL + +dnl Append user (-o), group (-g), mode (-m) to install command +dnl There is an assumption that this is possible with ./configure's chosen install command +extra_install_args="" +AC_ARG_WITH(nagios_user, + ACX_HELP_STRING([--with-nagios-user=USER], + [Installs executables with this user. Defaults to install user]), + extra_install_args="-o $withval") +AC_ARG_WITH(nagios_group, + ACX_HELP_STRING([--with-nagios-group=GROUP], + [Installs executables with this group. Defaults to install user]), + extra_install_args="$extra_install_args -g $withval") +AC_ARG_WITH(world_permissions, + ACX_HELP_STRING([--without-world-permissions], + [Installs executables without world permissions])) + +if test "x$with_world_permissions" = xno ; then + extra_install_args="$extra_install_args -m 0550" +fi + +INSTALL="$INSTALL $extra_install_args" +INSTALL_STRIP_PROGRAM="$INSTALL_STRIP_PROGRAM $extra_install_args" AC_SUBST(INSTALL) -dnl Must come very early on due to coreutils requirement -dnl Takes care of AC_GNU_SOURCE, AC_AIX and AC_MINIX -gl_USE_SYSTEM_EXTENSIONS - AC_PROG_CC -AC_PROG_CPP +gl_EARLY AC_PROG_GCC_TRADITIONAL AC_PROG_LIBTOOL -AC_PROG_MAKE_SET -AC_PROG_AWK +AM_PROG_CC_C_O -AC_FUNC_MALLOC -AC_FUNC_REALLOC AC_FUNC_ERROR_AT_LINE -AC_CONFIG_LIBOBJ_DIR(lib) -AC_FUNC_GETLOADAVG([lib]) - ifdef([AC_FUNC_STRTOD],[AC_FUNC_STRTOD],[AM_FUNC_STRTOD]) PLUGIN_TEST=`echo $srcdir/plugins/t/*.t|sed -e 's,\.*/plugins/,,g'` @@ -128,15 +136,6 @@ dnl the order should allow locally installed versions to override distros' ones OPENSSL_DIRS="/usr /usr/local /usr/slocal /usr/local/openssl /usr/local/ssl \ /opt /opt/openssl" -dnl -dnl Check for miscellaneous stuff -dnl - -case $host_vender-$host_os in -osf*) - AC_DEFINE(_OSF_SOURCE,1,[OSF needs this for getaddrinfo]) - ;; -esac dnl dnl Checks for libraries. @@ -156,7 +155,7 @@ AC_SUBST(MATHLIBS) dnl Check for libtap, to run perl-like tests AC_CHECK_LIB(tap, plan_tests, - EXTRA_TEST=test_utils + EXTRA_TEST="test_utils test_disk" AC_SUBST(EXTRA_TEST) ) @@ -242,40 +241,20 @@ fi LIBS="$_SAVEDLIBS" dnl Check for mysql libraries -dnl Default is to search path for mysql_config -AC_ARG_WITH(mysql, - ACX_HELP_STRING([--with-mysql=DIR], - [Compiles mysql plugins. Expects DIR/bin/mysql_config]), - with_mysql=$withval, - with_mysql=yes) -if test $with_mysql != "no" ; then - if test -x $with_mysql/bin/mysql_config ; then - MYSQLCONFIG="$with_mysql/bin/mysql_config" - else - AC_PATH_PROG(MYSQLCONFIG, mysql_config) - fi - if test -z "$MYSQLCONFIG"; then - with_mysql="not found" - AC_MSG_WARN([Skipping mysql plugin]) - AC_MSG_WARN([install mysql client libs to compile this plugin (see REQUIREMENTS).]) - else - with_mysql=$MYSQLCONFIG - EXTRAS="$EXTRAS check_mysql check_mysql_query" - MYSQLINCLUDE=`$MYSQLCONFIG --include` - # Mysql 3 does not support --include. --cflags should be sufficient - if test $? -ne 0 ; then - MYSQLINCLUDE="" - fi - MYSQLLIBS=`$MYSQLCONFIG --libs` - MYSQLCFLAGS=`$MYSQLCONFIG --cflags` - AC_SUBST(MYSQLINCLUDE) - AC_SUBST(MYSQLLIBS) - AC_SUBST(MYSQLCFLAGS) - fi +np_mysqlclient +if test $with_mysql = "no" ; then + AC_MSG_WARN([Skipping mysql plugin]) + AC_MSG_WARN([install mysql client libs to compile this plugin (see REQUIREMENTS).]) +else + EXTRAS="$EXTRA check_mysql check_mysql_query" + MYSQLINCLUDE="$np_mysql_include" + MYSQLLIBS="$np_mysql_libs" + MYSQLCFLAGS="$np_mysql_cflags" + AC_SUBST(MYSQLINCLUDE) + AC_SUBST(MYSQLLIBS) + AC_SUBST(MYSQLCFLAGS) fi -AC_CHECK_HEADERS(unistd.h) - dnl Check for AF_INET6 support - unistd.h required for Darwin AC_CACHE_CHECK([for IPv6 support], with_ipv6, [ AC_TRY_COMPILE([#ifdef HAVE_UNISTD_H @@ -297,108 +276,6 @@ if test x"$with_ipv6" != xno ; then AC_DEFINE(USE_IPV6,1,[Enable IPv6 support]) fi -dnl ######################################################################### -dnl Check if Posix getaddrinfo() is available. It is also possible to use -dnl the version from the lwres library distributed with BIND. -dnl ######################################################################### -AC_ARG_ENABLE([emulate-getaddrinfo], - ACX_HELP_STRING([--enable-emulate-getaddrinfo], - [enable getaddrinfo emulation (default=no)]), - , - enable_emulate_getaddrinfo=no) - -AC_ARG_WITH(lwres, - ACX_HELP_STRING([--with-lwres=DIR], - [use lwres library for getaddrinfo (default=no)]), - , - with_lwres=no) - -dnl ## enable force to test getaddrinfo.c -if test x$enable_emulate_getaddrinfo = xforce ; then - enable_emulate_getaddrinfo=yes - have_getaddrinfo=no -else - -have_getaddrinfo=no -if test x$with_lwres != xno ; then - if test "$with_lwres" != yes ; then - CPPFLAGS="-I${with_lwres}/include $CPPFLAGS" - LDFLAGS="-L${with_lwres}/lib $LDFLAGS" - fi - AC_CHECK_HEADERS(lwres/netdb.h, , - [AC_MSG_ERROR([cannot find ])]) - AC_CHECK_LIB(lwres, lwres_getaddrinfo, , - [AC_MSG_ERROR([cannot find the lwres library])], - -lnsl -lpthread) - have_getaddrinfo=yes -fi - -if test x$have_getaddrinfo != xyes ; then - AC_SEARCH_LIBS(getaddrinfo, socket resolv bind nsl c_r cr, have_getaddrinfo=yes) -fi - -dnl # Special nonsense for systems that actually have getaddrinfo but -dnl # redefine the name to something else, e.g. OSF -if test x$have_getaddrinfo != xyes ; then - AC_MSG_CHECKING(if getaddrinfo is redefined in netdb.h) - AC_TRY_LINK([ -# include - ], [ - struct addrinfo hints, *res; - int err; - - err = getaddrinfo ("host", "service", &hints, &res); - ], [ - have_getaddrinfo=yes - AC_MSG_RESULT(yes) - ], [AC_MSG_RESULT(no)]) -fi - -fi - -if test x$have_getaddrinfo != xno ; then - if test x$enable_emulate_getaddrinfo != xno ; then - AC_MSG_ERROR([getaddrinfo found but emulate-getaddrinfo was enabled]) - fi - AC_DEFINE(HAVE_GETADDRINFO, 1, - [Does system provide RFC 2553/Posix getaddrinfo?]) -else - if test x$enable_emulate_getaddrinfo != xyes ; then -dnl AC_MSG_ERROR([getaddrinfo not found: try --with-lwres or --enable-emulate-getaddrinfo]) - enable_emulate_getaddrinfo=yes - AC_MSG_WARN([enabling getaddrinfo emulation]) - fi - EXTRA_NETOBJS="$EXTRA_NETOBJS getaddrinfo.o" -fi - -if test x"$enable_emulate_getaddrinfo" != xno ; then - have_resolver=no - - dnl Try for getipnodebyname - AC_SEARCH_LIBS(getipnodebyname, resolv bind nsl c_r cr, have_resolver=yes) - if test x"$have_resolver" != xno ; then - AC_DEFINE(HAVE_GETIPNODEBYNAME, 1, - [Set when getipnodebyname is available]) - fi - - dnl Try for gethostbyname_r - if test x"$have_resolver" = xno ; then - AC_SEARCH_LIBS(gethostbyname_r, resolv bind nsl c_r cr, - [have_resolver=yes - ACX_WHICH_GETHOSTBYNAME_R]) - fi - - dnl Try for gethostbyname - if test x"$have_resolver" = xno ; then - if test x"$enable_pthreads" != xno ; then - AC_MSG_WARN([using threads but cannot find gethostbyname_r or getipnodebyname]) - fi - AC_SEARCH_LIBS(gethostbyname, resolv bind nsl, , - [AC_MSG_ERROR([cannot find gethostbyname])]) - fi - EXTRA_NETOBJS="$EXTRA_NETOBJS gethostbyname.o" - -fi dnl Checks for Kerberos. Must come before openssl checks for Redhat EL 3 AC_CHECK_HEADERS(krb5.h,FOUNDINCLUDE=yes,FOUNDINCLUDE=no) @@ -516,11 +393,10 @@ dnl dnl Checks for header files. dnl -AC_HEADER_STDC AC_HEADER_TIME AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS(signal.h strings.h string.h syslog.h uio.h errno.h sys/types.h sys/time.h sys/socket.h sys/loadavg.h sys/un.h sys/poll.h) -AC_CHECK_HEADERS(features.h stdarg.h sys/unistd.h ctype.h stdlib.h) +AC_CHECK_HEADERS(signal.h syslog.h uio.h errno.h sys/time.h sys/socket.h sys/un.h sys/poll.h) +AC_CHECK_HEADERS(features.h stdarg.h sys/unistd.h ctype.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST @@ -547,37 +423,6 @@ else fi fi -AC_CHECK_FUNCS(vsnprintf snprintf asprintf vasprintf) -AC_CACHE_CHECK([for C99 vsnprintf],ac_cv_HAVE_C99_VSNPRINTF,[ -AC_TRY_RUN([ -#include -#include -void foo(const char *format, ...) { - va_list ap; - int len; - char buf[5]; - - va_start(ap, format); - len = vsnprintf(buf, 0, format, ap); - va_end(ap); - if (len != 5) exit(1); - - va_start(ap, format); - len = vsnprintf(0, 0, format, ap); - va_end(ap); - if (len != 5) exit(1); - - if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1); - - exit(0); -} -main() { foo("hello"); } -], -ac_cv_HAVE_C99_VSNPRINTF=yes,ac_cv_HAVE_C99_VSNPRINTF=no,ac_cv_HAVE_C99_VSNPRINTF=cross)]) -if test x"$ac_cv_HAVE_C99_VSNPRINTF" = x"yes"; then - AC_DEFINE(HAVE_C99_VSNPRINTF,1,[Define if system has C99 compatible vsnprintf]) -fi - AC_TRY_COMPILE([#include ], [struct timeval *tv; struct timezone *tz;], @@ -590,7 +435,7 @@ AC_TRY_COMPILE([#include ], AC_DEFINE(NEED_GETTIMEOFDAY,1,[Define if gettimeofday is needed]))) dnl Checks for library functions. -AC_CHECK_FUNCS(memmove select socket strdup strstr strtod strtol strtoul floor) +AC_CHECK_FUNCS(memmove select socket strdup strstr strtol strtoul floor) AC_CHECK_FUNCS(poll) AC_MSG_CHECKING(return type of socket size) @@ -606,24 +451,6 @@ AC_TRY_COMPILE([#include AC_DEFINE_UNQUOTED(SOCKET_SIZE_TYPE, $ac_cv_socket_size_type , [Define type of socket size]) -AC_ARG_WITH(proc-loadavg, - ACX_HELP_STRING([--with-proc-loadavg=PATH], - [path to /proc/loadavg or equivalent]), - ac_cv_proc_loadavg=$withval) -AC_MSG_CHECKING([for /proc/loadavg]) -if test -n "$ac_cv_proc_loadavg"; then - AC_MSG_RESULT([(command line) $ac_cv_proc_loadavg]) -elif test -f "/proc/loadavg"; then - AC_MSG_RESULT([found /proc/loadavg]) - ac_cv_proc_loadavg="/proc/loadavg" -else - AC_MSG_RESULT([no]) -fi - -if test -n "$ac_cv_proc_loadavg"; then - AC_DEFINE(HAVE_PROC_LOADAVG,1,[Define if /proc/loadavg or similar exists]) - AC_DEFINE_UNQUOTED(PROC_LOADAVG,"/proc/loadavg",[Location of /proc/loadavg]) -fi dnl #### Process table test @@ -654,30 +481,16 @@ if test -n "$PS_COMMAND" && test -n "$PS_FORMAT" && test -n "$PS_COLS" && test - ac_cv_ps_cols="$PS_COLS" AC_MSG_RESULT([(command-line) $ac_cv_ps_command]) -dnl Now using the pst3/kmem hack for solaris systems to avoid truncation -elif test "$ac_cv_uname_s" = "SunOS"; then - # - # this is a very, very ugly hack, to hardcode the location for plugins - # - if test "$libexecdir" = '${exec_prefix}/libexec'; then - if test "$exec_prefix" = "NONE"; then - if test "$prefix" = "NONE"; then - pst3="$ac_default_prefix/libexec/pst3" - else - pst3="$prefix/libexec/pst3" - fi - else - pst3="$exec_prefix/libexec/pst3" - fi - else - pst3="$libexecdir/pst3" - fi - ac_cv_ps_command="$pst3" - ac_cv_ps_format="%s %d %d %d %d %f %s %n" - ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" +dnl Using /usr/ucb/ps on Solaris systems, to avoid truncation +dnl Limitation that command name is not available +elif test "$ac_cv_uname_s" = "SunOS" && /usr/ucb/ps -alxwwn 2>/dev/null | \ + egrep -i ["^ *F +UID +PID +PPID +%C +PRI +NI +SZ +RSS +WCHAN +S +TT +TIME +COMMAND"] > /dev/null +then + ac_cv_ps_varlist="[&procuid,&procpid,&procppid,&procpcpu,&procvsz,&procrss,procstat,&pos]" + ac_cv_ps_command="/usr/ucb/ps -alxwwn" + ac_cv_ps_format=["%*s %d %d %d %d %*d %*d %d %d%*[ 0123456789abcdef]%[OSRZT]%*s %*s %n"] ac_cv_ps_cols=8 - AC_MSG_RESULT([using nagios-plugins internal ps for solaris]) - EXTRAS_ROOT="$EXTRAS_ROOT pst3" + AC_MSG_RESULT([$ac_cv_ps_command]) dnl Some gnu/linux systems (debian for one) don't like -axwo and need axwo. dnl so test for this first... @@ -931,7 +744,7 @@ if test -n "$ac_cv_ps_varlist" ; then AC_DEFINE_UNQUOTED(PS_COLS,$ac_cv_ps_cols, [Number of columns in ps command]) EXTRAS="$EXTRAS check_procs check_nagios" - if echo "$ac_cv_ps_varlist" | grep -q "procetime"; then + if echo "$ac_cv_ps_varlist" | grep "procetime" >/dev/null; then AC_DEFINE(PS_USES_PROCETIME,"yes", [Whether the ps utility uses the "procetime" field]) fi @@ -1439,7 +1252,7 @@ then elif [$PATH_TO_SWAPINFO -dfM 2>/dev/null | egrep -i "^TYPE +AVAIL +USED +FREE" >/dev/null] then ac_cv_have_swap=yes - ac_cv_swap_command="$PATH_TO_SWAPINFO -dfM", + ac_cv_swap_command="$PATH_TO_SWAPINFO -dfM" ac_cv_swap_format=["%*s %f %*d %f"] ac_cv_swap_conv=1024 AC_MSG_RESULT([using HP-UX format swapinfo]) @@ -1615,21 +1428,6 @@ elif test -f ../plugins/check_nt.c ; then EXTRAS="$EXTRAS check_nt" fi -AC_MSG_CHECKING(for va_list) -AC_TRY_COMPILE([#ifdef __STDC__ - #include - #include - #include - #else - #include - #include - #include - #endif], - [va_list args;], - [AC_MSG_RESULT(yes)], - [NEED_VA_LIST=-DNEED_VA_LIST - AC_SUBST(NEED_VA_LIST) - AC_MSG_RESULT(no)]) case $host in *bsd*) @@ -1682,13 +1480,16 @@ elif test "$ac_cv_enable_redhat_pthread_workaround" = "yes" ; then fi dnl External libraries - see ACKNOWLEDGEMENTS -np_COREUTILS -np_CURL +gl_INIT + +dnl Some helpful common compile errors checked here +if test "$ac_cv_uname_s" = 'SunOS' -a "$ac_cv_prog_ac_ct_AR" = 'false' ; then + AC_MSG_ERROR(No ar found for Solaris - is /usr/ccs/bin in PATH?) +fi AC_OUTPUT( Makefile lib/Makefile - m4/Makefile plugins/Makefile lib/tests/Makefile plugins-root/Makefile @@ -1722,19 +1523,16 @@ dnl ACX_FEATURE([with],[snmpgetnext-command]) dnl ACX_FEATURE([with],[ssh-command]) dnl ACX_FEATURE([with],[uptime-command]) -dnl ACX_FEATURE([with],[proc-loadavg]) dnl ACX_FEATURE([with],[proc-meminfo]) dnl ACX_FEATURE([with],[ps-command]) dnl ACX_FEATURE([with],[ps-format]) dnl ACX_FEATURE([with],[ps-cols]) dnl ACX_FEATURE([with],[ps-varlist]) -ACX_FEATURE([with],[lwres]) ACX_FEATURE([with],[ipv6]) ACX_FEATURE([with],[mysql]) ACX_FEATURE([with],[openssl]) ACX_FEATURE([with],[gnutls]) -ACX_FEATURE([enable],[emulate-getaddrinfo]) ACX_FEATURE([with],[perl]) ACX_FEATURE([with],[cgiurl]) ACX_FEATURE([with],[trusted-path]) diff --git a/contrib/CVS/Entries b/contrib/CVS/Entries deleted file mode 100644 index 1d41225..0000000 --- a/contrib/CVS/Entries +++ /dev/null @@ -1,87 +0,0 @@ -/README.TXT/1.4/Thu Jan 27 02:27:13 2005//Tr1_4_5 -/check_adptraid.sh/1.1/Sun Feb 9 14:20:30 2003//Tr1_4_5 -/check_apache.pl/1.1.1.1/Thu Feb 28 06:42:53 2002//Tr1_4_5 -/check_apc_ups.pl/1.2/Wed Aug 14 19:02:31 2002//Tr1_4_5 -/check_appletalk.pl/1.1/Tue Feb 18 04:05:01 2003//Tr1_4_5 -/check_arping.pl/1.1/Thu Jan 27 04:44:29 2005//Tr1_4_5 -/check_asterisk.pl/1.1/Tue Feb 1 04:19:31 2005//Tr1_4_5 -/check_axis.sh/1.2/Mon May 26 10:09:23 2003//Tr1_4_5 -/check_backup.pl/1.1/Sun Apr 7 05:13:57 2002//Tr1_4_5 -/check_bgpstate.pl/1.2/Sun Feb 23 17:10:39 2003//Tr1_4_5 -/check_breeze.pl/1.1/Fri Mar 1 02:42:56 2002//Tr1_4_5 -/check_cluster.c/1.1/Tue Jun 18 01:05:26 2002//Tr1_4_5 -/check_cluster2.c/1.1/Fri Mar 12 03:40:57 2004//Tr1_4_5 -/check_compaq_insight.pl/1.1/Sun Feb 9 14:20:30 2003//Tr1_4_5 -/check_cpqarray.c/1.1/Thu Jan 27 04:46:08 2005//Tr1_4_5 -/check_digitemp.pl/1.1/Thu Aug 1 04:46:01 2002//Tr1_4_5 -/check_dlswcircuit.pl/1.1.1.1/Thu Feb 28 06:42:53 2002//Tr1_4_5 -/check_dns_random.pl/1.2/Wed Jan 29 05:27:20 2003//Tr1_4_5 -/check_email_loop.pl/1.5/Tue Nov 29 23:21:06 2005//Tr1_4_5 -/check_fan_cpq_present/1.1/Thu Jan 27 04:52:58 2005//Tr1_4_5 -/check_fan_fsc_present/1.1/Thu Jan 27 04:53:21 2005//Tr1_4_5 -/check_flexlm.pl/1.1/Fri Mar 1 02:42:56 2002//Tr1_4_5 -/check_frontpage/1.1/Thu Jan 27 04:45:00 2005//Tr1_4_5 -/check_hltherm.c/1.1/Fri Mar 1 02:42:56 2002//Tr1_4_5 -/check_hprsc.pl/1.2/Thu Nov 25 03:01:23 2004//Tr1_4_5 -/check_http-with-client-certificate.c/1.1/Tue Feb 1 04:19:42 2005//Tr1_4_5 -/check_hw.sh/1.1/Thu Nov 25 04:30:04 2004//Tr1_4_5 -/check_ica_master_browser.pl/1.1/Tue Jan 25 09:09:33 2005//Tr1_4_5 -/check_ica_metaframe_pub_apps.pl/1.1/Tue Jan 25 09:07:39 2005//Tr1_4_5 -/check_ica_program_neigbourhood.pl/1.1/Tue Jan 25 09:05:53 2005//Tr1_4_5 -/check_inodes-freebsd.pl/1.1/Wed Aug 14 19:00:17 2002//Tr1_4_5 -/check_inodes.pl/1.1/Thu Apr 18 21:59:26 2002//Tr1_4_5 -/check_ipxping.c/1.2/Fri Mar 1 02:42:56 2002//Tr1_4_5 -/check_javaproc.pl/1.1/Mon Nov 18 21:58:58 2002//Tr1_4_5 -/check_joy.sh/1.1.1.1/Thu Feb 28 06:42:54 2002//Tr1_4_5 -/check_linux_raid.pl/1.5/Wed Jun 7 14:28:33 2006//Tr1_4_5 -/check_lmmon.pl/1.1/Tue Jun 25 13:55:07 2002//Tr1_4_5 -/check_log2.pl/1.2/Fri Dec 16 18:41:45 2005//Tr1_4_5 -/check_lotus.pl/1.1/Tue Jan 25 09:04:26 2005//Tr1_4_5 -/check_maxchannels.pl/1.1.1.1/Thu Feb 28 06:42:54 2002//Tr1_4_5 -/check_maxwanstate.pl/1.1.1.1/Thu Feb 28 06:42:54 2002//Tr1_4_5 -/check_mem.pl/1.1.1.1/Thu Feb 28 06:42:54 2002//Tr1_4_5 -/check_ms_spooler.pl/1.1/Tue Jul 16 00:04:42 2002//Tr1_4_5 -/check_mssql.sh/1.3/Tue Aug 5 09:56:13 2003//Tr1_4_5 -/check_nagios.pl/1.1.1.1/Thu Feb 28 06:42:55 2002//Tr1_4_5 -/check_nagios_db.pl/1.1/Wed Aug 14 19:01:58 2002//Tr1_4_5 -/check_nagios_db_pg.pl/1.1/Mon Apr 19 13:13:23 2004//Tr1_4_5 -/check_netapp.pl/1.1.1.1/Thu Feb 28 06:42:54 2002//Tr1_4_5 -/check_nmap.py/1.2/Wed Dec 1 03:50:37 2004//Tr1_4_5 -/check_ora_table_space.pl/1.1.1.1/Thu Feb 28 06:42:54 2002//Tr1_4_5 -/check_oracle_instance.pl/1.1/Wed Apr 3 02:58:47 2002//Tr1_4_5 -/check_oracle_tbs/1.2/Fri Feb 4 00:27:38 2005//Tr1_4_5 -/check_pcpmetric.py/1.1/Thu Jan 27 04:45:46 2005//Tr1_4_5 -/check_pfstate/1.1/Thu Jan 27 04:43:49 2005//Tr1_4_5 -/check_qmailq.pl/1.1.1.1/Thu Feb 28 06:42:53 2002//Tr1_4_5 -/check_rbl.c/1.3/Thu Dec 2 00:30:32 2004//Tr1_4_5 -/check_remote_nagios_status.pl/1.1/Sun Feb 9 14:16:28 2003//Tr1_4_5 -/check_rrd_data.pl/1.1.1.1/Thu Feb 28 06:42:54 2002//Tr1_4_5 -/check_sap.sh/1.2/Tue May 27 13:10:01 2003//Tr1_4_5 -/check_smart.pl/1.1/Thu Jan 27 10:32:48 2005//Tr1_4_5 -/check_smb.sh/1.1/Wed Aug 14 15:29:58 2002//Tr1_4_5 -/check_snmp_disk_monitor.pl/1.1/Thu Aug 22 14:42:43 2002//Tr1_4_5 -/check_snmp_printer.pl/1.1/Sun Jan 18 20:07:01 2004//Tr1_4_5 -/check_snmp_process_monitor.pl/1.2/Thu Aug 22 22:08:46 2002//Tr1_4_5 -/check_snmp_procs.pl/1.1/Tue Feb 17 13:23:31 2004//Tr1_4_5 -/check_sockets.pl/1.1.1.1/Thu Feb 28 06:42:54 2002//Tr1_4_5 -/check_sybase/1.3/Fri Apr 29 00:27:49 2005//Tr1_4_5 -/check_temp_cpq/1.1/Thu Jan 27 04:53:41 2005//Tr1_4_5 -/check_temp_fsc/1.1/Thu Jan 27 04:53:59 2005//Tr1_4_5 -/check_timeout.c/1.1.1.1/Thu Feb 28 06:42:53 2002//Tr1_4_5 -/check_traceroute-pure_perl.pl/1.1/Tue Feb 1 12:43:58 2005//Tr1_4_5 -/check_traceroute.pl/1.1/Thu Jan 27 10:34:16 2005//Tr1_4_5 -/check_uptime.c/1.2/Fri Mar 1 02:42:56 2002//Tr1_4_5 -/check_vcs.pl/1.1/Thu May 23 16:39:59 2002//Tr1_4_5 -/check_wave.pl/1.1/Fri Mar 1 02:42:56 2002//Tr1_4_5 -/check_wins.pl/1.3/Thu Nov 25 04:46:16 2004//Tr1_4_5 -/checkciscotemp.pl/1.3/Tue Jan 28 07:44:56 2003//Tr1_4_5 -/mrtgext.pl/1.1.1.1/Thu Feb 28 06:42:54 2002//Tr1_4_5 -/nagios_sendim.pl/1.1/Mon Nov 18 21:58:58 2002//Tr1_4_5 -/packet_utils.pm/1.1/Tue Jan 25 09:12:47 2005//Tr1_4_5 -/rblcheck-dns/1.1/Mon Nov 29 05:07:33 2004//Tr1_4_5 -/rblcheck-web/1.1/Mon Nov 29 05:07:33 2004//Tr1_4_5 -/restrict.pl/1.1.1.1/Thu Feb 28 06:42:54 2002//Tr1_4_5 -/sched_downtime.pl/1.1/Sun Feb 9 14:16:29 2003//Tr1_4_5 -/urlize.pl/1.2/Tue Jun 10 05:04:09 2003//Tr1_4_5 -/utils.py/1.1.1.1/Thu Feb 28 06:42:54 2002//Tr1_4_5 -D diff --git a/contrib/CVS/Entries.Log b/contrib/CVS/Entries.Log deleted file mode 100644 index 84852cd..0000000 --- a/contrib/CVS/Entries.Log +++ /dev/null @@ -1,2 +0,0 @@ -A D/aix//// -A D/tarballs//// diff --git a/contrib/CVS/Repository b/contrib/CVS/Repository deleted file mode 100644 index dd1e54b..0000000 --- a/contrib/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -nagiosplug/contrib diff --git a/contrib/CVS/Root b/contrib/CVS/Root deleted file mode 100644 index f4a2783..0000000 --- a/contrib/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:ext:tonvoon@nagiosplug.cvs.sourceforge.net:/cvsroot/nagiosplug diff --git a/contrib/CVS/Tag b/contrib/CVS/Tag deleted file mode 100644 index 65ed4ef..0000000 --- a/contrib/CVS/Tag +++ /dev/null @@ -1 +0,0 @@ -Nr1_4_5 diff --git a/contrib/aix/CVS/Entries b/contrib/aix/CVS/Entries deleted file mode 100644 index b6aa127..0000000 --- a/contrib/aix/CVS/Entries +++ /dev/null @@ -1,6 +0,0 @@ -/check_failed/1.1.1.1/Thu Feb 28 06:42:55 2002//Tr1_4_5 -/check_io/1.1.1.1/Thu Feb 28 06:42:55 2002//Tr1_4_5 -/check_kerberos/1.1.1.1/Thu Feb 28 06:42:55 2002//Tr1_4_5 -/check_queue/1.1.1.1/Thu Feb 28 06:42:55 2002//Tr1_4_5 -/pg_stat/1.1.1.1/Thu Feb 28 06:42:55 2002//Tr1_4_5 -D diff --git a/contrib/aix/CVS/Repository b/contrib/aix/CVS/Repository deleted file mode 100644 index 9b143d1..0000000 --- a/contrib/aix/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -nagiosplug/contrib/aix diff --git a/contrib/aix/CVS/Root b/contrib/aix/CVS/Root deleted file mode 100644 index f4a2783..0000000 --- a/contrib/aix/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:ext:tonvoon@nagiosplug.cvs.sourceforge.net:/cvsroot/nagiosplug diff --git a/contrib/aix/CVS/Tag b/contrib/aix/CVS/Tag deleted file mode 100644 index 65ed4ef..0000000 --- a/contrib/aix/CVS/Tag +++ /dev/null @@ -1 +0,0 @@ -Nr1_4_5 diff --git a/contrib/check_sybase b/contrib/check_sybase deleted file mode 100755 index 75a4855..0000000 --- a/contrib/check_sybase +++ /dev/null @@ -1,370 +0,0 @@ -#!/usr/bin/perl -# check_sybase -# A nagios plugin that connects to a Sybase database and checks free space. -# -# Copyright 2004-2005 Simon Bellwood, NetMan Network Management and IT -# Services GmbH -# Portions Copyright 2001 Michael Peppler. -# License: GPL -# -# Bugs and feedback to simon.bellwood@NOSPAM.net-man.at -# Latest version available from: -# http://www.net-man.at/software/check_sybase-LATEST.zip -# -# Revision history: -# 0.1 01-OCT-2004 Initial version. -# 0.2 08-NOV-2004 Initial release. -# 0.3 13-JAN-2005 Fixed lib path, improved timeouts. -# 0.4 26-JAN-2005 Added loginTimeout. -# 0.5 04-FEB-2005 Fixed dates in history. Oops. -# 0.6 29-MAR-2005 Added --explain option. -# 0.7 08-APR-2005 Added initial performance data support. -my $VERSION = "0.7"; - -#use warnings; -use strict; -use DBI; -use Getopt::Long; -use lib qw( /usr/lib/nagios/plugins/ /usr/local/nagios/libexec/ ); -use utils qw(%ERRORS &print_revision &support &usage $TIMEOUT); - - -my $PROGNAME = "check_sybase"; -my $DEFAULT_CHECKTYPE = "FREESPACE"; -my $DEFAULT_WARNING = "25"; -my $DEFAULT_CRITICAL = "10"; -my $DEFAULT_TIMEOUT = "30"; - -my ($user, $pass, $dbsvr, $dbname, $config, $checktype, $explain, - $warn, $crit, $timeout, $help, $version); - -my $options_okay = GetOptions( - "U|user=s" => \$user, - "P|pass:s" => \$pass, # ":" means optional - "S|dbsvr=s" => \$dbsvr, - "D|dbname=s" => \$dbname, - "config=s" => \$config, - "checktype=s" => \$checktype, - "explain" => \$explain, - "w|warning=i" => \$warn, - "c|critical=i" => \$crit, - "t|timeout=i" => \$timeout, - "h|help" => \$help, - "V|version" => \$version -); - - -if (! $options_okay) # Bad option passed -{ - &help; - &nunk("Bad command line option passed!"); -} - -# Use defaults, if needed -$warn = $warn || $DEFAULT_WARNING; -$crit = $crit || $DEFAULT_CRITICAL; -$checktype = $checktype || $DEFAULT_CHECKTYPE; -$timeout = $timeout || $TIMEOUT || $DEFAULT_TIMEOUT; - -if ($help) -{ - &help; - &nok; -} - -if ($version) -{ - print_revision($PROGNAME,"\$Revision: 1.3 $VERSION \$"); - &nok; -} - -if ($config) # Read any of "user", "pass", "dbsvr", "dbname" from config file -{ - &read_config; -} - -# Some more descriptive syntax checks -my $syntax_error; -$syntax_error .= "No dbsvr given! " unless $dbsvr; -$syntax_error .= "No dbname given! " unless $dbname; -$syntax_error .= "No user given! " unless $user; -$syntax_error .= "Bad checktype given!" - unless $checktype =~ m/^CONNECT|FREESPACE$/; -&nunk($syntax_error) if $syntax_error; - - -# Just in case of problems, let's not hang Nagios -$SIG{'ALRM'} = sub { - &nunk("Timeout: no response from dbsvr $dbsvr within $timeout seconds"); -}; -alarm($timeout); - - -# Decide on what we are checking -if ($checktype eq "CONNECT") -{ - &connect; -} -elsif ($checktype eq "FREESPACE") -{ - &check_space; -} - -my $dbh; -my $is_connected; -sub connect -{ - $dbh = DBI->connect("dbi:Sybase:server=$dbsvr;database=$dbname;". - "timeout=$timeout,loginTimeout=$timeout", $user, $pass) - or &ncrit("Could not connect to '$dbname' on '$dbsvr'"); - - # Report success for a check of type CONNECT - &nok("Connect okay") if $checktype ne "FREESPACE"; -} - -sub disconnect -{ - $dbh->disconnect if $is_connected; - $is_connected = 0; -} - -sub check_space -{ - &connect; - - # Most of this sub based on Michael Peppler's check-space.pl - # For debugging purposes, more values are collected than needed. - - $dbh->{syb_do_proc_status} = 1; - - my $dbinfo; - - # First check space in the database - my $sth = $dbh->prepare("sp_spaceused") - or &nunk("Failed to call sp_spaceused on '$dbsvr'"); - $sth->execute - or &nunk("Failed to call sp_spaceused on '$dbsvr'"); - do { - while(my $d = $sth->fetch) - { - if($d->[0] =~ /$dbname/) - { - # Grab "database_size" - $d->[1] =~ s/[^\d.]//g; - $dbinfo->{size} = $d->[1]; - } - else - { - # Reserved, data, index, unused - foreach (@$d) - { - s/\D//g; - } - - # Grab "reserved", "data", "index" - $dbinfo->{reserved} = $d->[0] / 1024; - $dbinfo->{data} = $d->[1] / 1024; - $dbinfo->{index} = $d->[2] / 1024; - $dbinfo->{unused} = $d->[3] / 1024; - } - } - } while($sth->{syb_more_results}); - - &explain("db size: ".$dbinfo->{size}); - &explain("reserved: ".$dbinfo->{reserved}); - &explain(" data: ".$dbinfo->{data}); - &explain(" index: ".$dbinfo->{index}); - &explain(" unused: ".$dbinfo->{unused}); - - # Get the actual device usage from sp_helpdb to get the free log space - $sth = $dbh->prepare("sp_helpdb $dbname") - or &nunk("Failed to call sp_helpdb $dbname on '$dbsvr'"); - $sth->execute - or &nunk("Failed to call sp_helpdb $dbname on '$dbsvr'"); - do { - while(my $d = $sth->fetch) - { - # Look for "usage" column with value "log only" - if($d->[2] && $d->[2] =~ /log only/) - { - # Grab "size", add it to our log size - $d->[1] =~ s/[^\d\.]//g; - $dbinfo->{log} += $d->[1]; - } - - # Look for "device fragments" column with "log only" - # followed by a number. - if($d->[0] =~ /log only .* (\d+)/) - { - $dbinfo->{logfree} = $1 / 1024; - } - } - } while($sth->{syb_more_results}); - - &explain("log: ".$dbinfo->{log}); - &explain("logfree: ".$dbinfo->{logfree}); - - # Subtract the log size from the database size - $dbinfo->{realsize} = $dbinfo->{size} - $dbinfo->{log}; - &explain("realsize (i.e. size - log) = ".$dbinfo->{realsize}); - - # The "reserved" space is free for use by the table that freed it, so - # it is not truly free space. To be safe, our calculation ignores it. - my $free = ($dbinfo->{realsize} - $dbinfo->{reserved})/$dbinfo->{realsize}; - $free = sprintf("%.2f", $free*100); - - &explain("(realsize-reserved)/realsize = $free%"); - &explain("For safety, this calculation assumes no log space reuse. ". - "Because of this, you may get negative values."); - - - if ($free < $crit) - { - &ncrit("Free space is $free%! (critical threshold is $crit%)". - "|free_space=$free%"); - } - - if ($free < $warn) - { - &nwarn("Free space is $free%! (warning threshold is $warn%)". - "|free_space=$free%"); - } - - - &nok("Free space within thresholds ($free% free)". - "|free_space=$free%"); -} - -sub read_config -{ - open (CONFIG, "<$config") - or &nunk("Failed to open config file '$config': $!"); - while () - { - chomp; - next if m/^#/; # skip comments - next if m/^$/; # skip blanks - - # Each case-insensitive argument can be followed by an optional - # colon, then must be followed by whitespace and the value. - # Options in the config file override those given on the - # command line, but don't rely on this! - - if (m/USER:?\s+(\S+)/i) - { - $user = $1; - } - elsif (m/PASS:?\s+(\S+)/i) - { - $pass = $1; - } - elsif (m/DBSVR:?\s+(\S+)/i) - { - $dbsvr = $1; - } - elsif (m/DBNAME:?\s+(\S+)/i) - { - $dbname = $1; - } - else - { - &nunk("Invalid line $. in config file '$config'"); - } - } - close (CONFIG); -} - -sub help -{ - print <<_HELP_; -Usage: $PROGNAME OPTIONS -A nagios plugin that connects to a Sybase database and checks free space. - -Mandatory arguments to long options are mandatory for short options too. - -U, --user Username to connect to database. - -P, --pass Password to connect to database. - -S, --dbsvr Database server (as in the interfaces file). - -D, --dbname Database name to check. - --config=FILE Config file (see SECURITY below) - --checktype=TYPE Type of check to run (see TYPEs below) - --explain Explains how we calculated the free space. - -w, --warning Warning threshold, in percent (default 25) - -c, --critical Critical threshold, in percent (default 10) - -t, --timeout Timeout value, in seconds (default 30) - -h, --help This help message - -V, --version Version information ($VERSION) - -Examples: - $PROGNAME -U sa -P secret -S bigbox -D orders - $PROGNAME --config=/secure/nagios-sybase.cfg --checktype=CONNECT - -TYPEs - There are two types of checks you can run: - --checktype=CONNECT - Checks just the connection to the database. - --checktype=FREESPACE - (Default) Checks both the connection to the database and the free space. - -SECURITY - Using a config file - Since a "ps ax" will reveal your database username and password, you can - instead specify them in a config file. Pass the config file with --config. - The format of the file is: - USER value - PASS value - You can also specify a DBSVR and DBNAME in the file. Comments (#) and blank - lines are ignored. Use whitespace to separate argument and value. -_HELP_ - -} - -sub explain -{ - return unless $explain; - - my $msg = shift; - print "$msg\n"; -} - - - -# Some wrappers.. - -# Returns code 0, OK -sub nok -{ - my $msg = shift; - print "OK: $msg\n" if $msg; - - &disconnect; - exit $ERRORS{OK}; -} - -# Returns code 1, Warning -sub nwarn -{ - my $msg = shift; - print "WARNING: $msg\n"; - - &disconnect; - exit $ERRORS{WARNING}; -} - -# Returns code 2, Critical -sub ncrit -{ - my $msg = shift; - print "CRITICAL: $msg\n"; - - &disconnect; - exit $ERRORS{CRITICAL}; -} - -# Returns code 3, Unknown -sub nunk -{ - my $msg = shift; - print "ERROR: $msg\n"; - - &disconnect; - exit $ERRORS{UNKNOWN}; -} diff --git a/contrib/tarballs/CVS/Entries b/contrib/tarballs/CVS/Entries deleted file mode 100644 index 90b1395..0000000 --- a/contrib/tarballs/CVS/Entries +++ /dev/null @@ -1,6 +0,0 @@ -/bowen-langley_plugins.tar.gz/1.2/Fri Mar 1 02:42:56 2002/-kb/Tr1_4_5 -/check_bgp-1.0.tar.gz/1.2/Fri Mar 1 02:42:56 2002/-kb/Tr1_4_5 -/check_radius.tar.gz/1.2/Fri Mar 1 02:42:56 2002/-kb/Tr1_4_5 -/check_traffic-0.91b.tar.gz/1.1/Tue Feb 1 04:20:04 2005/-kb/Tr1_4_5 -/fetchlog-0.94.tar.gz/1.1/Sun Feb 9 14:03:22 2003/-kb/Tr1_4_5 -D diff --git a/contrib/tarballs/CVS/Repository b/contrib/tarballs/CVS/Repository deleted file mode 100644 index f687a77..0000000 --- a/contrib/tarballs/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -nagiosplug/contrib/tarballs diff --git a/contrib/tarballs/CVS/Root b/contrib/tarballs/CVS/Root deleted file mode 100644 index f4a2783..0000000 --- a/contrib/tarballs/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:ext:tonvoon@nagiosplug.cvs.sourceforge.net:/cvsroot/nagiosplug diff --git a/contrib/tarballs/CVS/Tag b/contrib/tarballs/CVS/Tag deleted file mode 100644 index 65ed4ef..0000000 --- a/contrib/tarballs/CVS/Tag +++ /dev/null @@ -1 +0,0 @@ -Nr1_4_5 diff --git a/gl/Makefile.am b/gl/Makefile.am new file mode 100644 index 0000000..67c9872 --- /dev/null +++ b/gl/Makefile.am @@ -0,0 +1,607 @@ +## DO NOT EDIT! GENERATED AUTOMATICALLY! +## Process this file with automake to produce Makefile.in. +# Copyright (C) 2004-2007 Free Software Foundation, Inc. +# +# This file is free software, distributed under the terms of the GNU +# General Public License. As a special exception to the GNU General +# Public License, this file may be distributed as part of a program +# that contains a configuration script generated by Autoconf, under +# the same distribution terms as the rest of that program. +# +# Generated by gnulib-tool. +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --aux-dir=. --no-libtool --macro-prefix=gl dirname fsusage getaddrinfo gethostname getloadavg getopt gettext mountlist regex vasprintf vsnprintf + +AUTOMAKE_OPTIONS = 1.5 gnits + +noinst_HEADERS = +noinst_LIBRARIES = +noinst_LTLIBRARIES = +EXTRA_DIST = +BUILT_SOURCES = +SUFFIXES = +MOSTLYCLEANFILES = core *.stackdump +MOSTLYCLEANDIRS = +CLEANFILES = +DISTCLEANFILES = +MAINTAINERCLEANFILES = + +AM_CPPFLAGS = + +noinst_LIBRARIES += libgnu.a + +libgnu_a_SOURCES = +libgnu_a_LIBADD = $(gl_LIBOBJS) +libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) +EXTRA_libgnu_a_SOURCES = + +## begin gnulib module alloca + + +EXTRA_DIST += alloca.c + +EXTRA_libgnu_a_SOURCES += alloca.c + +libgnu_a_LIBADD += @ALLOCA@ +libgnu_a_DEPENDENCIES += @ALLOCA@ +## end gnulib module alloca + +## begin gnulib module alloca-opt + +BUILT_SOURCES += $(ALLOCA_H) + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +alloca.h: alloca_.h + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + cat $(srcdir)/alloca_.h; \ + } > $@-t + mv -f $@-t $@ +MOSTLYCLEANFILES += alloca.h alloca.h-t + +EXTRA_DIST += alloca_.h + +## end gnulib module alloca-opt + +## begin gnulib module arpa_inet + +BUILT_SOURCES += $(ARPA_INET_H) + +# We need the following in order to create when the system +# doesn't have one. +arpa/inet.h: + test -d arpa || mkdir arpa + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + echo '#include '; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += arpa/inet.h arpa/inet.h-t +MOSTLYCLEANDIRS += arpa + +## end gnulib module arpa_inet + +## begin gnulib module c-strtod + + +EXTRA_DIST += c-strtod.c c-strtod.h + +EXTRA_libgnu_a_SOURCES += c-strtod.c + +## end gnulib module c-strtod + +## begin gnulib module cloexec + + +EXTRA_DIST += cloexec.c cloexec.h + +EXTRA_libgnu_a_SOURCES += cloexec.c + +## end gnulib module cloexec + +## begin gnulib module dirname + + +EXTRA_DIST += basename.c dirname.c dirname.h stripslash.c + +EXTRA_libgnu_a_SOURCES += basename.c dirname.c stripslash.c + +## end gnulib module dirname + +## begin gnulib module error + + +EXTRA_DIST += error.c error.h + +EXTRA_libgnu_a_SOURCES += error.c + +## end gnulib module error + +## begin gnulib module exit + +libgnu_a_SOURCES += exit.h + +## end gnulib module exit + +## begin gnulib module exitfail + + +EXTRA_DIST += exitfail.c exitfail.h + +EXTRA_libgnu_a_SOURCES += exitfail.c + +## end gnulib module exitfail + +## begin gnulib module fcntl-safer + + +EXTRA_DIST += creat-safer.c fcntl--.h fcntl-safer.h open-safer.c + +EXTRA_libgnu_a_SOURCES += creat-safer.c open-safer.c + +## end gnulib module fcntl-safer + +## begin gnulib module fsusage + + +EXTRA_DIST += fsusage.c fsusage.h + +EXTRA_libgnu_a_SOURCES += fsusage.c + +## end gnulib module fsusage + +## begin gnulib module full-read + +libgnu_a_SOURCES += full-read.h full-read.c + +## end gnulib module full-read + +## begin gnulib module full-write + +libgnu_a_SOURCES += full-write.h full-write.c + +## end gnulib module full-write + +## begin gnulib module getaddrinfo + + +EXTRA_DIST += gai_strerror.c getaddrinfo.c getaddrinfo.h + +EXTRA_libgnu_a_SOURCES += gai_strerror.c getaddrinfo.c + +## end gnulib module getaddrinfo + +## begin gnulib module gethostname + + +EXTRA_DIST += gethostname.c + +EXTRA_libgnu_a_SOURCES += gethostname.c + +## end gnulib module gethostname + +## begin gnulib module getloadavg + + +EXTRA_DIST += getloadavg.c + +EXTRA_libgnu_a_SOURCES += getloadavg.c + +## end gnulib module getloadavg + +## begin gnulib module getopt + +BUILT_SOURCES += $(GETOPT_H) + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +getopt.h: getopt_.h + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + cat $(srcdir)/getopt_.h; \ + } > $@-t + mv -f $@-t $@ +MOSTLYCLEANFILES += getopt.h getopt.h-t + +EXTRA_DIST += getopt.c getopt1.c getopt_.h getopt_int.h + +EXTRA_libgnu_a_SOURCES += getopt.c getopt1.c + +## end gnulib module getopt + +## begin gnulib module gettext + +# This is for those projects which use "gettextize --intl" to put a source-code +# copy of libintl into their package. In such projects, every Makefile.am needs +# -I$(top_builddir)/intl, so that can be found in this directory. +# For the Makefile.ams in other directories it is the maintainer's +# responsibility; for the one from gnulib we do it here. +# This option has no effect when the user disables NLS (because then the intl +# directory contains no libintl.h file) or when the project does not use +# "gettextize --intl". +AM_CPPFLAGS += -I$(top_builddir)/intl + +## end gnulib module gettext + +## begin gnulib module gettext-h + +libgnu_a_SOURCES += gettext.h + +## end gnulib module gettext-h + +## begin gnulib module inet_ntop + + +EXTRA_DIST += inet_ntop.c inet_ntop.h + +EXTRA_libgnu_a_SOURCES += inet_ntop.c + +## end gnulib module inet_ntop + +## begin gnulib module intprops + + +EXTRA_DIST += intprops.h + +## end gnulib module intprops + +## begin gnulib module malloc + + +EXTRA_DIST += malloc.c + +EXTRA_libgnu_a_SOURCES += malloc.c + +## end gnulib module malloc + +## begin gnulib module mbchar + + +EXTRA_DIST += mbchar.c mbchar.h + +EXTRA_libgnu_a_SOURCES += mbchar.c + +## end gnulib module mbchar + +## begin gnulib module mbuiter + +libgnu_a_SOURCES += mbuiter.h + +## end gnulib module mbuiter + +## begin gnulib module memchr + + +EXTRA_DIST += memchr.c + +EXTRA_libgnu_a_SOURCES += memchr.c + +## end gnulib module memchr + +## begin gnulib module minmax + +libgnu_a_SOURCES += minmax.h + +## end gnulib module minmax + +## begin gnulib module mountlist + + +EXTRA_DIST += mountlist.c mountlist.h + +EXTRA_libgnu_a_SOURCES += mountlist.c + +## end gnulib module mountlist + +## begin gnulib module netinet_in + +BUILT_SOURCES += $(NETINET_IN_H) + +# We need the following in order to create when the system +# doesn't have one. +netinet/in.h: + test -d netinet || mkdir netinet + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + echo '#include '; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += netinet/in.h netinet/in.h-t +MOSTLYCLEANDIRS += netinet + +## end gnulib module netinet_in + +## begin gnulib module regex + + +EXTRA_DIST += regcomp.c regex.c regex.h regex_internal.c regex_internal.h regexec.c + +EXTRA_libgnu_a_SOURCES += regcomp.c regex.c regex_internal.c regexec.c + +## end gnulib module regex + +## begin gnulib module safe-read + + +EXTRA_DIST += safe-read.c safe-read.h + +EXTRA_libgnu_a_SOURCES += safe-read.c + +## end gnulib module safe-read + +## begin gnulib module safe-write + + +EXTRA_DIST += safe-write.c safe-write.h + +EXTRA_libgnu_a_SOURCES += safe-write.c + +## end gnulib module safe-write + +## begin gnulib module size_max + +libgnu_a_SOURCES += size_max.h + +## end gnulib module size_max + +## begin gnulib module snprintf + + +EXTRA_DIST += snprintf.c snprintf.h + +EXTRA_libgnu_a_SOURCES += snprintf.c + +## end gnulib module snprintf + +## begin gnulib module stdbool + +BUILT_SOURCES += $(STDBOOL_H) + +# We need the following in order to create when the system +# doesn't have one that works. +stdbool.h: stdbool_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool_.h; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += stdbool.h stdbool.h-t + +EXTRA_DIST += stdbool_.h + +## end gnulib module stdbool + +## begin gnulib module stdint + +BUILT_SOURCES += $(STDINT_H) + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +stdint.h: stdint_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ + -e 's|@''ABSOLUTE_STDINT_H''@|$(ABSOLUTE_STDINT_H)|g' \ + -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \ + -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ + -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ + -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ + -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ + -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ + -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ + -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ + -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ + -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \ + -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \ + -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \ + -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \ + -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \ + -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \ + -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \ + -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ + -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ + -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ + < $(srcdir)/stdint_.h; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += stdint.h stdint.h-t + +EXTRA_DIST += stdint_.h + +## end gnulib module stdint + +## begin gnulib module strcase + + +EXTRA_DIST += strcase.h strcasecmp.c strncasecmp.c + +EXTRA_libgnu_a_SOURCES += strcasecmp.c strncasecmp.c + +## end gnulib module strcase + +## begin gnulib module strdup + + +EXTRA_DIST += strdup.c strdup.h + +EXTRA_libgnu_a_SOURCES += strdup.c + +## end gnulib module strdup + +## begin gnulib module strndup + + +EXTRA_DIST += strndup.c strndup.h + +EXTRA_libgnu_a_SOURCES += strndup.c + +## end gnulib module strndup + +## begin gnulib module strnlen + + +EXTRA_DIST += strnlen.c strnlen.h + +EXTRA_libgnu_a_SOURCES += strnlen.c + +## end gnulib module strnlen + +## begin gnulib module strnlen1 + +libgnu_a_SOURCES += strnlen1.h strnlen1.c + +## end gnulib module strnlen1 + +## begin gnulib module sys_socket + +BUILT_SOURCES += $(SYS_SOCKET_H) + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +sys/socket.h: socket_.h + @MKDIR_P@ sys + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + cat $(srcdir)/socket_.h; \ + } > $@-t + mv -f $@-t $@ +MOSTLYCLEANFILES += sys/socket.h sys/socket.h-t +MOSTLYCLEANDIRS += sys + +EXTRA_DIST += socket_.h + +## end gnulib module sys_socket + +## begin gnulib module unistd + +BUILT_SOURCES += $(UNISTD_H) + +# We need the following in order to create an empty placeholder for +# when the system doesn't have one. +unistd.h: unistd_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''ABSOLUTE_UNISTD_H''@|$(ABSOLUTE_UNISTD_H)|g' \ + < $(srcdir)/unistd_.h; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += unistd.h unistd.h-t + +EXTRA_DIST += unistd_.h + +## end gnulib module unistd + +## begin gnulib module unistd-safer + + +EXTRA_DIST += dup-safer.c fd-safer.c pipe-safer.c unistd--.h unistd-safer.h + +EXTRA_libgnu_a_SOURCES += dup-safer.c fd-safer.c pipe-safer.c + +## end gnulib module unistd-safer + +## begin gnulib module vasnprintf + + +EXTRA_DIST += asnprintf.c printf-args.c printf-args.h printf-parse.c printf-parse.h vasnprintf.c vasnprintf.h + +EXTRA_libgnu_a_SOURCES += asnprintf.c printf-args.c printf-parse.c vasnprintf.c + +## end gnulib module vasnprintf + +## begin gnulib module vasprintf + + +EXTRA_DIST += asprintf.c vasprintf.c vasprintf.h + +EXTRA_libgnu_a_SOURCES += asprintf.c vasprintf.c + +## end gnulib module vasprintf + +## begin gnulib module vsnprintf + + +EXTRA_DIST += vsnprintf.c vsnprintf.h + +EXTRA_libgnu_a_SOURCES += vsnprintf.c + +## end gnulib module vsnprintf + +## begin gnulib module wchar + +BUILT_SOURCES += $(WCHAR_H) + +# We need the following in order to create when the system +# version does not work standalone. +wchar.h: wchar_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''ABSOLUTE_WCHAR_H''@|$(ABSOLUTE_WCHAR_H)|g' \ + < $(srcdir)/wchar_.h; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += wchar.h wchar.h-t + +EXTRA_DIST += wchar_.h + +## end gnulib module wchar + +## begin gnulib module wctype + +BUILT_SOURCES += $(WCTYPE_H) + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +wctype.h: wctype_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \ + -e 's|@''ABSOLUTE_WCTYPE_H''@|$(ABSOLUTE_WCTYPE_H)|g' \ + -e 's/@''HAVE_WCTYPE_CTMP_BUG''@/$(HAVE_WCTYPE_CTMP_BUG)/g' \ + -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \ + < $(srcdir)/wctype_.h; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += wctype.h wctype.h-t + +EXTRA_DIST += wctype_.h + +## end gnulib module wctype + +## begin gnulib module wcwidth + +libgnu_a_SOURCES += wcwidth.h + +## end gnulib module wcwidth + +## begin gnulib module xalloc + + +EXTRA_DIST += xalloc.h xmalloc.c + +EXTRA_libgnu_a_SOURCES += xmalloc.c + +## end gnulib module xalloc + +## begin gnulib module xalloc-die + +libgnu_a_SOURCES += xalloc-die.c + +## end gnulib module xalloc-die + +## begin gnulib module xsize + +libgnu_a_SOURCES += xsize.h + +## end gnulib module xsize + +## begin gnulib module xstrndup + +libgnu_a_SOURCES += xstrndup.h xstrndup.c + +## end gnulib module xstrndup + + +mostlyclean-local: mostlyclean-generic + @for dir in '' $(MOSTLYCLEANDIRS); do \ + if test -n "$$dir" && test -d $$dir; then \ + echo "rmdir $$dir"; rmdir $$dir; \ + fi; \ + done diff --git a/gl/Makefile.in b/gl/Makefile.in new file mode 100644 index 0000000..ad99ccb --- /dev/null +++ b/gl/Makefile.in @@ -0,0 +1,859 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Copyright (C) 2004-2007 Free Software Foundation, Inc. +# +# This file is free software, distributed under the terms of the GNU +# General Public License. As a special exception to the GNU General +# Public License, this file may be distributed as part of a program +# that contains a configuration script generated by Autoconf, under +# the same distribution terms as the rest of that program. +# +# Generated by gnulib-tool. +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --aux-dir=. --no-libtool --macro-prefix=gl dirname fsusage getaddrinfo gethostname getloadavg getopt gettext mountlist regex vasprintf vsnprintf + + + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = gl +DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in alloca.c +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/np_mysqlclient.m4 \ + $(top_srcdir)/gl/m4/absolute-header.m4 \ + $(top_srcdir)/gl/m4/alloca.m4 \ + $(top_srcdir)/gl/m4/arpa_inet_h.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/double-slash-root.m4 \ + $(top_srcdir)/gl/m4/eoverflow.m4 $(top_srcdir)/gl/m4/error.m4 \ + $(top_srcdir)/gl/m4/exitfail.m4 \ + $(top_srcdir)/gl/m4/extensions.m4 \ + $(top_srcdir)/gl/m4/fcntl-safer.m4 \ + $(top_srcdir)/gl/m4/fstypename.m4 \ + $(top_srcdir)/gl/m4/fsusage.m4 \ + $(top_srcdir)/gl/m4/getaddrinfo.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 \ + $(top_srcdir)/gl/m4/gnulib-common.m4 \ + $(top_srcdir)/gl/m4/gnulib-comp.m4 \ + $(top_srcdir)/gl/m4/iconv.m4 $(top_srcdir)/gl/m4/inet_ntop.m4 \ + $(top_srcdir)/gl/m4/inline.m4 $(top_srcdir)/gl/m4/intmax_t.m4 \ + $(top_srcdir)/gl/m4/inttypes_h.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/lock.m4 \ + $(top_srcdir)/gl/m4/longdouble.m4 \ + $(top_srcdir)/gl/m4/longlong.m4 \ + $(top_srcdir)/gl/m4/ls-mntd-fs.m4 \ + $(top_srcdir)/gl/m4/mbchar.m4 $(top_srcdir)/gl/m4/mbiter.m4 \ + $(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/memchr.m4 \ + $(top_srcdir)/gl/m4/minmax.m4 $(top_srcdir)/gl/m4/mountlist.m4 \ + $(top_srcdir)/gl/m4/netinet_in_h.m4 $(top_srcdir)/gl/m4/nls.m4 \ + $(top_srcdir)/gl/m4/onceonly_2_57.m4 $(top_srcdir)/gl/m4/po.m4 \ + $(top_srcdir)/gl/m4/progtest.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/size_max.m4 \ + $(top_srcdir)/gl/m4/snprintf.m4 $(top_srcdir)/gl/m4/socklen.m4 \ + $(top_srcdir)/gl/m4/sockpfaf.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \ + $(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stdint.m4 \ + $(top_srcdir)/gl/m4/stdint_h.m4 $(top_srcdir)/gl/m4/strcase.m4 \ + $(top_srcdir)/gl/m4/strdup.m4 $(top_srcdir)/gl/m4/strndup.m4 \ + $(top_srcdir)/gl/m4/strnlen.m4 \ + $(top_srcdir)/gl/m4/sys_socket_h.m4 \ + $(top_srcdir)/gl/m4/ulonglong.m4 \ + $(top_srcdir)/gl/m4/unistd-safer.m4 \ + $(top_srcdir)/gl/m4/unistd_h.m4 \ + $(top_srcdir)/gl/m4/vasnprintf.m4 \ + $(top_srcdir)/gl/m4/vasprintf.m4 \ + $(top_srcdir)/gl/m4/vsnprintf.m4 $(top_srcdir)/gl/m4/wchar.m4 \ + $(top_srcdir)/gl/m4/wchar_t.m4 $(top_srcdir)/gl/m4/wctype.m4 \ + $(top_srcdir)/gl/m4/wcwidth.m4 $(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) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +libgnu_a_AR = $(AR) $(ARFLAGS) +am__DEPENDENCIES_1 = +am_libgnu_a_OBJECTS = full-read.$(OBJEXT) full-write.$(OBJEXT) \ + strnlen1.$(OBJEXT) xalloc-die.$(OBJEXT) xstrndup.$(OBJEXT) +libgnu_a_OBJECTS = $(am_libgnu_a_OBJECTS) +LTLIBRARIES = $(noinst_LTLIBRARIES) +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(libgnu_a_SOURCES) $(EXTRA_libgnu_a_SOURCES) +DIST_SOURCES = $(libgnu_a_SOURCES) $(EXTRA_libgnu_a_SOURCES) +HEADERS = $(noinst_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +INSTALL = @INSTALL@ +ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@ +ABSOLUTE_UNISTD_H = @ABSOLUTE_UNISTD_H@ +ABSOLUTE_WCHAR_H = @ABSOLUTE_WCHAR_H@ +ABSOLUTE_WCTYPE_H = @ABSOLUTE_WCTYPE_H@ +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +ALLOCA_H = @ALLOCA_H@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +ARPA_INET_H = @ARPA_INET_H@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASENAME = @BASENAME@ +BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ +BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ +BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ +BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ +BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DEPLIBS = @DEPLIBS@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EOVERFLOW = @EOVERFLOW@ +EXEEXT = @EXEEXT@ +EXTRAS = @EXTRAS@ +EXTRAS_ROOT = @EXTRAS_ROOT@ +EXTRA_NETOBJS = @EXTRA_NETOBJS@ +EXTRA_TEST = @EXTRA_TEST@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GETLOADAVG_LIBS = @GETLOADAVG_LIBS@ +GETOPT_H = @GETOPT_H@ +GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@ +GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ +HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ +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_STDINT_H = @HAVE_STDINT_H@ +HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ +HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ +HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ +HAVE_WINT_T = @HAVE_WINT_T@ +HAVE__BOOL = @HAVE__BOOL@ +HOSTNAME = @HOSTNAME@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +KMEM_GROUP = @KMEM_GROUP@ +KRBINCLUDE = @KRBINCLUDE@ +LDAPINCLUDE = @LDAPINCLUDE@ +LDAPLIBS = @LDAPLIBS@ +LDFLAGS = @LDFLAGS@ +LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ +LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MATHLIBS = @MATHLIBS@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +MYSQLCFLAGS = @MYSQLCFLAGS@ +MYSQLINCLUDE = @MYSQLINCLUDE@ +MYSQLLIBS = @MYSQLLIBS@ +NEED_SETGID = @NEED_SETGID@ +NETINET_IN_H = @NETINET_IN_H@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PATH_TO_APTGET = @PATH_TO_APTGET@ +PATH_TO_DIG = @PATH_TO_DIG@ +PATH_TO_FPING = @PATH_TO_FPING@ +PATH_TO_LMSTAT = @PATH_TO_LMSTAT@ +PATH_TO_LSPS = @PATH_TO_LSPS@ +PATH_TO_MAILQ = @PATH_TO_MAILQ@ +PATH_TO_NSLOOKUP = @PATH_TO_NSLOOKUP@ +PATH_TO_PING = @PATH_TO_PING@ +PATH_TO_PING6 = @PATH_TO_PING6@ +PATH_TO_PS = @PATH_TO_PS@ +PATH_TO_QMAIL_QSTAT = @PATH_TO_QMAIL_QSTAT@ +PATH_TO_QSTAT = @PATH_TO_QSTAT@ +PATH_TO_QUAKESTAT = @PATH_TO_QUAKESTAT@ +PATH_TO_RPCINFO = @PATH_TO_RPCINFO@ +PATH_TO_SMBCLIENT = @PATH_TO_SMBCLIENT@ +PATH_TO_SNMPGET = @PATH_TO_SNMPGET@ +PATH_TO_SNMPGETNEXT = @PATH_TO_SNMPGETNEXT@ +PATH_TO_SSH = @PATH_TO_SSH@ +PATH_TO_SWAP = @PATH_TO_SWAP@ +PATH_TO_SWAPINFO = @PATH_TO_SWAPINFO@ +PATH_TO_UPTIME = @PATH_TO_UPTIME@ +PATH_TO_WHO = @PATH_TO_WHO@ +PERL = @PERL@ +PGINCLUDE = @PGINCLUDE@ +PGLIBS = @PGLIBS@ +PKG_ARCH = @PKG_ARCH@ +PLUGIN_TEST = @PLUGIN_TEST@ +POSUB = @POSUB@ +POW_LIB = @POW_LIB@ +PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ +PYTHON = @PYTHON@ +RADIUSLIBS = @RADIUSLIBS@ +RANLIB = @RANLIB@ +RELEASE = @RELEASE@ +REV_DATESTAMP = @REV_DATESTAMP@ +REV_TIMESTAMP = @REV_TIMESTAMP@ +SCRIPT_TEST = @SCRIPT_TEST@ +SET_MAKE = @SET_MAKE@ +SH = @SH@ +SHELL = @SHELL@ +SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ +SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ +SOCKETLIBS = @SOCKETLIBS@ +SSLINCLUDE = @SSLINCLUDE@ +SSLLIBS = @SSLLIBS@ +STDBOOL_H = @STDBOOL_H@ +STDINT_H = @STDINT_H@ +STRIP = @STRIP@ +SUPPORT = @SUPPORT@ +SYS_SOCKET_H = @SYS_SOCKET_H@ +UNISTD_H = @UNISTD_H@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +WARRANTY = @WARRANTY@ +WCHAR_H = @WCHAR_H@ +WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WCTYPE_H = @WCTYPE_H@ +WINT_T_SUFFIX = @WINT_T_SUFFIX@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +check_tcp_ssl = @check_tcp_ssl@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +gl_LIBOBJS = @gl_LIBOBJS@ +gl_LTLIBOBJS = @gl_LTLIBOBJS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +np_mysql_config = @np_mysql_config@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +with_trusted_path = @with_trusted_path@ +AUTOMAKE_OPTIONS = 1.5 gnits +noinst_HEADERS = +noinst_LIBRARIES = libgnu.a +noinst_LTLIBRARIES = +EXTRA_DIST = alloca.c alloca_.h c-strtod.c c-strtod.h cloexec.c \ + cloexec.h basename.c dirname.c dirname.h stripslash.c error.c \ + error.h exitfail.c exitfail.h creat-safer.c fcntl--.h \ + fcntl-safer.h open-safer.c fsusage.c fsusage.h gai_strerror.c \ + getaddrinfo.c getaddrinfo.h gethostname.c getloadavg.c \ + getopt.c getopt1.c getopt_.h getopt_int.h inet_ntop.c \ + inet_ntop.h intprops.h malloc.c mbchar.c mbchar.h memchr.c \ + mountlist.c mountlist.h regcomp.c regex.c regex.h \ + regex_internal.c regex_internal.h regexec.c safe-read.c \ + safe-read.h safe-write.c safe-write.h snprintf.c snprintf.h \ + stdbool_.h stdint_.h strcase.h strcasecmp.c strncasecmp.c \ + strdup.c strdup.h strndup.c strndup.h strnlen.c strnlen.h \ + socket_.h unistd_.h dup-safer.c fd-safer.c pipe-safer.c \ + unistd--.h unistd-safer.h asnprintf.c printf-args.c \ + printf-args.h printf-parse.c printf-parse.h vasnprintf.c \ + vasnprintf.h asprintf.c vasprintf.c vasprintf.h vsnprintf.c \ + vsnprintf.h wchar_.h wctype_.h xalloc.h xmalloc.c +BUILT_SOURCES = $(ALLOCA_H) $(ARPA_INET_H) $(GETOPT_H) $(NETINET_IN_H) \ + $(STDBOOL_H) $(STDINT_H) $(SYS_SOCKET_H) $(UNISTD_H) \ + $(WCHAR_H) $(WCTYPE_H) +SUFFIXES = +MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t arpa/inet.h \ + arpa/inet.h-t getopt.h getopt.h-t netinet/in.h netinet/in.h-t \ + stdbool.h stdbool.h-t stdint.h stdint.h-t sys/socket.h \ + sys/socket.h-t unistd.h unistd.h-t wchar.h wchar.h-t wctype.h \ + wctype.h-t +MOSTLYCLEANDIRS = arpa netinet sys +CLEANFILES = +DISTCLEANFILES = +MAINTAINERCLEANFILES = + +# This is for those projects which use "gettextize --intl" to put a source-code +# copy of libintl into their package. In such projects, every Makefile.am needs +# -I$(top_builddir)/intl, so that can be found in this directory. +# For the Makefile.ams in other directories it is the maintainer's +# responsibility; for the one from gnulib we do it here. +# This option has no effect when the user disables NLS (because then the intl +# directory contains no libintl.h file) or when the project does not use +# "gettextize --intl". +AM_CPPFLAGS = -I$(top_builddir)/intl +libgnu_a_SOURCES = exit.h full-read.h full-read.c full-write.h \ + full-write.c gettext.h mbuiter.h minmax.h size_max.h \ + strnlen1.h strnlen1.c wcwidth.h xalloc-die.c xsize.h \ + xstrndup.h xstrndup.c +libgnu_a_LIBADD = $(gl_LIBOBJS) @ALLOCA@ +libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) @ALLOCA@ +EXTRA_libgnu_a_SOURCES = alloca.c c-strtod.c cloexec.c basename.c \ + dirname.c stripslash.c error.c exitfail.c creat-safer.c \ + open-safer.c fsusage.c gai_strerror.c getaddrinfo.c \ + gethostname.c getloadavg.c getopt.c getopt1.c inet_ntop.c \ + malloc.c mbchar.c memchr.c mountlist.c regcomp.c regex.c \ + regex_internal.c regexec.c safe-read.c safe-write.c snprintf.c \ + strcasecmp.c strncasecmp.c strdup.c strndup.c strnlen.c \ + dup-safer.c fd-safer.c pipe-safer.c asnprintf.c printf-args.c \ + printf-parse.c vasnprintf.c asprintf.c vasprintf.c vsnprintf.c \ + xmalloc.c +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits gl/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnits gl/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +libgnu.a: $(libgnu_a_OBJECTS) $(libgnu_a_DEPENDENCIES) + -rm -f libgnu.a + $(libgnu_a_AR) libgnu.a $(libgnu_a_OBJECTS) $(libgnu_a_LIBADD) + $(RANLIB) libgnu.a + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/alloca.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloca.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asnprintf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asprintf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strtod.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cloexec.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/creat-safer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup-safer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exitfail.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-safer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsusage.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/full-read.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/full-write.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gai_strerror.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getaddrinfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gethostname.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getloadavg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet_ntop.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbchar.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memchr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mountlist.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open-safer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe-safer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-args.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-parse.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regcomp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex_internal.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexec.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/safe-read.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/safe-write.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snprintf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasecmp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strdup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stripslash.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strncasecmp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strndup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vasnprintf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vasprintf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsnprintf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xalloc-die.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrndup.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: + +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; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + 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; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + 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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) +installdirs: +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +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 +mostlyclean-generic: + -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf $(DEPDIR) ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf $(DEPDIR) ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool mostlyclean-local + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am install-info \ + install-info-am install-man install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \ + pdf-am ps ps-am tags uninstall uninstall-am uninstall-info-am + + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +alloca.h: alloca_.h + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + cat $(srcdir)/alloca_.h; \ + } > $@-t + mv -f $@-t $@ + +# We need the following in order to create when the system +# doesn't have one. +arpa/inet.h: + test -d arpa || mkdir arpa + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + echo '#include '; \ + } > $@-t + mv $@-t $@ + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +getopt.h: getopt_.h + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + cat $(srcdir)/getopt_.h; \ + } > $@-t + mv -f $@-t $@ + +# We need the following in order to create when the system +# doesn't have one. +netinet/in.h: + test -d netinet || mkdir netinet + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + echo '#include '; \ + } > $@-t + mv $@-t $@ + +# We need the following in order to create when the system +# doesn't have one that works. +stdbool.h: stdbool_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool_.h; \ + } > $@-t + mv $@-t $@ + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +stdint.h: stdint_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ + -e 's|@''ABSOLUTE_STDINT_H''@|$(ABSOLUTE_STDINT_H)|g' \ + -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \ + -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ + -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ + -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ + -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ + -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ + -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ + -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ + -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ + -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \ + -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \ + -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \ + -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \ + -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \ + -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \ + -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \ + -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ + -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ + -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ + < $(srcdir)/stdint_.h; \ + } > $@-t + mv $@-t $@ + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +sys/socket.h: socket_.h + @MKDIR_P@ sys + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + cat $(srcdir)/socket_.h; \ + } > $@-t + mv -f $@-t $@ + +# We need the following in order to create an empty placeholder for +# when the system doesn't have one. +unistd.h: unistd_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''ABSOLUTE_UNISTD_H''@|$(ABSOLUTE_UNISTD_H)|g' \ + < $(srcdir)/unistd_.h; \ + } > $@-t + mv $@-t $@ + +# We need the following in order to create when the system +# version does not work standalone. +wchar.h: wchar_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''ABSOLUTE_WCHAR_H''@|$(ABSOLUTE_WCHAR_H)|g' \ + < $(srcdir)/wchar_.h; \ + } > $@-t + mv $@-t $@ + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +wctype.h: wctype_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \ + -e 's|@''ABSOLUTE_WCTYPE_H''@|$(ABSOLUTE_WCTYPE_H)|g' \ + -e 's/@''HAVE_WCTYPE_CTMP_BUG''@/$(HAVE_WCTYPE_CTMP_BUG)/g' \ + -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \ + < $(srcdir)/wctype_.h; \ + } > $@-t + mv $@-t $@ + +mostlyclean-local: mostlyclean-generic + @for dir in '' $(MOSTLYCLEANDIRS); do \ + if test -n "$$dir" && test -d $$dir; then \ + echo "rmdir $$dir"; rmdir $$dir; \ + fi; \ + done +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/gl/alloca.c b/gl/alloca.c new file mode 100644 index 0000000..3a1f4e2 --- /dev/null +++ b/gl/alloca.c @@ -0,0 +1,489 @@ +/* alloca.c -- allocate automatically reclaimed memory + (Mostly) portable public-domain implementation -- D A Gwyn + + This implementation of the PWB library alloca function, + which is used to allocate space off the run-time stack so + that it is automatically reclaimed upon procedure exit, + was inspired by discussions with J. Q. Johnson of Cornell. + J.Otto Tennant contributed the Cray support. + + There are some preprocessor constants that can + be defined when compiling for your specific system, for + improved efficiency; however, the defaults should be okay. + + The general concept of this implementation is to keep + track of all alloca-allocated blocks, and reclaim any + that are found to be deeper in the stack than the current + invocation. This heuristic does not reclaim storage as + soon as it becomes invalid, but it will do so eventually. + + As a special case, alloca(0) reclaims storage without + allocating any. It is a good idea to use alloca(0) in + your main control loop, etc. to force garbage collection. */ + +#include + +#include + +#include +#include + +#ifdef emacs +# include "lisp.h" +# include "blockinput.h" +# ifdef EMACS_FREE +# undef free +# define free EMACS_FREE +# endif +#else +# define memory_full() abort () +#endif + +/* If compiling with GCC 2, this file's not needed. */ +#if !defined (__GNUC__) || __GNUC__ < 2 + +/* If someone has defined alloca as a macro, + there must be some other way alloca is supposed to work. */ +# ifndef alloca + +# ifdef emacs +# ifdef static +/* actually, only want this if static is defined as "" + -- this is for usg, in which emacs must undefine static + in order to make unexec workable + */ +# ifndef STACK_DIRECTION +you +lose +-- must know STACK_DIRECTION at compile-time +/* Using #error here is not wise since this file should work for + old and obscure compilers. */ +# endif /* STACK_DIRECTION undefined */ +# endif /* static */ +# endif /* emacs */ + +/* If your stack is a linked list of frames, you have to + provide an "address metric" ADDRESS_FUNCTION macro. */ + +# if defined (CRAY) && defined (CRAY_STACKSEG_END) +long i00afunc (); +# define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg)) +# else +# define ADDRESS_FUNCTION(arg) &(arg) +# endif + +/* Define STACK_DIRECTION if you know the direction of stack + growth for your system; otherwise it will be automatically + deduced at run-time. + + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ + +# ifndef STACK_DIRECTION +# define STACK_DIRECTION 0 /* Direction unknown. */ +# endif + +# if STACK_DIRECTION != 0 + +# define STACK_DIR STACK_DIRECTION /* Known at compile-time. */ + +# else /* STACK_DIRECTION == 0; need run-time code. */ + +static int stack_dir; /* 1 or -1 once known. */ +# define STACK_DIR stack_dir + +static void +find_stack_direction (void) +{ + static char *addr = NULL; /* Address of first `dummy', once known. */ + auto char dummy; /* To get stack address. */ + + if (addr == NULL) + { /* Initial entry. */ + addr = ADDRESS_FUNCTION (dummy); + + find_stack_direction (); /* Recurse once. */ + } + else + { + /* Second entry. */ + if (ADDRESS_FUNCTION (dummy) > addr) + stack_dir = 1; /* Stack grew upward. */ + else + stack_dir = -1; /* Stack grew downward. */ + } +} + +# endif /* STACK_DIRECTION == 0 */ + +/* An "alloca header" is used to: + (a) chain together all alloca'ed blocks; + (b) keep track of stack depth. + + It is very important that sizeof(header) agree with malloc + alignment chunk size. The following default should work okay. */ + +# ifndef ALIGN_SIZE +# define ALIGN_SIZE sizeof(double) +# endif + +typedef union hdr +{ + char align[ALIGN_SIZE]; /* To force sizeof(header). */ + struct + { + union hdr *next; /* For chaining headers. */ + char *deep; /* For stack depth measure. */ + } h; +} header; + +static header *last_alloca_header = NULL; /* -> last alloca header. */ + +/* Return a pointer to at least SIZE bytes of storage, + which will be automatically reclaimed upon exit from + the procedure that called alloca. Originally, this space + was supposed to be taken from the current stack frame of the + caller, but that method cannot be made to work for some + implementations of C, for example under Gould's UTX/32. */ + +void * +alloca (size_t size) +{ + auto char probe; /* Probes stack depth: */ + register char *depth = ADDRESS_FUNCTION (probe); + +# if STACK_DIRECTION == 0 + if (STACK_DIR == 0) /* Unknown growth direction. */ + find_stack_direction (); +# endif + + /* Reclaim garbage, defined as all alloca'd storage that + was allocated from deeper in the stack than currently. */ + + { + register header *hp; /* Traverses linked list. */ + +# ifdef emacs + BLOCK_INPUT; +# endif + + for (hp = last_alloca_header; hp != NULL;) + if ((STACK_DIR > 0 && hp->h.deep > depth) + || (STACK_DIR < 0 && hp->h.deep < depth)) + { + register header *np = hp->h.next; + + free (hp); /* Collect garbage. */ + + hp = np; /* -> next header. */ + } + else + break; /* Rest are not deeper. */ + + last_alloca_header = hp; /* -> last valid storage. */ + +# ifdef emacs + UNBLOCK_INPUT; +# endif + } + + if (size == 0) + return NULL; /* No allocation required. */ + + /* Allocate combined header + user data storage. */ + + { + /* Address of header. */ + register header *new; + + size_t combined_size = sizeof (header) + size; + if (combined_size < sizeof (header)) + memory_full (); + + new = malloc (combined_size); + + if (! new) + memory_full (); + + new->h.next = last_alloca_header; + new->h.deep = depth; + + last_alloca_header = new; + + /* User storage begins just after header. */ + + return (void *) (new + 1); + } +} + +# if defined (CRAY) && defined (CRAY_STACKSEG_END) + +# ifdef DEBUG_I00AFUNC +# include +# endif + +# ifndef CRAY_STACK +# define CRAY_STACK +# ifndef CRAY2 +/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */ +struct stack_control_header + { + long shgrow:32; /* Number of times stack has grown. */ + long shaseg:32; /* Size of increments to stack. */ + long shhwm:32; /* High water mark of stack. */ + long shsize:32; /* Current size of stack (all segments). */ + }; + +/* The stack segment linkage control information occurs at + the high-address end of a stack segment. (The stack + grows from low addresses to high addresses.) The initial + part of the stack segment linkage control information is + 0200 (octal) words. This provides for register storage + for the routine which overflows the stack. */ + +struct stack_segment_linkage + { + long ss[0200]; /* 0200 overflow words. */ + long sssize:32; /* Number of words in this segment. */ + long ssbase:32; /* Offset to stack base. */ + long:32; + long sspseg:32; /* Offset to linkage control of previous + segment of stack. */ + long:32; + long sstcpt:32; /* Pointer to task common address block. */ + long sscsnm; /* Private control structure number for + microtasking. */ + long ssusr1; /* Reserved for user. */ + long ssusr2; /* Reserved for user. */ + long sstpid; /* Process ID for pid based multi-tasking. */ + long ssgvup; /* Pointer to multitasking thread giveup. */ + long sscray[7]; /* Reserved for Cray Research. */ + long ssa0; + long ssa1; + long ssa2; + long ssa3; + long ssa4; + long ssa5; + long ssa6; + long ssa7; + long sss0; + long sss1; + long sss2; + long sss3; + long sss4; + long sss5; + long sss6; + long sss7; + }; + +# else /* CRAY2 */ +/* The following structure defines the vector of words + returned by the STKSTAT library routine. */ +struct stk_stat + { + long now; /* Current total stack size. */ + long maxc; /* Amount of contiguous space which would + be required to satisfy the maximum + stack demand to date. */ + long high_water; /* Stack high-water mark. */ + long overflows; /* Number of stack overflow ($STKOFEN) calls. */ + long hits; /* Number of internal buffer hits. */ + long extends; /* Number of block extensions. */ + long stko_mallocs; /* Block allocations by $STKOFEN. */ + long underflows; /* Number of stack underflow calls ($STKRETN). */ + long stko_free; /* Number of deallocations by $STKRETN. */ + long stkm_free; /* Number of deallocations by $STKMRET. */ + long segments; /* Current number of stack segments. */ + long maxs; /* Maximum number of stack segments so far. */ + long pad_size; /* Stack pad size. */ + long current_address; /* Current stack segment address. */ + long current_size; /* Current stack segment size. This + number is actually corrupted by STKSTAT to + include the fifteen word trailer area. */ + long initial_address; /* Address of initial segment. */ + long initial_size; /* Size of initial segment. */ + }; + +/* The following structure describes the data structure which trails + any stack segment. I think that the description in 'asdef' is + out of date. I only describe the parts that I am sure about. */ + +struct stk_trailer + { + long this_address; /* Address of this block. */ + long this_size; /* Size of this block (does not include + this trailer). */ + long unknown2; + long unknown3; + long link; /* Address of trailer block of previous + segment. */ + long unknown5; + long unknown6; + long unknown7; + long unknown8; + long unknown9; + long unknown10; + long unknown11; + long unknown12; + long unknown13; + long unknown14; + }; + +# endif /* CRAY2 */ +# endif /* not CRAY_STACK */ + +# ifdef CRAY2 +/* Determine a "stack measure" for an arbitrary ADDRESS. + I doubt that "lint" will like this much. */ + +static long +i00afunc (long *address) +{ + struct stk_stat status; + struct stk_trailer *trailer; + long *block, size; + long result = 0; + + /* We want to iterate through all of the segments. The first + step is to get the stack status structure. We could do this + more quickly and more directly, perhaps, by referencing the + $LM00 common block, but I know that this works. */ + + STKSTAT (&status); + + /* Set up the iteration. */ + + trailer = (struct stk_trailer *) (status.current_address + + status.current_size + - 15); + + /* There must be at least one stack segment. Therefore it is + a fatal error if "trailer" is null. */ + + if (trailer == 0) + abort (); + + /* Discard segments that do not contain our argument address. */ + + while (trailer != 0) + { + block = (long *) trailer->this_address; + size = trailer->this_size; + if (block == 0 || size == 0) + abort (); + trailer = (struct stk_trailer *) trailer->link; + if ((block <= address) && (address < (block + size))) + break; + } + + /* Set the result to the offset in this segment and add the sizes + of all predecessor segments. */ + + result = address - block; + + if (trailer == 0) + { + return result; + } + + do + { + if (trailer->this_size <= 0) + abort (); + result += trailer->this_size; + trailer = (struct stk_trailer *) trailer->link; + } + while (trailer != 0); + + /* We are done. Note that if you present a bogus address (one + not in any segment), you will get a different number back, formed + from subtracting the address of the first block. This is probably + not what you want. */ + + return (result); +} + +# else /* not CRAY2 */ +/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP. + Determine the number of the cell within the stack, + given the address of the cell. The purpose of this + routine is to linearize, in some sense, stack addresses + for alloca. */ + +static long +i00afunc (long address) +{ + long stkl = 0; + + long size, pseg, this_segment, stack; + long result = 0; + + struct stack_segment_linkage *ssptr; + + /* Register B67 contains the address of the end of the + current stack segment. If you (as a subprogram) store + your registers on the stack and find that you are past + the contents of B67, you have overflowed the segment. + + B67 also points to the stack segment linkage control + area, which is what we are really interested in. */ + + stkl = CRAY_STACKSEG_END (); + ssptr = (struct stack_segment_linkage *) stkl; + + /* If one subtracts 'size' from the end of the segment, + one has the address of the first word of the segment. + + If this is not the first segment, 'pseg' will be + nonzero. */ + + pseg = ssptr->sspseg; + size = ssptr->sssize; + + this_segment = stkl - size; + + /* It is possible that calling this routine itself caused + a stack overflow. Discard stack segments which do not + contain the target address. */ + + while (!(this_segment <= address && address <= stkl)) + { +# ifdef DEBUG_I00AFUNC + fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl); +# endif + if (pseg == 0) + break; + stkl = stkl - pseg; + ssptr = (struct stack_segment_linkage *) stkl; + size = ssptr->sssize; + pseg = ssptr->sspseg; + this_segment = stkl - size; + } + + result = address - this_segment; + + /* If you subtract pseg from the current end of the stack, + you get the address of the previous stack segment's end. + This seems a little convoluted to me, but I'll bet you save + a cycle somewhere. */ + + while (pseg != 0) + { +# ifdef DEBUG_I00AFUNC + fprintf (stderr, "%011o %011o\n", pseg, size); +# endif + stkl = stkl - pseg; + ssptr = (struct stack_segment_linkage *) stkl; + size = ssptr->sssize; + pseg = ssptr->sspseg; + result += size; + } + return (result); +} + +# endif /* not CRAY2 */ +# endif /* CRAY */ + +# endif /* no alloca */ +#endif /* not GCC version 2 */ diff --git a/gl/alloca_.h b/gl/alloca_.h new file mode 100644 index 0000000..dd0b3e9 --- /dev/null +++ b/gl/alloca_.h @@ -0,0 +1,54 @@ +/* Memory allocation on the stack. + + Copyright (C) 1995, 1999, 2001, 2002, 2003, 2004, 2006 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, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + USA. */ + +/* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H + means there is a real alloca function. */ +#ifndef _GNULIB_ALLOCA_H +# define _GNULIB_ALLOCA_H + +/* alloca (N) returns a pointer to N bytes of memory + allocated on the stack, which will last until the function returns. + Use of alloca should be avoided: + - inside arguments of function calls - undefined behaviour, + - in inline functions - the allocation may actually last until the + calling function returns, + - for huge N (say, N >= 65536) - you never know how large (or small) + the stack is, and when the stack cannot fulfill the memory allocation + request, the program just crashes. + */ + +#ifndef alloca +# ifdef __GNUC__ +# define alloca __builtin_alloca +# elif defined _AIX +# define alloca __alloca +# elif defined _MSC_VER +# include +# define alloca _alloca +# else +# include +# ifdef __cplusplus +extern "C" +# endif +void *alloca (size_t); +# endif +#endif + +#endif /* _GNULIB_ALLOCA_H */ diff --git a/gl/asnprintf.c b/gl/asnprintf.c new file mode 100644 index 0000000..26c3988 --- /dev/null +++ b/gl/asnprintf.c @@ -0,0 +1,35 @@ +/* Formatted output to strings. + Copyright (C) 1999, 2002, 2006 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#include + +/* Specification. */ +#include "vasnprintf.h" + +#include + +char * +asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) +{ + va_list args; + char *result; + + va_start (args, format); + result = vasnprintf (resultbuf, lengthp, format, args); + va_end (args); + return result; +} diff --git a/gl/asprintf.c b/gl/asprintf.c new file mode 100644 index 0000000..29ac6cf --- /dev/null +++ b/gl/asprintf.c @@ -0,0 +1,35 @@ +/* Formatted output to strings. + Copyright (C) 1999, 2002, 2006 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#include + +/* Specification. */ +#include "vasprintf.h" + +#include + +int +asprintf (char **resultp, const char *format, ...) +{ + va_list args; + int result; + + va_start (args, format); + result = vasprintf (resultp, format, args); + va_end (args); + return result; +} diff --git a/gl/basename.c b/gl/basename.c new file mode 100644 index 0000000..fbe17ff --- /dev/null +++ b/gl/basename.c @@ -0,0 +1,129 @@ +/* basename.c -- return the last element in a file name + + Copyright (C) 1990, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#include + +#include "dirname.h" + +#include +#include "xalloc.h" +#include "xstrndup.h" + +/* Return the address of the last file name component of NAME. If + NAME has no relative file name components because it is a file + system root, return the empty string. */ + +char * +last_component (char const *name) +{ + char const *base = name + FILE_SYSTEM_PREFIX_LEN (name); + char const *p; + bool saw_slash = false; + + while (ISSLASH (*base)) + base++; + + for (p = base; *p; p++) + { + if (ISSLASH (*p)) + saw_slash = true; + else if (saw_slash) + { + base = p; + saw_slash = false; + } + } + + return (char *) base; +} + + +/* In general, we can't use the builtin `basename' function if available, + since it has different meanings in different environments. + In some environments the builtin `basename' modifies its argument. + + Return the last file name component of NAME, allocated with + xmalloc. On systems with drive letters, a leading "./" + distinguishes relative names that would otherwise look like a drive + letter. Unlike POSIX basename(), NAME cannot be NULL, + base_name("") returns "", and the first trailing slash is not + stripped. + + If lstat (NAME) would succeed, then { chdir (dir_name (NAME)); + lstat (base_name (NAME)); } will access the same file. Likewise, + if the sequence { chdir (dir_name (NAME)); + rename (base_name (NAME), "foo"); } succeeds, you have renamed NAME + to "foo" in the same directory NAME was in. */ + +char * +base_name (char const *name) +{ + char const *base = last_component (name); + size_t length; + + /* If there is no last component, then name is a file system root or the + empty string. */ + if (! *base) + return xstrndup (name, base_len (name)); + + /* Collapse a sequence of trailing slashes into one. */ + length = base_len (base); + if (ISSLASH (base[length])) + length++; + + /* On systems with drive letters, `a/b:c' must return `./b:c' rather + than `b:c' to avoid confusion with a drive letter. On systems + with pure POSIX semantics, this is not an issue. */ + if (FILE_SYSTEM_PREFIX_LEN (base)) + { + char *p = xmalloc (length + 3); + p[0] = '.'; + p[1] = '/'; + memcpy (p + 2, base, length); + p[length + 2] = '\0'; + return p; + } + + /* Finally, copy the basename. */ + return xstrndup (base, length); +} + +/* Return the length of the basename NAME. Typically NAME is the + value returned by base_name or last_component. Act like strlen + (NAME), except omit all trailing slashes. */ + +size_t +base_len (char const *name) +{ + size_t len; + size_t prefix_len = FILE_SYSTEM_PREFIX_LEN (name); + + for (len = strlen (name); 1 < len && ISSLASH (name[len - 1]); len--) + continue; + + if (DOUBLE_SLASH_IS_DISTINCT_ROOT && len == 1 + && ISSLASH (name[0]) && ISSLASH (name[1]) && ! name[2]) + return 2; + + if (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE && prefix_len + && len == prefix_len && ISSLASH (name[prefix_len])) + return prefix_len + 1; + + return len; +} diff --git a/lib/c-strtod.c b/gl/c-strtod.c similarity index 94% rename from lib/c-strtod.c rename to gl/c-strtod.c index 031f5f8..2234ed0 100644 --- a/lib/c-strtod.c +++ b/gl/c-strtod.c @@ -1,6 +1,6 @@ /* Convert string to double, using the C locale. - Copyright (C) 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2006 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 @@ -18,9 +18,7 @@ /* Written by Paul Eggert. */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include #include "c-strtod.h" diff --git a/lib/c-strtod.h b/gl/c-strtod.h similarity index 100% rename from lib/c-strtod.h rename to gl/c-strtod.h diff --git a/lib/cloexec.c b/gl/cloexec.c similarity index 92% rename from lib/cloexec.c rename to gl/cloexec.c index cf2308c..6480006 100644 --- a/lib/cloexec.c +++ b/gl/cloexec.c @@ -1,5 +1,6 @@ /* closexec.c - set or clear the close-on-exec descriptor flag - Copyright (C) 1991, 2004, 2005 Free Software Foundation, Inc. + + Copyright (C) 1991, 2004, 2005, 2006 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 @@ -17,9 +18,7 @@ The code is taken from glibc/manual/llio.texi */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include #include "cloexec.h" diff --git a/lib/cloexec.h b/gl/cloexec.h similarity index 100% rename from lib/cloexec.h rename to gl/cloexec.h diff --git a/lib/creat-safer.c b/gl/creat-safer.c similarity index 90% rename from lib/creat-safer.c rename to gl/creat-safer.c index 4588de3..f4a2e59 100644 --- a/lib/creat-safer.c +++ b/gl/creat-safer.c @@ -1,5 +1,6 @@ /* Invoke creat, but avoid some glitches. - Copyright (C) 2005 Free Software Foundation, Inc. + + Copyright (C) 2005, 2006 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 @@ -17,9 +18,7 @@ /* Written by Jim Meyering. */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include #include "fcntl-safer.h" diff --git a/gl/dirname.c b/gl/dirname.c new file mode 100644 index 0000000..16552c6 --- /dev/null +++ b/gl/dirname.c @@ -0,0 +1,85 @@ +/* dirname.c -- return all but the last element in a file name + + Copyright (C) 1990, 1998, 2000, 2001, 2003, 2004, 2005, 2006 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#include + +#include "dirname.h" + +#include +#include "xalloc.h" + +/* Return the length of the prefix of FILE that will be used by + dir_name. If FILE is in the working directory, this returns zero + even though `dir_name (FILE)' will return ".". Works properly even + if there are trailing slashes (by effectively ignoring them). */ + +size_t +dir_len (char const *file) +{ + size_t prefix_length = FILE_SYSTEM_PREFIX_LEN (file); + size_t length; + + /* Advance prefix_length beyond important leading slashes. */ + prefix_length += (prefix_length != 0 + ? (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE + && ISSLASH (file[prefix_length])) + : (ISSLASH (file[0]) + ? ((DOUBLE_SLASH_IS_DISTINCT_ROOT + && ISSLASH (file[1]) && ! ISSLASH (file[2]) + ? 2 : 1)) + : 0)); + + /* Strip the basename and any redundant slashes before it. */ + for (length = last_component (file) - file; + prefix_length < length; length--) + if (! ISSLASH (file[length - 1])) + break; + return length; +} + + +/* In general, we can't use the builtin `dirname' function if available, + since it has different meanings in different environments. + In some environments the builtin `dirname' modifies its argument. + + Return the leading directories part of FILE, allocated with xmalloc. + Works properly even if there are trailing slashes (by effectively + ignoring them). Unlike POSIX dirname(), FILE cannot be NULL. + + If lstat (FILE) would succeed, then { chdir (dir_name (FILE)); + lstat (base_name (FILE)); } will access the same file. Likewise, + if the sequence { chdir (dir_name (FILE)); + rename (base_name (FILE), "foo"); } succeeds, you have renamed FILE + to "foo" in the same directory FILE was in. */ + +char * +dir_name (char const *file) +{ + size_t length = dir_len (file); + bool append_dot = (length == 0 + || (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE + && length == FILE_SYSTEM_PREFIX_LEN (file) + && file[2] != '\0' && ! ISSLASH (file[2]))); + char *dir = xmalloc (length + append_dot + 1); + memcpy (dir, file, length); + if (append_dot) + dir[length++] = '.'; + dir[length] = '\0'; + return dir; +} diff --git a/lib/dirname.h b/gl/dirname.h similarity index 57% rename from lib/dirname.h rename to gl/dirname.h index 1688ae8..91e7ed3 100644 --- a/lib/dirname.h +++ b/gl/dirname.h @@ -1,6 +1,6 @@ /* Take file names apart into directory and base names. - Copyright (C) 1998, 2001, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1998, 2001, 2003-2006 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 @@ -31,16 +31,39 @@ # endif # ifndef FILE_SYSTEM_PREFIX_LEN -# define FILE_SYSTEM_PREFIX_LEN(File_name) 0 +# if FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX + /* This internal macro assumes ASCII, but all hosts that support drive + letters use ASCII. */ +# define _IS_DRIVE_LETTER(c) (((unsigned int) (c) | ('a' - 'A')) - 'a' \ + <= 'z' - 'a') +# define FILE_SYSTEM_PREFIX_LEN(Filename) \ + (_IS_DRIVE_LETTER ((Filename)[0]) && (Filename)[1] == ':' ? 2 : 0) +# else +# define FILE_SYSTEM_PREFIX_LEN(Filename) 0 +# endif # endif -# define IS_ABSOLUTE_FILE_NAME(F) ISSLASH ((F)[FILE_SYSTEM_PREFIX_LEN (F)]) +# ifndef FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE +# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0 +# endif + +# ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT +# define DOUBLE_SLASH_IS_DISTINCT_ROOT 0 +# endif + +# if FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE +# define IS_ABSOLUTE_FILE_NAME(F) ISSLASH ((F)[FILE_SYSTEM_PREFIX_LEN (F)]) +# else +# define IS_ABSOLUTE_FILE_NAME(F) \ + (ISSLASH ((F)[0]) || 0 < FILE_SYSTEM_PREFIX_LEN (F)) +# endif # define IS_RELATIVE_FILE_NAME(F) (! IS_ABSOLUTE_FILE_NAME (F)) char *base_name (char const *file); char *dir_name (char const *file); size_t base_len (char const *file); size_t dir_len (char const *file); +char *last_component (char const *file); bool strip_trailing_slashes (char *file); diff --git a/lib/dup-safer.c b/gl/dup-safer.c similarity index 89% rename from lib/dup-safer.c rename to gl/dup-safer.c index 8cbee70..7b12b61 100644 --- a/lib/dup-safer.c +++ b/gl/dup-safer.c @@ -1,5 +1,6 @@ /* Invoke dup, but avoid some glitches. - Copyright (C) 2001, 2004, 2005 Free Software Foundation, Inc. + + Copyright (C) 2001, 2004, 2005, 2006 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 @@ -17,9 +18,7 @@ /* Written by Paul Eggert. */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include #include "unistd-safer.h" @@ -36,7 +35,7 @@ int dup_safer (int fd) { -#ifdef F_DUPFD +#if defined F_DUPFD && !defined FCHDIR_REPLACEMENT return fcntl (fd, F_DUPFD, STDERR_FILENO + 1); #else /* fd_safer calls us back, but eventually the recursion unwinds and diff --git a/lib/error.c b/gl/error.c similarity index 77% rename from lib/error.c rename to gl/error.c index 45698be..cf86343 100644 --- a/lib/error.c +++ b/gl/error.c @@ -1,5 +1,5 @@ /* Error handler for noninteractive utilities - Copyright (C) 1990-1998, 2000-2003, 2004 Free Software Foundation, Inc. + Copyright (C) 1990-1998, 2000-2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software; you can redistribute it and/or modify @@ -18,7 +18,7 @@ /* Written by David MacKenzie . */ -#ifdef HAVE_CONFIG_H +#if !_LIBC # include #endif @@ -34,6 +34,9 @@ #endif #ifdef _LIBC +# include +# include +# include # include # define mbsrtowcs __mbsrtowcs #endif @@ -59,6 +62,7 @@ unsigned int error_message_count; # define program_name program_invocation_name # include +# include # include /* In GNU libc we want do not want to use the common name `error' directly. @@ -88,23 +92,19 @@ extern void __error_at_line (int status, int errnum, const char *file_name, char *strerror_r (); # endif -# ifndef SIZE_MAX -# define SIZE_MAX ((size_t) -1) -# endif - /* The calling program should define program_name and set it to the name of the executing program. */ extern char *program_name; # if HAVE_STRERROR_R || defined strerror_r # define __strerror_r strerror_r -# endif +# endif /* HAVE_STRERROR_R || defined strerror_r */ #endif /* not _LIBC */ static void print_errno_message (int errnum) { - char const *s = NULL; + char const *s; #if defined HAVE_STRERROR_R || _LIBC char errbuf[1024]; @@ -113,23 +113,23 @@ print_errno_message (int errnum) # else if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0) s = errbuf; + else + s = 0; # endif +#else + s = strerror (errnum); #endif #if !_LIBC - if (! s && ! (s = strerror (errnum))) + if (! s) s = _("Unknown system error"); #endif #if _LIBC - if (_IO_fwide (stderr, 0) > 0) - { - __fwprintf (stderr, L": %s", s); - return; - } -#endif - + __fxprintf (NULL, ": %s", s); +#else fprintf (stderr, ": %s", s); +#endif } static void @@ -140,26 +140,65 @@ error_tail (int status, int errnum, const char *message, va_list args) { # define ALLOCA_LIMIT 2000 size_t len = strlen (message) + 1; - const wchar_t *wmessage = L"out of memory"; - wchar_t *wbuf = (len < ALLOCA_LIMIT - ? alloca (len * sizeof *wbuf) - : len <= SIZE_MAX / sizeof *wbuf - ? malloc (len * sizeof *wbuf) - : NULL); + wchar_t *wmessage = NULL; + mbstate_t st; + size_t res; + const char *tmp; + bool use_malloc = false; - if (wbuf) + while (1) { - size_t res; - mbstate_t st; - const char *tmp = message; + if (__libc_use_alloca (len * sizeof (wchar_t))) + wmessage = (wchar_t *) alloca (len * sizeof (wchar_t)); + else + { + if (!use_malloc) + wmessage = NULL; + + wchar_t *p = (wchar_t *) realloc (wmessage, + len * sizeof (wchar_t)); + if (p == NULL) + { + free (wmessage); + fputws_unlocked (L"out of memory\n", stderr); + return; + } + wmessage = p; + use_malloc = true; + } + memset (&st, '\0', sizeof (st)); - res = mbsrtowcs (wbuf, &tmp, len, &st); - wmessage = res == (size_t) -1 ? L"???" : wbuf; + tmp = message; + + res = mbsrtowcs (wmessage, &tmp, len, &st); + if (res != len) + break; + + if (__builtin_expect (len >= SIZE_MAX / 2, 0)) + { + /* This really should not happen if everything is fine. */ + res = (size_t) -1; + break; + } + + len *= 2; + } + + if (res == (size_t) -1) + { + /* The string cannot be converted. */ + if (use_malloc) + { + free (wmessage); + use_malloc = false; + } + wmessage = (wchar_t *) L"???"; } __vfwprintf (stderr, wmessage, args); - if (! (len < ALLOCA_LIMIT)) - free (wbuf); + + if (use_malloc) + free (wmessage); } else #endif @@ -170,11 +209,10 @@ error_tail (int status, int errnum, const char *message, va_list args) if (errnum) print_errno_message (errnum); #if _LIBC - if (_IO_fwide (stderr, 0) > 0) - putwc (L'\n', stderr); - else + __fxprintf (NULL, "\n"); +#else + putc ('\n', stderr); #endif - putc ('\n', stderr); fflush (stderr); if (status) exit (status); @@ -207,11 +245,10 @@ error (int status, int errnum, const char *message, ...) else { #if _LIBC - if (_IO_fwide (stderr, 0) > 0) - __fwprintf (stderr, L"%s: ", program_name); - else + __fxprintf (NULL, "%s: ", program_name); +#else + fprintf (stderr, "%s: ", program_name); #endif - fprintf (stderr, "%s: ", program_name); } va_start (args, message); @@ -267,22 +304,19 @@ error_at_line (int status, int errnum, const char *file_name, else { #if _LIBC - if (_IO_fwide (stderr, 0) > 0) - __fwprintf (stderr, L"%s: ", program_name); - else + __fxprintf (NULL, "%s:", program_name); +#else + fprintf (stderr, "%s:", program_name); #endif - fprintf (stderr, "%s:", program_name); } - if (file_name != NULL) - { #if _LIBC - if (_IO_fwide (stderr, 0) > 0) - __fwprintf (stderr, L"%s:%d: ", file_name, line_number); - else + __fxprintf (NULL, file_name != NULL ? "%s:%d: " : " ", + file_name, line_number); +#else + fprintf (stderr, file_name != NULL ? "%s:%d: " : " ", + file_name, line_number); #endif - fprintf (stderr, "%s:%d: ", file_name, line_number); - } va_start (args, message); error_tail (status, errnum, message, args); diff --git a/lib/error.h b/gl/error.h similarity index 93% rename from lib/error.h rename to gl/error.h index e5220a2..5a5f247 100644 --- a/lib/error.h +++ b/gl/error.h @@ -1,5 +1,5 @@ /* Declaration for error-reporting function - Copyright (C) 1995, 1996, 1997, 2003 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 2003, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software; you can redistribute it and/or modify @@ -21,7 +21,7 @@ #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ # define __attribute__(Spec) /* empty */ # endif /* The __-protected variants of `format' and `printf' attributes diff --git a/lib/exit.h b/gl/exit.h similarity index 92% rename from lib/exit.h rename to gl/exit.h index 9dbfb7c..e8f7738 100644 --- a/lib/exit.h +++ b/gl/exit.h @@ -21,7 +21,7 @@ /* Get exit() declaration. */ #include -/* Some systems do not define EXIT_*, even with STDC_HEADERS. */ +/* Some systems do not define EXIT_*, despite otherwise supporting C89. */ #ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 #endif diff --git a/lib/exitfail.c b/gl/exitfail.c similarity index 88% rename from lib/exitfail.c rename to gl/exitfail.c index 27d38c3..97abc67 100644 --- a/lib/exitfail.c +++ b/gl/exitfail.c @@ -1,6 +1,6 @@ /* Failure exit status - Copyright (C) 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2005, 2006 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 @@ -17,9 +17,7 @@ If not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include #include "exitfail.h" #include "exit.h" diff --git a/lib/exitfail.h b/gl/exitfail.h similarity index 100% rename from lib/exitfail.h rename to gl/exitfail.h diff --git a/lib/fcntl--.h b/gl/fcntl--.h similarity index 100% rename from lib/fcntl--.h rename to gl/fcntl--.h diff --git a/lib/fcntl-safer.h b/gl/fcntl-safer.h similarity index 100% rename from lib/fcntl-safer.h rename to gl/fcntl-safer.h diff --git a/lib/fd-safer.c b/gl/fd-safer.c similarity index 94% rename from lib/fd-safer.c rename to gl/fd-safer.c index 5933bcb..256bfa4 100644 --- a/lib/fd-safer.c +++ b/gl/fd-safer.c @@ -1,6 +1,6 @@ /* Return a safer copy of a file descriptor. - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005, 2006 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 @@ -18,9 +18,7 @@ /* Written by Paul Eggert. */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include #include "unistd-safer.h" diff --git a/lib/fsusage.c b/gl/fsusage.c similarity index 81% rename from lib/fsusage.c rename to gl/fsusage.c index b137790..337bf53 100644 --- a/lib/fsusage.c +++ b/gl/fsusage.c @@ -1,6 +1,6 @@ /* fsusage.c -- return space usage of mounted file systems - Copyright (C) 1991, 1992, 1996, 1998, 1999, 2002, 2003, 2004, 2005 + Copyright (C) 1991, 1992, 1996, 1998, 1999, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -17,62 +17,49 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include -#if HAVE_INTTYPES_H -# include -#endif -#if HAVE_STDINT_H -# include -#endif -#include -#ifndef UINTMAX_MAX -# define UINTMAX_MAX ((uintmax_t) -1) -#endif - -#include -#include #include "fsusage.h" #include +#include -#if HAVE_SYS_PARAM_H -# include -#endif - -#if HAVE_SYS_MOUNT_H -# include -#endif - -#if HAVE_SYS_VFS_H -# include -#endif - -#if HAVE_SYS_FS_S5PARAM_H /* Fujitsu UXP/V */ -# include -#endif - -#if defined HAVE_SYS_FILSYS_H && !defined _CRAY -# include /* SVR2 */ -#endif - -#include - -#if HAVE_SYS_STATFS_H -# include -#endif - -#if HAVE_DUSTAT_H /* AIX PS/2 */ -# include -#endif - -#if HAVE_SYS_STATVFS_H /* SVR4 */ +#if STAT_STATVFS /* POSIX 1003.1-2001 (and later) with XSI */ # include +#else +/* Don't include backward-compatibility files unless they're needed. + Eventually we'd like to remove all this cruft. */ +# include +# include +# include +# if HAVE_SYS_PARAM_H +# include +# endif +# if HAVE_SYS_MOUNT_H +# include +# endif +# if HAVE_SYS_VFS_H +# include +# endif +# if HAVE_SYS_FS_S5PARAM_H /* Fujitsu UXP/V */ +# include +# endif +# if defined HAVE_SYS_FILSYS_H && !defined _CRAY +# include /* SVR2 */ +# endif +# if HAVE_SYS_STATFS_H +# include +# endif +# if HAVE_DUSTAT_H /* AIX PS/2 */ +# include +# endif +# include "full-read.h" #endif -#include "full-read.h" +/* The results of open() in this file are not used with fchdir, + therefore save some unnecessary work in fchdir.c. */ +#undef open +#undef close /* Many space usage primitives use all 1 bits to denote a value that is not applicable or unknown. Propagate this information by returning @@ -83,7 +70,7 @@ && (~ (x) == (sizeof (x) < sizeof (int) \ ? - (1 << (sizeof (x) * CHAR_BIT)) \ : 0))) \ - ? UINTMAX_MAX : (x)) + ? UINTMAX_MAX : (uintmax_t) (x)) /* Extract the top bit of X as an uintmax_t value. */ #define EXTRACT_TOP_BIT(x) ((x) \ @@ -108,18 +95,19 @@ int get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp) { -#ifdef STAT_STATFS3_OSF1 +#if defined STAT_STATVFS /* POSIX */ - struct statfs fsd; + struct statvfs fsd; - if (statfs (file, &fsd, sizeof (struct statfs)) != 0) + if (statvfs (file, &fsd) < 0) return -1; - fsp->fsu_blocksize = PROPAGATE_ALL_ONES (fsd.f_fsize); + /* f_frsize isn't guaranteed to be supported. */ + fsp->fsu_blocksize = (fsd.f_frsize + ? PROPAGATE_ALL_ONES (fsd.f_frsize) + : PROPAGATE_ALL_ONES (fsd.f_bsize)); -#endif /* STAT_STATFS3_OSF1 */ - -#ifdef STAT_STATFS2_FS_DATA /* Ultrix */ +#elif defined STAT_STATFS2_FS_DATA /* Ultrix */ struct fs_data fsd; @@ -134,9 +122,7 @@ get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp) fsp->fsu_files = PROPAGATE_ALL_ONES (fsd.fd_req.gtot); fsp->fsu_ffree = PROPAGATE_ALL_ONES (fsd.fd_req.gfree); -#endif /* STAT_STATFS2_FS_DATA */ - -#ifdef STAT_READ_FILSYS /* SVR2 */ +#elif defined STAT_READ_FILSYS /* SVR2 */ # ifndef SUPERBOFF # define SUPERBOFF (SUPERB * 512) # endif @@ -171,9 +157,16 @@ get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp) : (fsd.s_isize - 2) * INOPB * (fsd.s_type == Fs2b ? 2 : 1)); fsp->fsu_ffree = PROPAGATE_ALL_ONES (fsd.s_tinode); -#endif /* STAT_READ_FILSYS */ +#elif defined STAT_STATFS3_OSF1 -#ifdef STAT_STATFS2_BSIZE /* 4.3BSD, SunOS 4, HP-UX, AIX */ + struct statfs fsd; + + if (statfs (file, &fsd, sizeof (struct statfs)) != 0) + return -1; + + fsp->fsu_blocksize = PROPAGATE_ALL_ONES (fsd.f_fsize); + +#elif defined STAT_STATFS2_BSIZE /* 4.3BSD, SunOS 4, HP-UX, AIX */ struct statfs fsd; @@ -197,9 +190,7 @@ get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp) } # endif /* STATFS_TRUNCATES_BLOCK_COUNTS */ -#endif /* STAT_STATFS2_BSIZE */ - -#ifdef STAT_STATFS2_FSIZE /* 4.4BSD */ +#elif defined STAT_STATFS2_FSIZE /* 4.4BSD */ struct statfs fsd; @@ -208,9 +199,7 @@ get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp) fsp->fsu_blocksize = PROPAGATE_ALL_ONES (fsd.f_fsize); -#endif /* STAT_STATFS2_FSIZE */ - -#ifdef STAT_STATFS4 /* SVR3, Dynix, Irix, AIX */ +#elif defined STAT_STATFS4 /* SVR3, Dynix, Irix, AIX */ # if !_AIX && !defined _SEQUENT_ && !defined DOLPHIN # define f_bavail f_bfree @@ -230,24 +219,10 @@ get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp) fsp->fsu_blocksize = 512; # endif -#endif /* STAT_STATFS4 */ +#endif -#ifdef STAT_STATVFS /* SVR4 */ - - struct statvfs fsd; - - if (statvfs (file, &fsd) < 0) - return -1; - - /* f_frsize isn't guaranteed to be supported. */ - fsp->fsu_blocksize = (fsd.f_frsize - ? PROPAGATE_ALL_ONES (fsd.f_frsize) - : PROPAGATE_ALL_ONES (fsd.f_bsize)); - -#endif /* STAT_STATVFS */ - -#if !defined STAT_STATFS2_FS_DATA && !defined STAT_READ_FILSYS - /* !Ultrix && !SVR2 */ +#if (defined STAT_STATVFS \ + || (!defined STAT_STATFS2_FS_DATA && !defined STAT_READ_FILSYS)) fsp->fsu_blocks = PROPAGATE_ALL_ONES (fsd.f_blocks); fsp->fsu_bfree = PROPAGATE_ALL_ONES (fsd.f_bfree); @@ -256,7 +231,7 @@ get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp) fsp->fsu_files = PROPAGATE_ALL_ONES (fsd.f_files); fsp->fsu_ffree = PROPAGATE_ALL_ONES (fsd.f_ffree); -#endif /* not STAT_STATFS2_FS_DATA && not STAT_READ_FILSYS */ +#endif return 0; } diff --git a/lib/fsusage.h b/gl/fsusage.h similarity index 93% rename from lib/fsusage.h rename to gl/fsusage.h index f3eda2d..7fa9f8d 100644 --- a/lib/fsusage.h +++ b/gl/fsusage.h @@ -1,6 +1,6 @@ /* fsusage.h -- declarations for file system space usage info - Copyright (C) 1991, 1992, 1997, 2003, 2004, 2005 Free Software + Copyright (C) 1991, 1992, 1997, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -22,6 +22,7 @@ #if !defined FSUSAGE_H_ # define FSUSAGE_H_ +# include # include struct fs_usage diff --git a/lib/full-read.c b/gl/full-read.c similarity index 100% rename from lib/full-read.c rename to gl/full-read.c diff --git a/lib/full-read.h b/gl/full-read.h similarity index 100% rename from lib/full-read.h rename to gl/full-read.h diff --git a/lib/full-write.c b/gl/full-write.c similarity index 95% rename from lib/full-write.c rename to gl/full-write.c index 106f3c7..cc16872 100644 --- a/lib/full-write.c +++ b/gl/full-write.c @@ -1,7 +1,7 @@ /* An interface to read and write that retries (if necessary) until complete. Copyright (C) 1993, 1994, 1997, 1998, 1999, 2000, 2001, 2002, 2003, - 2004 Free Software Foundation, Inc. + 2004, 2005, 2006 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 @@ -17,9 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include /* Specification. */ #ifdef FULL_READ @@ -62,7 +60,7 @@ size_t full_rw (int fd, const void *buf, size_t count) { size_t total = 0; - const char *ptr = buf; + const char *ptr = (const char *) buf; while (count > 0) { diff --git a/lib/full-write.h b/gl/full-write.h similarity index 100% rename from lib/full-write.h rename to gl/full-write.h diff --git a/gl/gai_strerror.c b/gl/gai_strerror.c new file mode 100644 index 0000000..7f0e034 --- /dev/null +++ b/gl/gai_strerror.c @@ -0,0 +1,77 @@ +/* Copyright (C) 1997, 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Philip Blundell , 1997. + + 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _LIBC +# include +# include "getaddrinfo.h" +#endif + +#include +#ifdef HAVE_NETDB_H +# include +#endif + +#ifdef _LIBC +# include +#else +# include "gettext.h" +# define _(String) gettext (String) +# define N_(String) String +#endif + +static struct + { + int code; + const char *msg; + } +values[] = + { + { EAI_ADDRFAMILY, N_("Address family for hostname not supported") }, + { EAI_AGAIN, N_("Temporary failure in name resolution") }, + { EAI_BADFLAGS, N_("Bad value for ai_flags") }, + { EAI_FAIL, N_("Non-recoverable failure in name resolution") }, + { EAI_FAMILY, N_("ai_family not supported") }, + { EAI_MEMORY, N_("Memory allocation failure") }, + { EAI_NODATA, N_("No address associated with hostname") }, + { EAI_NONAME, N_("Name or service not known") }, + { EAI_SERVICE, N_("Servname not supported for ai_socktype") }, + { EAI_SOCKTYPE, N_("ai_socktype not supported") }, + { EAI_SYSTEM, N_("System error") }, +#ifdef __USE_GNU + { EAI_INPROGRESS, N_("Processing request in progress") }, + { EAI_CANCELED, N_("Request canceled") }, + { EAI_NOTCANCELED, N_("Request not canceled") }, + { EAI_ALLDONE, N_("All requests done") }, + { EAI_INTR, N_("Interrupted by a signal") }, + { EAI_IDN_ENCODE, N_("Parameter string not correctly encoded") } +#endif + }; + +const char * +gai_strerror (int code) +{ + size_t i; + for (i = 0; i < sizeof (values) / sizeof (values[0]); ++i) + if (values[i].code == code) + return _(values[i].msg); + + return _("Unknown error"); +} +#ifdef _LIBC +libc_hidden_def (gai_strerror) +#endif diff --git a/gl/getaddrinfo.c b/gl/getaddrinfo.c new file mode 100644 index 0000000..f523f76 --- /dev/null +++ b/gl/getaddrinfo.c @@ -0,0 +1,417 @@ +/* Get address information (partial implementation). + Copyright (C) 1997, 2001, 2002, 2004, 2005, 2006 Free Software + Foundation, Inc. + Contributed by Simon Josefsson . + + 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#include + +#include "getaddrinfo.h" + +#if HAVE_NETINET_IN_H +# include +#endif + +/* Get calloc. */ +#include + +/* Get memcpy. */ +#include + +#include + +#include "gettext.h" +#define _(String) gettext (String) +#define N_(String) String + +#include "inet_ntop.h" +#include "snprintf.h" +#include "strdup.h" + +/* BeOS has AF_INET, but not PF_INET. */ +#ifndef PF_INET +# define PF_INET AF_INET +#endif +/* BeOS also lacks PF_UNSPEC. */ +#ifndef PF_UNSPEC +# define PF_UNSPEC 0 +#endif + +#if defined _WIN32 || defined __WIN32__ +# define WIN32_NATIVE +#endif + +#ifdef WIN32_NATIVE +typedef int (WSAAPI *getaddrinfo_func) (const char*, const char*, + const struct addrinfo*, + struct addrinfo**); +typedef void (WSAAPI *freeaddrinfo_func) (struct addrinfo*); +typedef int (WSAAPI *getnameinfo_func) (const struct sockaddr*, + socklen_t, char*, DWORD, + char*, DWORD, int); + +static getaddrinfo_func getaddrinfo_ptr = NULL; +static freeaddrinfo_func freeaddrinfo_ptr = NULL; +static getnameinfo_func getnameinfo_ptr = NULL; + +static int +use_win32_p (void) +{ + static int done = 0; + HMODULE h; + + if (done) + return getaddrinfo_ptr ? 1 : 0; + + done = 1; + + h = GetModuleHandle ("ws2_32.dll"); + + if (h) + { + getaddrinfo_ptr = (getaddrinfo_func) GetProcAddress (h, "getaddrinfo"); + freeaddrinfo_ptr = (freeaddrinfo_func) GetProcAddress (h, "freeaddrinfo"); + getnameinfo_ptr = (getnameinfo_func) GetProcAddress (h, "getnameinfo"); + } + + /* If either is missing, something is odd. */ + if (!getaddrinfo_ptr || !freeaddrinfo_ptr || !getnameinfo_ptr) + { + getaddrinfo_ptr = NULL; + freeaddrinfo_ptr = NULL; + getnameinfo_ptr = NULL; + return 0; + } + + return 1; +} +#endif + +static inline bool +validate_family (int family) +{ + /* FIXME: Support more families. */ +#if HAVE_IPV4 + if (family == PF_INET) + return true; +#endif +#if HAVE_IPV6 + if (family == PF_INET6) + return true; +#endif + if (family == PF_UNSPEC) + return true; + return false; +} + +/* Translate name of a service location and/or a service name to set of + socket addresses. */ +int +getaddrinfo (const char *restrict nodename, + const char *restrict servname, + const struct addrinfo *restrict hints, + struct addrinfo **restrict res) +{ + struct addrinfo *tmp; + int port = 0; + struct hostent *he; + void *storage; + size_t size; +#if HAVE_IPV6 + struct v6_pair { + struct addrinfo addrinfo; + struct sockaddr_in6 sockaddr_in6; + }; +#endif +#if HAVE_IPV4 + struct v4_pair { + struct addrinfo addrinfo; + struct sockaddr_in sockaddr_in; + }; +#endif + +#ifdef WIN32_NATIVE + if (use_win32_p ()) + return getaddrinfo_ptr (nodename, servname, hints, res); +#endif + + if (hints && (hints->ai_flags & ~(AI_CANONNAME|AI_PASSIVE))) + /* FIXME: Support more flags. */ + return EAI_BADFLAGS; + + if (hints && !validate_family (hints->ai_family)) + return EAI_FAMILY; + + if (hints && + hints->ai_socktype != SOCK_STREAM && hints->ai_socktype != SOCK_DGRAM) + /* FIXME: Support other socktype. */ + return EAI_SOCKTYPE; /* FIXME: Better return code? */ + + if (!nodename) + { + if (!(hints->ai_flags & AI_PASSIVE)) + return EAI_NONAME; + +#ifdef HAVE_IPV6 + nodename = (hints->ai_family == AF_INET6) ? "::" : "0.0.0.0"; +#else + nodename = "0.0.0.0"; +#endif + } + + if (servname) + { + struct servent *se = NULL; + const char *proto = + (hints && hints->ai_socktype == SOCK_DGRAM) ? "udp" : "tcp"; + + if (!(hints->ai_flags & AI_NUMERICSERV)) + /* FIXME: Use getservbyname_r if available. */ + se = getservbyname (servname, proto); + + if (!se) + { + char *c; + if (!(*servname >= '0' && *servname <= '9')) + return EAI_NONAME; + port = strtoul (servname, &c, 10); + if (*c || port > 0xffff) + return EAI_NONAME; + port = htons (port); + } + else + port = se->s_port; + } + + /* FIXME: Use gethostbyname_r if available. */ + he = gethostbyname (nodename); + if (!he || he->h_addr_list[0] == NULL) + return EAI_NONAME; + + switch (he->h_addrtype) + { +#if HAVE_IPV6 + case PF_INET6: + size = sizeof (struct v6_pair); + break; +#endif + +#if HAVE_IPV4 + case PF_INET: + size = sizeof (struct v4_pair); + break; +#endif + + default: + return EAI_NODATA; + } + + storage = calloc (1, size); + if (!storage) + return EAI_MEMORY; + + switch (he->h_addrtype) + { +#if HAVE_IPV6 + case PF_INET6: + { + struct v6_pair *p = storage; + struct sockaddr_in6 *sinp = &p->sockaddr_in6; + tmp = &p->addrinfo; + + if (port) + sinp->sin6_port = port; + + if (he->h_length != sizeof (sinp->sin6_addr)) + { + free (storage); + return EAI_SYSTEM; /* FIXME: Better return code? Set errno? */ + } + + memcpy (&sinp->sin6_addr, he->h_addr_list[0], sizeof sinp->sin6_addr); + + tmp->ai_addr = (struct sockaddr *) sinp; + tmp->ai_addrlen = sizeof *sinp; + } + break; +#endif + +#if HAVE_IPV4 + case PF_INET: + { + struct v4_pair *p = storage; + struct sockaddr_in *sinp = &p->sockaddr_in; + tmp = &p->addrinfo; + + if (port) + sinp->sin_port = port; + + if (he->h_length != sizeof (sinp->sin_addr)) + { + free (storage); + return EAI_SYSTEM; /* FIXME: Better return code? Set errno? */ + } + + memcpy (&sinp->sin_addr, he->h_addr_list[0], sizeof sinp->sin_addr); + + tmp->ai_addr = (struct sockaddr *) sinp; + tmp->ai_addrlen = sizeof *sinp; + } + break; +#endif + + default: + free (storage); + return EAI_NODATA; + } + + if (hints && hints->ai_flags & AI_CANONNAME) + { + const char *cn; + if (he->h_name) + cn = he->h_name; + else + cn = nodename; + + tmp->ai_canonname = strdup (cn); + if (!tmp->ai_canonname) + { + free (storage); + return EAI_MEMORY; + } + } + + tmp->ai_protocol = (hints) ? hints->ai_protocol : 0; + tmp->ai_socktype = (hints) ? hints->ai_socktype : 0; + tmp->ai_addr->sa_family = he->h_addrtype; + tmp->ai_family = he->h_addrtype; + + /* FIXME: If more than one address, create linked list of addrinfo's. */ + + *res = tmp; + + return 0; +} + +/* Free `addrinfo' structure AI including associated storage. */ +void +freeaddrinfo (struct addrinfo *ai) +{ +#ifdef WIN32_NATIVE + if (use_win32_p ()) + { + freeaddrinfo_ptr (ai); + return; + } +#endif + + while (ai) + { + struct addrinfo *cur; + + cur = ai; + ai = ai->ai_next; + + if (cur->ai_canonname) free (cur->ai_canonname); + free (cur); + } +} + +int getnameinfo(const struct sockaddr *restrict sa, socklen_t salen, + char *restrict node, socklen_t nodelen, + char *restrict service, socklen_t servicelen, + int flags) +{ +#ifdef WIN32_NATIVE + if (use_win32_p ()) + return getnameinfo_ptr (sa, salen, node, nodelen, + service, servicelen, flags); +#endif + + /* FIXME: Support other flags. */ + if ((node && nodelen > 0 && !(flags & NI_NUMERICHOST)) || + (service && servicelen > 0 && !(flags & NI_NUMERICHOST)) || + (flags & ~(NI_NUMERICHOST|NI_NUMERICSERV))) + return EAI_BADFLAGS; + + if (sa == NULL || salen < sizeof (sa->sa_family)) + return EAI_FAMILY; + + switch (sa->sa_family) + { +#if HAVE_IPV4 + case AF_INET: + if (salen < sizeof (struct sockaddr_in)) + return EAI_FAMILY; + break; +#endif +#if HAVE_IPV6 + case AF_INET6: + if (salen < sizeof (struct sockaddr_in6)) + return EAI_FAMILY; + break; +#endif + default: + return EAI_FAMILY; + } + + if (node && nodelen > 0 && flags & NI_NUMERICHOST) + { + switch (sa->sa_family) + { +#if HAVE_IPV4 + case AF_INET: + if (!inet_ntop (AF_INET, + &(((const struct sockaddr_in *) sa)->sin_addr), + node, nodelen)) + return EAI_SYSTEM; + break; +#endif + +#if HAVE_IPV6 + case AF_INET6: + if (!inet_ntop (AF_INET6, + &(((const struct sockaddr_in6 *) sa)->sin6_addr), + node, nodelen)) + return EAI_SYSTEM; + break; +#endif + + default: + return EAI_FAMILY; + } + } + + if (service && servicelen > 0 && flags & NI_NUMERICSERV) + switch (sa->sa_family) + { +#if HAVE_IPV4 + case AF_INET: +#endif +#if HAVE_IPV6 + case AF_INET6: +#endif + { + unsigned short int port + = ntohs (((const struct sockaddr_in *) sa)->sin_port); + if (servicelen <= snprintf (service, servicelen, "%u", port)) + return EAI_OVERFLOW; + } + break; + } + + return 0; +} diff --git a/gl/getaddrinfo.h b/gl/getaddrinfo.h new file mode 100644 index 0000000..b4ef242 --- /dev/null +++ b/gl/getaddrinfo.h @@ -0,0 +1,155 @@ +/* Get address information. + Copyright (C) 1996-2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + Contributed by Simon Josefsson . + + 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef GETADDRINFO_H +#define GETADDRINFO_H + +/* sys/socket.h in i386-unknown-freebsd4.10 and + powerpc-apple-darwin5.5 require sys/types.h, so include it first. + Then we'll also get 'socklen_t' and 'struct sockaddr' which are + used below. */ +#include +/* Get all getaddrinfo related declarations, if available. */ +#include +#ifdef HAVE_NETDB_H +# include +#endif + +#ifndef HAVE_STRUCT_ADDRINFO + +/* Structure to contain information about address of a service provider. */ +struct addrinfo +{ + int ai_flags; /* Input flags. */ + int ai_family; /* Protocol family for socket. */ + int ai_socktype; /* Socket type. */ + int ai_protocol; /* Protocol for socket. */ + socklen_t ai_addrlen; /* Length of socket address. */ + struct sockaddr *ai_addr; /* Socket address for socket. */ + char *ai_canonname; /* Canonical name for service location. */ + struct addrinfo *ai_next; /* Pointer to next in list. */ +}; +#endif + +/* Possible values for `ai_flags' field in `addrinfo' structure. */ +#ifndef AI_PASSIVE +# define AI_PASSIVE 0x0001 /* Socket address is intended for `bind'. */ +#endif +#ifndef AI_CANONNAME +# define AI_CANONNAME 0x0002 /* Request for canonical name. */ +#endif +#ifndef AI_NUMERICSERV +# define AI_NUMERICSERV 0x0400 /* Don't use name resolution. */ +#endif + +#if 0 +/* The commented out definitions below are not yet implemented in the + GNULIB getaddrinfo() replacement, so are not yet needed and may, in fact, + cause conflicts on systems with a getaddrinfo() function which does not + define them. + + If they are restored, be sure to protect the definitions with #ifndef. */ +#define AI_NUMERICHOST 0x0004 /* Don't use name resolution. */ +#define AI_V4MAPPED 0x0008 /* IPv4 mapped addresses are acceptable. */ +#define AI_ALL 0x0010 /* Return IPv4 mapped and IPv6 addresses. */ +#define AI_ADDRCONFIG 0x0020 /* Use configuration of this host to choose + returned address type.. */ +#endif /* 0 */ + +/* Error values for `getaddrinfo' function. */ +#ifndef EAI_BADFLAGS +# define EAI_BADFLAGS -1 /* Invalid value for `ai_flags' field. */ +# define EAI_NONAME -2 /* NAME or SERVICE is unknown. */ +# define EAI_AGAIN -3 /* Temporary failure in name resolution. */ +# define EAI_FAIL -4 /* Non-recoverable failure in name res. */ +# define EAI_NODATA -5 /* No address associated with NAME. */ +# define EAI_FAMILY -6 /* `ai_family' not supported. */ +# define EAI_SOCKTYPE -7 /* `ai_socktype' not supported. */ +# define EAI_SERVICE -8 /* SERVICE not supported for `ai_socktype'. */ +# define EAI_MEMORY -10 /* Memory allocation failure. */ +#endif +#ifndef EAI_OVERFLOW +/* Not defined on mingw32. */ +# define EAI_OVERFLOW -12 /* Argument buffer overflow. */ +#endif +#ifndef EAI_ADDRFAMILY +/* Not defined on mingw32. */ +# define EAI_ADDRFAMILY -9 /* Address family for NAME not supported. */ +#endif +#ifndef EAI_SYSTEM +/* Not defined on mingw32. */ +# define EAI_SYSTEM -11 /* System error returned in `errno'. */ +#endif + +#ifdef __USE_GNU +# ifndef EAI_INPROGRESS +# define EAI_INPROGRESS -100 /* Processing request in progress. */ +# define EAI_CANCELED -101 /* Request canceled. */ +# define EAI_NOTCANCELED -102 /* Request not canceled. */ +# define EAI_ALLDONE -103 /* All requests done. */ +# define EAI_INTR -104 /* Interrupted by a signal. */ +# define EAI_IDN_ENCODE -105 /* IDN encoding failed. */ +# endif +#endif + +#if !HAVE_DECL_GETADDRINFO +/* Translate name of a service location and/or a service name to set of + socket addresses. + For more details, see the POSIX:2001 specification + . */ +extern int getaddrinfo (const char *restrict nodename, + const char *restrict servname, + const struct addrinfo *restrict hints, + struct addrinfo **restrict res); +#endif + +#if !HAVE_DECL_FREEADDRINFO +/* Free `addrinfo' structure AI including associated storage. + For more details, see the POSIX:2001 specification + . */ +extern void freeaddrinfo (struct addrinfo *ai); +#endif + +#if !HAVE_DECL_GAI_STRERROR +/* Convert error return from getaddrinfo() to a string. + For more details, see the POSIX:2001 specification + . */ +extern const char *gai_strerror (int ecode); +#endif + +#if !HAVE_DECL_GETNAMEINFO +/* Convert socket address to printable node and service names. + For more details, see the POSIX:2001 specification + . */ +extern int getnameinfo(const struct sockaddr *restrict sa, socklen_t salen, + char *restrict node, socklen_t nodelen, + char *restrict service, socklen_t servicelen, + int flags); + +#endif + +/* Possible flags for getnameinfo. */ +#ifndef NI_NUMERICHOST +# define NI_NUMERICHOST 1 +#endif +#ifndef NI_NUMERICSERV +# define NI_NUMERICSERV 2 +#endif + +#endif /* GETADDRINFO_H */ diff --git a/gl/gethostname.c b/gl/gethostname.c new file mode 100644 index 0000000..eedc40e --- /dev/null +++ b/gl/gethostname.c @@ -0,0 +1,52 @@ +/* gethostname emulation for SysV and POSIX.1. + + Copyright (C) 1992, 2003, 2006 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* David MacKenzie */ + +#include + +#ifdef HAVE_UNAME +# include +#endif + +/* Put up to LEN chars of the host name into NAME. + Null terminate it if the name is shorter than LEN. + Return 0 if ok, -1 if error. */ + +#include + +int +gethostname (char *name, size_t len) +{ +#ifdef HAVE_UNAME + struct utsname uts; + + if (uname (&uts) == -1) + return -1; + if (len > sizeof (uts.nodename)) + { + /* More space than we need is available. */ + name[sizeof (uts.nodename)] = '\0'; + len = sizeof (uts.nodename); + } + strncpy (name, uts.nodename, len); +#else + strcpy (name, ""); /* Hardcode your system name if you want. */ +#endif + return 0; +} diff --git a/lib/getloadavg.c b/gl/getloadavg.c similarity index 97% rename from lib/getloadavg.c rename to gl/getloadavg.c index 2a50131..cfa6273 100644 --- a/lib/getloadavg.c +++ b/gl/getloadavg.c @@ -1,7 +1,8 @@ /* Get the system load averages. Copyright (C) 1985, 1986, 1987, 1988, 1989, 1991, 1992, 1993, 1994, - 1995, 1997, 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. + 1995, 1997, 1999, 2000, 2003, 2004, 2005, 2006 Free Software + Foundation, Inc. NOTE: The canonical source of this file is maintained with gnulib. Bugs can be reported to bug-gnulib@gnu.org. @@ -80,13 +81,15 @@ We also #define LDAV_PRIVILEGED if a program will require special installation to be able to call getloadavg. */ -/* This should always be first. */ -#ifdef HAVE_CONFIG_H +/* "configure" defines CONFIGURING_GETLOADAVG to sidestep problems + with partially-configured source directories. */ + +#ifndef CONFIGURING_GETLOADAVG # include +# include #endif #include -#include #include #include @@ -279,7 +282,7 @@ # endif -# ifndef FSCALE +# ifndef FSCALE /* SunOS and some others define FSCALE in sys/param.h. */ @@ -358,7 +361,7 @@ # ifdef LOAD_AVE_TYPE -# ifndef VMS +# ifndef __VMS # ifndef __linux__ # ifndef NLIST_STRUCT # include @@ -385,7 +388,7 @@ # endif /* LDAV_SYMBOL */ # endif /* __linux__ */ -# else /* VMS */ +# else /* __VMS */ # ifndef eunice # include @@ -393,7 +396,7 @@ # else /* eunice */ # include # endif /* eunice */ -# endif /* VMS */ +# endif /* __VMS */ # ifndef LDAV_CVT # define LDAV_CVT(n) ((double) (n)) @@ -473,9 +476,9 @@ static bool getloadavg_initialized; /* Offset in kmem to seek to read load average, or 0 means invalid. */ static long offset; -# if !defined (VMS) && !defined (sgi) && !defined (__linux__) +# if ! defined __VMS && ! defined sgi && ! defined __linux__ static struct nlist nl[2]; -# endif /* Not VMS or sgi */ +# endif # ifdef SUNOS_5 static kvm_t *kd; @@ -813,7 +816,7 @@ getloadavg (double loadavg[], int nelem) : (load_ave.tl_avenrun.l[elem] / (double) load_ave.tl_lscale)); # endif /* OSF_ALPHA */ -# if !defined (LDAV_DONE) && defined (VMS) +# if ! defined LDAV_DONE && defined __VMS /* VMS specific code -- read from the Load Ave driver. */ LOAD_AVE_TYPE load_ave[3]; @@ -851,9 +854,9 @@ getloadavg (double loadavg[], int nelem) if (!getloadavg_initialized) return -1; -# endif /* VMS */ +# endif /* ! defined LDAV_DONE && defined __VMS */ -# if !defined (LDAV_DONE) && defined (LOAD_AVE_TYPE) && !defined (VMS) +# if ! defined LDAV_DONE && defined LOAD_AVE_TYPE && ! defined __VMS /* UNIX-specific code -- read the average from /dev/kmem. */ @@ -953,7 +956,7 @@ getloadavg (double loadavg[], int nelem) if (offset == 0 || !getloadavg_initialized) return -1; -# endif /* LOAD_AVE_TYPE and not VMS */ +# endif /* ! defined LDAV_DONE && defined LOAD_AVE_TYPE && ! defined __VMS */ # if !defined (LDAV_DONE) && defined (LOAD_AVE_TYPE) /* Including VMS. */ if (nelem > 0) diff --git a/lib/getopt.c b/gl/getopt.c similarity index 94% rename from lib/getopt.c rename to gl/getopt.c index bcb81c8..3580ad8 100644 --- a/lib/getopt.c +++ b/gl/getopt.c @@ -2,7 +2,7 @@ NOTE: getopt is now part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to drepper@gnu.org before changing it! - Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002,2003,2004 + Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002,2003,2004,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -20,30 +20,18 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* This tells Alpha OSF/1 not to define a getopt prototype in . - Ditto for AIX 3.2 and . */ -#ifndef _NO_PROTO -# define _NO_PROTO -#endif - -#ifdef HAVE_CONFIG_H +#ifndef _LIBC # include #endif +#include "getopt.h" + #include - -/* This needs to come after some library #include - to get __GNU_LIBRARY__ defined. */ -#ifdef __GNU_LIBRARY__ -/* Don't include stdlib.h for non-GNU C libraries because some of them - contain conflicting prototypes for getopt. */ -# include -# include -#endif /* GNU C library. */ - +#include #include +#include -#ifdef VMS +#ifdef __VMS # include #endif @@ -76,7 +64,6 @@ GNU application programs can use a third alternative mode in which they can distinguish the relative order of options and other arguments. */ -#include "getopt.h" #include "getopt_int.h" /* For communication from `getopt' to the caller. @@ -118,16 +105,9 @@ int optopt = '?'; static struct _getopt_data getopt_data; -#ifndef __GNU_LIBRARY__ - -/* Avoid depending on library functions or files - whose names are inconsistent. */ - -#ifndef getenv +#if defined HAVE_DECL_GETENV && !HAVE_DECL_GETENV extern char *getenv (); #endif - -#endif /* not __GNU_LIBRARY__ */ #ifdef _LIBC /* Stored original parameters. @@ -556,10 +536,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring, int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - if (_IO_fwide (stderr, 0) > 0) - __fwprintf (stderr, L"%s", buf); - else - fputs (buf, stderr); + __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); @@ -634,10 +611,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring, ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - if (_IO_fwide (stderr, 0) > 0) - __fwprintf (stderr, L"%s", buf); - else - fputs (buf, stderr); + __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); @@ -674,10 +648,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring, ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - if (_IO_fwide (stderr, 0) > 0) - __fwprintf (stderr, L"%s", buf); - else - fputs (buf, stderr); + __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); @@ -751,10 +722,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring, int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - if (_IO_fwide (stderr, 0) > 0) - __fwprintf (stderr, L"%s", buf); - else - fputs (buf, stderr); + __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); @@ -817,10 +785,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring, int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - if (_IO_fwide (stderr, 0) > 0) - __fwprintf (stderr, L"%s", buf); - else - fputs (buf, stderr); + __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); @@ -868,10 +833,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring, int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - if (_IO_fwide (stderr, 0) > 0) - __fwprintf (stderr, L"%s", buf); - else - fputs (buf, stderr); + __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); @@ -940,10 +902,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring, int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - if (_IO_fwide (stderr, 0) > 0) - __fwprintf (stderr, L"%s", buf); - else - fputs (buf, stderr); + __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); @@ -985,10 +944,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring, ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - if (_IO_fwide (stderr, 0) > 0) - __fwprintf (stderr, L"%s", buf); - else - fputs (buf, stderr); + __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); @@ -1027,10 +983,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring, ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - if (_IO_fwide (stderr, 0) > 0) - __fwprintf (stderr, L"%s", buf); - else - fputs (buf, stderr); + __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); @@ -1101,10 +1054,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring, int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - if (_IO_fwide (stderr, 0) > 0) - __fwprintf (stderr, L"%s", buf); - else - fputs (buf, stderr); + __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); diff --git a/lib/getopt1.c b/gl/getopt1.c similarity index 97% rename from lib/getopt1.c rename to gl/getopt1.c index 25d7926..cc0746e 100644 --- a/lib/getopt1.c +++ b/gl/getopt1.c @@ -1,5 +1,5 @@ /* getopt_long and getopt_long_only entry points for GNU getopt. - Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98,2004 + Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98,2004,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -17,13 +17,10 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifdef HAVE_CONFIG_H -# include -#endif - #ifdef _LIBC # include #else +# include # include "getopt.h" #endif #include "getopt_int.h" diff --git a/lib/getopt_.h b/gl/getopt_.h similarity index 96% rename from lib/getopt_.h rename to gl/getopt_.h index 3c406e5..27fce3d 100644 --- a/lib/getopt_.h +++ b/gl/getopt_.h @@ -1,5 +1,5 @@ /* Declarations for getopt. - Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2005 + Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -196,9 +196,10 @@ struct option scanning, explicitly telling `getopt' that there are no more options. - If OPTS begins with `--', then non-option arguments are treated as - arguments to the option '\0'. This behavior is specific to the GNU - `getopt'. */ + If OPTS begins with `-', then non-option arguments are treated as + arguments to the option '\1'. This behavior is specific to the GNU + `getopt'. If OPTS begins with `+', or POSIXLY_CORRECT is set in + the environment, then do not permute arguments. */ extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) __THROW; diff --git a/lib/getopt_int.h b/gl/getopt_int.h similarity index 100% rename from lib/getopt_int.h rename to gl/getopt_int.h diff --git a/gl/gettext.h b/gl/gettext.h new file mode 100644 index 0000000..9d76ec9 --- /dev/null +++ b/gl/gettext.h @@ -0,0 +1,270 @@ +/* Convenience header for conditional use of GNU . + Copyright (C) 1995-1998, 2000-2002, 2004-2006 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _LIBGETTEXT_H +#define _LIBGETTEXT_H 1 + +/* NLS can be disabled through the configure --disable-nls option. */ +#if ENABLE_NLS + +/* Get declarations of GNU message catalog functions. */ +# include + +/* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by + the gettext() and ngettext() macros. This is an alternative to calling + textdomain(), and is useful for libraries. */ +# ifdef DEFAULT_TEXT_DOMAIN +# undef gettext +# define gettext(Msgid) \ + dgettext (DEFAULT_TEXT_DOMAIN, Msgid) +# undef ngettext +# define ngettext(Msgid1, Msgid2, N) \ + dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N) +# endif + +#else + +/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which + chokes if dcgettext is defined as a macro. So include it now, to make + later inclusions of a NOP. We don't include + as well because people using "gettext.h" will not include , + and also including would fail on SunOS 4, whereas + is OK. */ +#if defined(__sun) +# include +#endif + +/* Many header files from the libstdc++ coming with g++ 3.3 or newer include + , which chokes if dcgettext is defined as a macro. So include + it now, to make later inclusions of a NOP. */ +#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) +# include +# if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H +# include +# endif +#endif + +/* Disabled NLS. + The casts to 'const char *' serve the purpose of producing warnings + for invalid uses of the value returned from these functions. + On pre-ANSI systems without 'const', the config.h file is supposed to + contain "#define const". */ +# define gettext(Msgid) ((const char *) (Msgid)) +# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid)) +# define dcgettext(Domainname, Msgid, Category) \ + ((void) (Category), dgettext (Domainname, Msgid)) +# define ngettext(Msgid1, Msgid2, N) \ + ((N) == 1 \ + ? ((void) (Msgid2), (const char *) (Msgid1)) \ + : ((void) (Msgid1), (const char *) (Msgid2))) +# define dngettext(Domainname, Msgid1, Msgid2, N) \ + ((void) (Domainname), ngettext (Msgid1, Msgid2, N)) +# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ + ((void) (Category), dngettext(Domainname, Msgid1, Msgid2, N)) +# define textdomain(Domainname) ((const char *) (Domainname)) +# define bindtextdomain(Domainname, Dirname) \ + ((void) (Domainname), (const char *) (Dirname)) +# define bind_textdomain_codeset(Domainname, Codeset) \ + ((void) (Domainname), (const char *) (Codeset)) + +#endif + +/* A pseudo function call that serves as a marker for the automated + extraction of messages, but does not call gettext(). The run-time + translation is done at a different place in the code. + The argument, String, should be a literal string. Concatenated strings + and other string expressions won't work. + The macro's expansion is not parenthesized, so that it is suitable as + initializer for static 'char[]' or 'const char[]' variables. */ +#define gettext_noop(String) String + +/* The separator between msgctxt and msgid in a .mo file. */ +#define GETTEXT_CONTEXT_GLUE "\004" + +/* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a + MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be + short and rarely need to change. + The letter 'p' stands for 'particular' or 'special'. */ +#ifdef DEFAULT_TEXT_DOMAIN +# define pgettext(Msgctxt, Msgid) \ + pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) +#else +# define pgettext(Msgctxt, Msgid) \ + pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) +#endif +#define dpgettext(Domainname, Msgctxt, Msgid) \ + pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) +#define dcpgettext(Domainname, Msgctxt, Msgid, Category) \ + pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category) +#ifdef DEFAULT_TEXT_DOMAIN +# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ + npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) +#else +# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ + npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) +#endif +#define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ + npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) +#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ + npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category) + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static const char * +pgettext_aux (const char *domain, + const char *msg_ctxt_id, const char *msgid, + int category) +{ + const char *translation = dcgettext (domain, msg_ctxt_id, category); + if (translation == msg_ctxt_id) + return msgid; + else + return translation; +} + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static const char * +npgettext_aux (const char *domain, + const char *msg_ctxt_id, const char *msgid, + const char *msgid_plural, unsigned long int n, + int category) +{ + const char *translation = + dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); + if (translation == msg_ctxt_id || translation == msgid_plural) + return (n == 1 ? msgid : msgid_plural); + else + return translation; +} + +/* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID + can be arbitrary expressions. But for string literals these macros are + less efficient than those above. */ + +#include + +#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ + (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \ + /* || __STDC_VERSION__ >= 199901L */ ) + +#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS +#include +#endif + +#define pgettext_expr(Msgctxt, Msgid) \ + dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES) +#define dpgettext_expr(Domainname, Msgctxt, Msgid) \ + dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES) + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static const char * +dcpgettext_expr (const char *domain, + const char *msgctxt, const char *msgid, + int category) +{ + size_t msgctxt_len = strlen (msgctxt) + 1; + size_t msgid_len = strlen (msgid) + 1; + const char *translation; +#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS + char msg_ctxt_id[msgctxt_len + msgid_len]; +#else + char buf[1024]; + char *msg_ctxt_id = + (msgctxt_len + msgid_len <= sizeof (buf) + ? buf + : (char *) malloc (msgctxt_len + msgid_len)); + if (msg_ctxt_id != NULL) +#endif + { + memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); + msg_ctxt_id[msgctxt_len - 1] = '\004'; + memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); + translation = dcgettext (domain, msg_ctxt_id, category); +#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS + if (msg_ctxt_id != buf) + free (msg_ctxt_id); +#endif + if (translation != msg_ctxt_id) + return translation; + } + return msgid; +} + +#define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \ + dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) +#define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ + dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static const char * +dcnpgettext_expr (const char *domain, + const char *msgctxt, const char *msgid, + const char *msgid_plural, unsigned long int n, + int category) +{ + size_t msgctxt_len = strlen (msgctxt) + 1; + size_t msgid_len = strlen (msgid) + 1; + const char *translation; +#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS + char msg_ctxt_id[msgctxt_len + msgid_len]; +#else + char buf[1024]; + char *msg_ctxt_id = + (msgctxt_len + msgid_len <= sizeof (buf) + ? buf + : (char *) malloc (msgctxt_len + msgid_len)); + if (msg_ctxt_id != NULL) +#endif + { + memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); + msg_ctxt_id[msgctxt_len - 1] = '\004'; + memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); + translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); +#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS + if (msg_ctxt_id != buf) + free (msg_ctxt_id); +#endif + if (!(translation == msg_ctxt_id || translation == msgid_plural)) + return translation; + } + return (n == 1 ? msgid : msgid_plural); +} + +#endif /* _LIBGETTEXT_H */ diff --git a/gl/inet_ntop.c b/gl/inet_ntop.c new file mode 100644 index 0000000..537b59f --- /dev/null +++ b/gl/inet_ntop.c @@ -0,0 +1,238 @@ +/* inet_ntop.c -- convert IPv4 and IPv6 addresses from binary to text form + + Copyright (C) 2005, 2006 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* + * Copyright (c) 1996-1999 by Internet Software Consortium. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS + * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE + * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS + * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + */ + +#include + +/* Specification. */ +#include "inet_ntop.h" + +#include +#include +#include + +#ifndef EAFNOSUPPORT +# define EAFNOSUPPORT EINVAL +#endif + +#define NS_IN6ADDRSZ 16 +#define NS_INT16SZ 2 + +/* + * WARNING: Don't even consider trying to compile this on a system where + * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX. + */ +typedef int verify_int_size[2 * sizeof (int) - 7]; + +static const char *inet_ntop4 (const unsigned char *src, char *dst, socklen_t size); +#if HAVE_IPV6 +static const char *inet_ntop6 (const unsigned char *src, char *dst, socklen_t size); +#endif + + +/* char * + * inet_ntop(af, src, dst, size) + * convert a network format address to presentation format. + * return: + * pointer to presentation format address (`dst'), or NULL (see errno). + * author: + * Paul Vixie, 1996. + */ +const char * +inet_ntop (int af, const void *restrict src, + char *restrict dst, socklen_t cnt) +{ + switch (af) + { +#if HAVE_IPV4 + case AF_INET: + return (inet_ntop4 (src, dst, cnt)); +#endif + +#if HAVE_IPV6 + case AF_INET6: + return (inet_ntop6 (src, dst, cnt)); +#endif + + default: + errno = EAFNOSUPPORT; + return (NULL); + } + /* NOTREACHED */ +} + +/* const char * + * inet_ntop4(src, dst, size) + * format an IPv4 address + * return: + * `dst' (as a const) + * notes: + * (1) uses no statics + * (2) takes a u_char* not an in_addr as input + * author: + * Paul Vixie, 1996. + */ +static const char * +inet_ntop4 (const unsigned char *src, char *dst, socklen_t size) +{ + char tmp[sizeof "255.255.255.255"]; + int len; + + len = sprintf (tmp, "%u.%u.%u.%u", src[0], src[1], src[2], src[3]); + if (len < 0) + return NULL; + + if (len > size) + { + errno = ENOSPC; + return NULL; + } + + return strcpy (dst, tmp); +} + +#if HAVE_IPV6 + +/* const char * + * inet_ntop6(src, dst, size) + * convert IPv6 binary address into presentation (printable) format + * author: + * Paul Vixie, 1996. + */ +static const char * +inet_ntop6 (const unsigned char *src, char *dst, socklen_t size) +{ + /* + * Note that int32_t and int16_t need only be "at least" large enough + * to contain a value of the specified size. On some systems, like + * Crays, there is no such thing as an integer variable with 16 bits. + * Keep this in mind if you think this function should have been coded + * to use pointer overlays. All the world's not a VAX. + */ + char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"], *tp; + struct + { + int base, len; + } best, cur; + unsigned int words[NS_IN6ADDRSZ / NS_INT16SZ]; + int i; + + /* + * Preprocess: + * Copy the input (bytewise) array into a wordwise array. + * Find the longest run of 0x00's in src[] for :: shorthanding. + */ + memset (words, '\0', sizeof words); + for (i = 0; i < NS_IN6ADDRSZ; i += 2) + words[i / 2] = (src[i] << 8) | src[i + 1]; + best.base = -1; + cur.base = -1; + for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) + { + if (words[i] == 0) + { + if (cur.base == -1) + cur.base = i, cur.len = 1; + else + cur.len++; + } + else + { + if (cur.base != -1) + { + if (best.base == -1 || cur.len > best.len) + best = cur; + cur.base = -1; + } + } + } + if (cur.base != -1) + { + if (best.base == -1 || cur.len > best.len) + best = cur; + } + if (best.base != -1 && best.len < 2) + best.base = -1; + + /* + * Format the result. + */ + tp = tmp; + for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) + { + /* Are we inside the best run of 0x00's? */ + if (best.base != -1 && i >= best.base && i < (best.base + best.len)) + { + if (i == best.base) + *tp++ = ':'; + continue; + } + /* Are we following an initial run of 0x00s or any real hex? */ + if (i != 0) + *tp++ = ':'; + /* Is this address an encapsulated IPv4? */ + if (i == 6 && best.base == 0 && + (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) + { + if (!inet_ntop4 (src + 12, tp, sizeof tmp - (tp - tmp))) + return (NULL); + tp += strlen (tp); + break; + } + { + int len = sprintf (tp, "%x", words[i]); + if (len < 0) + return NULL; + tp += len; + } + } + /* Was it a trailing run of 0x00's? */ + if (best.base != -1 && (best.base + best.len) == + (NS_IN6ADDRSZ / NS_INT16SZ)) + *tp++ = ':'; + *tp++ = '\0'; + + /* + * Check for overflow, copy, and we're done. + */ + if ((socklen_t) (tp - tmp) > size) + { + errno = ENOSPC; + return NULL; + } + + return strcpy (dst, tmp); +} + +#endif diff --git a/gl/inet_ntop.h b/gl/inet_ntop.h new file mode 100644 index 0000000..bd1e085 --- /dev/null +++ b/gl/inet_ntop.h @@ -0,0 +1,42 @@ +/* Convert internet address from internal to printable, presentable format. + Copyright (C) 2005, 2006 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#include +#include +#include +#include + +/* Converts an internet address from internal format to a printable, + presentable format. + AF is an internet address family, such as AF_INET or AF_INET6. + SRC points to a 'struct in_addr' (for AF_INET) or 'struct in6_addr' + (for AF_INET6). + DST points to a buffer having room for CNT bytes. + The printable representation of the address (in numeric form, not + surrounded by [...], no reverse DNS is done) is placed in DST, and + DST is returned. If an error occurs, the return value is NULL and + errno is set. If CNT bytes are not sufficient to hold the result, + the return value is NULL and errno is set to ENOSPC. A good value + for CNT is 46. + + For more details, see the POSIX:2001 specification + . */ + +#if !HAVE_DECL_INET_NTOP +extern const char *inet_ntop (int af, const void *restrict src, + char *restrict dst, socklen_t cnt); +#endif diff --git a/lib/intprops.h b/gl/intprops.h similarity index 78% rename from lib/intprops.h rename to gl/intprops.h index 65280b1..34f971c 100644 --- a/lib/intprops.h +++ b/gl/intprops.h @@ -53,12 +53,25 @@ ? (t) -1 \ : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) +/* Return zero if T can be determined to be an unsigned type. + Otherwise, return 1. + When compiling with GCC, INT_STRLEN_BOUND uses this macro to obtain a + tighter bound. Otherwise, it overestimates the true bound by one byte + when applied to unsigned types of size 2, 4, 16, ... bytes. + The symbol signed_type_or_expr__ is private to this header file. */ +#if __GNUC__ >= 2 +# define signed_type_or_expr__(t) TYPE_SIGNED (__typeof__ (t)) +#else +# define signed_type_or_expr__(t) 1 +#endif + /* Bound on length of the string representing an integer type or expression T. - Subtract 1 for the sign bit if t is signed; log10 (2.0) < 146/485; + Subtract 1 for the sign bit if T is signed; log10 (2.0) < 146/485; add 1 for integer division truncation; add 1 more for a minus sign if needed. */ #define INT_STRLEN_BOUND(t) \ - ((sizeof (t) * CHAR_BIT - 1) * 146 / 485 + 2) + ((sizeof (t) * CHAR_BIT - signed_type_or_expr__ (t)) * 146 / 485 \ + + signed_type_or_expr__ (t) + 1) /* Bound on buffer size needed to represent an integer type or expression T, including the terminating null. */ diff --git a/gl/m4/absolute-header.m4 b/gl/m4/absolute-header.m4 new file mode 100644 index 0000000..c649df0 --- /dev/null +++ b/gl/m4/absolute-header.m4 @@ -0,0 +1,44 @@ +# absolute-header.m4 serial 6 +dnl Copyright (C) 2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Derek Price. + +# gl_ABSOLUTE_HEADER(HEADER1 HEADER2 ...) +# --------------------------------------- +# Find the absolute name of a header file, assuming the header exists. +# If the header were sys/inttypes.h, this macro would define +# ABSOLUTE_SYS_INTTYPES_H to the `""' quoted absolute name of sys/inttypes.h +# in config.h +# (e.g. `#define ABSOLUTE_SYS_INTTYPES_H "///usr/include/sys/inttypes.h"'). +# The three "///" are to pacify Sun C 5.8, which otherwise would say +# "warning: #include of /usr/include/... may be non-portable". +# Use `""', not `<>', so that the /// cannot be confused with a C99 comment. +AC_DEFUN([gl_ABSOLUTE_HEADER], +[AC_LANG_PREPROC_REQUIRE()dnl +AC_FOREACH([gl_HEADER_NAME], [$1], + [AS_VAR_PUSHDEF([gl_absolute_header], + [gl_cv_absolute_]m4_quote(m4_defn([gl_HEADER_NAME])))dnl + AC_CACHE_CHECK([absolute name of <]m4_quote(m4_defn([gl_HEADER_NAME]))[>], + m4_quote(m4_defn([gl_absolute_header])), + [AS_VAR_PUSHDEF([ac_header_exists], + [ac_cv_header_]m4_quote(m4_defn([gl_HEADER_NAME])))dnl + AC_CHECK_HEADERS_ONCE(m4_quote(m4_defn([gl_HEADER_NAME])))dnl + if test AS_VAR_GET(ac_header_exists) = yes; then + AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]])]) +dnl eval is necessary to expand ac_cpp. +dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell. + AS_VAR_SET(gl_absolute_header, +[`(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | +sed -n '\#/]m4_quote(m4_defn([gl_HEADER_NAME]))[#{s#.*"\(.*/]m4_quote(m4_defn([gl_HEADER_NAME]))[\)".*#\1#;s#^/[^/]#//&#;p;q;}'`]) + fi + AS_VAR_POPDEF([ac_header_exists])dnl + ])dnl + AC_DEFINE_UNQUOTED(AS_TR_CPP([ABSOLUTE_]m4_quote(m4_defn([gl_HEADER_NAME]))), + ["AS_VAR_GET(gl_absolute_header)"], + [Define this to an absolute name of <]m4_quote(m4_defn([gl_HEADER_NAME]))[>.]) + AS_VAR_POPDEF([gl_absolute_header])dnl +])dnl +])# gl_ABSOLUTE_HEADER diff --git a/m4/alloca.m4 b/gl/m4/alloca.m4 similarity index 55% rename from m4/alloca.m4 rename to gl/m4/alloca.m4 index a9e3f45..eb62e0e 100644 --- a/m4/alloca.m4 +++ b/gl/m4/alloca.m4 @@ -1,5 +1,5 @@ -# alloca.m4 serial 5 -dnl Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +# alloca.m4 serial 7 +dnl Copyright (C) 2002-2004, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -17,16 +17,24 @@ AC_DEFUN([gl_FUNC_ALLOCA], # Define an additional variable used in the Makefile substitution. if test $ac_cv_working_alloca_h = yes; then - AC_EGREP_CPP([Need own alloca], [ + AC_CACHE_CHECK([for alloca as a compiler built-in], [gl_cv_rpl_alloca], [ + AC_EGREP_CPP([Need own alloca], [ #if defined __GNUC__ || defined _AIX || defined _MSC_VER - Need own alloca + Need own alloca #endif - ], - [AC_DEFINE(HAVE_ALLOCA, 1, - [Define to 1 if you have `alloca' after including , - a header that may be supplied by this distribution.]) - ALLOCA_H=alloca.h], - [ALLOCA_H=]) + ], [gl_cv_rpl_alloca=yes], [gl_cv_rpl_alloca=no]) + ]) + if test $gl_cv_rpl_alloca = yes; then + dnl OK, alloca can be implemented through a compiler built-in. + AC_DEFINE([HAVE_ALLOCA], 1, + [Define to 1 if you have 'alloca' after including , + a header that may be supplied by this distribution.]) + ALLOCA_H=alloca.h + else + dnl alloca exists as a library function, i.e. it is slow and probably + dnl a memory leak. Don't define HAVE_ALLOCA in this case. + ALLOCA_H= + fi else ALLOCA_H=alloca.h fi diff --git a/gl/m4/arpa_inet_h.m4 b/gl/m4/arpa_inet_h.m4 new file mode 100644 index 0000000..d01d098 --- /dev/null +++ b/gl/m4/arpa_inet_h.m4 @@ -0,0 +1,18 @@ +# arpa_inet_h.m4 serial 1 +dnl Copyright (C) 2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Written by Simon Josefsson + +AC_DEFUN([gl_HEADER_ARPA_INET], +[ + AC_CHECK_HEADERS_ONCE([arpa/inet.h]) + if test $ac_cv_header_arpa_inet_h = yes; then + ARPA_INET_H='' + else + ARPA_INET_H='arpa/inet.h' + fi + AC_SUBST(ARPA_INET_H) +]) diff --git a/m4/c-strtod.m4 b/gl/m4/c-strtod.m4 similarity index 86% rename from m4/c-strtod.m4 rename to gl/m4/c-strtod.m4 index ffeb458..7f206c7 100644 --- a/m4/c-strtod.m4 +++ b/gl/m4/c-strtod.m4 @@ -1,6 +1,6 @@ -# c-strtod.m4 serial 6 +# c-strtod.m4 serial 9 -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2004, 2005, 2006 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,7 +11,7 @@ AC_DEFUN([gl_C99_STRTOLD], [ AC_CACHE_CHECK([whether strtold conforms to C99], [gl_cv_func_c99_strtold], - [AC_COMPILE_IFELSE( + [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[/* On HP-UX before 11.23, strtold returns a struct instead of long double. Reject implementations like that, by requiring @@ -35,7 +35,6 @@ AC_DEFUN([gl_C99_STRTOLD], AC_DEFUN([gl_C_STRTOD], [ - AC_LIBSOURCES([c-strtod.c, c-strtod.h]) AC_LIBOBJ([c-strtod]) dnl Prerequisites of lib/c-strtod.c. @@ -45,11 +44,10 @@ AC_DEFUN([gl_C_STRTOD], AC_DEFUN([gl_C_STRTOLD], [ - AC_LIBSOURCES([c-strtold.c, c-strtod.h]) AC_LIBOBJ([c-strtold]) dnl Prerequisites of lib/c-strtold.c. - AC_REQUIRE([gl_C_STRTOD]) + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_C99_STRTOLD]) : ]) diff --git a/gl/m4/cloexec.m4 b/gl/m4/cloexec.m4 new file mode 100644 index 0000000..4c4e26a --- /dev/null +++ b/gl/m4/cloexec.m4 @@ -0,0 +1,10 @@ +#serial 6 +dnl Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_CLOEXEC], +[ + AC_LIBOBJ([cloexec]) +]) diff --git a/m4/codeset.m4 b/gl/m4/codeset.m4 similarity index 79% rename from m4/codeset.m4 rename to gl/m4/codeset.m4 index a6e67ec..223955b 100644 --- a/m4/codeset.m4 +++ b/gl/m4/codeset.m4 @@ -1,5 +1,5 @@ -# codeset.m4 serial AM1 (gettext-0.10.40) -dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. +# codeset.m4 serial 2 (gettext-0.16) +dnl Copyright (C) 2000-2002, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -10,7 +10,7 @@ AC_DEFUN([AM_LANGINFO_CODESET], [ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, [AC_TRY_LINK([#include ], - [char* cs = nl_langinfo(CODESET);], + [char* cs = nl_langinfo(CODESET); return !cs;], am_cv_langinfo_codeset=yes, am_cv_langinfo_codeset=no) ]) diff --git a/gl/m4/dirname.m4 b/gl/m4/dirname.m4 new file mode 100644 index 0000000..e35da96 --- /dev/null +++ b/gl/m4/dirname.m4 @@ -0,0 +1,18 @@ +#serial 7 -*- autoconf -*- +dnl Copyright (C) 2002-2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_DIRNAME], +[ + AC_LIBOBJ([basename]) + AC_LIBOBJ([dirname]) + AC_LIBOBJ([stripslash]) + + dnl Prerequisites of lib/dirname.h. + AC_REQUIRE([gl_AC_DOS]) + AC_REQUIRE([gl_DOUBLE_SLASH_ROOT]) + + dnl No prerequisites of lib/basename.c, lib/dirname.c, lib/stripslash.c. +]) diff --git a/m4/dos.m4 b/gl/m4/dos.m4 similarity index 57% rename from m4/dos.m4 rename to gl/m4/dos.m4 index 0713cf1..dd59571 100644 --- a/m4/dos.m4 +++ b/gl/m4/dos.m4 @@ -1,9 +1,9 @@ -#serial 9 +#serial 10 -*- autoconf -*- # Define some macros required for proper operation of code in lib/*.c # on MSDOS/Windows systems. -# Copyright (C) 2000, 2001, 2004 Free Software Foundation, Inc. +# Copyright (C) 2000, 2001, 2004, 2005, 2006 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. @@ -14,30 +14,38 @@ AC_DEFUN([gl_AC_DOS], [ AC_CACHE_CHECK([whether system is Windows or MSDOS], [ac_cv_win_or_dos], [ - AC_TRY_COMPILE([], - [#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __CYGWIN__ + AC_TRY_COMPILE([], + [#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __CYGWIN__ neither MSDOS nor Windows #endif], - [ac_cv_win_or_dos=yes], - [ac_cv_win_or_dos=no]) + [ac_cv_win_or_dos=yes], + [ac_cv_win_or_dos=no]) ]) 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 + AC_CACHE_CHECK([whether drive letter can start relative path], + [ac_cv_drive_letter_can_be_relative], + [ + AC_TRY_COMPILE([], + [#if defined __CYGWIN__ +drive letters are always absolute +#endif], + [ac_cv_drive_letter_can_be_relative=yes], + [ac_cv_drive_letter_can_be_relative=no]) + ]) + 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 - AH_VERBATIM(FILE_SYSTEM_PREFIX_LEN, - [#if FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX -# define FILE_SYSTEM_PREFIX_LEN(Filename) \ - ((Filename)[0] && (Filename)[1] == ':' ? 2 : 0) -#else -# define FILE_SYSTEM_PREFIX_LEN(Filename) 0 -#endif]) - AC_DEFINE_UNQUOTED([FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX], $ac_fs_accepts_drive_letter_prefix, [Define on systems for which file names may have a so-called @@ -55,4 +63,9 @@ neither MSDOS nor Windows $ac_fs_backslash_is_file_name_separator, [Define if the backslash character may also serve as a file name component separator.]) + + AC_DEFINE_UNQUOTED([FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE], + $ac_fs_drive_letter_can_be_relative, + [Define if a drive letter prefix denotes a relative path if it is + not followed by a file name component separator.]) ]) diff --git a/gl/m4/double-slash-root.m4 b/gl/m4/double-slash-root.m4 new file mode 100644 index 0000000..69d60d0 --- /dev/null +++ b/gl/m4/double-slash-root.m4 @@ -0,0 +1,38 @@ +# double-slash-root.m4 serial 2 -*- Autoconf -*- +dnl Copyright (C) 2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_DOUBLE_SLASH_ROOT], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_CACHE_CHECK([whether // is distinct from /], [gl_cv_double_slash_root], + [ if test x"$cross_compiling" = xyes ; then + # When cross-compiling, there is no way to tell whether // is special + # short of a list of hosts. However, the only known hosts to date + # that have a distinct // are Apollo DomainOS (too old to port to), + # Cygwin, and z/OS. If anyone knows of another system for which // has + # special semantics and is distinct from /, please report it to + # . + case $host in + *-cygwin | i370-ibm-openedition) + gl_cv_double_slash_root=yes ;; + *) + # Be optimistic and assume that / and // are the same when we + # don't know. + gl_cv_double_slash_root='unknown, assuming no' ;; + esac + else + set x `ls -di / //` + if test $[2] = $[4] && wc //dev/null >/dev/null 2>&1; then + gl_cv_double_slash_root=no + else + gl_cv_double_slash_root=yes + fi + fi]) + if test "$gl_cv_double_slash_root" = yes; then + AC_DEFINE([DOUBLE_SLASH_IS_DISTINCT_ROOT], 1, + [Define to 1 if // is a file system root distinct from /.]) + fi +]) diff --git a/gl/m4/eoverflow.m4 b/gl/m4/eoverflow.m4 new file mode 100644 index 0000000..3bffd10 --- /dev/null +++ b/gl/m4/eoverflow.m4 @@ -0,0 +1,70 @@ +# eoverflow.m4 serial 2 +dnl Copyright (C) 2004, 2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +# The EOVERFLOW errno value ought to be defined in , according to +# POSIX. But some systems (like AIX 3) don't define it, and some systems +# (like OSF/1) define it when _XOPEN_SOURCE_EXTENDED is defined. + +# Define EOVERFLOW as a C macro and as a substituted macro in such a way that +# 1. on all systems, after inclusion of , EOVERFLOW is usable, +# 2. on systems where EOVERFLOW is defined elsewhere, we use the same numeric +# value. + +AC_DEFUN([gl_EOVERFLOW], +[ + AC_REQUIRE([AC_PROG_CC])dnl + + AC_CACHE_CHECK([for EOVERFLOW], ac_cv_decl_EOVERFLOW, [ + AC_EGREP_CPP(yes,[ +#include +#ifdef EOVERFLOW +yes +#endif + ], have_eoverflow=1) + if test -n "$have_eoverflow"; then + dnl EOVERFLOW exists in . Don't need to define EOVERFLOW ourselves. + ac_cv_decl_EOVERFLOW=yes + else + AC_EGREP_CPP(yes,[ +#define _XOPEN_SOURCE_EXTENDED 1 +#include +#ifdef EOVERFLOW +yes +#endif + ], have_eoverflow=1) + if test -n "$have_eoverflow"; then + dnl EOVERFLOW exists but is hidden. + dnl Define it to the same value. + AC_COMPUTE_INT([ac_cv_decl_EOVERFLOW], [EOVERFLOW], [ +#define _XOPEN_SOURCE_EXTENDED 1 +#include +/* The following two lines are a workaround against an autoconf-2.52 bug. */ +#include +#include +]) + else + dnl EOVERFLOW isn't defined by the system. Define EOVERFLOW ourselves, but + dnl don't define it as EINVAL, because snprintf() callers want to + dnl distinguish EINVAL and EOVERFLOW. + ac_cv_decl_EOVERFLOW=E2BIG + fi + fi + ]) + if test "$ac_cv_decl_EOVERFLOW" != yes; then + AC_DEFINE_UNQUOTED([EOVERFLOW], [$ac_cv_decl_EOVERFLOW], + [Define as good substitute value for EOVERFLOW.]) + EOVERFLOW="$ac_cv_decl_EOVERFLOW" + AC_SUBST(EOVERFLOW) + fi +]) + +dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. +dnl Remove this when we can assume autoconf >= 2.61. +m4_ifdef([AC_COMPUTE_INT], [], [ + AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) +]) diff --git a/m4/error.m4 b/gl/m4/error.m4 similarity index 100% rename from m4/error.m4 rename to gl/m4/error.m4 diff --git a/m4/exitfail.m4 b/gl/m4/exitfail.m4 similarity index 69% rename from m4/exitfail.m4 rename to gl/m4/exitfail.m4 index 5523676..b7a691e 100644 --- a/m4/exitfail.m4 +++ b/gl/m4/exitfail.m4 @@ -1,12 +1,11 @@ -# exitfail.m4 serial 5 -dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. +# exitfail.m4 serial 6 +dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_EXITFAIL], [ - AC_LIBSOURCES([exitfail.c, exitfail.h]) AC_LIBOBJ([exitfail]) dnl No prerequisites of lib/exitfail.c. diff --git a/gl/m4/extensions.m4 b/gl/m4/extensions.m4 new file mode 100644 index 0000000..143a9e5 --- /dev/null +++ b/gl/m4/extensions.m4 @@ -0,0 +1,58 @@ +# serial 4 -*- Autoconf -*- +# Enable extensions on systems that normally disable them. + +# Copyright (C) 2003, 2006 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. + +# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS +# Autoconf. Perhaps we can remove this once we can assume Autoconf +# 2.61 or later everywhere, but since CVS Autoconf mutates rapidly +# enough in this area it's likely we'll need to redefine +# AC_USE_SYSTEM_EXTENSIONS for quite some time. + +# AC_USE_SYSTEM_EXTENSIONS +# ------------------------ +# Enable extensions on systems that normally disable them, +# typically due to standards-conformance issues. +AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], +[ + AC_BEFORE([$0], [AC_COMPILE_IFELSE]) + AC_BEFORE([$0], [AC_RUN_IFELSE]) + + AC_REQUIRE([AC_GNU_SOURCE]) + AC_REQUIRE([AC_AIX]) + AC_REQUIRE([AC_MINIX]) + + AH_VERBATIM([__EXTENSIONS__], +[/* Enable extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#endif]) + AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], + [ac_cv_safe_to_define___extensions__], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([ +# define __EXTENSIONS__ 1 + AC_INCLUDES_DEFAULT])], + [ac_cv_safe_to_define___extensions__=yes], + [ac_cv_safe_to_define___extensions__=no])]) + test $ac_cv_safe_to_define___extensions__ = yes && + AC_DEFINE([__EXTENSIONS__]) + AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) + AC_DEFINE([_TANDEM_SOURCE]) +]) + +# gl_USE_SYSTEM_EXTENSIONS +# ------------------------ +# Enable extensions on systems that normally disable them, +# typically due to standards-conformance issues. +AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS], + [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])]) diff --git a/m4/fcntl-safer.m4 b/gl/m4/fcntl-safer.m4 similarity index 67% rename from m4/fcntl-safer.m4 rename to gl/m4/fcntl-safer.m4 index be210f9..3475b0a 100644 --- a/m4/fcntl-safer.m4 +++ b/gl/m4/fcntl-safer.m4 @@ -1,12 +1,11 @@ -#serial 2 -dnl Copyright (C) 2005 Free Software Foundation, Inc. +#serial 5 +dnl Copyright (C) 2005-2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FCNTL_SAFER], [ - AC_LIBSOURCES([creat-safer.c, fcntl-safer.h, open-safer.c, fcntl--.h]) AC_LIBOBJ([open-safer]) AC_LIBOBJ([creat-safer]) ]) diff --git a/gl/m4/fstypename.m4 b/gl/m4/fstypename.m4 new file mode 100644 index 0000000..aa676f3 --- /dev/null +++ b/gl/m4/fstypename.m4 @@ -0,0 +1,22 @@ +#serial 6 + +dnl From Jim Meyering. +dnl +dnl See if struct statfs has the f_fstypename member. +dnl If so, define HAVE_STRUCT_STATFS_F_FSTYPENAME. +dnl + +# Copyright (C) 1998, 1999, 2001, 2004, 2006 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. + +AC_DEFUN([gl_FSTYPENAME], +[ + AC_CHECK_MEMBERS([struct statfs.f_fstypename],,, + [ + #include + #include + #include + ]) +]) diff --git a/m4/fsusage.m4 b/gl/m4/fsusage.m4 similarity index 92% rename from m4/fsusage.m4 rename to gl/m4/fsusage.m4 index dd10f79..08bf06c 100644 --- a/m4/fsusage.m4 +++ b/gl/m4/fsusage.m4 @@ -1,7 +1,7 @@ -#serial 16 +#serial 22 # Obtaining file system usage information. -# Copyright (C) 1997, 1998, 2000, 2001, 2003, 2004, 2005 Free Software +# Copyright (C) 1997, 1998, 2000, 2001, 2003, 2004, 2005, 2006 Free Software # Foundation, Inc. # # This file is free software; the Free Software Foundation @@ -12,8 +12,6 @@ AC_DEFUN([gl_FSUSAGE], [ - AC_LIBSOURCES([fsusage.c, fsusage.h]) - AC_CHECK_HEADERS_ONCE(sys/param.h) AC_CHECK_HEADERS_ONCE(sys/vfs.h sys/fs_types.h) AC_CHECK_HEADERS(sys/mount.h, [], [], @@ -37,7 +35,7 @@ AC_DEFUN([gl_FSUSAGE], AC_DEFUN([gl_FILE_SYSTEM_USAGE], [ -echo "checking how to get file system space usage..." +AC_MSG_NOTICE([checking how to get file system space usage]) ac_fsusage_space=no # Perform only the link test since it seems there are no variants of the @@ -50,10 +48,12 @@ if test $ac_fsusage_space = no; then # SVR4 AC_CACHE_CHECK([for statvfs function (SVR4)], fu_cv_sys_stat_statvfs, [AC_TRY_LINK([#include -#ifdef __GLIBC__ +#if defined __GLIBC__ && !defined __BEOS__ Do not use statvfs on systems with GNU libc, 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 BeOS operates differently: it only makes a system +call. #endif #include ], [struct statvfs fsd; statvfs (0, &fsd);], @@ -74,11 +74,12 @@ if test $ac_fsusage_space = no; then #include #include #include + int main () { struct statfs fsd; fsd.f_fsize = 0; - exit (statfs (".", &fsd, sizeof (struct statfs))); + return statfs (".", &fsd, sizeof (struct statfs)) != 0; }], fu_cv_sys_stat_statfs3_osf1=yes, fu_cv_sys_stat_statfs3_osf1=no, @@ -106,11 +107,12 @@ member (AIX, 4.3BSD)]) #ifdef HAVE_SYS_VFS_H #include #endif + int main () { struct statfs fsd; fsd.f_bsize = 0; - exit (statfs (".", &fsd)); + return statfs (".", &fsd) != 0; }], fu_cv_sys_stat_statfs2_bsize=yes, fu_cv_sys_stat_statfs2_bsize=no, @@ -130,10 +132,11 @@ if test $ac_fsusage_space = no; then AC_CACHE_VAL(fu_cv_sys_stat_statfs4, [AC_TRY_RUN([#include #include + int main () { struct statfs fsd; - exit (statfs (".", &fsd, sizeof fsd, 0)); + return statfs (".", &fsd, sizeof fsd, 0) != 0; }], fu_cv_sys_stat_statfs4=yes, fu_cv_sys_stat_statfs4=no, @@ -158,11 +161,12 @@ member (4.4BSD and NetBSD)]) #ifdef HAVE_SYS_MOUNT_H #include #endif + int main () { struct statfs fsd; fsd.f_fsize = 0; - exit (statfs (".", &fsd)); + return statfs (".", &fsd) != 0; }], fu_cv_sys_stat_statfs2_fsize=yes, fu_cv_sys_stat_statfs2_fsize=no, @@ -190,12 +194,13 @@ if test $ac_fsusage_space = no; then #ifdef HAVE_SYS_FS_TYPES_H #include #endif + int main () { struct fs_data fsd; /* Ultrix's statfs returns 1 for success, 0 for not mounted, -1 for failure. */ - exit (statfs (".", &fsd) != 1); + return statfs (".", &fsd) != 1; }], fu_cv_sys_stat_fs_data=yes, fu_cv_sys_stat_fs_data=no, @@ -237,7 +242,8 @@ choke -- this is a workaround for a Sun-specific problem #endif #include #include ]], - [[struct statfs t; long c = *(t.f_spare);]])], + [[struct statfs t; long c = *(t.f_spare); + if (c) return 0;]])], [fu_cv_sys_truncating_statfs=yes], [fu_cv_sys_truncating_statfs=no])]) if test $fu_cv_sys_truncating_statfs = yes; then @@ -254,7 +260,6 @@ choke -- this is a workaround for a Sun-specific problem # Prerequisites of lib/fsusage.c not done by gl_FILE_SYSTEM_USAGE. AC_DEFUN([gl_PREREQ_FSUSAGE_EXTRA], [ - AC_REQUIRE([gl_AC_TYPE_UINTMAX_T]) - AC_CHECK_HEADERS(dustat.h sys/fs/s5param.h sys/filsys.h sys/statfs.h sys/statvfs.h) + AC_CHECK_HEADERS(dustat.h sys/fs/s5param.h sys/filsys.h sys/statfs.h) gl_STATFS_TRUNCATES ]) diff --git a/gl/m4/getaddrinfo.m4 b/gl/m4/getaddrinfo.m4 new file mode 100644 index 0000000..db285d9 --- /dev/null +++ b/gl/m4/getaddrinfo.m4 @@ -0,0 +1,88 @@ +# getaddrinfo.m4 serial 11 +dnl Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_GETADDRINFO], +[ + AC_MSG_NOTICE([checking how to do getaddrinfo, freeaddrinfo and getnameinfo]) + + AC_SEARCH_LIBS(getaddrinfo, [nsl socket]) + AC_CHECK_FUNCS(getaddrinfo,, [ + AC_CACHE_CHECK(for getaddrinfo in ws2tcpip.h and -lws2_32, + gl_cv_w32_getaddrinfo, [ + gl_cv_w32_getaddrinfo=no + am_save_LIBS="$LIBS" + LIBS="$LIBS -lws2_32" + AC_TRY_LINK([ +#ifdef HAVE_WS2TCPIP_H +#include +#endif +], [getaddrinfo(0, 0, 0, 0);], gl_cv_w32_getaddrinfo=yes) + LIBS="$am_save_LIBS"]) + if test "$gl_cv_w32_getaddrinfo" = "yes"; then + LIBS="$LIBS -lws2_32" + else + AC_LIBOBJ(getaddrinfo) + fi + ]) + + AC_REPLACE_FUNCS(gai_strerror) + gl_PREREQ_GETADDRINFO +]) + +# Prerequisites of lib/getaddrinfo.h and lib/getaddrinfo.c. +AC_DEFUN([gl_PREREQ_GETADDRINFO], [ + AC_SEARCH_LIBS(gethostbyname, [inet nsl]) + AC_SEARCH_LIBS(getservbyname, [inet nsl socket xnet]) + AC_CHECK_FUNCS(gethostbyname,, [ + AC_CACHE_CHECK(for gethostbyname in winsock2.h and -lws2_32, + gl_cv_w32_gethostbyname, [ + gl_cv_w32_gethostbyname=no + am_save_LIBS="$LIBS" + LIBS="$LIBS -lws2_32" + AC_TRY_LINK([ +#ifdef HAVE_WINSOCK2_H +#include +#endif +], [gethostbyname(0);], gl_cv_w32_gethostbyname=yes) + LIBS="$am_save_LIBS"]) + if test "$gl_cv_w32_gethostbyname" = "yes"; then + LIBS="$LIBS -lws2_32" + fi + ]) + AC_REQUIRE([AC_C_RESTRICT]) + AC_REQUIRE([gl_SOCKET_FAMILIES]) + AC_REQUIRE([gl_HEADER_SYS_SOCKET]) + AC_REQUIRE([AC_C_INLINE]) + AC_REQUIRE([AC_GNU_SOURCE]) + AC_CHECK_HEADERS_ONCE(netinet/in.h netdb.h) + AC_CHECK_DECLS([getaddrinfo, freeaddrinfo, gai_strerror, getnameinfo],,,[ + /* 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 +]) + AC_CHECK_TYPES([struct addrinfo],,,[ +#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETDB_H +#include +#endif +#ifdef HAVE_WS2TCPIP_H +#include +#endif +]) +]) diff --git a/gl/m4/gethostname.m4 b/gl/m4/gethostname.m4 new file mode 100644 index 0000000..1e9749d --- /dev/null +++ b/gl/m4/gethostname.m4 @@ -0,0 +1,18 @@ +# gethostname.m4 serial 2 +dnl Copyright (C) 2002 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_FUNC_GETHOSTNAME], +[ + AC_REPLACE_FUNCS(gethostname) + if test $ac_cv_func_gethostname = no; then + gl_PREREQ_GETHOSTNAME + fi +]) + +# Prerequisites of lib/gethostname.c. +AC_DEFUN([gl_PREREQ_GETHOSTNAME], [ + AC_CHECK_FUNCS(uname) +]) diff --git a/gl/m4/getloadavg.m4 b/gl/m4/getloadavg.m4 new file mode 100644 index 0000000..8243729 --- /dev/null +++ b/gl/m4/getloadavg.m4 @@ -0,0 +1,155 @@ +# Check for getloadavg. + +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2002, 2003, +# 2006 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. + +# Autoconf defines AC_FUNC_GETLOADAVG, but that is obsolescent. +# New applications should use gl_GETLOADAVG instead. + +# gl_GETLOADAVG(LIBOBJDIR) +# ------------------------ +AC_DEFUN([gl_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/$1/getloadavg.c" || + AC_MSG_ERROR([$srcdir/$1/getloadavg.c is missing]) + +gl_save_LIBS=$LIBS + +# Check for getloadavg, but be sure not to touch the cache variable. +(AC_CHECK_FUNC(getloadavg, exit 0, exit 1)) && gl_have_func=yes + +# On HPUX9, an unprivileged user can get load averages through this function. +AC_CHECK_FUNCS(pstat_getdynamic) + +# Solaris has libkstat which does not require root. +AC_CHECK_LIB(kstat, kstat_open) +test $ac_cv_lib_kstat_kstat_open = 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 + AC_CHECK_LIB(elf, elf_begin, LIBS="-lelf $LIBS") +fi +if test $gl_have_func = no; then + AC_CHECK_LIB(kvm, kvm_open, LIBS="-lkvm $LIBS") + # Check for the 4.4BSD definition of getloadavg. + AC_CHECK_LIB(util, getloadavg, + [LIBS="-lutil $LIBS" gl_have_func=yes gl_cv_func_getloadavg_setgid=yes]) +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" + AC_CHECK_LIB(getloadavg, getloadavg, + [LIBS="-lgetloadavg $LIBS"], [LIBS=$gl_getloadavg_LIBS]) +fi + +# Make sure it is really in the library, if we think we found it, +# otherwise set up the replacement function. +AC_CHECK_FUNCS(getloadavg, [], + [gl_PREREQ_GETLOADAVG]) + +# Some definitions of getloadavg require that the program be installed setgid. +AC_CACHE_CHECK(whether getloadavg requires setgid, + gl_cv_func_getloadavg_setgid, +[AC_EGREP_CPP([Yowza Am I SETGID yet], +[#define CONFIGURING_GETLOADAVG +#include "$srcdir/$1/getloadavg.c" +#ifdef LDAV_PRIVILEGED +Yowza Am I SETGID yet +#endif +], + gl_cv_func_getloadavg_setgid=yes, + gl_cv_func_getloadavg_setgid=no)]) +if test $gl_cv_func_getloadavg_setgid = yes; then + NEED_SETGID=true + AC_DEFINE(GETLOADAVG_PRIVILEGED, 1, + [Define to 1 if the `getloadavg' function needs to be run setuid + or setgid.]) +else + NEED_SETGID=false +fi +AC_SUBST(NEED_SETGID)dnl + +if test $gl_cv_func_getloadavg_setgid = yes; then + AC_CACHE_CHECK(group of /dev/kmem, gl_cv_group_kmem, +[ # 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']` +]) + AC_SUBST(KMEM_GROUP, $gl_cv_group_kmem)dnl +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 + +AC_SUBST(GETLOADAVG_LIBS)dnl +])# gl_GETLOADAVG + + +# gl_PREREQ_GETLOADAVG +# -------------------- +# Set up the AC_LIBOBJ replacement of `getloadavg'. +AC_DEFUN([gl_PREREQ_GETLOADAVG], +[AC_LIBOBJ(getloadavg) +AC_DEFINE(C_GETLOADAVG, 1, [Define to 1 if using `getloadavg.c'.]) +# Figure out what our getloadavg.c needs. +gl_have_func=no +AC_CHECK_HEADER(sys/dg_sys_info.h, +[gl_have_func=yes + AC_DEFINE(DGUX, 1, [Define to 1 for DGUX with .]) + AC_CHECK_LIB(dgc, dg_sys_info)]) + +# 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 + AC_DEFINE(SVR4, 1, [Define to 1 on System V Release 4.]) +fi + +if test $gl_have_func = no; then + AC_CHECK_HEADER(inq_stats/cpustats.h, + [gl_have_func=yes + AC_DEFINE(UMAX, 1, [Define to 1 for Encore UMAX.]) + AC_DEFINE(UMAX4_3, 1, + [Define to 1 for Encore UMAX 4.3 that has + instead of .])]) +fi + +if test $gl_have_func = no; then + AC_CHECK_HEADER(sys/cpustats.h, + [gl_have_func=yes; AC_DEFINE(UMAX)]) +fi + +if test $gl_have_func = no; then + AC_CHECK_HEADERS(mach/mach.h) +fi + +AC_CHECK_HEADERS(nlist.h, +[AC_CHECK_MEMBERS([struct nlist.n_un.n_name], + [AC_DEFINE(NLIST_NAME_UNION, 1, + [Define to 1 if your `struct nlist' has an + `n_un' member. Obsolete, depend on + `HAVE_STRUCT_NLIST_N_UN_N_NAME])], [], + [@%:@include ]) +])dnl +])# gl_PREREQ_GETLOADAVG diff --git a/m4/getopt.m4 b/gl/m4/getopt.m4 similarity index 90% rename from m4/getopt.m4 rename to gl/m4/getopt.m4 index 6b98782..c0a73b2 100644 --- a/m4/getopt.m4 +++ b/gl/m4/getopt.m4 @@ -1,11 +1,11 @@ -# getopt.m4 serial 11 -dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +# getopt.m4 serial 13 +dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # The getopt module assume you want GNU getopt, with getopt_long etc, -# rather than vanilla POSIX getopt. This means your your code should +# rather than vanilla POSIX getopt. This means your code should # always include for the getopt prototypes. AC_DEFUN([gl_GETOPT_SUBSTITUTE], @@ -77,4 +77,7 @@ AC_DEFUN([gl_GETOPT_IFELSE], AC_DEFUN([gl_GETOPT], [gl_GETOPT_IFELSE([gl_GETOPT_SUBSTITUTE])]) # Prerequisites of lib/getopt*. -AC_DEFUN([gl_PREREQ_GETOPT], [:]) +AC_DEFUN([gl_PREREQ_GETOPT], +[ + AC_CHECK_DECLS_ONCE([getenv]) +]) diff --git a/m4/gettext.m4 b/gl/m4/gettext.m4 similarity index 61% rename from m4/gettext.m4 rename to gl/m4/gettext.m4 index 624a807..91c345e 100644 --- a/m4/gettext.m4 +++ b/gl/m4/gettext.m4 @@ -1,5 +1,5 @@ -# gettext.m4 serial 37 (gettext-0.14.4) -dnl Copyright (C) 1995-2005 Free Software Foundation, Inc. +# gettext.m4 serial 59 (gettext-0.16.1) +dnl Copyright (C) 1995-2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -15,7 +15,7 @@ dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. -dnl Bruno Haible , 2000-2003. +dnl Bruno Haible , 2000-2006. dnl Macro to add for using GNU gettext. @@ -63,8 +63,13 @@ AC_DEFUN([AM_GNU_GETTEXT], ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT ])])])]) - define([gt_included_intl], ifelse([$1], [external], [no], [yes])) + define([gt_included_intl], + ifelse([$1], [external], + ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), + [yes])) define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) + gt_NEEDS_INIT + AM_GNU_GETTEXT_NEED([$2]) AC_REQUIRE([AM_PO_SUBDIRS])dnl ifelse(gt_included_intl, yes, [ @@ -78,7 +83,7 @@ AC_DEFUN([AM_GNU_GETTEXT], dnl Sometimes libintl requires libiconv, so first search for libiconv. dnl Ideally we would do this search only after the dnl if test "$USE_NLS" = "yes"; then - dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then + dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT dnl the configure script would need to contain the same shell code dnl again, outside any 'if'. There are two solutions: @@ -94,7 +99,7 @@ AC_DEFUN([AM_GNU_GETTEXT], gt_INTL_MACOSX dnl Set USE_NLS. - AM_NLS + AC_REQUIRE([AM_NLS]) ifelse(gt_included_intl, yes, [ BUILD_INCLUDED_LIBINTL=no @@ -104,6 +109,15 @@ AC_DEFUN([AM_GNU_GETTEXT], LTLIBINTL= POSUB= + dnl Add a version number to the cache macros. + case " $gt_needs " in + *" need-formatstring-macros "*) gt_api_version=3 ;; + *" need-ngettext "*) gt_api_version=2 ;; + *) gt_api_version=1 ;; + esac + gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" + gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" + dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no @@ -122,28 +136,35 @@ AC_DEFUN([AM_GNU_GETTEXT], dnl to use. If GNU gettext is available we use this. Else we have dnl to fall back to GNU NLS library. - dnl Add a version number to the cache macros. - define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1))) - define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc]) - define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl]) - - AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, - [AC_TRY_LINK([#include -]ifelse([$2], [need-formatstring-macros], -[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION + if test $gt_api_version -ge 3; then + gt_revision_test_code=' +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl -], [])[extern int _nl_msg_cat_cntr; +' + else + gt_revision_test_code= + fi + if test $gt_api_version -ge 2; then + gt_expression_test_code=' + * ngettext ("", "", 0)' + else + gt_expression_test_code= + fi + + AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], + [AC_TRY_LINK([#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings;], [bindtextdomain ("", ""); -return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings], - gt_cv_func_gnugettext_libc=yes, - gt_cv_func_gnugettext_libc=no)]) +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings], + [eval "$gt_func_gnugettext_libc=yes"], + [eval "$gt_func_gnugettext_libc=no"])]) - if test "$gt_cv_func_gnugettext_libc" != "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl Sometimes libintl requires libiconv, so first search for libiconv. ifelse(gt_included_intl, yes, , [ AM_ICONV_LINK @@ -154,52 +175,40 @@ return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], dnl even if libiconv doesn't exist. AC_LIB_LINKFLAGS_BODY([intl]) AC_CACHE_CHECK([for GNU gettext in libintl], - gt_cv_func_gnugettext_libintl, + [$gt_func_gnugettext_libintl], [gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" dnl Now see whether libintl exists and does not depend on libiconv. AC_TRY_LINK([#include -]ifelse([$2], [need-formatstring-macros], -[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION -#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) -#endif -changequote(,)dnl -typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; -changequote([,])dnl -], [])[extern int _nl_msg_cat_cntr; +$gt_revision_test_code +extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *);], [bindtextdomain ("", ""); -return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")], - gt_cv_func_gnugettext_libintl=yes, - gt_cv_func_gnugettext_libintl=no) +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], + [eval "$gt_func_gnugettext_libintl=yes"], + [eval "$gt_func_gnugettext_libintl=no"]) dnl Now see whether libintl exists and depends on libiconv. - if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include -]ifelse([$2], [need-formatstring-macros], -[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION -#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) -#endif -changequote(,)dnl -typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; -changequote([,])dnl -], [])[extern int _nl_msg_cat_cntr; +$gt_revision_test_code +extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *);], [bindtextdomain ("", ""); -return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")], +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], [LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" - gt_cv_func_gnugettext_libintl=yes + eval "$gt_func_gnugettext_libintl=yes" ]) fi CPPFLAGS="$gt_save_CPPFLAGS" @@ -210,8 +219,8 @@ return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], dnl use it. But if this macro is used in GNU gettext, and GNU dnl gettext is already preinstalled in libintl, we update this dnl libintl. (Cf. the install rule in intl/Makefile.in.) - if test "$gt_cv_func_gnugettext_libc" = "yes" \ - || { test "$gt_cv_func_gnugettext_libintl" = "yes" \ + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ + || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes @@ -234,8 +243,8 @@ return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], dnl Mark actions used to generate GNU NLS library. BUILD_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes - LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV" - LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV" + LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" + LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi @@ -271,7 +280,7 @@ return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], if test "$USE_NLS" = "yes"; then AC_MSG_CHECKING([where the gettext function comes from]) if test "$gt_use_preinstalled_gnugettext" = "yes"; then - if test "$gt_cv_func_gnugettext_libintl" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" @@ -285,7 +294,7 @@ return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then - if test "$gt_cv_func_gnugettext_libintl" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then AC_MSG_CHECKING([how to link with libintl]) AC_MSG_RESULT([$LIBINTL]) AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) @@ -353,134 +362,6 @@ return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], ]) -dnl Checks for all prerequisites of the intl subdirectory, -dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, -dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. -AC_DEFUN([AM_INTL_SUBDIR], -[ - AC_REQUIRE([AC_PROG_INSTALL])dnl - AC_REQUIRE([AM_MKINSTALLDIRS])dnl - AC_REQUIRE([AC_PROG_CC])dnl - AC_REQUIRE([AC_CANONICAL_HOST])dnl - AC_REQUIRE([gt_GLIBC2])dnl - AC_REQUIRE([AC_PROG_RANLIB])dnl - AC_REQUIRE([AC_ISC_POSIX])dnl - AC_REQUIRE([AC_HEADER_STDC])dnl - AC_REQUIRE([AC_C_CONST])dnl - AC_REQUIRE([bh_C_SIGNED])dnl - AC_REQUIRE([AC_C_INLINE])dnl - AC_REQUIRE([AC_TYPE_OFF_T])dnl - AC_REQUIRE([AC_TYPE_SIZE_T])dnl - AC_REQUIRE([gl_AC_TYPE_LONG_LONG])dnl - AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl - AC_REQUIRE([gt_TYPE_WCHAR_T])dnl - AC_REQUIRE([gt_TYPE_WINT_T])dnl - AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) - AC_REQUIRE([gl_AC_HEADER_STDINT_H]) - AC_REQUIRE([gt_TYPE_INTMAX_T]) - AC_REQUIRE([gt_PRINTF_POSIX]) - AC_REQUIRE([AC_FUNC_ALLOCA])dnl - AC_REQUIRE([AC_FUNC_MMAP])dnl - AC_REQUIRE([gl_GLIBC21])dnl - AC_REQUIRE([gt_INTDIV0])dnl - AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl - AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl - AC_REQUIRE([gt_INTTYPES_PRI])dnl - AC_REQUIRE([gl_XSIZE])dnl - AC_REQUIRE([gt_INTL_MACOSX])dnl - - AC_CHECK_TYPE([ptrdiff_t], , - [AC_DEFINE([ptrdiff_t], [long], - [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) - ]) - AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ -stdlib.h string.h unistd.h sys/param.h]) - AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \ -mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \ -strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \ -__fsetlocking]) - - dnl Use the _snprintf function only if it is declared (because on NetBSD it - dnl is defined as a weak alias of snprintf; we prefer to use the latter). - gt_CHECK_DECL(_snprintf, [#include ]) - gt_CHECK_DECL(_snwprintf, [#include ]) - - dnl Use the *_unlocked functions only if they are declared. - dnl (because some of them were defined without being declared in Solaris - dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built - dnl on Solaris 2.5.1 to run on Solaris 2.6). - dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. - gt_CHECK_DECL(feof_unlocked, [#include ]) - gt_CHECK_DECL(fgets_unlocked, [#include ]) - gt_CHECK_DECL(getc_unlocked, [#include ]) - - case $gt_cv_func_printf_posix in - *yes) HAVE_POSIX_PRINTF=1 ;; - *) HAVE_POSIX_PRINTF=0 ;; - esac - AC_SUBST([HAVE_POSIX_PRINTF]) - if test "$ac_cv_func_asprintf" = yes; then - HAVE_ASPRINTF=1 - else - HAVE_ASPRINTF=0 - fi - AC_SUBST([HAVE_ASPRINTF]) - if test "$ac_cv_func_snprintf" = yes; then - HAVE_SNPRINTF=1 - else - HAVE_SNPRINTF=0 - fi - AC_SUBST([HAVE_SNPRINTF]) - if test "$ac_cv_func_wprintf" = yes; then - HAVE_WPRINTF=1 - else - HAVE_WPRINTF=0 - fi - AC_SUBST([HAVE_WPRINTF]) - - AM_ICONV - AM_LANGINFO_CODESET - if test $ac_cv_header_locale_h = yes; then - gt_LC_MESSAGES - fi - - if test -n "$INTL_MACOSX_LIBS"; then - CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers" - fi - - dnl intl/plural.c is generated from intl/plural.y. It requires bison, - dnl because plural.y uses bison specific features. It requires at least - dnl bison-1.26 because earlier versions generate a plural.c that doesn't - dnl compile. - dnl bison is only needed for the maintainer (who touches plural.y). But in - dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put - dnl the rule in general Makefile. Now, some people carelessly touch the - dnl files or have a broken "make" program, hence the plural.c rule will - dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not - dnl present or too old. - AC_CHECK_PROGS([INTLBISON], [bison]) - if test -z "$INTLBISON"; then - ac_verc_fail=yes - else - dnl Found it, now check the version. - AC_MSG_CHECKING([version of bison]) -changequote(<<,>>)dnl - ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) -changequote([,])dnl - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - esac - AC_MSG_RESULT([$ac_prog_version]) - fi - if test $ac_verc_fail = yes; then - INTLBISON=: - fi -]) - - dnl Checks for special options needed on MacOS X. dnl Defines INTL_MACOSX_LIBS. AC_DEFUN([gt_INTL_MACOSX], @@ -488,15 +369,12 @@ AC_DEFUN([gt_INTL_MACOSX], dnl Check for API introduced in MacOS X 10.2. AC_CACHE_CHECK([for CFPreferencesCopyAppValue], gt_cv_func_CFPreferencesCopyAppValue, - [gt_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers" - gt_save_LIBS="$LIBS" - LIBS="$LIBS -framework CoreFoundation" - AC_TRY_LINK([#include ], + [gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + AC_TRY_LINK([#include ], [CFPreferencesCopyAppValue(NULL, NULL)], [gt_cv_func_CFPreferencesCopyAppValue=yes], [gt_cv_func_CFPreferencesCopyAppValue=no]) - CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1, @@ -504,14 +382,11 @@ AC_DEFUN([gt_INTL_MACOSX], fi dnl Check for API introduced in MacOS X 10.3. AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent, - [gt_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers" - gt_save_LIBS="$LIBS" - LIBS="$LIBS -framework CoreFoundation" - AC_TRY_LINK([#include ], [CFLocaleCopyCurrent();], + [gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + AC_TRY_LINK([#include ], [CFLocaleCopyCurrent();], [gt_cv_func_CFLocaleCopyCurrent=yes], [gt_cv_func_CFLocaleCopyCurrent=no]) - CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFLocaleCopyCurrent = yes; then AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1, @@ -525,23 +400,18 @@ AC_DEFUN([gt_INTL_MACOSX], ]) -dnl gt_CHECK_DECL(FUNC, INCLUDES) -dnl Check whether a function is declared. -AC_DEFUN([gt_CHECK_DECL], +dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. +m4_define([gt_NEEDS_INIT], [ - AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1, - [AC_TRY_COMPILE([$2], [ -#ifndef $1 - char *p = (char *) $1; -#endif -], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)]) - if test $ac_cv_have_decl_$1 = yes; then - gt_value=1 - else - gt_value=0 - fi - AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value], - [Define to 1 if you have the declaration of `$1', and to 0 if you don't.]) + m4_divert_text([DEFAULTS], [gt_needs=]) + m4_define([gt_NEEDS_INIT], []) +]) + + +dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) +AC_DEFUN([AM_GNU_GETTEXT_NEED], +[ + m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) ]) diff --git a/gl/m4/gnulib-common.m4 b/gl/m4/gnulib-common.m4 new file mode 100644 index 0000000..5398010 --- /dev/null +++ b/gl/m4/gnulib-common.m4 @@ -0,0 +1,22 @@ +# gnulib-common.m4 serial 2 +dnl Copyright (C) 2007 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +# gl_MODULE_INDICATOR([modulename]) +# defines a C macro indicating the presence of the given module. +AC_DEFUN([gl_MODULE_INDICATOR], +[ + AC_DEFINE([GNULIB_]translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1], + [Define to 1 when using the gnulib module ]$1[.]) +]) + +# AC_PROG_MKDIR_P +# is a backport of autoconf-2.60's AC_PROG_MKDIR_P. +# Remove this macro when we can assume autoconf >= 2.60. +m4_ifdef([AC_PROG_MKDIR_P], [], [ + AC_DEFUN([AC_PROG_MKDIR_P], + [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake + MKDIR_P='$(mkdir_p)' + AC_SUBST([MKDIR_P])])]) diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4 new file mode 100644 index 0000000..ed4da7d --- /dev/null +++ b/gl/m4/gnulib-comp.m4 @@ -0,0 +1,326 @@ +# DO NOT EDIT! GENERATED AUTOMATICALLY! +# Copyright (C) 2004-2007 Free Software Foundation, Inc. +# +# This file is free software, distributed under the terms of the GNU +# General Public License. As a special exception to the GNU General +# Public License, this file may be distributed as part of a program +# that contains a configuration script generated by Autoconf, under +# the same distribution terms as the rest of that program. +# +# Generated by gnulib-tool. +# +# This file represents the compiled summary of the specification in +# gnulib-cache.m4. It lists the computed macro invocations that need +# to be invoked from configure.ac. +# In projects using CVS, this file can be treated like other built files. + + +# This macro should be invoked from ./configure.in, in the section +# "Checks for programs", right after AC_PROG_CC, and certainly before +# any checks for libraries, header files, types and library functions. +AC_DEFUN([gl_EARLY], +[ + m4_pattern_forbid([^gl_[A-Z]])dnl the gnulib macro namespace + m4_pattern_allow([^gl_ES$])dnl a valid locale name + m4_pattern_allow([^gl_LIBOBJS$])dnl a variable + m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable + AC_REQUIRE([AC_PROG_RANLIB]) + AC_REQUIRE([AC_GNU_SOURCE]) + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_REQUIRE([gl_LOCK_EARLY]) +]) + +# This macro should be invoked from ./configure.in, in the section +# "Check for header files, types and library functions". +AC_DEFUN([gl_INIT], +[ + m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ])) + m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS])) + m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES])) + AM_CONDITIONAL([GL_COND_LIBTOOL], [false]) + gl_cond_libtool=false + gl_libdeps= + gl_ltlibdeps= + gl_source_base='gl' + gl_FUNC_ALLOCA + gl_HEADER_ARPA_INET + gl_C_STRTOD + gl_CLOEXEC + gl_DIRNAME + gl_DOUBLE_SLASH_ROOT + gl_ERROR + gl_EXITFAIL + dnl gl_USE_SYSTEM_EXTENSIONS must be added quite early to configure.ac. + gl_FCNTL_SAFER + gl_MODULE_INDICATOR([fcntl-safer]) + gl_FSUSAGE + gl_GETADDRINFO + gl_FUNC_GETHOSTNAME + gl_GETLOADAVG([$gl_source_base]) + gl_GETOPT + dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac. + AM_GNU_GETTEXT_VERSION([0.15]) + gl_INET_NTOP + gl_INLINE + AC_FUNC_MALLOC + gl_MBCHAR + gl_MBITER + gl_FUNC_MEMCHR + gl_MINMAX + gl_MOUNTLIST + gl_HEADER_NETINET_IN + gl_REGEX + gl_SAFE_READ + gl_SAFE_WRITE + gl_SIZE_MAX + gl_FUNC_SNPRINTF + gl_TYPE_SOCKLEN_T + gt_TYPE_SSIZE_T + AM_STDBOOL_H + gl_STDINT_H + gl_STRCASE + gl_FUNC_STRDUP + gl_FUNC_STRNDUP + gl_FUNC_STRNLEN + gl_HEADER_SYS_SOCKET + AC_PROG_MKDIR_P + gl_HEADER_UNISTD + gl_UNISTD_SAFER + gl_FUNC_VASNPRINTF + gl_FUNC_VASPRINTF + gl_FUNC_VSNPRINTF + gl_WCHAR_H + gl_WCTYPE_H + gl_FUNC_WCWIDTH + gl_XALLOC + gl_XSIZE + gl_XSTRNDUP + LIBGNU_LIBDEPS="$gl_libdeps" + AC_SUBST([LIBGNU_LIBDEPS]) + LIBGNU_LTLIBDEPS="$gl_ltlibdeps" + AC_SUBST([LIBGNU_LTLIBDEPS]) + m4_popdef([AC_LIBSOURCES]) + m4_popdef([AC_REPLACE_FUNCS]) + m4_popdef([AC_LIBOBJ]) + AC_CONFIG_COMMANDS_PRE([ + gl_libobjs= + gl_ltlibobjs= + if test -n "$gl_LIBOBJS"; then + # Remove the extension. + sed_drop_objext='s/\.o$//;s/\.obj$//' + for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do + gl_libobjs="$gl_libobjs $i.$ac_objext" + gl_ltlibobjs="$gl_ltlibobjs $i.lo" + done + fi + AC_SUBST([gl_LIBOBJS], [$gl_libobjs]) + AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs]) + ]) +]) + +# Like AC_LIBOBJ, except that the module name goes +# into gl_LIBOBJS instead of into LIBOBJS. +AC_DEFUN([gl_LIBOBJ], + [gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"]) + +# Like AC_REPLACE_FUNCS, except that the module name goes +# into gl_LIBOBJS instead of into LIBOBJS. +AC_DEFUN([gl_REPLACE_FUNCS], + [AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])]) + +# Like AC_LIBSOURCES, except that it does nothing. +# We rely on EXTRA_lib..._SOURCES instead. +AC_DEFUN([gl_LIBSOURCES], + []) + +# This macro records the list of files which have been installed by +# gnulib-tool and may be removed by future gnulib-tool invocations. +AC_DEFUN([gl_FILE_LIST], [ + build-aux/config.rpath + lib/alloca.c + lib/alloca_.h + lib/asnprintf.c + lib/asprintf.c + lib/basename.c + lib/c-strtod.c + lib/c-strtod.h + lib/cloexec.c + lib/cloexec.h + lib/creat-safer.c + lib/dirname.c + lib/dirname.h + lib/dup-safer.c + lib/error.c + lib/error.h + lib/exit.h + lib/exitfail.c + lib/exitfail.h + lib/fcntl--.h + lib/fcntl-safer.h + lib/fd-safer.c + lib/fsusage.c + lib/fsusage.h + lib/full-read.c + lib/full-read.h + lib/full-write.c + lib/full-write.h + lib/gai_strerror.c + lib/getaddrinfo.c + lib/getaddrinfo.h + lib/gethostname.c + lib/getloadavg.c + lib/getopt.c + lib/getopt1.c + lib/getopt_.h + lib/getopt_int.h + lib/gettext.h + lib/inet_ntop.c + lib/inet_ntop.h + lib/intprops.h + lib/malloc.c + lib/mbchar.c + lib/mbchar.h + lib/mbuiter.h + lib/memchr.c + lib/minmax.h + lib/mountlist.c + lib/mountlist.h + lib/open-safer.c + lib/pipe-safer.c + lib/printf-args.c + lib/printf-args.h + lib/printf-parse.c + lib/printf-parse.h + lib/regcomp.c + lib/regex.c + lib/regex.h + lib/regex_internal.c + lib/regex_internal.h + lib/regexec.c + lib/safe-read.c + lib/safe-read.h + lib/safe-write.c + lib/safe-write.h + lib/size_max.h + lib/snprintf.c + lib/snprintf.h + lib/socket_.h + lib/stdbool_.h + lib/stdint_.h + lib/strcase.h + lib/strcasecmp.c + lib/strdup.c + lib/strdup.h + lib/stripslash.c + lib/strncasecmp.c + lib/strndup.c + lib/strndup.h + lib/strnlen.c + lib/strnlen.h + lib/strnlen1.c + lib/strnlen1.h + lib/unistd--.h + lib/unistd-safer.h + lib/unistd_.h + lib/vasnprintf.c + lib/vasnprintf.h + lib/vasprintf.c + lib/vasprintf.h + lib/vsnprintf.c + lib/vsnprintf.h + lib/wchar_.h + lib/wctype_.h + lib/wcwidth.h + lib/xalloc-die.c + lib/xalloc.h + lib/xmalloc.c + lib/xsize.h + lib/xstrndup.c + lib/xstrndup.h + m4/absolute-header.m4 + m4/alloca.m4 + m4/arpa_inet_h.m4 + m4/c-strtod.m4 + m4/cloexec.m4 + m4/codeset.m4 + m4/dirname.m4 + m4/dos.m4 + m4/double-slash-root.m4 + m4/eoverflow.m4 + m4/error.m4 + m4/exitfail.m4 + m4/extensions.m4 + m4/fcntl-safer.m4 + m4/fstypename.m4 + m4/fsusage.m4 + m4/getaddrinfo.m4 + m4/gethostname.m4 + m4/getloadavg.m4 + m4/getopt.m4 + m4/gettext.m4 + m4/glibc2.m4 + m4/glibc21.m4 + m4/gnulib-common.m4 + m4/iconv.m4 + m4/inet_ntop.m4 + m4/inline.m4 + m4/intdiv0.m4 + m4/intl.m4 + m4/intldir.m4 + m4/intmax.m4 + m4/intmax_t.m4 + m4/inttypes-pri.m4 + m4/inttypes_h.m4 + m4/lcmessage.m4 + m4/lib-ld.m4 + m4/lib-link.m4 + m4/lib-prefix.m4 + m4/lock.m4 + m4/longdouble.m4 + m4/longlong.m4 + m4/ls-mntd-fs.m4 + m4/mbchar.m4 + m4/mbiter.m4 + m4/mbrtowc.m4 + m4/memchr.m4 + m4/minmax.m4 + m4/mountlist.m4 + m4/netinet_in_h.m4 + m4/nls.m4 + m4/onceonly_2_57.m4 + m4/po.m4 + m4/printf-posix.m4 + m4/progtest.m4 + m4/regex.m4 + m4/safe-read.m4 + m4/safe-write.m4 + m4/size_max.m4 + m4/snprintf.m4 + m4/socklen.m4 + m4/sockpfaf.m4 + m4/ssize_t.m4 + m4/stdbool.m4 + m4/stdint.m4 + m4/stdint_h.m4 + m4/strcase.m4 + m4/strdup.m4 + m4/strndup.m4 + m4/strnlen.m4 + m4/sys_socket_h.m4 + m4/uintmax_t.m4 + m4/ulonglong.m4 + m4/unistd-safer.m4 + m4/unistd_h.m4 + m4/vasnprintf.m4 + m4/vasprintf.m4 + m4/visibility.m4 + m4/vsnprintf.m4 + m4/wchar.m4 + m4/wchar_t.m4 + m4/wctype.m4 + m4/wcwidth.m4 + m4/wint_t.m4 + m4/xalloc.m4 + m4/xsize.m4 + m4/xstrndup.m4 +]) diff --git a/m4/iconv.m4 b/gl/m4/iconv.m4 similarity index 100% rename from m4/iconv.m4 rename to gl/m4/iconv.m4 diff --git a/gl/m4/inet_ntop.m4 b/gl/m4/inet_ntop.m4 new file mode 100644 index 0000000..bb02d22 --- /dev/null +++ b/gl/m4/inet_ntop.m4 @@ -0,0 +1,19 @@ +# inet_ntop.m4 serial 3 +dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_INET_NTOP], +[ + AC_REPLACE_FUNCS(inet_ntop) + gl_PREREQ_INET_NTOP +]) + +# Prerequisites of lib/inet_ntop.h and lib/inet_ntop.c. +AC_DEFUN([gl_PREREQ_INET_NTOP], [ + AC_CHECK_HEADERS_ONCE([netinet/in.h arpa/inet.h]) + AC_CHECK_DECLS([inet_ntop],,,[#include ]) + AC_REQUIRE([gl_SOCKET_FAMILIES]) + AC_REQUIRE([AC_C_RESTRICT]) +]) diff --git a/gl/m4/inline.m4 b/gl/m4/inline.m4 new file mode 100644 index 0000000..a07076c --- /dev/null +++ b/gl/m4/inline.m4 @@ -0,0 +1,40 @@ +# inline.m4 serial 3 +dnl Copyright (C) 2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Test for the 'inline' keyword or equivalent. +dnl Define 'inline' to a supported equivalent, or to nothing if not supported, +dnl like AC_C_INLINE does. Also, define HAVE_INLINE if 'inline' or an +dnl equivalent is effectively supported, i.e. if the compiler is likely to +dnl drop unused 'static inline' functions. +AC_DEFUN([gl_INLINE], +[ + AC_REQUIRE([AC_C_INLINE]) + AC_CACHE_CHECK([whether the compiler generally respects inline], + [gl_cv_c_inline_effective], + [if test $ac_cv_c_inline = no; then + gl_cv_c_inline_effective=no + else + dnl GCC defines __NO_INLINE__ if not optimizing or if -fno-inline is + dnl specified. + dnl Use AC_COMPILE_IFELSE here, not AC_EGREP_CPP, because the result + dnl depends on optimization flags, which can be in CFLAGS. + dnl (AC_EGREP_CPP looks only at the CPPFLAGS.) + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[]], + [[#ifdef __NO_INLINE__ + #error "inline is not effective" + #endif]])], + [gl_cv_c_inline_effective=yes], + [gl_cv_c_inline_effective=no]) + fi + ]) + if test $gl_cv_c_inline_effective = yes; then + AC_DEFINE([HAVE_INLINE], 1, + [Define to 1 if the compiler supports one of the keywords + 'inline', '__inline__', '__inline' and effectively inlines + functions marked as such.]) + fi +]) diff --git a/gl/m4/intmax_t.m4 b/gl/m4/intmax_t.m4 new file mode 100644 index 0000000..17c7b0a --- /dev/null +++ b/gl/m4/intmax_t.m4 @@ -0,0 +1,61 @@ +# intmax_t.m4 serial 5 +dnl Copyright (C) 1997-2004, 2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Paul Eggert. + +AC_PREREQ(2.13) + +# Define intmax_t to 'long' or 'long long' +# if it is not already defined in or . + +AC_DEFUN([gl_AC_TYPE_INTMAX_T], +[ + dnl For simplicity, we assume that a header file defines 'intmax_t' if and + dnl only if it defines 'uintmax_t'. + AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) + AC_REQUIRE([gl_AC_HEADER_STDINT_H]) + if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then + AC_REQUIRE([gl_AC_TYPE_LONG_LONG]) + test $ac_cv_type_long_long = yes \ + && ac_type='long long' \ + || ac_type='long' + AC_DEFINE_UNQUOTED(intmax_t, $ac_type, + [Define to long or long long if and don't define.]) + else + AC_DEFINE(HAVE_INTMAX_T, 1, + [Define if you have the 'intmax_t' type in or .]) + fi +]) + +dnl An alternative would be to explicitly test for 'intmax_t'. + +AC_DEFUN([gt_AC_TYPE_INTMAX_T], +[ + AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) + AC_REQUIRE([gl_AC_HEADER_STDINT_H]) + AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t, + [AC_TRY_COMPILE([ +#include +#include +#if HAVE_STDINT_H_WITH_UINTMAX +#include +#endif +#if HAVE_INTTYPES_H_WITH_UINTMAX +#include +#endif +], [intmax_t x = -1; return !x;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)]) + if test $gt_cv_c_intmax_t = yes; then + AC_DEFINE(HAVE_INTMAX_T, 1, + [Define if you have the 'intmax_t' type in or .]) + else + AC_REQUIRE([gl_AC_TYPE_LONG_LONG]) + test $ac_cv_type_long_long = yes \ + && ac_type='long long' \ + || ac_type='long' + AC_DEFINE_UNQUOTED(intmax_t, $ac_type, + [Define to long or long long if and don't define.]) + fi +]) diff --git a/m4/inttypes_h.m4 b/gl/m4/inttypes_h.m4 similarity index 85% rename from m4/inttypes_h.m4 rename to gl/m4/inttypes_h.m4 index a5d075d..edc8ecb 100644 --- a/m4/inttypes_h.m4 +++ b/gl/m4/inttypes_h.m4 @@ -1,5 +1,5 @@ -# inttypes_h.m4 serial 6 -dnl Copyright (C) 1997-2004 Free Software Foundation, Inc. +# inttypes_h.m4 serial 7 +dnl Copyright (C) 1997-2004, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -15,7 +15,7 @@ AC_DEFUN([gl_AC_HEADER_INTTYPES_H], [AC_TRY_COMPILE( [#include #include ], - [uintmax_t i = (uintmax_t) -1;], + [uintmax_t i = (uintmax_t) -1; return !i;], gl_cv_header_inttypes_h=yes, gl_cv_header_inttypes_h=no)]) if test $gl_cv_header_inttypes_h = yes; then diff --git a/m4/lib-ld.m4 b/gl/m4/lib-ld.m4 similarity index 100% rename from m4/lib-ld.m4 rename to gl/m4/lib-ld.m4 diff --git a/m4/lib-link.m4 b/gl/m4/lib-link.m4 similarity index 70% rename from m4/lib-link.m4 rename to gl/m4/lib-link.m4 index 244a779..f157d98 100644 --- a/m4/lib-link.m4 +++ b/gl/m4/lib-link.m4 @@ -1,17 +1,19 @@ -# lib-link.m4 serial 7 (gettext-0.15) -dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. +# lib-link.m4 serial 13 (gettext-0.16.2) +dnl Copyright (C) 2001-2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. -AC_PREREQ(2.50) +AC_PREREQ(2.54) dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and dnl augments the CPPFLAGS variable. +dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname +dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) @@ -24,13 +26,16 @@ AC_DEFUN([AC_LIB_LINKFLAGS], ac_cv_lib[]Name[]_libs="$LIB[]NAME" ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" ac_cv_lib[]Name[]_cppflags="$INC[]NAME" + ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" ]) LIB[]NAME="$ac_cv_lib[]Name[]_libs" LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" INC[]NAME="$ac_cv_lib[]Name[]_cppflags" + LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) + AC_SUBST([LIB]NAME[_PREFIX]) dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the dnl results of this search when this library appears as a dependency. HAVE_LIB[]NAME=yes @@ -46,6 +51,8 @@ dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. +dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname +dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) @@ -82,17 +89,23 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], CPPFLAGS="$ac_save_CPPFLAGS" LIB[]NAME= LTLIB[]NAME= + LIB[]NAME[]_PREFIX= fi AC_SUBST([HAVE_LIB]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) + AC_SUBST([LIB]NAME[_PREFIX]) undefine([Name]) undefine([NAME]) ]) dnl Determine the platform dependent parameters needed to use rpath: -dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, -dnl hardcode_direct, hardcode_minus_L. +dnl acl_libext, +dnl acl_shlibext, +dnl acl_hardcode_libdir_flag_spec, +dnl acl_hardcode_libdir_separator, +dnl acl_hardcode_direct, +dnl acl_hardcode_minus_L. AC_DEFUN([AC_LIB_RPATH], [ dnl Tell automake >= 1.10 to complain if config.rpath is missing. @@ -109,12 +122,14 @@ AC_DEFUN([AC_LIB_RPATH], acl_cv_rpath=done ]) wl="$acl_cv_wl" - libext="$acl_cv_libext" - shlibext="$acl_cv_shlibext" - hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" - hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" - hardcode_direct="$acl_cv_hardcode_direct" - hardcode_minus_L="$acl_cv_hardcode_minus_L" + acl_libext="$acl_cv_libext" + acl_shlibext="$acl_cv_shlibext" + acl_libname_spec="$acl_cv_libname_spec" + acl_library_names_spec="$acl_cv_library_names_spec" + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" dnl Determine whether the user wants rpath handling at all. AC_ARG_ENABLE(rpath, [ --disable-rpath do not hardcode runtime library paths], @@ -124,20 +139,24 @@ AC_DEFUN([AC_LIB_RPATH], dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. +dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found +dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + dnl Autoconf >= 2.61 supports dots in --with options. + define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) - AC_LIB_ARG_WITH([lib$1-prefix], -[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib - --without-lib$1-prefix don't search for lib$1 in includedir and libdir], + AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix], +[ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib + --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no @@ -158,6 +177,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], LIB[]NAME= LTLIB[]NAME= INC[]NAME= + LIB[]NAME[]_PREFIX= rpathdirs= ltrpathdirs= names_already_handled= @@ -197,22 +217,55 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], 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 - if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then - found_dir="$additional_libdir" - found_so="$additional_libdir/lib$name.$shlibext" - if test -f "$additional_libdir/lib$name.la"; then - found_la="$additional_libdir/lib$name.la" - fi - else - if test -f "$additional_libdir/lib$name.$libext"; then - found_dir="$additional_libdir" - found_a="$additional_libdir/lib$name.$libext" - if test -f "$additional_libdir/lib$name.la"; then - found_la="$additional_libdir/lib$name.la" + dir="$additional_libdir" + dnl The same code as in the loop below: + dnl First look for a shared library. + 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 + dnl Then look for a static library. + 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 $LTLIB[]NAME; do @@ -220,21 +273,46 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` - if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then - found_dir="$dir" - found_so="$dir/lib$name.$shlibext" - if test -f "$dir/lib$name.la"; then - found_la="$dir/lib$name.la" - fi - else - if test -f "$dir/lib$name.$libext"; then + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then found_dir="$dir" - found_a="$dir/lib$name.$libext" - if test -f "$dir/lib$name.la"; then - found_la="$dir/lib$name.la" + 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 + dnl Then look for a static library. + 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 @@ -268,12 +346,12 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], ltrpathdirs="$ltrpathdirs $found_dir" fi dnl The hardcoding into $LIBNAME is system dependent. - if test "$hardcode_direct" = yes; then + if test "$acl_hardcode_direct" = yes; then dnl Using DIR/libNAME.so during linking hardcodes DIR into the dnl resulting binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else - if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode DIR into the resulting dnl binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" @@ -304,13 +382,13 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], if test -z "$haveit"; then LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" fi - if test "$hardcode_minus_L" != no; then + if test "$acl_hardcode_minus_L" != no; then dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else - dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH + dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH dnl here, because this doesn't fit in flags passed to the dnl compiler. So give up. No hardcoding. This affects only dnl very old systems. @@ -337,6 +415,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + LIB[]NAME[]_PREFIX="$basedir" additional_includedir="$basedir/include" ;; esac @@ -498,18 +577,18 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], done done if test "X$rpathdirs" != "X"; then - if test -n "$hardcode_libdir_separator"; then + if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do - alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done - dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. + dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. acl_save_libdir="$libdir" libdir="$alldirs" - eval flag=\"$hardcode_libdir_flag_spec\" + eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else @@ -517,7 +596,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" - eval flag=\"$hardcode_libdir_flag_spec\" + eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done @@ -552,3 +631,79 @@ AC_DEFUN([AC_LIB_APPENDTOVAR], fi done ]) + +dnl For those cases where a variable contains several -L and -l options +dnl referring to unknown libraries and directories, this macro determines the +dnl necessary additional linker options for the runtime path. +dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) +dnl sets LDADDVAR to linker options needed together with LIBSVALUE. +dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, +dnl otherwise linking without libtool is assumed. +AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], +[ + AC_REQUIRE([AC_LIB_RPATH]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + $1= + if test "$enable_rpath" != no; then + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode directories into the resulting + dnl binary. + rpathdirs= + next= + for opt in $2; do + if test -n "$next"; then + dir="$next" + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem"; then + rpathdirs="$rpathdirs $dir" + fi + next= + else + case $opt in + -L) next=yes ;; + -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem"; then + rpathdirs="$rpathdirs $dir" + fi + next= ;; + *) next= ;; + esac + fi + done + if test "X$rpathdirs" != "X"; then + if test -n ""$3""; then + dnl libtool is used for linking. Use -R options. + for dir in $rpathdirs; do + $1="${$1}${$1:+ }-R$dir" + done + else + dnl The linker is used for linking directly. + if test -n "$acl_hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user + dnl must pass all path elements in one option. + alldirs= + for dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="$flag" + else + dnl The -rpath options are cumulative. + for dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="${$1}${$1:+ }$flag" + done + fi + fi + fi + fi + fi + AC_SUBST([$1]) +]) diff --git a/m4/lib-prefix.m4 b/gl/m4/lib-prefix.m4 similarity index 100% rename from m4/lib-prefix.m4 rename to gl/m4/lib-prefix.m4 diff --git a/gl/m4/lock.m4 b/gl/m4/lock.m4 new file mode 100644 index 0000000..0224f2f --- /dev/null +++ b/gl/m4/lock.m4 @@ -0,0 +1,311 @@ +# lock.m4 serial 6 (gettext-0.16) +dnl Copyright (C) 2005-2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +dnl Tests for a multithreading library to be used. +dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS, +dnl USE_PTH_THREADS, USE_WIN32_THREADS +dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use +dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with +dnl libtool). +dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for +dnl programs that really need multithread functionality. The difference +dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak +dnl symbols, typically LIBTHREAD="" whereas LIBMULTITHREAD="-lpthread". +dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for +dnl multithread-safe programs. + +AC_DEFUN([gl_LOCK_EARLY], +[ + AC_REQUIRE([gl_LOCK_EARLY_BODY]) +]) + +dnl The guts of gl_LOCK_EARLY. Needs to be expanded only once. + +AC_DEFUN([gl_LOCK_EARLY_BODY], +[ + dnl Ordering constraints: This macro modifies CPPFLAGS in a way that + dnl influences the result of the autoconf tests that test for *_unlocked + dnl declarations, on AIX 5 at least. Therefore it must come early. + AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl + AC_BEFORE([$0], [gl_ARGP])dnl + + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_GNU_SOURCE]) dnl needed for pthread_rwlock_t on glibc systems + dnl Check for multithreading. + AC_ARG_ENABLE(threads, +AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify multithreading API]) +AC_HELP_STRING([--disable-threads], [build without multithread safety]), + [gl_use_threads=$enableval], + [case "$host_os" in + dnl Disable multithreading by default on OSF/1, because it interferes + dnl with fork()/exec(): When msgexec is linked with -lpthread, its child + dnl process gets an endless segmentation fault inside execvp(). + osf*) gl_use_threads=no ;; + *) gl_use_threads=yes ;; + esac + ]) + 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_TRY_LINK 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 +]) + +dnl The guts of gl_LOCK. Needs to be expanded only once. + +AC_DEFUN([gl_LOCK_BODY], +[ + AC_REQUIRE([gl_LOCK_EARLY_BODY]) + gl_threads_api=none + LIBTHREAD= + LTLIBTHREAD= + LIBMULTITHREAD= + LTLIBMULTITHREAD= + if test "$gl_use_threads" != no; then + dnl Check whether the compiler and linker support weak declarations. + AC_MSG_CHECKING([whether imported symbols can be declared weak]) + gl_have_weak=no + AC_TRY_LINK([extern void xyzzy (); +#pragma weak xyzzy], [xyzzy();], [gl_have_weak=yes]) + AC_MSG_RESULT([$gl_have_weak]) + 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_LOCK_EARLY_BODY. + AC_CHECK_HEADER(pthread.h, gl_have_pthread_h=yes, gl_have_pthread_h=no) + 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. + AC_TRY_LINK([#include ], + [pthread_mutex_lock((pthread_mutex_t*)0); + pthread_mutexattr_init((pthread_mutexattr_t*)0);], + [gl_have_pthread=yes]) + # 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. + AC_CHECK_LIB(pthread, pthread_kill, + [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*) + AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], 1, + [Define if the pthread_in_use() detection is hard.]) + esac + ]) + else + # Some library is needed. Try libpthread and libc_r. + AC_CHECK_LIB(pthread, pthread_kill, + [gl_have_pthread=yes + LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread + LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread]) + if test -z "$gl_have_pthread"; then + # For FreeBSD 4. + AC_CHECK_LIB(c_r, pthread_kill, + [gl_have_pthread=yes + LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r + LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r]) + fi + fi + if test -n "$gl_have_pthread"; then + gl_threads_api=posix + AC_DEFINE([USE_POSIX_THREADS], 1, + [Define if the POSIX multithreading library can be used.]) + if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then + if test $gl_have_weak = yes; then + AC_DEFINE([USE_POSIX_THREADS_WEAK], 1, + [Define if references to the POSIX multithreading library should be made weak.]) + LIBTHREAD= + LTLIBTHREAD= + fi + fi + # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the + # pthread_rwlock_* functions. + AC_CHECK_TYPE([pthread_rwlock_t], + [AC_DEFINE([HAVE_PTHREAD_RWLOCK], 1, + [Define if the POSIX multithreading library has read/write locks.])], + [], + [#include ]) + # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. + AC_TRY_COMPILE([#include ], + [#if __FreeBSD__ == 4 +error "No, in FreeBSD 4.0 recursive mutexes actually don't work." +#else +int x = (int)PTHREAD_MUTEX_RECURSIVE; +return !x; +#endif], + [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], 1, + [Define if the defines PTHREAD_MUTEX_RECURSIVE.])]) + 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" + AC_TRY_LINK([#include +#include ], + [thr_self();], + [gl_have_solaristhread=yes]) + LIBS="$gl_save_LIBS" + if test -n "$gl_have_solaristhread"; then + gl_threads_api=solaris + LIBTHREAD=-lthread + LTLIBTHREAD=-lthread + LIBMULTITHREAD="$LIBTHREAD" + LTLIBMULTITHREAD="$LTLIBTHREAD" + AC_DEFINE([USE_SOLARIS_THREADS], 1, + [Define if the old Solaris multithreading library can be used.]) + if test $gl_have_weak = yes; then + AC_DEFINE([USE_SOLARIS_THREADS_WEAK], 1, + [Define if references to the old Solaris multithreading library should be made weak.]) + LIBTHREAD= + LTLIBTHREAD= + fi + fi + fi + fi + if test "$gl_use_threads" = pth; then + gl_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_LINKFLAGS(pth) + gl_have_pth= + gl_save_LIBS="$LIBS" + LIBS="$LIBS -lpth" + AC_TRY_LINK([#include ], [pth_self();], gl_have_pth=yes) + LIBS="$gl_save_LIBS" + if test -n "$gl_have_pth"; then + gl_threads_api=pth + LIBTHREAD="$LIBPTH" + LTLIBTHREAD="$LTLIBPTH" + LIBMULTITHREAD="$LIBTHREAD" + LTLIBMULTITHREAD="$LTLIBTHREAD" + AC_DEFINE([USE_PTH_THREADS], 1, + [Define if the GNU Pth multithreading library can be used.]) + if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then + if test $gl_have_weak = yes; then + AC_DEFINE([USE_PTH_THREADS_WEAK], 1, + [Define if references to the GNU Pth multithreading library should be made weak.]) + LIBTHREAD= + LTLIBTHREAD= + fi + fi + else + CPPFLAGS="$gl_save_CPPFLAGS" + fi + fi + if test -z "$gl_have_pthread"; then + if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then + if { case "$host_os" in + mingw*) true;; + *) false;; + esac + }; then + gl_threads_api=win32 + AC_DEFINE([USE_WIN32_THREADS], 1, + [Define if the Win32 multithreading API can be used.]) + fi + fi + fi + fi + AC_MSG_CHECKING([for multithread API to use]) + AC_MSG_RESULT([$gl_threads_api]) + AC_SUBST(LIBTHREAD) + AC_SUBST(LTLIBTHREAD) + AC_SUBST(LIBMULTITHREAD) + AC_SUBST(LTLIBMULTITHREAD) +]) + +AC_DEFUN([gl_LOCK], +[ + AC_REQUIRE([gl_LOCK_EARLY]) + AC_REQUIRE([gl_LOCK_BODY]) + gl_PREREQ_LOCK +]) + +# Prerequisites of lib/lock.c. +AC_DEFUN([gl_PREREQ_LOCK], [ + AC_REQUIRE([AC_C_INLINE]) +]) + +dnl Survey of platforms: +dnl +dnl Platform Available Compiler Supports test-lock +dnl flavours option weak result +dnl --------------- --------- --------- -------- --------- +dnl Linux 2.4/glibc posix -lpthread Y OK +dnl +dnl GNU Hurd/glibc posix +dnl +dnl FreeBSD 5.3 posix -lc_r Y +dnl posix -lkse ? Y +dnl posix -lpthread ? Y +dnl posix -lthr Y +dnl +dnl FreeBSD 5.2 posix -lc_r Y +dnl posix -lkse Y +dnl posix -lthr Y +dnl +dnl FreeBSD 4.0,4.10 posix -lc_r Y OK +dnl +dnl NetBSD 1.6 -- +dnl +dnl OpenBSD 3.4 posix -lpthread Y OK +dnl +dnl MacOS X 10.[123] posix -lpthread Y OK +dnl +dnl Solaris 7,8,9 posix -lpthread Y Sol 7,8: 0.0; Sol 9: OK +dnl solaris -lthread Y Sol 7,8: 0.0; Sol 9: OK +dnl +dnl HP-UX 11 posix -lpthread N (cc) OK +dnl Y (gcc) +dnl +dnl IRIX 6.5 posix -lpthread Y 0.5 +dnl +dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK +dnl +dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK +dnl -lpthread (gcc) Y +dnl +dnl Cygwin posix -lpthread Y OK +dnl +dnl Any of the above pth -lpth 0.0 +dnl +dnl Mingw win32 N OK +dnl +dnl BeOS 5 -- +dnl +dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is +dnl turned off: +dnl OK if all three tests terminate OK, +dnl 0.5 if the first test terminates OK but the second one loops endlessly, +dnl 0.0 if the first test already loops endlessly. diff --git a/m4/longdouble.m4 b/gl/m4/longdouble.m4 similarity index 79% rename from m4/longdouble.m4 rename to gl/m4/longdouble.m4 index 40cd7ce..25590f4 100644 --- a/m4/longdouble.m4 +++ b/gl/m4/longdouble.m4 @@ -1,5 +1,5 @@ -# longdouble.m4 serial 1 (gettext-0.12) -dnl Copyright (C) 2002-2003 Free Software Foundation, Inc. +# longdouble.m4 serial 2 (gettext-0.15) +dnl Copyright (C) 2002-2003, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -8,6 +8,9 @@ dnl From Bruno Haible. dnl Test whether the compiler supports the 'long double' type. dnl Prerequisite: AC_PROG_CC +dnl This file is only needed in autoconf <= 2.59. Newer versions of autoconf +dnl have a macro AC_TYPE_LONG_DOUBLE with identical semantics. + AC_DEFUN([gt_TYPE_LONGDOUBLE], [ AC_CACHE_CHECK([for long double], gt_cv_c_long_double, diff --git a/gl/m4/longlong.m4 b/gl/m4/longlong.m4 new file mode 100644 index 0000000..1f9e862 --- /dev/null +++ b/gl/m4/longlong.m4 @@ -0,0 +1,72 @@ +# longlong.m4 serial 10 +dnl Copyright (C) 1999-2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Paul Eggert. + +# Define HAVE_LONG_LONG_INT if 'long long int' works. +# This fixes a bug in Autoconf 2.60, but can be removed once we +# assume 2.61 everywhere. + +# Note: If the type 'long long int' exists but is only 32 bits large +# (as on some very old compilers), HAVE_LONG_LONG_INT will not be +# defined. In this case you can treat 'long long int' like 'long int'. + +AC_DEFUN([AC_TYPE_LONG_LONG_INT], +[ + AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], + [AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[long long int ll = 9223372036854775807ll; + long long int nll = -9223372036854775807LL; + typedef int a[((-9223372036854775807LL < 0 + && 0 < 9223372036854775807ll) + ? 1 : -1)]; + int i = 63;]], + [[long long int llmax = 9223372036854775807ll; + return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) + | (llmax / ll) | (llmax % ll));]])], + [dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. + dnl If cross compiling, assume the bug isn't important, since + dnl nobody cross compiles for this platform as far as we know. + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[@%:@include + @%:@ifndef LLONG_MAX + @%:@ define HALF \ + (1LL << (sizeof (long long int) * CHAR_BIT - 2)) + @%:@ define LLONG_MAX (HALF - 1 + HALF) + @%:@endif]], + [[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;]])], + [ac_cv_type_long_long_int=yes], + [ac_cv_type_long_long_int=no], + [ac_cv_type_long_long_int=yes])], + [ac_cv_type_long_long_int=no])]) + if test $ac_cv_type_long_long_int = yes; then + AC_DEFINE([HAVE_LONG_LONG_INT], 1, + [Define to 1 if the system has the type `long long int'.]) + fi +]) + +# This macro is obsolescent and should go away soon. +AC_DEFUN([gl_AC_TYPE_LONG_LONG], +[ + AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) + ac_cv_type_long_long=$ac_cv_type_long_long_int + if test $ac_cv_type_long_long = yes; then + AC_DEFINE(HAVE_LONG_LONG, 1, + [Define if you have the 'long long' type.]) + fi +]) diff --git a/m4/ls-mntd-fs.m4 b/gl/m4/ls-mntd-fs.m4 similarity index 88% rename from m4/ls-mntd-fs.m4 rename to gl/m4/ls-mntd-fs.m4 index a4c8089..21ac4e7 100644 --- a/m4/ls-mntd-fs.m4 +++ b/gl/m4/ls-mntd-fs.m4 @@ -1,4 +1,4 @@ -#serial 21 +#serial 26 # How to list mounted file systems. # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006 Free Software @@ -28,7 +28,7 @@ AC_CHECK_FUNCS(getmntent) AC_DEFUN([gl_LIST_MOUNTED_FILE_SYSTEMS], [ AC_CHECK_FUNCS(listmntent getmntinfo) -AC_CHECK_HEADERS_ONCE(sys/param.h) +AC_CHECK_HEADERS_ONCE(sys/param.h sys/statvfs.h) # We must include grp.h before ucred.h on OSF V4.0, since ucred.h uses # NGROUPS (as the array dimension for a struct member) without a definition. @@ -141,7 +141,8 @@ if test $ac_cv_func_getmntent = yes; then # endif #endif ], - [ struct mntent *mnt = 0; char *table = MOUNTED; ], + [ struct mntent *mnt = 0; char *table = MOUNTED; + if (sizeof mnt && sizeof table) return 0;], fu_cv_sys_mounted_getmntent1=yes, fu_cv_sys_mounted_getmntent1=no)]) AC_MSG_RESULT($fu_cv_sys_mounted_getmntent1) @@ -167,6 +168,7 @@ if test $ac_cv_func_getmntent = yes; then AC_DEFINE(MOUNTED_GETMNTENT2, 1, [Define if there is a function named getmntent for reading the list of mounted file systems, and that function takes two arguments. (SVR4)]) + AC_CHECK_FUNCS(hasmntopt) fi fi @@ -232,10 +234,39 @@ if test -z "$ac_list_mounted_fs"; then ]) AC_MSG_RESULT($fu_cv_sys_mounted_getmntinfo) if test $fu_cv_sys_mounted_getmntinfo = yes; then - ac_list_mounted_fs=found - AC_DEFINE(MOUNTED_GETMNTINFO, 1, - [Define if there is a function named getmntinfo for reading the - list of mounted file systems. (4.4BSD, Darwin)]) + AC_MSG_CHECKING([whether getmntinfo returns statvfs structures]) + AC_CACHE_VAL(fu_cv_sys_mounted_getmntinfo2, + [ + AC_TRY_COMPILE([ +#if HAVE_SYS_PARAM_H +# include +#endif +#include +#if HAVE_SYS_MOUNT_H +# include +#endif +#if HAVE_SYS_STATVFS_H +# include +#endif +extern int getmntinfo (struct statfs **, int); + ], [], + [fu_cv_sys_mounted_getmntinfo2=no], + [fu_cv_sys_mounted_getmntinfo2=yes]) + ]) + AC_MSG_RESULT([$fu_cv_sys_mounted_getmntinfo2]) + if test $fu_cv_sys_mounted_getmntinfo2 = no; then + ac_list_mounted_fs=found + AC_DEFINE(MOUNTED_GETMNTINFO, 1, + [Define if there is a function named getmntinfo for reading the + list of mounted file systems and it returns an array of + 'struct statfs'. (4.4BSD, Darwin)]) + else + ac_list_mounted_fs=found + AC_DEFINE(MOUNTED_GETMNTINFO2, 1, + [Define if there is a function named getmntinfo for reading the + list of mounted file systems and it returns an array of + 'struct statvfs'. (NetBSD 3.0)]) + fi fi fi diff --git a/gl/m4/mbchar.m4 b/gl/m4/mbchar.m4 new file mode 100644 index 0000000..5380941 --- /dev/null +++ b/gl/m4/mbchar.m4 @@ -0,0 +1,14 @@ +# mbchar.m4 serial 5 +dnl Copyright (C) 2005-2007 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl autoconf tests required for use of mbchar.m4 +dnl From Bruno Haible. + +AC_DEFUN([gl_MBCHAR], +[ + AC_REQUIRE([AC_GNU_SOURCE]) + AC_LIBOBJ([mbchar]) +]) diff --git a/gl/m4/mbiter.m4 b/gl/m4/mbiter.m4 new file mode 100644 index 0000000..7d51af1 --- /dev/null +++ b/gl/m4/mbiter.m4 @@ -0,0 +1,17 @@ +# mbiter.m4 serial 2 +dnl Copyright (C) 2005 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl autoconf tests required for use of mbiter.h +dnl From Bruno Haible. + +AC_DEFUN([gl_MBITER], +[ + AC_REQUIRE([AC_TYPE_MBSTATE_T]) + dnl The following line is that so the user can test HAVE_MBRTOWC before + dnl #include "mbiter.h" or "mbuiter.h". + AC_REQUIRE([gl_FUNC_MBRTOWC]) + : +]) diff --git a/gl/m4/mbrtowc.m4 b/gl/m4/mbrtowc.m4 new file mode 100644 index 0000000..a3bd911 --- /dev/null +++ b/gl/m4/mbrtowc.m4 @@ -0,0 +1,31 @@ +# mbrtowc.m4 serial 8 +dnl Copyright (C) 2001-2002, 2004-2005 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Paul Eggert + +dnl This file can be removed, and gl_FUNC_MBRTOWC replaced with +dnl AC_FUNC_MBRTOWC, when autoconf 2.60 can be assumed everywhere. + +AC_DEFUN([gl_FUNC_MBRTOWC], +[ + dnl Same as AC_FUNC_MBRTOWC in autoconf-2.60. + AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared], + gl_cv_func_mbrtowc, + [AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[wchar_t wc; + char const s[] = ""; + size_t n = 1; + mbstate_t state; + return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));]])], + gl_cv_func_mbrtowc=yes, + gl_cv_func_mbrtowc=no)]) + if test $gl_cv_func_mbrtowc = yes; then + AC_DEFINE([HAVE_MBRTOWC], 1, + [Define to 1 if mbrtowc and mbstate_t are properly declared.]) + fi +]) diff --git a/gl/m4/memchr.m4 b/gl/m4/memchr.m4 new file mode 100644 index 0000000..91b8636 --- /dev/null +++ b/gl/m4/memchr.m4 @@ -0,0 +1,18 @@ +# memchr.m4 serial 4 +dnl Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_FUNC_MEMCHR], +[ + AC_REPLACE_FUNCS(memchr) + if test $ac_cv_func_memchr = no; then + gl_PREREQ_MEMCHR + fi +]) + +# Prerequisites of lib/memchr.c. +AC_DEFUN([gl_PREREQ_MEMCHR], [ + AC_CHECK_HEADERS(bp-sym.h) +]) diff --git a/gl/m4/minmax.m4 b/gl/m4/minmax.m4 new file mode 100644 index 0000000..bbd1ba0 --- /dev/null +++ b/gl/m4/minmax.m4 @@ -0,0 +1,41 @@ +# minmax.m4 serial 2 +dnl Copyright (C) 2005 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_PREREQ(2.52) + +AC_DEFUN([gl_MINMAX], +[ + AC_REQUIRE([gl_PREREQ_MINMAX]) +]) + +# Prerequisites of lib/minmax.h. +AC_DEFUN([gl_PREREQ_MINMAX], +[ + gl_MINMAX_IN_HEADER([limits.h]) + gl_MINMAX_IN_HEADER([sys/param.h]) +]) + +dnl gl_MINMAX_IN_HEADER(HEADER) +dnl The parameter has to be a literal header name; it cannot be macro, +dnl nor a shell variable. (Because autoheader collects only AC_DEFINE +dnl invocations with a literal macro name.) +AC_DEFUN([gl_MINMAX_IN_HEADER], +[ + m4_pushdef([header], AS_TR_SH([$1])) + m4_pushdef([HEADER], AS_TR_CPP([$1])) + AC_CACHE_CHECK([whether <$1> defines MIN and MAX], + [gl_cv_minmax_in_]header, + [AC_TRY_COMPILE([#include <$1> +int x = MIN (42, 17);], [], + [gl_cv_minmax_in_]header[=yes], + [gl_cv_minmax_in_]header[=no])]) + if test $gl_cv_minmax_in_[]header = yes; then + AC_DEFINE([HAVE_MINMAX_IN_]HEADER, 1, + [Define to 1 if <$1> defines the MIN and MAX macros.]) + fi + m4_popdef([HEADER]) + m4_popdef([header]) +]) diff --git a/m4/mountlist.m4 b/gl/m4/mountlist.m4 similarity index 84% rename from m4/mountlist.m4 rename to gl/m4/mountlist.m4 index b2a2e12..c25f44e 100644 --- a/m4/mountlist.m4 +++ b/gl/m4/mountlist.m4 @@ -1,13 +1,11 @@ -#serial 8 -dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +#serial 9 +dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_MOUNTLIST], [ - AC_LIBSOURCES([mountlist.c, mountlist.h]) - gl_LIST_MOUNTED_FILE_SYSTEMS([gl_cv_list_mounted_fs=yes], [gl_cv_list_mounted_fs=no]) if test $gl_cv_list_mounted_fs = yes; then diff --git a/gl/m4/netinet_in_h.m4 b/gl/m4/netinet_in_h.m4 new file mode 100644 index 0000000..d73531a --- /dev/null +++ b/gl/m4/netinet_in_h.m4 @@ -0,0 +1,18 @@ +# netinet_in_h.m4 serial 1 +dnl Copyright (C) 2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Written by Simon Josefsson + +AC_DEFUN([gl_HEADER_NETINET_IN], +[ + AC_CHECK_HEADERS_ONCE([netinet/in.h]) + if test $ac_cv_header_netinet_in_h = yes; then + NETINET_IN_H='' + else + NETINET_IN_H='netinet/in.h' + fi + AC_SUBST(NETINET_IN_H) +]) diff --git a/m4/nls.m4 b/gl/m4/nls.m4 similarity index 58% rename from m4/nls.m4 rename to gl/m4/nls.m4 index 2082c3b..7967cc2 100644 --- a/m4/nls.m4 +++ b/gl/m4/nls.m4 @@ -1,5 +1,5 @@ -# nls.m4 serial 2 (gettext-0.14.3) -dnl Copyright (C) 1995-2003, 2005 Free Software Foundation, Inc. +# nls.m4 serial 3 (gettext-0.15) +dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -29,23 +29,3 @@ AC_DEFUN([AM_NLS], AC_MSG_RESULT($USE_NLS) AC_SUBST(USE_NLS) ]) - -AC_DEFUN([AM_MKINSTALLDIRS], -[ - dnl Tell automake >= 1.10 to complain if mkinstalldirs is missing. - m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([mkinstalldirs])]) - dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly - dnl find the mkinstalldirs script in another subdir but $(top_srcdir). - dnl Try to locate it. - MKINSTALLDIRS= - if test -n "$ac_aux_dir"; then - case "$ac_aux_dir" in - /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;; - *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;; - esac - fi - if test -z "$MKINSTALLDIRS"; then - MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" - fi - AC_SUBST(MKINSTALLDIRS) -]) diff --git a/m4/onceonly_2_57.m4 b/gl/m4/onceonly_2_57.m4 similarity index 90% rename from m4/onceonly_2_57.m4 rename to gl/m4/onceonly_2_57.m4 index 14d3c0b..15884b3 100644 --- a/m4/onceonly_2_57.m4 +++ b/gl/m4/onceonly_2_57.m4 @@ -1,5 +1,5 @@ -# onceonly_2_57.m4 serial 3 -dnl Copyright (C) 2002-2003, 2005 Free Software Foundation, Inc. +# onceonly_2_57.m4 serial 4 +dnl Copyright (C) 2002-2003, 2005-2006 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program @@ -7,10 +7,10 @@ dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl This file defines some "once only" variants of standard autoconf macros. -dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS -dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS -dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS -dnl AC_REQUIRE([AC_HEADER_STDC]) like AC_HEADER_STDC +dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS +dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS +dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS +dnl AC_REQUIRE([AC_FUNC_STRCOLL]) like AC_FUNC_STRCOLL dnl The advantage is that the check for each of the headers/functions/decls dnl will be put only once into the 'configure' file. It keeps the size of dnl the 'configure' file down, and avoids redundant output when 'configure' diff --git a/m4/po.m4 b/gl/m4/po.m4 similarity index 90% rename from m4/po.m4 rename to gl/m4/po.m4 index f2795ee..00133ef 100644 --- a/m4/po.m4 +++ b/gl/m4/po.m4 @@ -1,5 +1,5 @@ -# po.m4 serial 7 (gettext-0.14.3) -dnl Copyright (C) 1995-2005 Free Software Foundation, Inc. +# po.m4 serial 13 (gettext-0.15) +dnl Copyright (C) 1995-2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -24,7 +24,7 @@ AC_DEFUN([AM_PO_SUBDIRS], [ AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl - AC_REQUIRE([AM_MKINSTALLDIRS])dnl + AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake AC_REQUIRE([AM_NLS])dnl dnl Perform the following tests also if --disable-nls has been given, @@ -39,6 +39,22 @@ AC_DEFUN([AM_PO_SUBDIRS], :) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + dnl Test whether it is GNU msgfmt >= 0.15. +changequote(,)dnl + case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; + *) MSGFMT_015=$MSGFMT ;; + esac +changequote([,])dnl + AC_SUBST([MSGFMT_015]) +changequote(,)dnl + case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; + *) GMSGFMT_015=$GMSGFMT ;; + esac +changequote([,])dnl + AC_SUBST([GMSGFMT_015]) + dnl Search for GNU xgettext 0.12 or newer in the PATH. dnl The first test excludes Solaris xgettext and early GNU xgettext versions. dnl The second test excludes FreeBSD xgettext. @@ -49,44 +65,26 @@ AC_DEFUN([AM_PO_SUBDIRS], dnl Remove leftover from FreeBSD xgettext call. rm -f messages.po + dnl Test whether it is GNU xgettext >= 0.15. +changequote(,)dnl + case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; + *) XGETTEXT_015=$XGETTEXT ;; + esac +changequote([,])dnl + AC_SUBST([XGETTEXT_015]) + dnl Search for GNU msgmerge 0.11 or newer in the PATH. AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) - dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. - dnl Test whether we really found GNU msgfmt. - if test "$GMSGFMT" != ":"; then - dnl If it is no GNU msgfmt we define it as : so that the - dnl Makefiles still can work. - if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && - (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then - : ; - else - GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` - AC_MSG_RESULT( - [found $GMSGFMT program is not GNU msgfmt; ignore it]) - GMSGFMT=":" - fi - fi + dnl Installation directories. + dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we + dnl have to define it here, so that it can be used in po/Makefile. + test -n "$localedir" || localedir='${datadir}/locale' + AC_SUBST([localedir]) - dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. - dnl Test whether we really found GNU xgettext. - if test "$XGETTEXT" != ":"; then - dnl If it is no GNU xgettext we define it as : so that the - dnl Makefiles still can work. - if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 && - (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then - : ; - else - AC_MSG_RESULT( - [found xgettext program is not GNU xgettext; ignore it]) - XGETTEXT=":" - fi - dnl Remove leftover from FreeBSD xgettext call. - rm -f messages.po - fi - - AC_OUTPUT_COMMANDS([ + AC_CONFIG_COMMANDS([po-directories], [[ for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in @@ -123,11 +121,12 @@ AC_DEFUN([AM_PO_SUBDIRS], 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. + # Hide the ALL_LINGUAS assigment 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. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES @@ -197,10 +196,10 @@ AC_DEFUN([AM_PO_SUBDIRS], fi ;; esac - done], + done]], [# Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it - # from automake. + # from automake < 1.5. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" @@ -286,7 +285,7 @@ x changequote([,])dnl # Set POTFILES to the value of the Makefile variable POTFILES. - sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`" + sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'` POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"` # Compute POTFILES_DEPS as # $(foreach file, $(POTFILES), $(top_srcdir)/$(file)) @@ -305,10 +304,10 @@ changequote([,])dnl POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS. - sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`" + sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'` ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"` fi - # Hide the ALL_LINGUAS assigment from automake. + # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) diff --git a/m4/progtest.m4 b/gl/m4/progtest.m4 similarity index 100% rename from m4/progtest.m4 rename to gl/m4/progtest.m4 diff --git a/m4/regex.m4 b/gl/m4/regex.m4 similarity index 69% rename from m4/regex.m4 rename to gl/m4/regex.m4 index 8ea4fe9..25da645 100644 --- a/m4/regex.m4 +++ b/gl/m4/regex.m4 @@ -1,7 +1,7 @@ -#serial 31 +#serial 42 -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 Free -# Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,34 +14,7 @@ AC_PREREQ([2.50]) AC_DEFUN([gl_REGEX], [ - AC_REQUIRE([AC_SYS_LARGEFILE]) dnl for a sufficently-wide off_t - - AC_CACHE_CHECK([whether off_t can be used in a switch statement], - [gl_cv_type_off_t_switch], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [AC_INCLUDES_DEFAULT], - [[off_t o = -1; - switch (o) - { - case -2: - return 1; - case -1: - return 2; - default: - return 0; - } - ]])], - [gl_cv_type_off_t_switch=yes], - [gl_cv_type_off_t_switch=no])]) - if test $gl_cv_type_off_t_switch = yes; then - AC_DEFINE([_REGEX_LARGE_OFFSETS], 1, - [Define if you want regoff_t to be at least as wide POSIX requires.]) - fi - - AC_LIBSOURCES( - [regcomp.c, regex.c, regex.h, - regex_internal.c, regex_internal.h, regexec.c]) + AC_CHECK_HEADERS_ONCE([locale.h]) AC_ARG_WITH([included-regex], [AC_HELP_STRING([--without-included-regex], @@ -49,30 +22,64 @@ AC_DEFUN([gl_REGEX], systems with recent-enough versions of the GNU C Library (use with caution on other systems)])]) - case $with_included_regex in + case $with_included_regex in #( yes|no) ac_use_included_regex=$with_included_regex ;; '') - # If the system regex support is good enough that it passes the the + # If the system regex support is good enough that it passes the # 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. The first failing regular expression is from `Spencer ere # test #75' in grep-2.3. AC_CACHE_CHECK([for working re_compile_pattern], - [gl_cv_func_re_compile_pattern_broken], + [gl_cv_func_re_compile_pattern_working], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [AC_INCLUDES_DEFAULT - #include ], + #if HAVE_LOCALE_H + #include + #endif + #include + #include + ], [[static struct re_pattern_buffer regex; + unsigned char folded_chars[UCHAR_MAX + 1]; + int i; const char *s; struct re_registers regs; - /* Use the POSIX-compliant spelling with leading REG_, - rather than the traditional GNU spelling with leading RE_, - so that we reject older libc implementations. */ - re_set_syntax (REG_SYNTAX_POSIX_EGREP); + + #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")) + { + static char const pat[] = "insert into"; + static char const data[] = + "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK"; + re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE + | RE_ICASE); + 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; + } + #endif + + re_set_syntax (RE_SYNTAX_POSIX_EGREP); memset (®ex, 0, sizeof (regex)); - s = re_compile_pattern ("a[:@:>@:]b\n", 9, ®ex); + for (i = 0; i <= UCHAR_MAX; i++) + folded_chars[i] = i; + regex.translate = folded_chars; + s = re_compile_pattern ("a[[:@:>@:]]b\n", 11, ®ex); /* This should fail with _Invalid character class name_ error. */ if (!s) exit (1); @@ -106,10 +113,9 @@ AC_DEFUN([gl_REGEX], exit (1); /* The version of regex.c in older versions of gnulib - ignored REG_IGNORE_CASE (which was then called RE_ICASE). - Detect that problem too. */ + ignored RE_ICASE. Detect that problem too. */ memset (®ex, 0, sizeof (regex)); - re_set_syntax (REG_SYNTAX_EMACS | REG_IGNORE_CASE); + re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE); s = re_compile_pattern ("x", 1, ®ex); if (s) exit (1); @@ -123,24 +129,29 @@ AC_DEFUN([gl_REGEX], exit (1); /* Reject hosts whose regoff_t values are too narrow. - These include glibc 2.3.5 on hosts with 64-bit off_t - and 32-bit int, and Solaris 10 on hosts with 32-bit int - and _FILE_OFFSET_BITS=64. */ - if (sizeof (regoff_t) < sizeof (off_t)) + These include glibc 2.3.5 on hosts with 64-bit ptrdiff_t + and 32-bit int. */ + if (sizeof (regoff_t) < sizeof (ptrdiff_t) + || sizeof (regoff_t) < sizeof (ssize_t)) exit (1); exit (0);]])], - [gl_cv_func_re_compile_pattern_broken=no], - [gl_cv_func_re_compile_pattern_broken=yes], - dnl When crosscompiling, assume it is broken. - [gl_cv_func_re_compile_pattern_broken=yes])]) - ac_use_included_regex=$gl_cv_func_re_compile_pattern_broken + [gl_cv_func_re_compile_pattern_working=yes], + [gl_cv_func_re_compile_pattern_working=no], + dnl When crosscompiling, assume it is not working. + [gl_cv_func_re_compile_pattern_working=no])]) + case $gl_cv_func_re_compile_pattern_working in #( + yes) ac_use_included_regex=no;; #( + no) ac_use_included_regex=yes;; + esac ;; *) AC_MSG_ERROR([Invalid value for --with-included-regex: $with_included_regex]) ;; esac if test $ac_use_included_regex = yes; then + AC_DEFINE([_REGEX_LARGE_OFFSETS], 1, + [Define if you want regoff_t to be at least as wide POSIX requires.]) AC_DEFINE([re_syntax_options], [rpl_re_syntax_options], [Define to rpl_re_syntax_options if the replacement should be used.]) AC_DEFINE([re_set_syntax], [rpl_re_set_syntax], @@ -180,8 +191,8 @@ AC_DEFUN([gl_REGEX], AC_DEFUN([gl_PREREQ_REGEX], [ AC_REQUIRE([AC_GNU_SOURCE]) - AC_REQUIRE([gl_C_RESTRICT]) + AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([AM_LANGINFO_CODESET]) - AC_CHECK_HEADERS_ONCE([locale.h wchar.h wctype.h]) - AC_CHECK_FUNCS_ONCE([isblank mbrtowc mempcpy wcrtomb wcscoll]) + AC_CHECK_FUNCS_ONCE([iswctype mbrtowc mempcpy wcrtomb wcscoll]) + AC_CHECK_DECLS([isblank], [], [], [#include ]) ]) diff --git a/gl/m4/safe-read.m4 b/gl/m4/safe-read.m4 new file mode 100644 index 0000000..7a89d0a --- /dev/null +++ b/gl/m4/safe-read.m4 @@ -0,0 +1,18 @@ +# safe-read.m4 serial 5 +dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_SAFE_READ], +[ + AC_LIBOBJ([safe-read]) + + gl_PREREQ_SAFE_READ +]) + +# Prerequisites of lib/safe-read.c. +AC_DEFUN([gl_PREREQ_SAFE_READ], +[ + AC_REQUIRE([gt_TYPE_SSIZE_T]) +]) diff --git a/gl/m4/safe-write.m4 b/gl/m4/safe-write.m4 new file mode 100644 index 0000000..db119ff --- /dev/null +++ b/gl/m4/safe-write.m4 @@ -0,0 +1,18 @@ +# safe-write.m4 serial 3 +dnl Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_SAFE_WRITE], +[ + AC_LIBOBJ([safe-write]) + + gl_PREREQ_SAFE_WRITE +]) + +# Prerequisites of lib/safe-write.c. +AC_DEFUN([gl_PREREQ_SAFE_WRITE], +[ + gl_PREREQ_SAFE_READ +]) diff --git a/gl/m4/size_max.m4 b/gl/m4/size_max.m4 new file mode 100644 index 0000000..6cb4868 --- /dev/null +++ b/gl/m4/size_max.m4 @@ -0,0 +1,68 @@ +# size_max.m4 serial 6 +dnl Copyright (C) 2003, 2005-2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_DEFUN([gl_SIZE_MAX], +[ + AC_CHECK_HEADERS(stdint.h) + dnl First test whether the system already has SIZE_MAX. + AC_MSG_CHECKING([for SIZE_MAX]) + AC_CACHE_VAL([gl_cv_size_max], [ + gl_cv_size_max= + AC_EGREP_CPP([Found it], [ +#include +#if HAVE_STDINT_H +#include +#endif +#ifdef SIZE_MAX +Found it +#endif +], gl_cv_size_max=yes) + if test -z "$gl_cv_size_max"; then + dnl Define it ourselves. Here we assume that the type 'size_t' is not wider + dnl than the type 'unsigned long'. Try hard to find a definition that can + dnl be used in a preprocessor #if, i.e. doesn't contain a cast. + AC_COMPUTE_INT([size_t_bits_minus_1], [sizeof (size_t) * CHAR_BIT - 1], + [#include +#include ], size_t_bits_minus_1=) + AC_COMPUTE_INT([fits_in_uint], [sizeof (size_t) <= sizeof (unsigned int)], + [#include ], fits_in_uint=) + if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then + if test $fits_in_uint = 1; then + dnl Even though SIZE_MAX fits in an unsigned int, it must be of type + dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. + AC_TRY_COMPILE([#include + extern size_t foo; + extern unsigned long foo; + ], [], fits_in_uint=0) + fi + dnl We cannot use 'expr' to simplify this expression, because 'expr' + dnl works only with 'long' integers in the host environment, while we + dnl might be cross-compiling from a 32-bit platform to a 64-bit platform. + if test $fits_in_uint = 1; then + gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" + else + gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" + fi + else + dnl Shouldn't happen, but who knows... + gl_cv_size_max='((size_t)~(size_t)0)' + fi + fi + ]) + AC_MSG_RESULT([$gl_cv_size_max]) + if test "$gl_cv_size_max" != yes; then + AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max], + [Define as the maximum value of type 'size_t', if the system doesn't define it.]) + fi +]) + +dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. +dnl Remove this when we can assume autoconf >= 2.61. +m4_ifdef([AC_COMPUTE_INT], [], [ + AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) +]) diff --git a/gl/m4/snprintf.m4 b/gl/m4/snprintf.m4 new file mode 100644 index 0000000..432e037 --- /dev/null +++ b/gl/m4/snprintf.m4 @@ -0,0 +1,15 @@ +# snprintf.m4 serial 2 +dnl Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_FUNC_SNPRINTF], +[ + AC_REPLACE_FUNCS(snprintf) + AC_CHECK_DECLS_ONCE(snprintf) + gl_PREREQ_SNPRINTF +]) + +# Prerequisites of lib/snprintf.c. +AC_DEFUN([gl_PREREQ_SNPRINTF], [:]) diff --git a/gl/m4/socklen.m4 b/gl/m4/socklen.m4 new file mode 100644 index 0000000..5e3765a --- /dev/null +++ b/gl/m4/socklen.m4 @@ -0,0 +1,52 @@ +# socklen.m4 serial 4 +dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Albert Chin, Windows fixes from Simon Josefsson. + +dnl Check for socklen_t: historically on BSD it is an int, and in +dnl POSIX 1g it is a type of its own, but some platforms use different +dnl types for the argument to getsockopt, getpeername, etc. So we +dnl have to test to find something that will work. + +dnl On mingw32, socklen_t is in ws2tcpip.h ('int'), so we try to find +dnl it there first. That file is included by gnulib's socket_.h, which +dnl all users of this module should include. Cygwin must not include +dnl ws2tcpip.h. +AC_DEFUN([gl_TYPE_SOCKLEN_T], + [AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl + AC_CHECK_TYPE([socklen_t], , + [AC_MSG_CHECKING([for socklen_t equivalent]) + AC_CACHE_VAL([gl_cv_gl_cv_socklen_t_equiv], + [# Systems have either "struct sockaddr *" or + # "void *" as the second argument to getpeername + gl_cv_socklen_t_equiv= + for arg2 in "struct sockaddr" void; do + for t in int size_t "unsigned int" "long int" "unsigned long int"; do + AC_TRY_COMPILE( + [#include + #include + + int getpeername (int, $arg2 *, $t *);], + [$t len; + getpeername (0, 0, &len);], + [gl_cv_socklen_t_equiv="$t"]) + test "$gl_cv_socklen_t_equiv" != "" && break + done + test "$gl_cv_socklen_t_equiv" != "" && break + done + ]) + if test "$gl_cv_socklen_t_equiv" = ""; then + AC_MSG_ERROR([Cannot find a type to use in place of socklen_t]) + fi + AC_MSG_RESULT([$gl_cv_socklen_t_equiv]) + AC_DEFINE_UNQUOTED([socklen_t], [$gl_cv_socklen_t_equiv], + [type to use in place of socklen_t if not defined])], + [#include + #if HAVE_SYS_SOCKET_H + # include + #elif HAVE_WS2TCPIP_H + # include + #endif])]) diff --git a/gl/m4/sockpfaf.m4 b/gl/m4/sockpfaf.m4 new file mode 100644 index 0000000..25d9755 --- /dev/null +++ b/gl/m4/sockpfaf.m4 @@ -0,0 +1,58 @@ +# sockpfaf.m4 serial 5 +dnl Copyright (C) 2004, 2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Test for some common socket protocol families (PF_INET, PF_INET6, ...) +dnl and some common address families (AF_INET, AF_INET6, ...). +dnl This test assumes that a system supports an address family if and only if +dnl it supports the corresponding protocol family. + +dnl From Bruno Haible. + +AC_DEFUN([gl_SOCKET_FAMILIES], +[ + AC_REQUIRE([gl_HEADER_SYS_SOCKET]) + AC_CHECK_HEADERS_ONCE([netinet/in.h]) + + AC_MSG_CHECKING(for IPv4 sockets) + AC_CACHE_VAL(gl_cv_socket_ipv4, + [AC_TRY_COMPILE([#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_WINSOCK2_H +#include +#endif], +[int x = AF_INET; struct in_addr y; struct sockaddr_in z; + if (&x && &y && &z) return 0;], + gl_cv_socket_ipv4=yes, gl_cv_socket_ipv4=no)]) + AC_MSG_RESULT($gl_cv_socket_ipv4) + if test $gl_cv_socket_ipv4 = yes; then + AC_DEFINE(HAVE_IPV4, 1, [Define to 1 if defines AF_INET.]) + fi + + AC_MSG_CHECKING(for IPv6 sockets) + AC_CACHE_VAL(gl_cv_socket_ipv6, + [AC_TRY_COMPILE([#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_WINSOCK2_H +#include +#endif], +[int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z; + if (&x && &y && &z) return 0;], + gl_cv_socket_ipv6=yes, gl_cv_socket_ipv6=no)]) + AC_MSG_RESULT($gl_cv_socket_ipv6) + if test $gl_cv_socket_ipv6 = yes; then + AC_DEFINE(HAVE_IPV6, 1, [Define to 1 if defines AF_INET6.]) + fi +]) diff --git a/gl/m4/ssize_t.m4 b/gl/m4/ssize_t.m4 new file mode 100644 index 0000000..4eaef93 --- /dev/null +++ b/gl/m4/ssize_t.m4 @@ -0,0 +1,21 @@ +# ssize_t.m4 serial 4 (gettext-0.15) +dnl Copyright (C) 2001-2003, 2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. +dnl Test whether ssize_t is defined. + +AC_DEFUN([gt_TYPE_SSIZE_T], +[ + AC_CACHE_CHECK([for ssize_t], [gt_cv_ssize_t], + [AC_TRY_COMPILE([#include ], + [int x = sizeof (ssize_t *) + sizeof (ssize_t); + return !x;], + [gt_cv_ssize_t=yes], [gt_cv_ssize_t=no])]) + if test $gt_cv_ssize_t = no; then + AC_DEFINE([ssize_t], [int], + [Define as a signed type of the same size as size_t.]) + fi +]) diff --git a/m4/stdbool.m4 b/gl/m4/stdbool.m4 similarity index 82% rename from m4/stdbool.m4 rename to gl/m4/stdbool.m4 index 162f1df..2204ecd 100644 --- a/m4/stdbool.m4 +++ b/gl/m4/stdbool.m4 @@ -1,6 +1,6 @@ # Check for stdbool.h that conforms to C99. -dnl Copyright (C) 2002-2005 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -64,9 +64,9 @@ AC_DEFUN([AC_HEADER_STDBOOL], 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]; + char d[(bool) 0.5 == true ? 1 : -1]; bool e = &s; - char f[(_Bool) -0.0 == false ? 1 : -1]; + char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; @@ -74,10 +74,10 @@ AC_DEFUN([AC_HEADER_STDBOOL], _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__ || __GNUC__ + #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. @@ -86,10 +86,17 @@ AC_DEFUN([AC_HEADER_STDBOOL], 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. */ + 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; ], diff --git a/gl/m4/stdint.m4 b/gl/m4/stdint.m4 new file mode 100644 index 0000000..1a4b4a6 --- /dev/null +++ b/gl/m4/stdint.m4 @@ -0,0 +1,369 @@ +# stdint.m4 serial 22 +dnl Copyright (C) 2001-2002, 2004-2007 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Paul Eggert and Bruno Haible. +dnl Test whether is supported or must be substituted. + +AC_DEFUN([gl_STDINT_H], +[ + AC_PREREQ(2.59)dnl + + dnl Check for long long int and unsigned long long int. + AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) + if test $ac_cv_type_long_long_int = yes; then + HAVE_LONG_LONG_INT=1 + else + HAVE_LONG_LONG_INT=0 + fi + AC_SUBST([HAVE_LONG_LONG_INT]) + AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) + 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 + AC_SUBST([HAVE_UNSIGNED_LONG_LONG_INT]) + + dnl Check for . + dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_inttypes_h. + if test $ac_cv_header_inttypes_h = yes; then + HAVE_INTTYPES_H=1 + else + HAVE_INTTYPES_H=0 + fi + AC_SUBST([HAVE_INTTYPES_H]) + + dnl Check for . + dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_sys_types_h. + if test $ac_cv_header_sys_types_h = yes; then + HAVE_SYS_TYPES_H=1 + else + HAVE_SYS_TYPES_H=0 + fi + AC_SUBST([HAVE_SYS_TYPES_H]) + + dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_stdint_h. + if test $ac_cv_header_stdint_h = yes; then + gl_ABSOLUTE_HEADER([stdint.h]) + ABSOLUTE_STDINT_H=\"$gl_cv_absolute_stdint_h\" + HAVE_STDINT_H=1 + else + ABSOLUTE_STDINT_H=\"no/such/file/stdint.h\" + HAVE_STDINT_H=0 + fi + AC_SUBST([ABSOLUTE_STDINT_H]) + AC_SUBST([HAVE_STDINT_H]) + + dnl Now see whether we need a substitute . Use + dnl ABSOLUTE_STDINT_H, not , so that it also works during + dnl a "config.status --recheck" if a stdint.h has been + dnl created in the build directory. + if test $ac_cv_header_stdint_h = yes; then + AC_CACHE_CHECK([whether stdint.h conforms to C99], + [gl_cv_header_working_stdint_h], + [gl_cv_header_working_stdint_h=no + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#include +#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 */ +#include ABSOLUTE_STDINT_H +#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; +struct s { + int check_PTRDIFF: PTRDIFF_MIN < 0 && 0 < PTRDIFF_MAX ? 1 : -1; + int check_SIG_ATOMIC: SIG_ATOMIC_MIN <= 0 && 0 < SIG_ATOMIC_MAX ? 1 : -1; + int check_SIZE: 0 < SIZE_MAX ? 1 : -1; + int check_WCHAR: WCHAR_MIN <= 0 && 0 < WCHAR_MAX ? 1 : -1; + int check_WINT: WINT_MIN <= 0 && 0 < WINT_MAX ? 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; +}; + ]])], + [gl_cv_header_working_stdint_h=yes])]) + fi + if test "$gl_cv_header_working_stdint_h" = yes; then + STDINT_H= + else + dnl Check for , and for + dnl (used in Linux libc4 >= 4.6.7 and libc5). + AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h]) + if test $ac_cv_header_sys_inttypes_h = yes; then + HAVE_SYS_INTTYPES_H=1 + else + HAVE_SYS_INTTYPES_H=0 + fi + AC_SUBST([HAVE_SYS_INTTYPES_H]) + if test $ac_cv_header_sys_bitypes_h = yes; then + HAVE_SYS_BITYPES_H=1 + else + HAVE_SYS_BITYPES_H=0 + fi + AC_SUBST([HAVE_SYS_BITYPES_H]) + + gl_STDINT_TYPE_PROPERTIES + STDINT_H=stdint.h + fi + AC_SUBST(STDINT_H) +]) + +dnl gl_STDINT_BITSIZEOF(TYPES, INCLUDES) +dnl Determine the size of each of the given types in bits. +AC_DEFUN([gl_STDINT_BITSIZEOF], +[ + dnl Use a shell loop, to avoid bloating configure, and + dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into + dnl config.h.in, + dnl - extra AC_SUBST calls, so that the right substitutions are made. + AC_FOREACH([gltype], [$1], + [AH_TEMPLATE([BITSIZEOF_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]), + [Define to the number of bits in type ']gltype['.])]) + for gltype in $1 ; do + AC_CACHE_CHECK([for bit size of $gltype], [gl_cv_bitsizeof_${gltype}], + [AC_COMPUTE_INT([result], [sizeof ($gltype) * CHAR_BIT], + [$2 +#include ], [result=unknown]) + eval gl_cv_bitsizeof_${gltype}=\$result + ]) + eval result=\$gl_cv_bitsizeof_${gltype} + if test $result = unknown; then + dnl Use a nonempty default, because some compilers, such as IRIX 5 cc, + dnl do a syntax check even on unused #if conditions and give an error + dnl on valid C code like this: + dnl #if 0 + dnl # if > 32 + dnl # endif + dnl #endif + result=0 + fi + GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` + AC_DEFINE_UNQUOTED([BITSIZEOF_${GLTYPE}], [$result]) + eval BITSIZEOF_${GLTYPE}=\$result + done + AC_FOREACH([gltype], [$1], + [AC_SUBST([BITSIZEOF_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))]) +]) + +dnl gl_CHECK_TYPES_SIGNED(TYPES, INCLUDES) +dnl Determine the signedness of each of the given types. +dnl Define HAVE_SIGNED_TYPE if type is signed. +AC_DEFUN([gl_CHECK_TYPES_SIGNED], +[ + dnl Use a shell loop, to avoid bloating configure, and + dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into + dnl config.h.in, + dnl - extra AC_SUBST calls, so that the right substitutions are made. + AC_FOREACH([gltype], [$1], + [AH_TEMPLATE([HAVE_SIGNED_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]), + [Define to 1 if ']gltype[' is a signed integer type.])]) + for gltype in $1 ; do + AC_CACHE_CHECK([whether $gltype is signed], [gl_cv_type_${gltype}_signed], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([$2[ + int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];]])], + result=yes, result=no) + eval gl_cv_type_${gltype}_signed=\$result + ]) + eval result=\$gl_cv_type_${gltype}_signed + GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` + if test "$result" = yes; then + AC_DEFINE_UNQUOTED([HAVE_SIGNED_${GLTYPE}], 1) + eval HAVE_SIGNED_${GLTYPE}=1 + else + eval HAVE_SIGNED_${GLTYPE}=0 + fi + done + AC_FOREACH([gltype], [$1], + [AC_SUBST([HAVE_SIGNED_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))]) +]) + +dnl gl_INTEGER_TYPE_SUFFIX(TYPES, INCLUDES) +dnl Determine the suffix to use for integer constants of the given types. +dnl Define t_SUFFIX for each such type. +AC_DEFUN([gl_INTEGER_TYPE_SUFFIX], +[ + dnl Use a shell loop, to avoid bloating configure, and + dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into + dnl config.h.in, + dnl - extra AC_SUBST calls, so that the right substitutions are made. + AC_FOREACH([gltype], [$1], + [AH_TEMPLATE(translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX], + [Define to l, ll, u, ul, ull, etc., as suitable for + constants of type ']gltype['.])]) + for gltype in $1 ; do + AC_CACHE_CHECK([for $gltype integer literal suffix], + [gl_cv_type_${gltype}_suffix], + [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 + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([$2 + extern $gltype foo; + extern $gltype1 foo;])], + [eval gl_cv_type_${gltype}_suffix=\$glsuf]) + eval result=\$gl_cv_type_${gltype}_suffix + test "$result" != no && break + done]) + GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` + eval result=\$gl_cv_type_${gltype}_suffix + test "$result" = no && result= + eval ${GLTYPE}_SUFFIX=\$result + AC_DEFINE_UNQUOTED([${GLTYPE}_SUFFIX], $result) + done + AC_FOREACH([gltype], [$1], + [AC_SUBST(translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX])]) +]) + +dnl gl_STDINT_INCLUDES +AC_DEFUN([gl_STDINT_INCLUDES], +[[ + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #include + #include + #include +]]) + +dnl gl_STDINT_TYPE_PROPERTIES +dnl Compute HAVE_SIGNED_t, BITSIZEOF_t and t_SUFFIX, for all the types t +dnl of interest to stdint_.h. +AC_DEFUN([gl_STDINT_TYPE_PROPERTIES], +[ + gl_STDINT_BITSIZEOF([ptrdiff_t sig_atomic_t size_t wchar_t wint_t], + [gl_STDINT_INCLUDES]) + gl_CHECK_TYPES_SIGNED([sig_atomic_t wchar_t wint_t], + [gl_STDINT_INCLUDES]) + gl_cv_type_ptrdiff_t_signed=yes + gl_cv_type_size_t_signed=no + gl_INTEGER_TYPE_SUFFIX([ptrdiff_t sig_atomic_t size_t wchar_t wint_t], + [gl_STDINT_INCLUDES]) +]) + +dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. +dnl Remove this when we can assume autoconf >= 2.61. +m4_ifdef([AC_COMPUTE_INT], [], [ + AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) +]) + +# Hey Emacs! +# Local Variables: +# indent-tabs-mode: nil +# End: diff --git a/m4/stdint_h.m4 b/gl/m4/stdint_h.m4 similarity index 85% rename from m4/stdint_h.m4 rename to gl/m4/stdint_h.m4 index 3355f35..db9a8ac 100644 --- a/m4/stdint_h.m4 +++ b/gl/m4/stdint_h.m4 @@ -1,5 +1,5 @@ -# stdint_h.m4 serial 5 -dnl Copyright (C) 1997-2004 Free Software Foundation, Inc. +# stdint_h.m4 serial 6 +dnl Copyright (C) 1997-2004, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -15,7 +15,7 @@ AC_DEFUN([gl_AC_HEADER_STDINT_H], [AC_TRY_COMPILE( [#include #include ], - [uintmax_t i = (uintmax_t) -1;], + [uintmax_t i = (uintmax_t) -1; return !i;], gl_cv_header_stdint_h=yes, gl_cv_header_stdint_h=no)]) if test $gl_cv_header_stdint_h = yes; then diff --git a/gl/m4/strcase.m4 b/gl/m4/strcase.m4 new file mode 100644 index 0000000..ae82790 --- /dev/null +++ b/gl/m4/strcase.m4 @@ -0,0 +1,39 @@ +# strcase.m4 serial 4 +dnl Copyright (C) 2002, 2005-2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_STRCASE], +[ + gl_FUNC_STRCASECMP + gl_FUNC_STRNCASECMP +]) + +AC_DEFUN([gl_FUNC_STRCASECMP], +[ + dnl No known system has a strcasecmp() function that works correctly in + dnl multibyte locales. Therefore we use our version always. + AC_LIBOBJ(strcasecmp) + gl_PREREQ_STRCASECMP +]) + +AC_DEFUN([gl_FUNC_STRNCASECMP], +[ + AC_REPLACE_FUNCS(strncasecmp) + AC_CHECK_DECLS(strncasecmp) + if test $ac_cv_func_strncasecmp = no; then + gl_PREREQ_STRNCASECMP + fi +]) + +# Prerequisites of lib/strcasecmp.c. +AC_DEFUN([gl_PREREQ_STRCASECMP], [ + AC_REQUIRE([gl_FUNC_MBRTOWC]) + : +]) + +# Prerequisites of lib/strncasecmp.c. +AC_DEFUN([gl_PREREQ_STRNCASECMP], [ + : +]) diff --git a/gl/m4/strdup.m4 b/gl/m4/strdup.m4 new file mode 100644 index 0000000..f7786e9 --- /dev/null +++ b/gl/m4/strdup.m4 @@ -0,0 +1,15 @@ +# strdup.m4 serial 7 +dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_FUNC_STRDUP], +[ + AC_REPLACE_FUNCS(strdup) + AC_CHECK_DECLS_ONCE(strdup) + gl_PREREQ_STRDUP +]) + +# Prerequisites of lib/strdup.c. +AC_DEFUN([gl_PREREQ_STRDUP], [:]) diff --git a/gl/m4/strndup.m4 b/gl/m4/strndup.m4 new file mode 100644 index 0000000..dd5780b --- /dev/null +++ b/gl/m4/strndup.m4 @@ -0,0 +1,48 @@ +# strndup.m4 serial 11 +dnl Copyright (C) 2002-2003, 2005-2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_FUNC_STRNDUP], +[ + dnl Persuade glibc to declare strndup(). + AC_REQUIRE([AC_GNU_SOURCE]) + + AC_CHECK_DECLS_ONCE([strndup]) + + # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'. + AC_CACHE_CHECK([for working strndup], gl_cv_func_strndup, + [AC_RUN_IFELSE([ + AC_LANG_PROGRAM([#include + #include ], [[ +#ifndef HAVE_DECL_STRNDUP + extern char *strndup (const char *, size_t); +#endif + char *s; + s = strndup ("some longer string", 15); + free (s); + s = strndup ("shorter string", 13); + return s[13] != '\0';]])], + [gl_cv_func_strndup=yes], + [gl_cv_func_strndup=no], + [AC_CHECK_FUNC([strndup], + [AC_EGREP_CPP([too risky], [ +#ifdef _AIX + too risky +#endif + ], + [gl_cv_func_strndup=no], + [gl_cv_func_strndup=yes])], + [gl_cv_func_strndup=no])])]) + if test $gl_cv_func_strndup = yes; then + AC_DEFINE([HAVE_STRNDUP], 1, + [Define if you have the strndup() function and it works.]) + else + AC_LIBOBJ([strndup]) + gl_PREREQ_STRNDUP + fi +]) + +# Prerequisites of lib/strndup.c. +AC_DEFUN([gl_PREREQ_STRNDUP], [:]) diff --git a/gl/m4/strnlen.m4 b/gl/m4/strnlen.m4 new file mode 100644 index 0000000..0213a8a --- /dev/null +++ b/gl/m4/strnlen.m4 @@ -0,0 +1,27 @@ +# strnlen.m4 serial 6 +dnl Copyright (C) 2002-2003, 2005, 2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_FUNC_STRNLEN], +[ + dnl Persuade glibc to declare strnlen(). + AC_REQUIRE([AC_GNU_SOURCE]) + + AC_FUNC_STRNLEN + if test $ac_cv_func_strnlen_working = no; then + # This is necessary because automake-1.6.1 doens't understand + # that the above use of AC_FUNC_STRNLEN means we may have to use + # lib/strnlen.c. + #AC_LIBOBJ(strnlen) + AC_DEFINE(strnlen, rpl_strnlen, + [Define to rpl_strnlen if the replacement function should be used.]) + gl_PREREQ_STRNLEN + fi +]) + +# Prerequisites of lib/strnlen.c. +AC_DEFUN([gl_PREREQ_STRNLEN], [ + AC_CHECK_DECLS_ONCE(strnlen) +]) diff --git a/gl/m4/sys_socket_h.m4 b/gl/m4/sys_socket_h.m4 new file mode 100644 index 0000000..d3e45b4 --- /dev/null +++ b/gl/m4/sys_socket_h.m4 @@ -0,0 +1,23 @@ +# sys_socket_h.m4 serial 2 +dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Simon Josefsson. + +AC_DEFUN([gl_HEADER_SYS_SOCKET], +[ + AC_CHECK_HEADERS_ONCE([sys/socket.h]) + if test $ac_cv_header_sys_socket_h = yes; then + SYS_SOCKET_H='' + else + dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make + dnl the check for those headers unconditional; yet cygwin reports + dnl that the headers are present but cannot be compiled (since on + dnl cygwin, all socket information should come from sys/socket.h). + AC_CHECK_HEADERS([winsock2.h ws2tcpip.h]) + SYS_SOCKET_H='sys/socket.h' + fi + AC_SUBST(SYS_SOCKET_H) +]) diff --git a/gl/m4/ulonglong.m4 b/gl/m4/ulonglong.m4 new file mode 100644 index 0000000..9fae98e --- /dev/null +++ b/gl/m4/ulonglong.m4 @@ -0,0 +1,48 @@ +# ulonglong.m4 serial 6 +dnl Copyright (C) 1999-2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Paul Eggert. + +# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. +# This fixes a bug in Autoconf 2.60, but can be removed once we +# assume 2.61 everywhere. + +# Note: If the type 'unsigned long long int' exists but is only 32 bits +# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT +# will not be defined. In this case you can treat 'unsigned long long int' +# like 'unsigned long int'. + +AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], +[ + AC_CACHE_CHECK([for unsigned long long int], + [ac_cv_type_unsigned_long_long_int], + [AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[unsigned long long int ull = 18446744073709551615ULL; + typedef int a[(18446744073709551615ULL <= (unsigned long long int) -1 + ? 1 : -1)]; + int i = 63;]], + [[unsigned long long int ullmax = 18446744073709551615ull; + return (ull << 63 | ull >> 63 | ull << i | ull >> i + | ullmax / ull | ullmax % ull);]])], + [ac_cv_type_unsigned_long_long_int=yes], + [ac_cv_type_unsigned_long_long_int=no])]) + if test $ac_cv_type_unsigned_long_long_int = yes; then + AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], 1, + [Define to 1 if the system has the type `unsigned long long int'.]) + fi +]) + +# This macro is obsolescent and should go away soon. +AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG], +[ + AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) + ac_cv_type_unsigned_long_long=$ac_cv_type_unsigned_long_long_int + if test $ac_cv_type_unsigned_long_long = yes; then + AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, + [Define if you have the 'unsigned long long' type.]) + fi +]) diff --git a/m4/unistd-safer.m4 b/gl/m4/unistd-safer.m4 similarity index 66% rename from m4/unistd-safer.m4 rename to gl/m4/unistd-safer.m4 index 6fbe4c6..09adf93 100644 --- a/m4/unistd-safer.m4 +++ b/gl/m4/unistd-safer.m4 @@ -1,12 +1,12 @@ -#serial 7 -dnl Copyright (C) 2002, 2005 Free Software Foundation, Inc. +#serial 8 +dnl Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_UNISTD_SAFER], [ - AC_LIBSOURCES([dup-safer.c, fd-safer.c, pipe-safer.c, unistd-safer.h, unistd--.h]) + AC_CHECK_FUNCS_ONCE([pipe]) AC_LIBOBJ([dup-safer]) AC_LIBOBJ([fd-safer]) AC_LIBOBJ([pipe-safer]) diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4 new file mode 100644 index 0000000..9d499df --- /dev/null +++ b/gl/m4/unistd_h.m4 @@ -0,0 +1,32 @@ +# unistd_h.m4 serial 3 +dnl Copyright (C) 2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Written by Simon Josefsson + +AC_DEFUN([gl_HEADER_UNISTD], +[ + AC_CHECK_HEADERS([unistd.h], [ + UNISTD_H='' + ], [ + UNISTD_H='unistd.h' + ]) + AC_SUBST(UNISTD_H) + dnl This module decides to build unistd.h if it is missing. + dnl The fchdir module decides to build unistd.h if fchdir() is missing. + dnl Therefore check for the prerequisites of lib/unistd.h always. + gl_PREREQ_UNISTD +]) + +dnl Prerequisites of lib/unistd.h. +AC_DEFUN([gl_PREREQ_UNISTD], +[ + AC_CHECK_HEADERS_ONCE([unistd.h]) + if test $ac_cv_header_unistd_h = yes; then + gl_ABSOLUTE_HEADER([unistd.h]) + ABSOLUTE_UNISTD_H=\"$gl_cv_absolute_unistd_h\" + fi + AC_SUBST([ABSOLUTE_UNISTD_H]) +]) diff --git a/gl/m4/vasnprintf.m4 b/gl/m4/vasnprintf.m4 new file mode 100644 index 0000000..72c9a13 --- /dev/null +++ b/gl/m4/vasnprintf.m4 @@ -0,0 +1,57 @@ +# vasnprintf.m4 serial 7 +dnl Copyright (C) 2002-2004, 2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_FUNC_VASNPRINTF], +[ + AC_REQUIRE([gl_EOVERFLOW]) + AC_REPLACE_FUNCS(vasnprintf) + if test $ac_cv_func_vasnprintf = no; then + AC_LIBOBJ(printf-args) + AC_LIBOBJ(printf-parse) + AC_LIBOBJ(asnprintf) + gl_PREREQ_PRINTF_ARGS + gl_PREREQ_PRINTF_PARSE + gl_PREREQ_VASNPRINTF + gl_PREREQ_ASNPRINTF + fi +]) + +# Prequisites of lib/printf-args.h, lib/printf-args.c. +AC_DEFUN([gl_PREREQ_PRINTF_ARGS], +[ + AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) + AC_REQUIRE([gt_TYPE_LONGDOUBLE]) + AC_REQUIRE([gt_TYPE_WCHAR_T]) + AC_REQUIRE([gt_TYPE_WINT_T]) +]) + +# Prequisites of lib/printf-parse.h, lib/printf-parse.c. +AC_DEFUN([gl_PREREQ_PRINTF_PARSE], +[ + AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) + AC_REQUIRE([gt_TYPE_LONGDOUBLE]) + AC_REQUIRE([gt_TYPE_WCHAR_T]) + AC_REQUIRE([gt_TYPE_WINT_T]) + AC_REQUIRE([AC_TYPE_SIZE_T]) + AC_CHECK_TYPES(ptrdiff_t) + AC_REQUIRE([gt_AC_TYPE_INTMAX_T]) +]) + +# Prerequisites of lib/vasnprintf.c. +AC_DEFUN([gl_PREREQ_VASNPRINTF], +[ + AC_REQUIRE([AC_FUNC_ALLOCA]) + AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) + AC_REQUIRE([gt_TYPE_LONGDOUBLE]) + AC_REQUIRE([gt_TYPE_WCHAR_T]) + AC_REQUIRE([gt_TYPE_WINT_T]) + AC_CHECK_FUNCS(snprintf wcslen) +]) + +# Prerequisites of lib/asnprintf.c. +AC_DEFUN([gl_PREREQ_ASNPRINTF], +[ +]) diff --git a/gl/m4/vasprintf.m4 b/gl/m4/vasprintf.m4 new file mode 100644 index 0000000..18ca632 --- /dev/null +++ b/gl/m4/vasprintf.m4 @@ -0,0 +1,33 @@ +# vasprintf.m4 serial 2 +dnl Copyright (C) 2002-2003, 2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_FUNC_VASPRINTF], +[ + AC_REPLACE_FUNCS(vasprintf) + if test $ac_cv_func_vasprintf = no; then + AC_LIBOBJ(asprintf) + gl_PREREQ_VASPRINTF_H + gl_PREREQ_VASPRINTF + gl_PREREQ_ASPRINTF + fi +]) + +# Prerequisites of lib/vasprintf.h. +AC_DEFUN([gl_PREREQ_VASPRINTF_H], +[ + dnl Persuade glibc to declare asprintf() and vasprintf(). + AC_REQUIRE([AC_GNU_SOURCE]) +]) + +# Prerequisites of lib/vasprintf.c. +AC_DEFUN([gl_PREREQ_VASPRINTF], +[ +]) + +# Prerequisites of lib/asprintf.c. +AC_DEFUN([gl_PREREQ_ASPRINTF], +[ +]) diff --git a/gl/m4/vsnprintf.m4 b/gl/m4/vsnprintf.m4 new file mode 100644 index 0000000..cb8a9b1 --- /dev/null +++ b/gl/m4/vsnprintf.m4 @@ -0,0 +1,15 @@ +# vsnprintf.m4 serial 2 +dnl Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_FUNC_VSNPRINTF], +[ + AC_REPLACE_FUNCS(vsnprintf) + AC_CHECK_DECLS_ONCE(vsnprintf) + gl_PREREQ_VSNPRINTF +]) + +# Prerequisites of lib/vsnprintf.c. +AC_DEFUN([gl_PREREQ_VSNPRINTF], [:]) diff --git a/gl/m4/wchar.m4 b/gl/m4/wchar.m4 new file mode 100644 index 0000000..068f22d --- /dev/null +++ b/gl/m4/wchar.m4 @@ -0,0 +1,29 @@ +dnl A placeholder for ISO C99 , for platforms that have issues. + +dnl Copyright (C) 2007 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Written by Eric Blake. + +# wchar.m4 serial 1 + +AC_DEFUN([gl_WCHAR_H], +[ + AC_CACHE_CHECK([whether is standalone], + [gl_cv_header_wchar_h_standalone], + [AC_COMPILE_IFELSE([[#include +wchar_t w;]], + [gl_cv_header_wchar_h_standalone=yes], + [gl_cv_header_wchar_h_standalone=no])]) + if test $gl_cv_header_wchar_h_standalone = yes; then + WCHAR_H= + else + gl_ABSOLUTE_HEADER([wchar.h]) + ABSOLUTE_WCHAR_H=\"$gl_cv_absolute_wchar_h\" + WCHAR_H=wchar.h + fi + AC_SUBST([ABSOLUTE_WCHAR_H]) + AC_SUBST([WCHAR_H]) +]) diff --git a/m4/wchar_t.m4 b/gl/m4/wchar_t.m4 similarity index 100% rename from m4/wchar_t.m4 rename to gl/m4/wchar_t.m4 diff --git a/gl/m4/wctype.m4 b/gl/m4/wctype.m4 new file mode 100644 index 0000000..62994c6 --- /dev/null +++ b/gl/m4/wctype.m4 @@ -0,0 +1,41 @@ +dnl A placeholder for ISO C99 , for platforms that lack it. + +dnl Copyright (C) 2006, 2007 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Written by Paul Eggert. + +AC_DEFUN([gl_WCTYPE_H], +[ + AC_CHECK_FUNCS_ONCE([iswcntrl]) + AC_CHECK_HEADERS_ONCE([wctype.h]) + AC_REQUIRE([AC_C_INLINE]) + + AC_REQUIRE([gt_TYPE_WINT_T]) + if test $gt_cv_c_wint_t = yes; then + HAVE_WINT_T=1 + else + HAVE_WINT_T=0 + fi + AC_SUBST([HAVE_WINT_T]) + + WCTYPE_H=wctype.h + if test $ac_cv_header_wctype_h = yes; then + if test "$ac_cv_func_iswcntrl" = yes; then + WCTYPE_H= + fi + dnl Compute ABSOLUTE_WCTYPE_H even if WCTYPE_H is empty, + dnl for the benefit of builds from non-distclean directories. + gl_ABSOLUTE_HEADER([wctype.h]) + ABSOLUTE_WCTYPE_H=\"$gl_cv_absolute_wctype_h\" + HAVE_WCTYPE_H=1 + else + ABSOLUTE_WCTYPE_H=\"no/such/file/wctype.h\" + HAVE_WCTYPE_H=0 + fi + AC_SUBST([ABSOLUTE_WCTYPE_H]) + AC_SUBST([HAVE_WCTYPE_H]) + AC_SUBST([WCTYPE_H]) +]) diff --git a/gl/m4/wcwidth.m4 b/gl/m4/wcwidth.m4 new file mode 100644 index 0000000..b483499 --- /dev/null +++ b/gl/m4/wcwidth.m4 @@ -0,0 +1,30 @@ +# wcwidth.m4 serial 8 +dnl Copyright (C) 2006, 2007 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_FUNC_WCWIDTH], +[ + dnl Persuade glibc to declare wcwidth(). + AC_REQUIRE([AC_GNU_SOURCE]) + + AC_REQUIRE([AC_C_INLINE]) + AC_REQUIRE([gt_TYPE_WCHAR_T]) + AC_REQUIRE([gt_TYPE_WINT_T]) + + AC_CHECK_HEADERS_ONCE([wchar.h]) + AC_CHECK_FUNCS_ONCE([wcwidth]) + + AC_CHECK_DECLS([wcwidth], [], [], [ +/* AIX 3.2.5 declares wcwidth in . */ +#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 +])]) diff --git a/m4/wint_t.m4 b/gl/m4/wint_t.m4 similarity index 59% rename from m4/wint_t.m4 rename to gl/m4/wint_t.m4 index b8fff9c..3706c04 100644 --- a/m4/wint_t.m4 +++ b/gl/m4/wint_t.m4 @@ -1,5 +1,5 @@ -# wint_t.m4 serial 1 (gettext-0.12) -dnl Copyright (C) 2003 Free Software Foundation, Inc. +# wint_t.m4 serial 2 (gettext-0.12) +dnl Copyright (C) 2003, 2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -11,7 +11,15 @@ dnl Prerequisite: AC_PROG_CC AC_DEFUN([gt_TYPE_WINT_T], [ AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t, - [AC_TRY_COMPILE([#include + [AC_TRY_COMPILE([ +/* 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 wint_t foo = (wchar_t)'\0';], , gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)]) if test $gt_cv_c_wint_t = yes; then diff --git a/m4/xalloc.m4 b/gl/m4/xalloc.m4 similarity index 72% rename from m4/xalloc.m4 rename to gl/m4/xalloc.m4 index c0847dd..837a948 100644 --- a/m4/xalloc.m4 +++ b/gl/m4/xalloc.m4 @@ -1,12 +1,11 @@ -# xalloc.m4 serial 12 -dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +# xalloc.m4 serial 16 +dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_XALLOC], [ - AC_LIBSOURCES([xmalloc.c, xalloc.h]) AC_LIBOBJ([xmalloc]) gl_PREREQ_XALLOC @@ -15,11 +14,11 @@ AC_DEFUN([gl_XALLOC], # Prerequisites of lib/xalloc.h. AC_DEFUN([gl_PREREQ_XALLOC], [ + AC_REQUIRE([gl_INLINE]) : ]) # Prerequisites of lib/xmalloc.c. AC_DEFUN([gl_PREREQ_XMALLOC], [ - AC_REQUIRE([AC_C_INLINE]) : ]) diff --git a/gl/m4/xsize.m4 b/gl/m4/xsize.m4 new file mode 100644 index 0000000..85bb721 --- /dev/null +++ b/gl/m4/xsize.m4 @@ -0,0 +1,13 @@ +# xsize.m4 serial 3 +dnl Copyright (C) 2003-2004 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_XSIZE], +[ + dnl Prerequisites of lib/xsize.h. + AC_REQUIRE([gl_SIZE_MAX]) + AC_REQUIRE([AC_C_INLINE]) + AC_CHECK_HEADERS(stdint.h) +]) diff --git a/gl/m4/xstrndup.m4 b/gl/m4/xstrndup.m4 new file mode 100644 index 0000000..8a30ab1 --- /dev/null +++ b/gl/m4/xstrndup.m4 @@ -0,0 +1,15 @@ +# xstrndup.m4 serial 2 +dnl Copyright (C) 2003 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_XSTRNDUP], +[ + gl_PREREQ_XSTRNDUP +]) + +# Prerequisites of lib/xstrndup.c. +AC_DEFUN([gl_PREREQ_XSTRNDUP], [ + : +]) diff --git a/lib/malloc.c b/gl/malloc.c similarity index 90% rename from lib/malloc.c rename to gl/malloc.c index 58fa611..d4dae3e 100644 --- a/lib/malloc.c +++ b/gl/malloc.c @@ -1,5 +1,6 @@ /* malloc() function that is glibc compatible. - Copyright (C) 1997, 1998 Free Software Foundation, Inc. + + Copyright (C) 1997, 1998, 2006 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 @@ -17,9 +18,7 @@ /* written by Jim Meyering */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include #undef malloc #include diff --git a/gl/mbchar.c b/gl/mbchar.c new file mode 100644 index 0000000..95373f5 --- /dev/null +++ b/gl/mbchar.c @@ -0,0 +1,36 @@ +/* Copyright (C) 2001, 2006 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, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + + +#include + +#include + +#include "mbchar.h" + +#if IS_BASIC_ASCII + +/* Bit table of characters in the ISO C "basic character set". */ +const unsigned int is_basic_table [UCHAR_MAX / 32 + 1] = +{ + 0x00001a00, /* '\t' '\v' '\f' */ + 0xffffffef, /* ' '...'#' '%'...'?' */ + 0xfffffffe, /* 'A'...'Z' '[' '\\' ']' '^' '_' */ + 0x7ffffffe /* 'a'...'z' '{' '|' '}' '~' */ + /* The remaining bits are 0. */ +}; + +#endif /* IS_BASIC_ASCII */ diff --git a/gl/mbchar.h b/gl/mbchar.h new file mode 100644 index 0000000..f3e28ef --- /dev/null +++ b/gl/mbchar.h @@ -0,0 +1,353 @@ +/* Multibyte character data type. + Copyright (C) 2001, 2005-2006 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, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +/* Written by Bruno Haible . */ + +/* A multibyte character is a short subsequence of a char* string, + representing a single wide character. + + We use multibyte characters instead of wide characters because of + the following goals: + 1) correct multibyte handling, i.e. operate according to the LC_CTYPE + locale, + 2) ease of maintenance, i.e. the maintainer needs not know all details + of the ISO C 99 standard, + 3) don't fail grossly if the input is not in the encoding set by the + locale, because often different encodings are in use in the same + countries (ISO-8859-1/UTF-8, EUC-JP/Shift_JIS, ...), + 4) fast in the case of ASCII characters, + 5) portability, i.e. don't make unportable assumptions about wchar_t. + + Multibyte characters are only accessed through the mb* macros. + + mb_ptr (mbc) + return a pointer to the beginning of the multibyte sequence. + + mb_len (mbc) + returns the number of bytes occupied by the multibyte sequence. + Always > 0. + + mb_iseq (mbc, sc) + returns true if mbc is the standard ASCII character sc. + + mb_isnul (mbc) + returns true if mbc is the nul character. + + mb_cmp (mbc1, mbc2) + returns a positive, zero, or negative value depending on whether mbc1 + sorts after, same or before mbc2. + + mb_casecmp (mbc1, mbc2) + returns a positive, zero, or negative value depending on whether mbc1 + sorts after, same or before mbc2, modulo upper/lowercase conversion. + + mb_equal (mbc1, mbc2) + returns true if mbc1 and mbc2 are equal. + + mb_caseequal (mbc1, mbc2) + returns true if mbc1 and mbc2 are equal modulo upper/lowercase conversion. + + mb_isalnum (mbc) + returns true if mbc is alphanumeric. + + mb_isalpha (mbc) + returns true if mbc is alphabetic. + + mb_isascii(mbc) + returns true if mbc is plain ASCII. + + mb_isblank (mbc) + returns true if mbc is a blank. + + mb_iscntrl (mbc) + returns true if mbc is a control character. + + mb_isdigit (mbc) + returns true if mbc is a decimal digit. + + mb_isgraph (mbc) + returns true if mbc is a graphic character. + + mb_islower (mbc) + returns true if mbc is lowercase. + + mb_isprint (mbc) + returns true if mbc is a printable character. + + mb_ispunct (mbc) + returns true if mbc is a punctuation character. + + mb_isspace (mbc) + returns true if mbc is a space character. + + mb_isupper (mbc) + returns true if mbc is uppercase. + + mb_isxdigit (mbc) + returns true if mbc is a hexadecimal digit. + + mb_width (mbc) + returns the number of columns on the output device occupied by mbc. + Always >= 0. + + mb_putc (mbc, stream) + outputs mbc on stream, a byte oriented FILE stream opened for output. + + mb_setascii (&mbc, sc) + assigns the standard ASCII character sc to mbc. + + mb_copy (&destmbc, &srcmbc) + copies srcmbc to destmbc. + + Here are the function prototypes of the macros. + + extern const char * mb_ptr (const mbchar_t mbc); + extern size_t mb_len (const mbchar_t mbc); + extern bool mb_iseq (const mbchar_t mbc, char sc); + extern bool mb_isnul (const mbchar_t mbc); + extern int mb_cmp (const mbchar_t mbc1, const mbchar_t mbc2); + extern int mb_casecmp (const mbchar_t mbc1, const mbchar_t mbc2); + extern bool mb_equal (const mbchar_t mbc1, const mbchar_t mbc2); + extern bool mb_caseequal (const mbchar_t mbc1, const mbchar_t mbc2); + extern bool mb_isalnum (const mbchar_t mbc); + extern bool mb_isalpha (const mbchar_t mbc); + extern bool mb_isascii (const mbchar_t mbc); + extern bool mb_isblank (const mbchar_t mbc); + extern bool mb_iscntrl (const mbchar_t mbc); + extern bool mb_isdigit (const mbchar_t mbc); + extern bool mb_isgraph (const mbchar_t mbc); + extern bool mb_islower (const mbchar_t mbc); + extern bool mb_isprint (const mbchar_t mbc); + extern bool mb_ispunct (const mbchar_t mbc); + extern bool mb_isspace (const mbchar_t mbc); + extern bool mb_isupper (const mbchar_t mbc); + extern bool mb_isxdigit (const mbchar_t mbc); + extern int mb_width (const mbchar_t mbc); + extern void mb_putc (const mbchar_t mbc, FILE *stream); + extern void mb_setascii (mbchar_t *new, char sc); + extern void mb_copy (mbchar_t *new, const mbchar_t *old); + */ + +#ifndef _MBCHAR_H +#define _MBCHAR_H 1 + +#include +#include + +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.1 has a bug: and must be included before + . */ +#include +#include +#include +#include + +#include "wcwidth.h" + +#define MBCHAR_BUF_SIZE 24 + +struct mbchar +{ + const char *ptr; /* pointer to current character */ + size_t bytes; /* number of bytes of current character, > 0 */ + bool wc_valid; /* true if wc is a valid wide character */ + wchar_t wc; /* if wc_valid: the current character */ + char buf[MBCHAR_BUF_SIZE]; /* room for the bytes, used for file input only */ +}; + +/* EOF (not a real character) is represented with bytes = 0 and + wc_valid = false. */ + +typedef struct mbchar mbchar_t; + +/* Access the current character. */ +#define mb_ptr(mbc) ((mbc).ptr) +#define mb_len(mbc) ((mbc).bytes) + +/* Comparison of characters. */ +#define mb_iseq(mbc, sc) ((mbc).wc_valid && (mbc).wc == (sc)) +#define mb_isnul(mbc) ((mbc).wc_valid && (mbc).wc == 0) +#define mb_cmp(mbc1, mbc2) \ + ((mbc1).wc_valid \ + ? ((mbc2).wc_valid \ + ? (int) (mbc1).wc - (int) (mbc2).wc \ + : -1) \ + : ((mbc2).wc_valid \ + ? 1 \ + : (mbc1).bytes == (mbc2).bytes \ + ? memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) \ + : (mbc1).bytes < (mbc2).bytes \ + ? (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) > 0 ? 1 : -1) \ + : (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc2).bytes) >= 0 ? 1 : -1))) +#define mb_casecmp(mbc1, mbc2) \ + ((mbc1).wc_valid \ + ? ((mbc2).wc_valid \ + ? (int) towlower ((mbc1).wc) - (int) towlower ((mbc2).wc) \ + : -1) \ + : ((mbc2).wc_valid \ + ? 1 \ + : (mbc1).bytes == (mbc2).bytes \ + ? memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) \ + : (mbc1).bytes < (mbc2).bytes \ + ? (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) > 0 ? 1 : -1) \ + : (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc2).bytes) >= 0 ? 1 : -1))) +#define mb_equal(mbc1, mbc2) \ + ((mbc1).wc_valid && (mbc2).wc_valid \ + ? (mbc1).wc == (mbc2).wc \ + : (mbc1).bytes == (mbc2).bytes \ + && memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) == 0) +#define mb_caseequal(mbc1, mbc2) \ + ((mbc1).wc_valid && (mbc2).wc_valid \ + ? towlower ((mbc1).wc) == towlower ((mbc2).wc) \ + : (mbc1).bytes == (mbc2).bytes \ + && memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) == 0) + +/* , classification. */ +#define mb_isascii(mbc) \ + ((mbc).wc_valid && (mbc).wc >= 0 && (mbc).wc <= 127) +#define mb_isalnum(mbc) ((mbc).wc_valid && iswalnum ((mbc).wc)) +#define mb_isalpha(mbc) ((mbc).wc_valid && iswalpha ((mbc).wc)) +#define mb_isblank(mbc) ((mbc).wc_valid && iswblank ((mbc).wc)) +#define mb_iscntrl(mbc) ((mbc).wc_valid && iswcntrl ((mbc).wc)) +#define mb_isdigit(mbc) ((mbc).wc_valid && iswdigit ((mbc).wc)) +#define mb_isgraph(mbc) ((mbc).wc_valid && iswgraph ((mbc).wc)) +#define mb_islower(mbc) ((mbc).wc_valid && iswlower ((mbc).wc)) +#define mb_isprint(mbc) ((mbc).wc_valid && iswprint ((mbc).wc)) +#define mb_ispunct(mbc) ((mbc).wc_valid && iswpunct ((mbc).wc)) +#define mb_isspace(mbc) ((mbc).wc_valid && iswspace ((mbc).wc)) +#define mb_isupper(mbc) ((mbc).wc_valid && iswupper ((mbc).wc)) +#define mb_isxdigit(mbc) ((mbc).wc_valid && iswxdigit ((mbc).wc)) + +/* Extra function. */ + +/* Unprintable characters appear as a small box of width 1. */ +#define MB_UNPRINTABLE_WIDTH 1 + +static inline int +mb_width_aux (wint_t wc) +{ + int w = wcwidth (wc); + /* For unprintable characters, arbitrarily return 0 for control characters + and MB_UNPRINTABLE_WIDTH otherwise. */ + return (w >= 0 ? w : iswcntrl (wc) ? 0 : MB_UNPRINTABLE_WIDTH); +} + +#define mb_width(mbc) \ + ((mbc).wc_valid ? mb_width_aux ((mbc).wc) : MB_UNPRINTABLE_WIDTH) + +/* Output. */ +#define mb_putc(mbc, stream) fwrite ((mbc).ptr, 1, (mbc).bytes, (stream)) + +/* Assignment. */ +#define mb_setascii(mbc, sc) \ + ((mbc)->ptr = (mbc)->buf, (mbc)->bytes = 1, (mbc)->wc_valid = 1, \ + (mbc)->wc = (mbc)->buf[0] = (sc)) + +/* Copying a character. */ +static inline void +mb_copy (mbchar_t *new_mbc, const mbchar_t *old_mbc) +{ + if (old_mbc->ptr == &old_mbc->buf[0]) + { + memcpy (&new_mbc->buf[0], &old_mbc->buf[0], old_mbc->bytes); + new_mbc->ptr = &new_mbc->buf[0]; + } + else + new_mbc->ptr = old_mbc->ptr; + new_mbc->bytes = old_mbc->bytes; + if ((new_mbc->wc_valid = old_mbc->wc_valid)) + new_mbc->wc = old_mbc->wc; +} + + +/* is_basic(c) tests whether the single-byte character c is in the + ISO C "basic character set". + This is a convenience function, and is in this file only to share code + between mbiter_multi.h and mbfile_multi.h. */ +#if (' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126) +/* The character set is ISO-646, not EBCDIC. */ +# define IS_BASIC_ASCII 1 + +extern const unsigned int is_basic_table[]; + +static inline bool +is_basic (char c) +{ + return (is_basic_table [(unsigned char) c >> 5] >> ((unsigned char) c & 31)) + & 1; +} + +#else + +static inline bool +is_basic (char c) +{ + switch (c) + { + case '\t': case '\v': case '\f': + case ' ': case '!': case '"': case '#': case '%': + case '&': case '\'': case '(': case ')': case '*': + case '+': case ',': case '-': case '.': case '/': + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + case ':': case ';': case '<': case '=': case '>': + case '?': + case 'A': case 'B': case 'C': case 'D': case 'E': + case 'F': case 'G': case 'H': case 'I': case 'J': + case 'K': case 'L': case 'M': case 'N': case 'O': + case 'P': case 'Q': case 'R': case 'S': case 'T': + case 'U': case 'V': case 'W': case 'X': case 'Y': + case 'Z': + case '[': case '\\': case ']': case '^': case '_': + case 'a': case 'b': case 'c': case 'd': case 'e': + case 'f': case 'g': case 'h': case 'i': case 'j': + case 'k': case 'l': case 'm': case 'n': case 'o': + case 'p': case 'q': case 'r': case 's': case 't': + case 'u': case 'v': case 'w': case 'x': case 'y': + case 'z': case '{': case '|': case '}': case '~': + return 1; + default: + return 0; + } +} + +#endif + +#endif /* _MBCHAR_H */ diff --git a/gl/mbuiter.h b/gl/mbuiter.h new file mode 100644 index 0000000..9da3a6c --- /dev/null +++ b/gl/mbuiter.h @@ -0,0 +1,203 @@ +/* Iterating through multibyte strings: macros for multi-byte encodings. + Copyright (C) 2001, 2005 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, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +/* Written by Bruno Haible . */ + +/* The macros in this file implement forward iteration through a + multi-byte string, without knowing its length a-priori. + + With these macros, an iteration loop that looks like + + char *iter; + for (iter = buf; *iter != '\0'; iter++) + { + do_something (*iter); + } + + becomes + + mbui_iterator_t iter; + for (mbui_init (iter, buf); mbui_avail (iter); mbui_advance (iter)) + { + do_something (mbui_cur_ptr (iter), mb_len (mbui_cur (iter))); + } + + The benefit of these macros over plain use of mbrtowc is: + - Handling of invalid multibyte sequences is possible without + making the code more complicated, while still preserving the + invalid multibyte sequences. + + Compared to mbiter.h, the macros here don't need to know the string's + length a-priori. The downside is that at each step, the look-ahead + that guards against overrunning the terminating '\0' is more expensive. + The mbui_* macros are therefore suitable when there is a high probability + that only the first few multibyte characters need to be inspected. + Whereas the mbi_* macros are better if usually the iteration runs + through the entire string. + + mbui_iterator_t + is a type usable for variable declarations. + + mbui_init (iter, startptr) + initializes the iterator, starting at startptr. + + mbui_avail (iter) + returns true if there are more multibyte chracters available before + the end of string is reached. In this case, mbui_cur (iter) is + initialized to the next multibyte chracter. + + mbui_advance (iter) + advances the iterator by one multibyte character. + + mbui_cur (iter) + returns the current multibyte character, of type mbchar_t. All the + macros defined in mbchar.h can be used on it. + + mbui_cur_ptr (iter) + return a pointer to the beginning of the current multibyte character. + + mbui_reloc (iter, ptrdiff) + relocates iterator when the string is moved by ptrdiff bytes. + + Here are the function prototypes of the macros. + + extern void mbui_init (mbui_iterator_t iter, const char *startptr); + extern bool mbui_avail (mbui_iterator_t iter); + extern void mbui_advance (mbui_iterator_t iter); + extern mbchar_t mbui_cur (mbui_iterator_t iter); + extern const char * mbui_cur_ptr (mbui_iterator_t iter); + extern void mbui_reloc (mbui_iterator_t iter, ptrdiff_t ptrdiff); + */ + +#ifndef _MBUITER_H +#define _MBUITER_H 1 + +#include +#include +#include + +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.1 has a bug: and must be included before + . */ +#include +#include +#include + +#include "mbchar.h" +#include "strnlen1.h" + +struct mbuiter_multi +{ + bool in_shift; /* true if next byte may not be interpreted as ASCII */ + mbstate_t state; /* if in_shift: current shift state */ + bool next_done; /* true if mbui_avail has already filled the following */ + struct mbchar cur; /* the current character: + const char *cur.ptr pointer to current character + The following are only valid after mbui_avail. + size_t cur.bytes number of bytes of current character + bool cur.wc_valid true if wc is a valid wide character + wchar_t cur.wc if wc_valid: the current character + */ +}; + +static inline void +mbuiter_multi_next (struct mbuiter_multi *iter) +{ + if (iter->next_done) + return; + if (iter->in_shift) + goto with_shift; + /* Handle most ASCII characters quickly, without calling mbrtowc(). */ + if (is_basic (*iter->cur.ptr)) + { + /* These characters are part of the basic character set. ISO C 99 + guarantees that their wide character code is identical to their + char code. */ + iter->cur.bytes = 1; + iter->cur.wc = *iter->cur.ptr; + iter->cur.wc_valid = true; + } + else + { + assert (mbsinit (&iter->state)); + iter->in_shift = true; + with_shift: + iter->cur.bytes = mbrtowc (&iter->cur.wc, iter->cur.ptr, + strnlen1 (iter->cur.ptr, MB_CUR_MAX), + &iter->state); + if (iter->cur.bytes == (size_t) -1) + { + /* An invalid multibyte sequence was encountered. */ + iter->cur.bytes = 1; + iter->cur.wc_valid = false; + /* Whether to set iter->in_shift = false and reset iter->state + or not is not very important; the string is bogus anyway. */ + } + else if (iter->cur.bytes == (size_t) -2) + { + /* An incomplete multibyte character at the end. */ + iter->cur.bytes = strlen (iter->cur.ptr); + iter->cur.wc_valid = false; + /* Whether to set iter->in_shift = false and reset iter->state + or not is not important; the string end is reached anyway. */ + } + else + { + if (iter->cur.bytes == 0) + { + /* A null wide character was encountered. */ + iter->cur.bytes = 1; + assert (*iter->cur.ptr == '\0'); + assert (iter->cur.wc == 0); + } + iter->cur.wc_valid = true; + + /* When in the initial state, we can go back treating ASCII + characters more quickly. */ + if (mbsinit (&iter->state)) + iter->in_shift = false; + } + } + iter->next_done = true; +} + +static inline void +mbuiter_multi_reloc (struct mbuiter_multi *iter, ptrdiff_t ptrdiff) +{ + iter->cur.ptr += ptrdiff; +} + +/* Iteration macros. */ +typedef struct mbuiter_multi mbui_iterator_t; +#define mbui_init(iter, startptr) \ + ((iter).cur.ptr = (startptr), \ + (iter).in_shift = false, memset (&(iter).state, '\0', sizeof (mbstate_t)), \ + (iter).next_done = false) +#define mbui_avail(iter) \ + (mbuiter_multi_next (&(iter)), !mb_isnul ((iter).cur)) +#define mbui_advance(iter) \ + ((iter).cur.ptr += (iter).cur.bytes, (iter).next_done = false) + +/* Access to the current character. */ +#define mbui_cur(iter) (iter).cur +#define mbui_cur_ptr(iter) (iter).cur.ptr + +/* Relocation. */ +#define mbui_reloc(iter, ptrdiff) mbuiter_multi_reloc (&iter, ptrdiff) + +#endif /* _MBUITER_H */ diff --git a/gl/memchr.c b/gl/memchr.c new file mode 100644 index 0000000..d44ad6d --- /dev/null +++ b/gl/memchr.c @@ -0,0 +1,201 @@ +/* Copyright (C) 1991, 1993, 1996, 1997, 1999, 2000, 2003, 2004, 2006 Free + Software Foundation, Inc. + + Based on strlen implementation by Torbjorn Granlund (tege@sics.se), + with help from Dan Sahlin (dan@sics.se) and + commentary by Jim Blandy (jimb@ai.mit.edu); + adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu), + and implemented by Roland McGrath (roland@ai.mit.edu). + +NOTE: The canonical source of this file is maintained with the GNU C Library. +Bugs can be reported to bug-glibc@prep.ai.mit.edu. + +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, write to the Free Software Foundation, +Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _LIBC +# include +#endif + +#include + +#include + +#if defined _LIBC +# include +#else +# define reg_char char +#endif + +#include + +#if HAVE_BP_SYM_H || defined _LIBC +# include +#else +# define BP_SYM(sym) sym +#endif + +#undef memchr +#undef __memchr + +/* Search no more than N bytes of S for C. */ +void * +__memchr (void const *s, int c_in, size_t n) +{ + const unsigned char *char_ptr; + const unsigned long int *longword_ptr; + unsigned long int longword, magic_bits, charmask; + unsigned reg_char c; + int i; + + c = (unsigned char) c_in; + + /* Handle the first few characters by reading one character at a time. + Do this until CHAR_PTR is aligned on a longword boundary. */ + for (char_ptr = (const unsigned char *) s; + n > 0 && (size_t) char_ptr % sizeof longword != 0; + --n, ++char_ptr) + if (*char_ptr == c) + return (void *) char_ptr; + + /* All these elucidatory comments refer to 4-byte longwords, + but the theory applies equally well to any size longwords. */ + + longword_ptr = (const unsigned long int *) char_ptr; + + /* Bits 31, 24, 16, and 8 of this number are zero. Call these bits + the "holes." Note that there is a hole just to the left of + each byte, with an extra at the end: + + bits: 01111110 11111110 11111110 11111111 + bytes: AAAAAAAA BBBBBBBB CCCCCCCC DDDDDDDD + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ + + /* Set MAGIC_BITS to be this pattern of 1 and 0 bits. + Set CHARMASK to be a longword, each of whose bytes is C. */ + + magic_bits = 0xfefefefe; + charmask = c | (c << 8); + charmask |= charmask << 16; +#if 0xffffffffU < ULONG_MAX + magic_bits |= magic_bits << 32; + charmask |= charmask << 32; + if (8 < sizeof longword) + for (i = 64; i < sizeof longword * 8; i *= 2) + { + magic_bits |= magic_bits << i; + charmask |= charmask << i; + } +#endif + magic_bits = (ULONG_MAX >> 1) & (magic_bits | 1); + + /* Instead of the traditional loop which tests each character, + we will test a longword at a time. The tricky part is testing + if *any of the four* bytes in the longword in question are zero. */ + while (n >= sizeof longword) + { + /* We tentatively exit the loop if adding MAGIC_BITS to + LONGWORD fails to change any of the hole bits of LONGWORD. + + 1) Is this safe? Will it catch all the zero bytes? + Suppose there is a byte with all zeros. Any carry bits + propagating from its left will fall into the hole at its + least significant bit and stop. Since there will be no + carry from its most significant bit, the LSB of the + byte to the left will be unchanged, and the zero will be + detected. + + 2) Is this worthwhile? Will it ignore everything except + zero bytes? Suppose every byte of LONGWORD has a bit set + somewhere. There will be a carry into bit 8. If bit 8 + is set, this will carry into bit 16. If bit 8 is clear, + one of bits 9-15 must be set, so there will be a carry + into bit 16. Similarly, there will be a carry into bit + 24. If one of bits 24-30 is set, there will be a carry + into bit 31, so all of the hole bits will be changed. + + The one misfire occurs when bits 24-30 are clear and bit + 31 is set; in this case, the hole at bit 31 is not + changed. If we had access to the processor carry flag, + we could close this loophole by putting the fourth hole + at bit 32! + + So it ignores everything except 128's, when they're aligned + properly. + + 3) But wait! Aren't we looking for C, not zero? + Good point. So what we do is XOR LONGWORD with a longword, + each of whose bytes is C. This turns each byte that is C + into a zero. */ + + longword = *longword_ptr++ ^ charmask; + + /* Add MAGIC_BITS to LONGWORD. */ + if ((((longword + magic_bits) + + /* Set those bits that were unchanged by the addition. */ + ^ ~longword) + + /* Look at only the hole bits. If any of the hole bits + are unchanged, most likely one of the bytes was a + zero. */ + & ~magic_bits) != 0) + { + /* Which of the bytes was C? If none of them were, it was + a misfire; continue the search. */ + + const unsigned char *cp = (const unsigned char *) (longword_ptr - 1); + + if (cp[0] == c) + return (void *) cp; + if (cp[1] == c) + return (void *) &cp[1]; + if (cp[2] == c) + return (void *) &cp[2]; + if (cp[3] == c) + return (void *) &cp[3]; + if (4 < sizeof longword && cp[4] == c) + return (void *) &cp[4]; + if (5 < sizeof longword && cp[5] == c) + return (void *) &cp[5]; + if (6 < sizeof longword && cp[6] == c) + return (void *) &cp[6]; + if (7 < sizeof longword && cp[7] == c) + return (void *) &cp[7]; + if (8 < sizeof longword) + for (i = 8; i < sizeof longword; i++) + if (cp[i] == c) + return (void *) &cp[i]; + } + + n -= sizeof longword; + } + + char_ptr = (const unsigned char *) longword_ptr; + + while (n-- > 0) + { + if (*char_ptr == c) + return (void *) char_ptr; + else + ++char_ptr; + } + + return 0; +} +#ifdef weak_alias +weak_alias (__memchr, BP_SYM (memchr)) +#endif diff --git a/gl/minmax.h b/gl/minmax.h new file mode 100644 index 0000000..975ea76 --- /dev/null +++ b/gl/minmax.h @@ -0,0 +1,60 @@ +/* MIN, MAX macros. + Copyright (C) 1995, 1998, 2001, 2003, 2005 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _MINMAX_H +#define _MINMAX_H + +/* Note: MIN, MAX are also defined in on some systems + (glibc, IRIX, HP-UX, OSF/1). Therefore you might get warnings about + MIN, MAX macro redefinitions on some systems; the workaround is to + #include this file as the last one among the #include list. */ + +/* Before we define the following symbols we get the file + since otherwise we get redefinitions on some systems if is + included after this file. Likewise for . + If more than one of these system headers define MIN and MAX, pick just + one of the headers (because the definitions most likely are the same). */ +#if HAVE_MINMAX_IN_LIMITS_H +# include +#elif HAVE_MINMAX_IN_SYS_PARAM_H +# include +#endif + +/* Note: MIN and MAX should be used with two arguments of the + same type. They might not return the minimum and maximum of their two + arguments, if the arguments have different types or have unusual + floating-point values. For example, on a typical host with 32-bit 'int', + 64-bit 'long long', and 64-bit IEEE 754 'double' types: + + MAX (-1, 2147483648) returns 4294967295. + MAX (9007199254740992.0, 9007199254740993) returns 9007199254740992.0. + MAX (NaN, 0.0) returns 0.0. + MAX (+0.0, -0.0) returns -0.0. + + and in each case the answer is in some sense bogus. */ + +/* MAX(a,b) returns the maximum of A and B. */ +#ifndef MAX +# define MAX(a,b) ((a) > (b) ? (a) : (b)) +#endif + +/* MIN(a,b) returns the minimum of A and B. */ +#ifndef MIN +# define MIN(a,b) ((a) < (b) ? (a) : (b)) +#endif + +#endif /* _MINMAX_H */ diff --git a/lib/mountlist.c b/gl/mountlist.c similarity index 87% rename from lib/mountlist.c rename to gl/mountlist.c index 70d4edb..bb01f91 100644 --- a/lib/mountlist.c +++ b/gl/mountlist.c @@ -1,7 +1,7 @@ /* mountlist.c -- return a list of mounted file systems Copyright (C) 1991, 1992, 1997, 1998, 1999, 2000, 2001, 2002, 2003, - 2004, 2005 Free Software Foundation, Inc. + 2004, 2005, 2006 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 @@ -17,12 +17,11 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include #include "mountlist.h" +#include #include #include #include @@ -81,6 +80,10 @@ char *strstr (); # include #endif +#ifdef MOUNTED_GETMNTINFO2 /* NetBSD 3.0. */ +# include +#endif + #ifdef MOUNTED_GETMNT /* Ultrix. */ # include # include @@ -140,29 +143,42 @@ char *strstr (); # define SIZE_MAX ((size_t) -1) #endif +/* The results of open() in this file are not used with fchdir, + therefore save some unnecessary work in fchdir.c. */ +#undef open +#undef close + +/* The results of opendir() in this file are not used with dirfd and fchdir, + therefore save some unnecessary work in fchdir.c. */ +#undef opendir +#undef closedir + #ifndef ME_DUMMY # define ME_DUMMY(Fs_name, Fs_type) \ (strcmp (Fs_type, "autofs") == 0 \ || strcmp (Fs_type, "none") == 0 \ || strcmp (Fs_type, "proc") == 0 \ || strcmp (Fs_type, "subfs") == 0 \ + /* for NetBSD 3.0 */ \ + || strcmp (Fs_type, "kernfs") == 0 \ /* for Irix 6.5 */ \ || strcmp (Fs_type, "ignore") == 0) #endif #ifndef ME_REMOTE /* A file system is `remote' if its Fs_name contains a `:' - or if (it is of type smbfs and its Fs_name starts with `//'). */ + or if (it is of type (smbfs or cifs) and its Fs_name starts with `//'). */ # define ME_REMOTE(Fs_name, Fs_type) \ - (strchr (Fs_name, ':') != 0 \ + (strchr (Fs_name, ':') != NULL \ || ((Fs_name)[0] == '/' \ && (Fs_name)[1] == '/' \ - && strcmp (Fs_type, "smbfs") == 0)) + && (strcmp (Fs_type, "smbfs") == 0 \ + || strcmp (Fs_type, "cifs") == 0))) #endif #if MOUNTED_GETMNTINFO -# if ! HAVE_F_FSTYPENAME_IN_STATFS +# if ! HAVE_STRUCT_STATFS_F_FSTYPENAME static char * fstype_to_string (short int t) { @@ -256,13 +272,12 @@ fstype_to_string (short int t) return "?"; } } -# endif /* ! HAVE_F_FSTYPENAME_IN_STATFS */ +# endif -/* __NetBSD__ || BSD_NET2 || __OpenBSD__ */ static char * fsp_to_string (const struct statfs *fsp) { -# if defined HAVE_F_FSTYPENAME_IN_STATFS +# if HAVE_STRUCT_STATFS_F_FSTYPENAME return (char *) (fsp->f_fstypename); # else return fstype_to_string (fsp->f_type); @@ -285,6 +300,44 @@ fstype_to_string (int t) } #endif /* MOUNTED_VMOUNT */ + +#if defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2 + +/* Return the device number from MOUNT_OPTIONS, if possible. + Otherwise return (dev_t) -1. */ + +static dev_t +dev_from_mount_options (char const *mount_options) +{ + /* GNU/Linux allows file system implementations to define their own + meaning for "dev=" mount options, so don't trust the meaning + here. */ +# ifndef __linux__ + + static char const dev_pattern[] = ",dev="; + char const *devopt = strstr (mount_options, dev_pattern); + + if (devopt) + { + char const *optval = devopt + sizeof dev_pattern - 1; + char *optvalend; + unsigned long int dev; + errno = 0; + dev = strtoul (optval, &optvalend, 16); + if (optval != optvalend + && (*optvalend == '\0' || *optvalend == ',') + && ! (dev == ULONG_MAX && errno == ERANGE) + && dev == (dev_t) dev) + return dev; + } + +# endif + + return -1; +} + +#endif + /* Return a list of the currently mounted file systems, or NULL on error. Add each entry to the tail of the list so that they stay in order. If NEED_FS_TYPE is true, ensure that the file system type fields in @@ -327,12 +380,11 @@ read_file_system_list (bool need_fs_type) } #endif -#ifdef MOUNTED_GETMNTENT1 /* 4.3BSD, SunOS, HP-UX, Dynix, Irix. */ +#ifdef MOUNTED_GETMNTENT1 /* GNU/Linux, 4.3BSD, SunOS, HP-UX, Dynix, Irix. */ { struct mntent *mnt; char *table = MOUNTED; FILE *fp; - char *devopt; fp = setmntent (table, "r"); if (fp == NULL) @@ -347,11 +399,7 @@ read_file_system_list (bool need_fs_type) me->me_type_malloced = 1; me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); me->me_remote = ME_REMOTE (me->me_devname, me->me_type); - devopt = strstr (mnt->mnt_opts, "dev="); - if (devopt) - me->me_dev = strtoul (devopt + 4, NULL, 16); - else - me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ + me->me_dev = dev_from_mount_options (mnt->mnt_opts); /* Add to the linked list. */ *mtail = me; @@ -391,6 +439,32 @@ read_file_system_list (bool need_fs_type) } #endif /* MOUNTED_GETMNTINFO */ +#ifdef MOUNTED_GETMNTINFO2 /* NetBSD 3.0. */ + { + struct statvfs *fsp; + int entries; + + entries = getmntinfo (&fsp, MNT_NOWAIT); + if (entries < 0) + return NULL; + for (; entries-- > 0; fsp++) + { + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (fsp->f_mntfromname); + me->me_mountdir = xstrdup (fsp->f_mntonname); + me->me_type = xstrdup (fsp->f_fstypename); + me->me_type_malloced = 1; + me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); + me->me_remote = ME_REMOTE (me->me_devname, me->me_type); + me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ + + /* Add to the linked list. */ + *mtail = me; + mtail = &me->me_next; + } + } +#endif /* MOUNTED_GETMNTINFO2 */ + #ifdef MOUNTED_GETMNT /* Ultrix. */ { int offset = 0; @@ -625,7 +699,7 @@ read_file_system_list (bool need_fs_type) } #endif /* MOUNTED_FREAD || MOUNTED_FREAD_FSTYP. */ -#ifdef MOUNTED_GETMNTTBL /* DolphinOS goes it's own way */ +#ifdef MOUNTED_GETMNTTBL /* DolphinOS goes its own way. */ { struct mntent **mnttbl = getmnttbl (), **ent; for (ent=mnttbl;*ent;ent++) @@ -699,7 +773,7 @@ read_file_system_list (bool need_fs_type) me->me_type_malloced = 1; me->me_dummy = MNT_IGNORE (&mnt) != 0; me->me_remote = ME_REMOTE (me->me_devname, me->me_type); - me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ + me->me_dev = dev_from_mount_options (mnt.mnt_mntopts); /* Add to the linked list. */ *mtail = me; diff --git a/lib/mountlist.h b/gl/mountlist.h similarity index 100% rename from lib/mountlist.h rename to gl/mountlist.h diff --git a/lib/open-safer.c b/gl/open-safer.c similarity index 93% rename from lib/open-safer.c rename to gl/open-safer.c index d3ba894..04a72eb 100644 --- a/lib/open-safer.c +++ b/gl/open-safer.c @@ -1,5 +1,6 @@ /* Invoke open, but avoid some glitches. - Copyright (C) 2005 Free Software Foundation, Inc. + + Copyright (C) 2005, 2006 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 @@ -17,9 +18,7 @@ /* Written by Paul Eggert. */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include #include "fcntl-safer.h" diff --git a/lib/pipe-safer.c b/gl/pipe-safer.c similarity index 65% rename from lib/pipe-safer.c rename to gl/pipe-safer.c index fb02d72..e4431b3 100644 --- a/lib/pipe-safer.c +++ b/gl/pipe-safer.c @@ -1,5 +1,5 @@ /* Invoke pipe, but avoid some glitches. - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005, 2006 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 @@ -17,34 +17,41 @@ /* Written by Jim Meyering. */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include #include "unistd-safer.h" #include +#include /* Like pipe, but ensure that neither of the file descriptors is - STDIN_FILENO, STDOUT_FILENO, or STDERR_FILENO. */ + STDIN_FILENO, STDOUT_FILENO, or STDERR_FILENO. Fail with ENOSYS on + platforms that lack pipe. */ int pipe_safer (int fd[2]) { - int fail = pipe (fd); - if (fail) - return fail; +#if HAVE_PIPE + if (pipe (fd) == 0) + { + int i; + for (i = 0; i < 2; i++) + { + fd[i] = fd_safer (fd[i]); + if (fd[i] < 0) + { + int e = errno; + close (fd[1 - i]); + errno = e; + return -1; + } + } - { - int i; - for (i = 0; i < 2; i++) - { - int f = fd_safer (fd[i]); - if (f < 0) - return -1; - fd[i] = f; - } - } + return 0; + } +#else + errno = ENOSYS; +#endif - return 0; + return -1; } diff --git a/gl/printf-args.c b/gl/printf-args.c new file mode 100644 index 0000000..358801c --- /dev/null +++ b/gl/printf-args.c @@ -0,0 +1,141 @@ +/* Decomposed printf argument list. + Copyright (C) 1999, 2002-2003, 2005-2006 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#include + +/* Specification. */ +#include "printf-args.h" + +#ifdef STATIC +STATIC +#endif +int +printf_fetchargs (va_list args, arguments *a) +{ + size_t i; + argument *ap; + + for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++) + switch (ap->type) + { + case TYPE_SCHAR: + ap->a.a_schar = va_arg (args, /*signed char*/ int); + break; + case TYPE_UCHAR: + ap->a.a_uchar = va_arg (args, /*unsigned char*/ int); + break; + case TYPE_SHORT: + ap->a.a_short = va_arg (args, /*short*/ int); + break; + case TYPE_USHORT: + ap->a.a_ushort = va_arg (args, /*unsigned short*/ int); + break; + case TYPE_INT: + ap->a.a_int = va_arg (args, int); + break; + case TYPE_UINT: + ap->a.a_uint = va_arg (args, unsigned int); + break; + case TYPE_LONGINT: + ap->a.a_longint = va_arg (args, long int); + break; + case TYPE_ULONGINT: + ap->a.a_ulongint = va_arg (args, unsigned long int); + break; +#ifdef HAVE_LONG_LONG_INT + case TYPE_LONGLONGINT: + ap->a.a_longlongint = va_arg (args, long long int); + break; + case TYPE_ULONGLONGINT: + ap->a.a_ulonglongint = va_arg (args, unsigned long long int); + break; +#endif + case TYPE_DOUBLE: + ap->a.a_double = va_arg (args, double); + break; +#ifdef HAVE_LONG_DOUBLE + case TYPE_LONGDOUBLE: + ap->a.a_longdouble = va_arg (args, long double); + break; +#endif + case TYPE_CHAR: + ap->a.a_char = va_arg (args, int); + break; +#ifdef HAVE_WINT_T + case TYPE_WIDE_CHAR: + /* Although ISO C 99 7.24.1.(2) says that wint_t is "unchanged by + default argument promotions", this is not the case in mingw32, + where wint_t is 'unsigned short'. */ + ap->a.a_wide_char = + (sizeof (wint_t) < sizeof (int) + ? va_arg (args, int) + : va_arg (args, wint_t)); + break; +#endif + case TYPE_STRING: + ap->a.a_string = va_arg (args, const char *); + /* A null pointer is an invalid argument for "%s", but in practice + it occurs quite frequently in printf statements that produce + debug output. Use a fallback in this case. */ + if (ap->a.a_string == NULL) + ap->a.a_string = "(NULL)"; + break; +#ifdef HAVE_WCHAR_T + case TYPE_WIDE_STRING: + ap->a.a_wide_string = va_arg (args, const wchar_t *); + /* A null pointer is an invalid argument for "%ls", but in practice + it occurs quite frequently in printf statements that produce + debug output. Use a fallback in this case. */ + if (ap->a.a_wide_string == NULL) + { + static const wchar_t wide_null_string[] = + { + (wchar_t)'(', + (wchar_t)'N', (wchar_t)'U', (wchar_t)'L', (wchar_t)'L', + (wchar_t)')', + (wchar_t)0 + }; + ap->a.a_wide_string = wide_null_string; + } + break; +#endif + case TYPE_POINTER: + ap->a.a_pointer = va_arg (args, void *); + break; + case TYPE_COUNT_SCHAR_POINTER: + ap->a.a_count_schar_pointer = va_arg (args, signed char *); + break; + case TYPE_COUNT_SHORT_POINTER: + ap->a.a_count_short_pointer = va_arg (args, short *); + break; + case TYPE_COUNT_INT_POINTER: + ap->a.a_count_int_pointer = va_arg (args, int *); + break; + case TYPE_COUNT_LONGINT_POINTER: + ap->a.a_count_longint_pointer = va_arg (args, long int *); + break; +#ifdef HAVE_LONG_LONG_INT + case TYPE_COUNT_LONGLONGINT_POINTER: + ap->a.a_count_longlongint_pointer = va_arg (args, long long int *); + break; +#endif + default: + /* Unknown type. */ + return -1; + } + return 0; +} diff --git a/gl/printf-args.h b/gl/printf-args.h new file mode 100644 index 0000000..5759da0 --- /dev/null +++ b/gl/printf-args.h @@ -0,0 +1,136 @@ +/* Decomposed printf argument list. + Copyright (C) 1999, 2002-2003, 2006 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _PRINTF_ARGS_H +#define _PRINTF_ARGS_H + +/* Get size_t. */ +#include + +/* Get wchar_t. */ +#ifdef HAVE_WCHAR_T +# include +#endif + +/* Get wint_t. */ +#ifdef HAVE_WINT_T +# include +#endif + +/* Get va_list. */ +#include + + +/* Argument types */ +typedef enum +{ + TYPE_NONE, + TYPE_SCHAR, + TYPE_UCHAR, + TYPE_SHORT, + TYPE_USHORT, + TYPE_INT, + TYPE_UINT, + TYPE_LONGINT, + TYPE_ULONGINT, +#ifdef HAVE_LONG_LONG_INT + TYPE_LONGLONGINT, + TYPE_ULONGLONGINT, +#endif + TYPE_DOUBLE, +#ifdef HAVE_LONG_DOUBLE + TYPE_LONGDOUBLE, +#endif + TYPE_CHAR, +#ifdef HAVE_WINT_T + TYPE_WIDE_CHAR, +#endif + TYPE_STRING, +#ifdef HAVE_WCHAR_T + TYPE_WIDE_STRING, +#endif + TYPE_POINTER, + TYPE_COUNT_SCHAR_POINTER, + TYPE_COUNT_SHORT_POINTER, + TYPE_COUNT_INT_POINTER, + TYPE_COUNT_LONGINT_POINTER +#ifdef HAVE_LONG_LONG_INT +, TYPE_COUNT_LONGLONGINT_POINTER +#endif +} arg_type; + +/* Polymorphic argument */ +typedef struct +{ + arg_type type; + union + { + signed char a_schar; + unsigned char a_uchar; + short a_short; + unsigned short a_ushort; + int a_int; + unsigned int a_uint; + long int a_longint; + unsigned long int a_ulongint; +#ifdef HAVE_LONG_LONG_INT + long long int a_longlongint; + unsigned long long int a_ulonglongint; +#endif + float a_float; + double a_double; +#ifdef HAVE_LONG_DOUBLE + long double a_longdouble; +#endif + int a_char; +#ifdef HAVE_WINT_T + wint_t a_wide_char; +#endif + const char* a_string; +#ifdef HAVE_WCHAR_T + const wchar_t* a_wide_string; +#endif + void* a_pointer; + signed char * a_count_schar_pointer; + short * a_count_short_pointer; + int * a_count_int_pointer; + long int * a_count_longint_pointer; +#ifdef HAVE_LONG_LONG_INT + long long int * a_count_longlongint_pointer; +#endif + } + a; +} +argument; + +typedef struct +{ + size_t count; + argument *arg; +} +arguments; + + +/* Fetch the arguments, putting them into a. */ +#ifdef STATIC +STATIC +#else +extern +#endif +int printf_fetchargs (va_list args, arguments *a); + +#endif /* _PRINTF_ARGS_H */ diff --git a/gl/printf-parse.c b/gl/printf-parse.c new file mode 100644 index 0000000..9a86f77 --- /dev/null +++ b/gl/printf-parse.c @@ -0,0 +1,543 @@ +/* Formatted output to strings. + Copyright (C) 1999-2000, 2002-2003, 2006 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#include + +/* Specification. */ +#if WIDE_CHAR_VERSION +# include "wprintf-parse.h" +#else +# include "printf-parse.h" +#endif + +/* Get size_t, NULL. */ +#include + +/* Get intmax_t. */ +#if HAVE_STDINT_H_WITH_UINTMAX +# include +#endif +#if HAVE_INTTYPES_H_WITH_UINTMAX +# include +#endif + +/* malloc(), realloc(), free(). */ +#include + +/* Checked size_t computations. */ +#include "xsize.h" + +#if WIDE_CHAR_VERSION +# define PRINTF_PARSE wprintf_parse +# define CHAR_T wchar_t +# define DIRECTIVE wchar_t_directive +# define DIRECTIVES wchar_t_directives +#else +# define PRINTF_PARSE printf_parse +# define CHAR_T char +# define DIRECTIVE char_directive +# define DIRECTIVES char_directives +#endif + +#ifdef STATIC +STATIC +#endif +int +PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) +{ + const CHAR_T *cp = format; /* pointer into format */ + size_t arg_posn = 0; /* number of regular arguments consumed */ + size_t d_allocated; /* allocated elements of d->dir */ + size_t a_allocated; /* allocated elements of a->arg */ + size_t max_width_length = 0; + size_t max_precision_length = 0; + + d->count = 0; + d_allocated = 1; + d->dir = (DIRECTIVE *) malloc (d_allocated * sizeof (DIRECTIVE)); + if (d->dir == NULL) + /* Out of memory. */ + return -1; + + a->count = 0; + a_allocated = 0; + a->arg = NULL; + +#define REGISTER_ARG(_index_,_type_) \ + { \ + size_t n = (_index_); \ + if (n >= a_allocated) \ + { \ + size_t memory_size; \ + argument *memory; \ + \ + a_allocated = xtimes (a_allocated, 2); \ + if (a_allocated <= n) \ + a_allocated = xsum (n, 1); \ + memory_size = xtimes (a_allocated, sizeof (argument)); \ + if (size_overflow_p (memory_size)) \ + /* Overflow, would lead to out of memory. */ \ + goto error; \ + memory = (argument *) (a->arg \ + ? realloc (a->arg, memory_size) \ + : malloc (memory_size)); \ + if (memory == NULL) \ + /* Out of memory. */ \ + goto error; \ + a->arg = memory; \ + } \ + while (a->count <= n) \ + a->arg[a->count++].type = TYPE_NONE; \ + if (a->arg[n].type == TYPE_NONE) \ + a->arg[n].type = (_type_); \ + else if (a->arg[n].type != (_type_)) \ + /* Ambiguous type for positional argument. */ \ + goto error; \ + } + + while (*cp != '\0') + { + CHAR_T c = *cp++; + if (c == '%') + { + size_t arg_index = ARG_NONE; + DIRECTIVE *dp = &d->dir[d->count];/* pointer to next directive */ + + /* Initialize the next directive. */ + dp->dir_start = cp - 1; + dp->flags = 0; + dp->width_start = NULL; + dp->width_end = NULL; + dp->width_arg_index = ARG_NONE; + dp->precision_start = NULL; + dp->precision_end = NULL; + dp->precision_arg_index = ARG_NONE; + dp->arg_index = ARG_NONE; + + /* Test for positional argument. */ + if (*cp >= '0' && *cp <= '9') + { + const CHAR_T *np; + + for (np = cp; *np >= '0' && *np <= '9'; np++) + ; + if (*np == '$') + { + size_t n = 0; + + for (np = cp; *np >= '0' && *np <= '9'; np++) + n = xsum (xtimes (n, 10), *np - '0'); + if (n == 0) + /* Positional argument 0. */ + goto error; + if (size_overflow_p (n)) + /* n too large, would lead to out of memory later. */ + goto error; + arg_index = n - 1; + cp = np + 1; + } + } + + /* Read the flags. */ + for (;;) + { + if (*cp == '\'') + { + dp->flags |= FLAG_GROUP; + cp++; + } + else if (*cp == '-') + { + dp->flags |= FLAG_LEFT; + cp++; + } + else if (*cp == '+') + { + dp->flags |= FLAG_SHOWSIGN; + cp++; + } + else if (*cp == ' ') + { + dp->flags |= FLAG_SPACE; + cp++; + } + else if (*cp == '#') + { + dp->flags |= FLAG_ALT; + cp++; + } + else if (*cp == '0') + { + dp->flags |= FLAG_ZERO; + cp++; + } + else + break; + } + + /* Parse the field width. */ + if (*cp == '*') + { + dp->width_start = cp; + cp++; + dp->width_end = cp; + if (max_width_length < 1) + max_width_length = 1; + + /* Test for positional argument. */ + if (*cp >= '0' && *cp <= '9') + { + const CHAR_T *np; + + for (np = cp; *np >= '0' && *np <= '9'; np++) + ; + if (*np == '$') + { + size_t n = 0; + + for (np = cp; *np >= '0' && *np <= '9'; np++) + n = xsum (xtimes (n, 10), *np - '0'); + if (n == 0) + /* Positional argument 0. */ + goto error; + if (size_overflow_p (n)) + /* n too large, would lead to out of memory later. */ + goto error; + dp->width_arg_index = n - 1; + cp = np + 1; + } + } + if (dp->width_arg_index == ARG_NONE) + { + dp->width_arg_index = arg_posn++; + if (dp->width_arg_index == ARG_NONE) + /* arg_posn wrapped around. */ + goto error; + } + REGISTER_ARG (dp->width_arg_index, TYPE_INT); + } + else if (*cp >= '0' && *cp <= '9') + { + size_t width_length; + + dp->width_start = cp; + for (; *cp >= '0' && *cp <= '9'; cp++) + ; + dp->width_end = cp; + width_length = dp->width_end - dp->width_start; + if (max_width_length < width_length) + max_width_length = width_length; + } + + /* Parse the precision. */ + if (*cp == '.') + { + cp++; + if (*cp == '*') + { + dp->precision_start = cp - 1; + cp++; + dp->precision_end = cp; + if (max_precision_length < 2) + max_precision_length = 2; + + /* Test for positional argument. */ + if (*cp >= '0' && *cp <= '9') + { + const CHAR_T *np; + + for (np = cp; *np >= '0' && *np <= '9'; np++) + ; + if (*np == '$') + { + size_t n = 0; + + for (np = cp; *np >= '0' && *np <= '9'; np++) + n = xsum (xtimes (n, 10), *np - '0'); + if (n == 0) + /* Positional argument 0. */ + goto error; + if (size_overflow_p (n)) + /* n too large, would lead to out of memory + later. */ + goto error; + dp->precision_arg_index = n - 1; + cp = np + 1; + } + } + if (dp->precision_arg_index == ARG_NONE) + { + dp->precision_arg_index = arg_posn++; + if (dp->precision_arg_index == ARG_NONE) + /* arg_posn wrapped around. */ + goto error; + } + REGISTER_ARG (dp->precision_arg_index, TYPE_INT); + } + else + { + size_t precision_length; + + dp->precision_start = cp - 1; + for (; *cp >= '0' && *cp <= '9'; cp++) + ; + dp->precision_end = cp; + precision_length = dp->precision_end - dp->precision_start; + if (max_precision_length < precision_length) + max_precision_length = precision_length; + } + } + + { + arg_type type; + + /* Parse argument type/size specifiers. */ + { + int flags = 0; + + for (;;) + { + if (*cp == 'h') + { + flags |= (1 << (flags & 1)); + cp++; + } + else if (*cp == 'L') + { + flags |= 4; + cp++; + } + else if (*cp == 'l') + { + flags += 8; + cp++; + } +#ifdef HAVE_INTMAX_T + else if (*cp == 'j') + { + if (sizeof (intmax_t) > sizeof (long)) + { + /* intmax_t = long long */ + flags += 16; + } + else if (sizeof (intmax_t) > sizeof (int)) + { + /* intmax_t = long */ + flags += 8; + } + cp++; + } +#endif + else if (*cp == 'z' || *cp == 'Z') + { + /* 'z' is standardized in ISO C 99, but glibc uses 'Z' + because the warning facility in gcc-2.95.2 understands + only 'Z' (see gcc-2.95.2/gcc/c-common.c:1784). */ + if (sizeof (size_t) > sizeof (long)) + { + /* size_t = long long */ + flags += 16; + } + else if (sizeof (size_t) > sizeof (int)) + { + /* size_t = long */ + flags += 8; + } + cp++; + } + else if (*cp == 't') + { + if (sizeof (ptrdiff_t) > sizeof (long)) + { + /* ptrdiff_t = long long */ + flags += 16; + } + else if (sizeof (ptrdiff_t) > sizeof (int)) + { + /* ptrdiff_t = long */ + flags += 8; + } + cp++; + } + else + break; + } + + /* Read the conversion character. */ + c = *cp++; + switch (c) + { + case 'd': case 'i': +#ifdef HAVE_LONG_LONG_INT + /* If 'long long' exists and is larger than 'long': */ + if (flags >= 16 || (flags & 4)) + type = TYPE_LONGLONGINT; + else +#endif + /* If 'long long' exists and is the same as 'long', we parse + "lld" into TYPE_LONGINT. */ + if (flags >= 8) + type = TYPE_LONGINT; + else if (flags & 2) + type = TYPE_SCHAR; + else if (flags & 1) + type = TYPE_SHORT; + else + type = TYPE_INT; + break; + case 'o': case 'u': case 'x': case 'X': +#ifdef HAVE_LONG_LONG_INT + /* If 'long long' exists and is larger than 'long': */ + if (flags >= 16 || (flags & 4)) + type = TYPE_ULONGLONGINT; + else +#endif + /* If 'unsigned long long' exists and is the same as + 'unsigned long', we parse "llu" into TYPE_ULONGINT. */ + if (flags >= 8) + type = TYPE_ULONGINT; + else if (flags & 2) + type = TYPE_UCHAR; + else if (flags & 1) + type = TYPE_USHORT; + else + type = TYPE_UINT; + break; + case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': + case 'a': case 'A': +#ifdef HAVE_LONG_DOUBLE + if (flags >= 16 || (flags & 4)) + type = TYPE_LONGDOUBLE; + else +#endif + type = TYPE_DOUBLE; + break; + case 'c': + if (flags >= 8) +#ifdef HAVE_WINT_T + type = TYPE_WIDE_CHAR; +#else + goto error; +#endif + else + type = TYPE_CHAR; + break; +#ifdef HAVE_WINT_T + case 'C': + type = TYPE_WIDE_CHAR; + c = 'c'; + break; +#endif + case 's': + if (flags >= 8) +#ifdef HAVE_WCHAR_T + type = TYPE_WIDE_STRING; +#else + goto error; +#endif + else + type = TYPE_STRING; + break; +#ifdef HAVE_WCHAR_T + case 'S': + type = TYPE_WIDE_STRING; + c = 's'; + break; +#endif + case 'p': + type = TYPE_POINTER; + break; + case 'n': +#ifdef HAVE_LONG_LONG_INT + /* If 'long long' exists and is larger than 'long': */ + if (flags >= 16 || (flags & 4)) + type = TYPE_COUNT_LONGLONGINT_POINTER; + else +#endif + /* If 'long long' exists and is the same as 'long', we parse + "lln" into TYPE_COUNT_LONGINT_POINTER. */ + if (flags >= 8) + type = TYPE_COUNT_LONGINT_POINTER; + else if (flags & 2) + type = TYPE_COUNT_SCHAR_POINTER; + else if (flags & 1) + type = TYPE_COUNT_SHORT_POINTER; + else + type = TYPE_COUNT_INT_POINTER; + break; + case '%': + type = TYPE_NONE; + break; + default: + /* Unknown conversion character. */ + goto error; + } + } + + if (type != TYPE_NONE) + { + dp->arg_index = arg_index; + if (dp->arg_index == ARG_NONE) + { + dp->arg_index = arg_posn++; + if (dp->arg_index == ARG_NONE) + /* arg_posn wrapped around. */ + goto error; + } + REGISTER_ARG (dp->arg_index, type); + } + dp->conversion = c; + dp->dir_end = cp; + } + + d->count++; + if (d->count >= d_allocated) + { + size_t memory_size; + DIRECTIVE *memory; + + d_allocated = xtimes (d_allocated, 2); + memory_size = xtimes (d_allocated, sizeof (DIRECTIVE)); + if (size_overflow_p (memory_size)) + /* Overflow, would lead to out of memory. */ + goto error; + memory = (DIRECTIVE *) realloc (d->dir, memory_size); + if (memory == NULL) + /* Out of memory. */ + goto error; + d->dir = memory; + } + } + } + d->dir[d->count].dir_start = cp; + + d->max_width_length = max_width_length; + d->max_precision_length = max_precision_length; + return 0; + +error: + if (a->arg) + free (a->arg); + if (d->dir) + free (d->dir); + return -1; +} + +#undef DIRECTIVES +#undef DIRECTIVE +#undef CHAR_T +#undef PRINTF_PARSE diff --git a/gl/printf-parse.h b/gl/printf-parse.h new file mode 100644 index 0000000..82a0d37 --- /dev/null +++ b/gl/printf-parse.h @@ -0,0 +1,74 @@ +/* Parse printf format string. + Copyright (C) 1999, 2002-2003 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _PRINTF_PARSE_H +#define _PRINTF_PARSE_H + +#include "printf-args.h" + + +/* Flags */ +#define FLAG_GROUP 1 /* ' flag */ +#define FLAG_LEFT 2 /* - flag */ +#define FLAG_SHOWSIGN 4 /* + flag */ +#define FLAG_SPACE 8 /* space flag */ +#define FLAG_ALT 16 /* # flag */ +#define FLAG_ZERO 32 + +/* arg_index value indicating that no argument is consumed. */ +#define ARG_NONE (~(size_t)0) + +/* A parsed directive. */ +typedef struct +{ + const char* dir_start; + const char* dir_end; + int flags; + const char* width_start; + const char* width_end; + size_t width_arg_index; + const char* precision_start; + const char* precision_end; + size_t precision_arg_index; + char conversion; /* d i o u x X f e E g G c s p n U % but not C S */ + size_t arg_index; +} +char_directive; + +/* A parsed format string. */ +typedef struct +{ + size_t count; + char_directive *dir; + size_t max_width_length; + size_t max_precision_length; +} +char_directives; + + +/* Parses the format string. Fills in the number N of directives, and fills + in directives[0], ..., directives[N-1], and sets directives[N].dir_start + to the end of the format string. Also fills in the arg_type fields of the + arguments and the needed count of arguments. */ +#ifdef STATIC +STATIC +#else +extern +#endif +int printf_parse (const char *format, char_directives *d, arguments *a); + +#endif /* _PRINTF_PARSE_H */ diff --git a/lib/regcomp.c b/gl/regcomp.c similarity index 87% rename from lib/regcomp.c rename to gl/regcomp.c index 279b20c..8df6bb8 100644 --- a/lib/regcomp.c +++ b/gl/regcomp.c @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2002,2003,2004,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . @@ -18,11 +18,11 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern, - Idx length, reg_syntax_t syntax); + size_t length, reg_syntax_t syntax); static void re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, char *fastmap); -static reg_errcode_t init_dfa (re_dfa_t *dfa, Idx pat_len); +static reg_errcode_t init_dfa (re_dfa_t *dfa, size_t pat_len); #ifdef RE_ENABLE_I18N static void free_charset (re_charset_t *cset); #endif /* RE_ENABLE_I18N */ @@ -55,7 +55,7 @@ static reg_errcode_t calc_inveclosure (re_dfa_t *dfa); static Idx fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax); static int peek_token (re_token_t *token, re_string_t *input, - reg_syntax_t syntax); + reg_syntax_t syntax) internal_function; static bin_tree_t *parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax, reg_errcode_t *err); static bin_tree_t *parse_reg_exp (re_string_t *regexp, regex_t *preg, @@ -86,26 +86,26 @@ static reg_errcode_t parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token); #ifdef RE_ENABLE_I18N -static reg_errcode_t build_equiv_class (bitset sbcset, +static reg_errcode_t build_equiv_class (bitset_t sbcset, re_charset_t *mbcset, Idx *equiv_class_alloc, const unsigned char *name); -static reg_errcode_t build_charclass (unsigned REG_TRANSLATE_TYPE trans, - bitset sbcset, +static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans, + bitset_t sbcset, re_charset_t *mbcset, Idx *char_class_alloc, const unsigned char *class_name, reg_syntax_t syntax); #else /* not RE_ENABLE_I18N */ -static reg_errcode_t build_equiv_class (bitset sbcset, +static reg_errcode_t build_equiv_class (bitset_t sbcset, const unsigned char *name); -static reg_errcode_t build_charclass (unsigned REG_TRANSLATE_TYPE trans, - bitset sbcset, +static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans, + bitset_t sbcset, const unsigned char *class_name, reg_syntax_t syntax); #endif /* not RE_ENABLE_I18N */ static bin_tree_t *build_charclass_op (re_dfa_t *dfa, - unsigned REG_TRANSLATE_TYPE trans, + RE_TRANSLATE_TYPE trans, const unsigned char *class_name, const unsigned char *extra, bool non_match, reg_errcode_t *err); @@ -125,7 +125,7 @@ static reg_errcode_t mark_opt_subexp (void *extra, bin_tree_t *node); POSIX doesn't require that we do anything for REG_NOERROR, but why not be nice? */ -const char __re_error_msgid[] attribute_hidden = +static const char __re_error_msgid[] = { #define REG_NOERROR_IDX 0 gettext_noop ("Success") /* REG_NOERROR */ @@ -179,7 +179,7 @@ const char __re_error_msgid[] attribute_hidden = gettext_noop ("Unmatched ) or \\)") /* REG_ERPAREN */ }; -const size_t __re_error_msgid_idx[] attribute_hidden = +static const size_t __re_error_msgid_idx[] = { REG_NOERROR_IDX, REG_NOMATCH_IDX, @@ -206,22 +206,30 @@ const size_t __re_error_msgid_idx[] attribute_hidden = compiles PATTERN (of length LENGTH) and puts the result in BUFP. Returns 0 if the pattern was valid, otherwise an error string. - Assumes the `re_allocated' (and perhaps `re_buffer') and `translate' fields + Assumes the `allocated' (and perhaps `buffer') and `translate' fields are set in BUFP on entry. */ +#ifdef _LIBC +const char * +re_compile_pattern (pattern, length, bufp) + const char *pattern; + size_t length; + struct re_pattern_buffer *bufp; +#else /* size_t might promote */ const char * re_compile_pattern (const char *pattern, size_t length, struct re_pattern_buffer *bufp) +#endif { reg_errcode_t ret; /* And GNU code determines whether or not to get register information by passing null for the REGS argument to re_match, etc., not by - setting re_no_sub, unless REG_NO_SUB is set. */ - bufp->re_no_sub = !!(re_syntax_options & REG_NO_SUB); + setting no_sub, unless RE_NO_SUB is set. */ + bufp->no_sub = !!(re_syntax_options & RE_NO_SUB); /* Match anchors at newline. */ - bufp->re_newline_anchor = 1; + bufp->newline_anchor = 1; ret = re_compile_internal (bufp, pattern, length, re_syntax_options); @@ -249,7 +257,8 @@ reg_syntax_t re_syntax_options; defined in regex.h. We return the old syntax. */ reg_syntax_t -re_set_syntax (reg_syntax_t syntax) +re_set_syntax (syntax) + reg_syntax_t syntax; { reg_syntax_t ret = re_syntax_options; @@ -261,10 +270,11 @@ weak_alias (__re_set_syntax, re_set_syntax) #endif int -re_compile_fastmap (struct re_pattern_buffer *bufp) +re_compile_fastmap (bufp) + struct re_pattern_buffer *bufp; { - re_dfa_t *dfa = (re_dfa_t *) bufp->re_buffer; - char *fastmap = bufp->re_fastmap; + re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; + char *fastmap = bufp->fastmap; memset (fastmap, '\0', sizeof (char) * SBC_MAX); re_compile_fastmap_iter (bufp, dfa->init_state, fastmap); @@ -274,7 +284,7 @@ re_compile_fastmap (struct re_pattern_buffer *bufp) re_compile_fastmap_iter (bufp, dfa->init_state_nl, fastmap); if (dfa->init_state != dfa->init_state_begbuf) re_compile_fastmap_iter (bufp, dfa->init_state_begbuf, fastmap); - bufp->re_fastmap_accurate = 1; + bufp->fastmap_accurate = 1; return 0; } #ifdef _LIBC @@ -297,9 +307,9 @@ static void re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, char *fastmap) { - re_dfa_t *dfa = (re_dfa_t *) bufp->re_buffer; + re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; Idx node_cnt; - bool icase = (dfa->mb_cur_max == 1 && (bufp->re_syntax & REG_IGNORE_CASE)); + bool icase = (dfa->mb_cur_max == 1 && (bufp->syntax & RE_ICASE)); for (node_cnt = 0; node_cnt < init_state->nodes.nelem; ++node_cnt) { Idx node = init_state->nodes.elems[node_cnt]; @@ -309,7 +319,7 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, { re_set_fastmap (fastmap, icase, dfa->nodes[node].opr.c); #ifdef RE_ENABLE_I18N - if ((bufp->re_syntax & REG_IGNORE_CASE) && dfa->mb_cur_max > 1) + if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) { unsigned char buf[MB_LEN_MAX]; unsigned char *p; @@ -322,7 +332,7 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, && dfa->nodes[node].type == CHARACTER && dfa->nodes[node].mb_partial) *p++ = dfa->nodes[node].opr.c; - memset (&state, 0, sizeof (state)); + memset (&state, '\0', sizeof (state)); if (mbrtowc (&wc, (const char *) buf, p - buf, &state) == p - buf && (__wcrtomb ((char *) buf, towlower (wc), &state) @@ -333,11 +343,15 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, } else if (type == SIMPLE_BRACKET) { - int i, j, ch; + int i, ch; for (i = 0, ch = 0; i < BITSET_WORDS; ++i) - for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) - if (dfa->nodes[node].opr.sbcset[i] & ((bitset_word) 1 << j)) - re_set_fastmap (fastmap, icase, ch); + { + int j; + bitset_word_t w = dfa->nodes[node].opr.sbcset[i]; + for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) + if (w & ((bitset_word_t) 1 << j)) + re_set_fastmap (fastmap, icase, ch); + } } #ifdef RE_ENABLE_I18N else if (type == COMPLEX_BRACKET) @@ -376,7 +390,7 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, memset (&state, '\0', sizeof (state)); if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1) re_set_fastmap (fastmap, icase, *(unsigned char *) buf); - if ((bufp->re_syntax & REG_IGNORE_CASE) && dfa->mb_cur_max > 1) + if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) { if (__wcrtomb (buf, towlower (cset->mbchars[i]), &state) != (size_t) -1) @@ -393,7 +407,7 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, { memset (fastmap, '\1', sizeof (char) * SBC_MAX); if (type == END_OF_RE) - bufp->re_can_be_null = 1; + bufp->can_be_null = 1; return; } } @@ -405,14 +419,14 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, PREG is a regex_t *. We do not expect any fields to be initialized, since POSIX says we shouldn't. Thus, we set - `re_buffer' to the compiled pattern; - `re_used' to the length of the compiled pattern; - `re_syntax' to REG_SYNTAX_POSIX_EXTENDED if the + `buffer' to the compiled pattern; + `used' to the length of the compiled pattern; + `syntax' to RE_SYNTAX_POSIX_EXTENDED if the REG_EXTENDED bit in CFLAGS is set; otherwise, to - REG_SYNTAX_POSIX_BASIC; - `re_newline_anchor' to REG_NEWLINE being set in CFLAGS; - `re_fastmap' to an allocated space for the fastmap; - `re_fastmap_accurate' to zero; + RE_SYNTAX_POSIX_BASIC; + `newline_anchor' to REG_NEWLINE being set in CFLAGS; + `fastmap' to an allocated space for the fastmap; + `fastmap_accurate' to zero; `re_nsub' to the number of subexpressions in PATTERN. PATTERN is the address of the pattern string. @@ -436,35 +450,38 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, the return codes and their meanings.) */ int -regcomp (regex_t *__restrict preg, const char *__restrict pattern, int cflags) +regcomp (preg, pattern, cflags) + regex_t *__restrict preg; + const char *__restrict pattern; + int cflags; { reg_errcode_t ret; - reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? REG_SYNTAX_POSIX_EXTENDED - : REG_SYNTAX_POSIX_BASIC); + reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED + : RE_SYNTAX_POSIX_BASIC); - preg->re_buffer = NULL; - preg->re_allocated = 0; - preg->re_used = 0; + preg->buffer = NULL; + preg->allocated = 0; + preg->used = 0; /* Try to allocate space for the fastmap. */ - preg->re_fastmap = re_malloc (char, SBC_MAX); - if (BE (preg->re_fastmap == NULL, 0)) + preg->fastmap = re_malloc (char, SBC_MAX); + if (BE (preg->fastmap == NULL, 0)) return REG_ESPACE; - syntax |= (cflags & REG_ICASE) ? REG_IGNORE_CASE : 0; + syntax |= (cflags & REG_ICASE) ? RE_ICASE : 0; /* If REG_NEWLINE is set, newlines are treated differently. */ if (cflags & REG_NEWLINE) { /* REG_NEWLINE implies neither . nor [^...] match newline. */ - syntax &= ~REG_DOT_NEWLINE; - syntax |= REG_HAT_LISTS_NOT_NEWLINE; + syntax &= ~RE_DOT_NEWLINE; + syntax |= RE_HAT_LISTS_NOT_NEWLINE; /* It also changes the matching behavior. */ - preg->re_newline_anchor = 1; + preg->newline_anchor = 1; } else - preg->re_newline_anchor = 0; - preg->re_no_sub = !!(cflags & REG_NOSUB); - preg->re_translate = NULL; + preg->newline_anchor = 0; + preg->no_sub = !!(cflags & REG_NOSUB); + preg->translate = NULL; ret = re_compile_internal (preg, pattern, strlen (pattern), syntax); @@ -473,7 +490,7 @@ regcomp (regex_t *__restrict preg, const char *__restrict pattern, int cflags) if (ret == REG_ERPAREN) ret = REG_EPAREN; - /* We have already checked preg->re_fastmap != NULL. */ + /* We have already checked preg->fastmap != NULL. */ if (BE (ret == REG_NOERROR, 1)) /* Compute the fastmap now, since regexec cannot modify the pattern buffer. This function never fails in this implementation. */ @@ -481,8 +498,8 @@ regcomp (regex_t *__restrict preg, const char *__restrict pattern, int cflags) else { /* Some error occurred while compiling the expression. */ - re_free (preg->re_fastmap); - preg->re_fastmap = NULL; + re_free (preg->fastmap); + preg->fastmap = NULL; } return (int) ret; @@ -494,9 +511,18 @@ weak_alias (__regcomp, regcomp) /* Returns a message corresponding to an error code, ERRCODE, returned from either regcomp or regexec. We don't use PREG here. */ +#ifdef _LIBC +size_t +regerror (errcode, preg, errbuf, errbuf_size) + int errcode; + const regex_t *__restrict preg; + char *__restrict errbuf; + size_t errbuf_size; +#else /* size_t might promote */ size_t regerror (int errcode, const regex_t *__restrict preg, char *__restrict errbuf, size_t errbuf_size) +#endif { const char *msg; size_t msg_size; @@ -541,20 +567,17 @@ weak_alias (__regerror, regerror) UTF-8 is used. Otherwise we would allocate memory just to initialize it the same all the time. UTF-8 is the preferred encoding so this is a worthwhile optimization. */ -static const bitset utf8_sb_map = +static const bitset_t utf8_sb_map = { /* Set the first 128 bits. */ -# if 2 < BITSET_WORDS +# if 4 * BITSET_WORD_BITS < ASCII_CHARS +# error "bitset_word_t is narrower than 32 bits" +# elif 3 * BITSET_WORD_BITS < ASCII_CHARS + BITSET_WORD_MAX, BITSET_WORD_MAX, BITSET_WORD_MAX, +# elif 2 * BITSET_WORD_BITS < ASCII_CHARS + BITSET_WORD_MAX, BITSET_WORD_MAX, +# elif 1 * BITSET_WORD_BITS < ASCII_CHARS BITSET_WORD_MAX, -# endif -# if 4 < BITSET_WORDS - BITSET_WORD_MAX, -# endif -# if 6 < BITSET_WORDS - BITSET_WORD_MAX, -# endif -# if 8 < BITSET_WORDS -# error "Invalid BITSET_WORDS" # endif (BITSET_WORD_MAX >> (SBC_MAX % BITSET_WORD_BITS == 0 @@ -615,19 +638,20 @@ free_dfa_content (re_dfa_t *dfa) /* Free dynamically allocated space used by PREG. */ void -regfree (regex_t *preg) +regfree (preg) + regex_t *preg; { - re_dfa_t *dfa = (re_dfa_t *) preg->re_buffer; + re_dfa_t *dfa = (re_dfa_t *) preg->buffer; if (BE (dfa != NULL, 1)) free_dfa_content (dfa); - preg->re_buffer = NULL; - preg->re_allocated = 0; + preg->buffer = NULL; + preg->allocated = 0; - re_free (preg->re_fastmap); - preg->re_fastmap = NULL; + re_free (preg->fastmap); + preg->fastmap = NULL; - re_free (preg->re_translate); - preg->re_translate = NULL; + re_free (preg->translate); + preg->translate = NULL; } #ifdef _LIBC weak_alias (__regfree, regfree) @@ -648,31 +672,32 @@ char * regcomp/regexec above without link errors. */ weak_function # endif -re_comp (const char *s) +re_comp (s) + const char *s; { reg_errcode_t ret; char *fastmap; if (!s) { - if (!re_comp_buf.re_buffer) + if (!re_comp_buf.buffer) return gettext ("No previous regular expression"); return 0; } - if (re_comp_buf.re_buffer) + if (re_comp_buf.buffer) { - fastmap = re_comp_buf.re_fastmap; - re_comp_buf.re_fastmap = NULL; + fastmap = re_comp_buf.fastmap; + re_comp_buf.fastmap = NULL; __regfree (&re_comp_buf); memset (&re_comp_buf, '\0', sizeof (re_comp_buf)); - re_comp_buf.re_fastmap = fastmap; + re_comp_buf.fastmap = fastmap; } - if (re_comp_buf.re_fastmap == NULL) + if (re_comp_buf.fastmap == NULL) { - re_comp_buf.re_fastmap = (char *) malloc (SBC_MAX); - if (re_comp_buf.re_fastmap == NULL) + re_comp_buf.fastmap = (char *) malloc (SBC_MAX); + if (re_comp_buf.fastmap == NULL) return (char *) gettext (__re_error_msgid + __re_error_msgid_idx[(int) REG_ESPACE]); } @@ -681,7 +706,7 @@ re_comp (const char *s) don't need to initialize the pattern buffer fields which affect it. */ /* Match anchors at newlines. */ - re_comp_buf.re_newline_anchor = 1; + re_comp_buf.newline_anchor = 1; ret = re_compile_internal (&re_comp_buf, s, strlen (s), re_syntax_options); @@ -706,7 +731,7 @@ libc_freeres_fn (free_mem) SYNTAX indicate regular expression's syntax. */ static reg_errcode_t -re_compile_internal (regex_t *preg, const char *pattern, Idx length, +re_compile_internal (regex_t *preg, const char * pattern, size_t length, reg_syntax_t syntax) { reg_errcode_t err = REG_NOERROR; @@ -714,55 +739,56 @@ re_compile_internal (regex_t *preg, const char *pattern, Idx length, re_string_t regexp; /* Initialize the pattern buffer. */ - preg->re_fastmap_accurate = 0; - preg->re_syntax = syntax; - preg->re_not_bol = preg->re_not_eol = 0; - preg->re_used = 0; + preg->fastmap_accurate = 0; + preg->syntax = syntax; + preg->not_bol = preg->not_eol = 0; + preg->used = 0; preg->re_nsub = 0; - preg->re_can_be_null = 0; - preg->re_regs_allocated = REG_UNALLOCATED; + preg->can_be_null = 0; + preg->regs_allocated = REGS_UNALLOCATED; /* Initialize the dfa. */ - dfa = (re_dfa_t *) preg->re_buffer; - if (BE (preg->re_allocated < sizeof (re_dfa_t), 0)) + dfa = (re_dfa_t *) preg->buffer; + if (BE (preg->allocated < sizeof (re_dfa_t), 0)) { /* If zero allocated, but buffer is non-null, try to realloc enough space. This loses if buffer's address is bogus, but - that is the user's responsibility. If buffer is null this + that is the user's responsibility. If ->buffer is NULL this is a simple allocation. */ - dfa = re_realloc (preg->re_buffer, re_dfa_t, 1); + dfa = re_realloc (preg->buffer, re_dfa_t, 1); if (dfa == NULL) return REG_ESPACE; - preg->re_allocated = sizeof (re_dfa_t); - preg->re_buffer = (unsigned char *) dfa; + preg->allocated = sizeof (re_dfa_t); + preg->buffer = (unsigned char *) dfa; } - preg->re_used = sizeof (re_dfa_t); - - __libc_lock_init (dfa->lock); + preg->used = sizeof (re_dfa_t); err = init_dfa (dfa, length); if (BE (err != REG_NOERROR, 0)) { free_dfa_content (dfa); - preg->re_buffer = NULL; - preg->re_allocated = 0; + preg->buffer = NULL; + preg->allocated = 0; return err; } #ifdef DEBUG + /* Note: length+1 will not overflow since it is checked in init_dfa. */ dfa->re_str = re_malloc (char, length + 1); strncpy (dfa->re_str, pattern, length + 1); #endif - err = re_string_construct (®exp, pattern, length, preg->re_translate, - syntax & REG_IGNORE_CASE, dfa); + __libc_lock_init (dfa->lock); + + err = re_string_construct (®exp, pattern, length, preg->translate, + syntax & RE_ICASE, dfa); if (BE (err != REG_NOERROR, 0)) { re_compile_internal_free_return: free_workarea_compile (preg); re_string_destruct (®exp); free_dfa_content (dfa); - preg->re_buffer = NULL; - preg->re_allocated = 0; + preg->buffer = NULL; + preg->allocated = 0; return err; } @@ -779,7 +805,7 @@ re_compile_internal (regex_t *preg, const char *pattern, Idx length, #ifdef RE_ENABLE_I18N /* If possible, do searching in single byte encoding to speed things up. */ - if (dfa->is_utf8 && !(syntax & REG_IGNORE_CASE) && preg->re_translate == NULL) + if (dfa->is_utf8 && !(syntax & RE_ICASE) && preg->translate == NULL) optimize_utf8 (dfa); #endif @@ -793,8 +819,8 @@ re_compile_internal (regex_t *preg, const char *pattern, Idx length, if (BE (err != REG_NOERROR, 0)) { free_dfa_content (dfa); - preg->re_buffer = NULL; - preg->re_allocated = 0; + preg->buffer = NULL; + preg->allocated = 0; } return err; @@ -804,27 +830,45 @@ re_compile_internal (regex_t *preg, const char *pattern, Idx length, as the initial length of some arrays. */ static reg_errcode_t -init_dfa (re_dfa_t *dfa, Idx pat_len) +init_dfa (re_dfa_t *dfa, size_t pat_len) { __re_size_t table_size; #ifndef _LIBC char *codeset_name; #endif +#ifdef RE_ENABLE_I18N + size_t max_i18n_object_size = MAX (sizeof (wchar_t), sizeof (wctype_t)); +#else + size_t max_i18n_object_size = 0; +#endif + size_t max_object_size = + MAX (sizeof (struct re_state_table_entry), + MAX (sizeof (re_token_t), + MAX (sizeof (re_node_set), + MAX (sizeof (regmatch_t), + max_i18n_object_size)))); memset (dfa, '\0', sizeof (re_dfa_t)); /* Force allocation of str_tree_storage the first time. */ dfa->str_tree_storage_idx = BIN_TREE_STORAGE_SIZE; + /* Avoid overflows. The extra "/ 2" is for the table_size doubling + calculation below, and for similar doubling calculations + elsewhere. And it's <= rather than <, because some of the + doubling calculations add 1 afterwards. */ + if (BE (SIZE_MAX / max_object_size / 2 <= pat_len, 0)) + return REG_ESPACE; + dfa->nodes_alloc = pat_len + 1; - dfa->nodes = re_xmalloc (re_token_t, dfa->nodes_alloc); + dfa->nodes = re_malloc (re_token_t, dfa->nodes_alloc); /* table_size = 2 ^ ceil(log pat_len) */ - for (table_size = 1; table_size <= pat_len; table_size <<= 1) - if (0 < (Idx) -1 && table_size == 0) - return REG_ESPACE; + for (table_size = 1; ; table_size <<= 1) + if (table_size > pat_len) + break; - dfa->state_table = re_calloc (struct re_state_table_entry, table_size); + dfa->state_table = calloc (sizeof (struct re_state_table_entry), table_size); dfa->state_hash_mask = table_size - 1; dfa->mb_cur_max = MB_CUR_MAX; @@ -867,7 +911,7 @@ init_dfa (re_dfa_t *dfa, Idx pat_len) { int i, j, ch; - dfa->sb_char = re_calloc (bitset_word, BITSET_WORDS); + dfa->sb_char = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); if (BE (dfa->sb_char == NULL, 0)) return REG_ESPACE; @@ -877,7 +921,7 @@ init_dfa (re_dfa_t *dfa, Idx pat_len) { wint_t wch = __btowc (ch); if (wch != WEOF) - dfa->sb_char[i] |= (bitset_word) 1 << j; + dfa->sb_char[i] |= (bitset_word_t) 1 << j; # ifndef _LIBC if (isascii (ch) && wch != ch) dfa->map_notascii = 1; @@ -897,6 +941,7 @@ init_dfa (re_dfa_t *dfa, Idx pat_len) character used by some operators like "\<", "\>", etc. */ static void +internal_function init_word_char (re_dfa_t *dfa) { int i, j, ch; @@ -904,7 +949,7 @@ init_word_char (re_dfa_t *dfa) for (i = 0, ch = 0; i < BITSET_WORDS; ++i) for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) if (isalnum (ch) || ch == '_') - dfa->word_char[i] |= (bitset_word) 1 << j; + dfa->word_char[i] |= (bitset_word_t) 1 << j; } /* Free the work area which are only used while compiling. */ @@ -912,7 +957,7 @@ init_word_char (re_dfa_t *dfa) static void free_workarea_compile (regex_t *preg) { - re_dfa_t *dfa = (re_dfa_t *) preg->re_buffer; + re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_storage_t *storage, *next; for (storage = dfa->str_tree_storage; storage; storage = next) { @@ -1022,7 +1067,7 @@ optimize_utf8 (re_dfa_t *dfa) switch (dfa->nodes[node].type) { case CHARACTER: - if (dfa->nodes[node].opr.c >= 0x80) + if (dfa->nodes[node].opr.c >= ASCII_CHARS) mb_chars = true; break; case ANCHOR: @@ -1053,11 +1098,10 @@ optimize_utf8 (re_dfa_t *dfa) case SIMPLE_BRACKET: /* Just double check. */ { - int rshift = - (SBC_MAX / 2 % BITSET_WORD_BITS == 0 - ? 0 - : BITSET_WORD_BITS - SBC_MAX / 2 % BITSET_WORD_BITS); - for (i = SBC_MAX / 2 / BITSET_WORD_BITS; i < BITSET_WORDS; ++i) + int rshift = (ASCII_CHARS % BITSET_WORD_BITS == 0 + ? 0 + : BITSET_WORD_BITS - ASCII_CHARS % BITSET_WORD_BITS); + for (i = ASCII_CHARS / BITSET_WORD_BITS; i < BITSET_WORDS; ++i) { if (dfa->nodes[node].opr.sbcset[i] >> rshift != 0) return; @@ -1073,7 +1117,7 @@ optimize_utf8 (re_dfa_t *dfa) for (node = 0; node < dfa->nodes_len; ++node) { if (dfa->nodes[node].type == CHARACTER - && dfa->nodes[node].opr.c >= 0x80) + && dfa->nodes[node].opr.c >= ASCII_CHARS) dfa->nodes[node].mb_partial = 0; else if (dfa->nodes[node].type == OP_PERIOD) dfa->nodes[node].type = OP_UTF8_PERIOD; @@ -1092,19 +1136,19 @@ optimize_utf8 (re_dfa_t *dfa) static reg_errcode_t analyze (regex_t *preg) { - re_dfa_t *dfa = (re_dfa_t *) preg->re_buffer; + re_dfa_t *dfa = (re_dfa_t *) preg->buffer; reg_errcode_t ret; /* Allocate arrays. */ dfa->nexts = re_malloc (Idx, dfa->nodes_alloc); dfa->org_indices = re_malloc (Idx, dfa->nodes_alloc); - dfa->edests = re_xmalloc (re_node_set, dfa->nodes_alloc); + dfa->edests = re_malloc (re_node_set, dfa->nodes_alloc); dfa->eclosures = re_malloc (re_node_set, dfa->nodes_alloc); if (BE (dfa->nexts == NULL || dfa->org_indices == NULL || dfa->edests == NULL || dfa->eclosures == NULL, 0)) return REG_ESPACE; - dfa->subexp_map = re_xmalloc (Idx, preg->re_nsub); + dfa->subexp_map = re_malloc (Idx, preg->re_nsub); if (dfa->subexp_map != NULL) { Idx i; @@ -1137,10 +1181,10 @@ analyze (regex_t *preg) /* We only need this during the prune_impossible_nodes pass in regexec.c; skip it if p_i_n will not run, as calc_inveclosure can be quadratic. */ - if ((!preg->re_no_sub && preg->re_nsub > 0 && dfa->has_plural_match) + if ((!preg->no_sub && preg->re_nsub > 0 && dfa->has_plural_match) || dfa->nbackref) { - dfa->inveclosures = re_xmalloc (re_node_set, dfa->nodes_len); + dfa->inveclosures = re_malloc (re_node_set, dfa->nodes_len); if (BE (dfa->inveclosures == NULL, 0)) return REG_ESPACE; ret = calc_inveclosure (dfa); @@ -1240,7 +1284,7 @@ optimize_subexps (void *extra, bin_tree_t *node) dfa->subexp_map[other_idx] = dfa->subexp_map[node->token.opr.idx]; if (other_idx < BITSET_WORD_BITS) - dfa->used_bkref_map &= ~ ((bitset_word) 1 << other_idx); + dfa->used_bkref_map &= ~((bitset_word_t) 1 << other_idx); } return REG_NOERROR; @@ -1273,18 +1317,19 @@ lower_subexps (void *extra, bin_tree_t *node) static bin_tree_t * lower_subexp (reg_errcode_t *err, regex_t *preg, bin_tree_t *node) { - re_dfa_t *dfa = (re_dfa_t *) preg->re_buffer; + re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *body = node->left; bin_tree_t *op, *cls, *tree1, *tree; - if (preg->re_no_sub + if (preg->no_sub /* We do not optimize empty subexpressions, because otherwise we may have bad CONCAT nodes with NULL children. This is obviously not very common, so we do not lose much. An example that triggers this case is the sed "script" /\(\)/x. */ && node->left != NULL - && ! (node->token.opr.idx < BITSET_WORD_BITS - && dfa->used_bkref_map & ((bitset_word) 1 << node->token.opr.idx))) + && (node->token.opr.idx >= BITSET_WORD_BITS + || !(dfa->used_bkref_map + & ((bitset_word_t) 1 << node->token.opr.idx)))) return node->left; /* Convert the SUBEXP node to the concatenation of an @@ -1410,9 +1455,9 @@ link_nfa_nodes (void *extra, bin_tree_t *node) to their own constraint. */ static reg_errcode_t -duplicate_node_closure (re_dfa_t *dfa, Idx top_org_node, - Idx top_clone_node, Idx root_node, - unsigned int init_constraint) +internal_function +duplicate_node_closure (re_dfa_t *dfa, Idx top_org_node, Idx top_clone_node, + Idx root_node, unsigned int init_constraint) { Idx org_node, clone_node; bool ok; @@ -1458,8 +1503,7 @@ duplicate_node_closure (re_dfa_t *dfa, Idx top_org_node, /* ...but if the node is root_node itself, it means the epsilon closure have a loop, then tie it to the destination of the root_node. */ - ok = re_node_set_insert (dfa->edests + clone_node, - org_dest); + ok = re_node_set_insert (dfa->edests + clone_node, org_dest); if (BE (! ok, 0)) return REG_ESPACE; break; @@ -1652,8 +1696,6 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root) && dfa->edests[node].nelem && !dfa->nodes[dfa->edests[node].elems[0]].duplicated) { - Idx org_node, cur_node; - org_node = cur_node = node; err = duplicate_node_closure (dfa, node, node, node, constraint); if (BE (err != REG_NOERROR, 0)) return err; @@ -1711,6 +1753,7 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root) We must not use this function inside bracket expressions. */ static void +internal_function fetch_token (re_token_t *result, re_string_t *input, reg_syntax_t syntax) { re_string_skip_bytes (input, peek_token (result, input, syntax)); @@ -1720,6 +1763,7 @@ fetch_token (re_token_t *result, re_string_t *input, reg_syntax_t syntax) We must not use this function inside bracket expressions. */ static int +internal_function peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) { unsigned char c; @@ -1770,97 +1814,97 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) switch (c2) { case '|': - if (!(syntax & REG_LIMITED_OPS) && !(syntax & REG_NO_BK_VBAR)) + if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_NO_BK_VBAR)) token->type = OP_ALT; break; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': - if (!(syntax & REG_NO_BK_REFS)) + if (!(syntax & RE_NO_BK_REFS)) { token->type = OP_BACK_REF; token->opr.idx = c2 - '1'; } break; case '<': - if (!(syntax & REG_NO_GNU_OPS)) + if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = WORD_FIRST; } break; case '>': - if (!(syntax & REG_NO_GNU_OPS)) + if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = WORD_LAST; } break; case 'b': - if (!(syntax & REG_NO_GNU_OPS)) + if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = WORD_DELIM; } break; case 'B': - if (!(syntax & REG_NO_GNU_OPS)) + if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = NOT_WORD_DELIM; } break; case 'w': - if (!(syntax & REG_NO_GNU_OPS)) + if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_WORD; break; case 'W': - if (!(syntax & REG_NO_GNU_OPS)) + if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_NOTWORD; break; case 's': - if (!(syntax & REG_NO_GNU_OPS)) + if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_SPACE; break; case 'S': - if (!(syntax & REG_NO_GNU_OPS)) + if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_NOTSPACE; break; case '`': - if (!(syntax & REG_NO_GNU_OPS)) + if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = BUF_FIRST; } break; case '\'': - if (!(syntax & REG_NO_GNU_OPS)) + if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = BUF_LAST; } break; case '(': - if (!(syntax & REG_NO_BK_PARENS)) + if (!(syntax & RE_NO_BK_PARENS)) token->type = OP_OPEN_SUBEXP; break; case ')': - if (!(syntax & REG_NO_BK_PARENS)) + if (!(syntax & RE_NO_BK_PARENS)) token->type = OP_CLOSE_SUBEXP; break; case '+': - if (!(syntax & REG_LIMITED_OPS) && (syntax & REG_BK_PLUS_QM)) + if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_PLUS; break; case '?': - if (!(syntax & REG_LIMITED_OPS) && (syntax & REG_BK_PLUS_QM)) + if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_QUESTION; break; case '{': - if ((syntax & REG_INTERVALS) && (!(syntax & REG_NO_BK_BRACES))) + if ((syntax & RE_INTERVALS) && (!(syntax & RE_NO_BK_BRACES))) token->type = OP_OPEN_DUP_NUM; break; case '}': - if ((syntax & REG_INTERVALS) && (!(syntax & REG_NO_BK_BRACES))) + if ((syntax & RE_INTERVALS) && (!(syntax & RE_NO_BK_BRACES))) token->type = OP_CLOSE_DUP_NUM; break; default: @@ -1883,38 +1927,38 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) switch (c) { case '\n': - if (syntax & REG_NEWLINE_ALT) + if (syntax & RE_NEWLINE_ALT) token->type = OP_ALT; break; case '|': - if (!(syntax & REG_LIMITED_OPS) && (syntax & REG_NO_BK_VBAR)) + if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_NO_BK_VBAR)) token->type = OP_ALT; break; case '*': token->type = OP_DUP_ASTERISK; break; case '+': - if (!(syntax & REG_LIMITED_OPS) && !(syntax & REG_BK_PLUS_QM)) + if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_PLUS; break; case '?': - if (!(syntax & REG_LIMITED_OPS) && !(syntax & REG_BK_PLUS_QM)) + if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_QUESTION; break; case '{': - if ((syntax & REG_INTERVALS) && (syntax & REG_NO_BK_BRACES)) + if ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES)) token->type = OP_OPEN_DUP_NUM; break; case '}': - if ((syntax & REG_INTERVALS) && (syntax & REG_NO_BK_BRACES)) + if ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES)) token->type = OP_CLOSE_DUP_NUM; break; case '(': - if (syntax & REG_NO_BK_PARENS) + if (syntax & RE_NO_BK_PARENS) token->type = OP_OPEN_SUBEXP; break; case ')': - if (syntax & REG_NO_BK_PARENS) + if (syntax & RE_NO_BK_PARENS) token->type = OP_CLOSE_SUBEXP; break; case '[': @@ -1924,18 +1968,18 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) token->type = OP_PERIOD; break; case '^': - if (!(syntax & (REG_CONTEXT_INDEP_ANCHORS | REG_CARET_ANCHORS_HERE)) && + if (!(syntax & (RE_CONTEXT_INDEP_ANCHORS | RE_CARET_ANCHORS_HERE)) && re_string_cur_idx (input) != 0) { char prev = re_string_peek_byte (input, -1); - if (!(syntax & REG_NEWLINE_ALT) || prev != '\n') + if (!(syntax & RE_NEWLINE_ALT) || prev != '\n') break; } token->type = ANCHOR; token->opr.ctx_type = LINE_FIRST; break; case '$': - if (!(syntax & REG_CONTEXT_INDEP_ANCHORS) && + if (!(syntax & RE_CONTEXT_INDEP_ANCHORS) && re_string_cur_idx (input) + 1 != re_string_length (input)) { re_token_t next; @@ -1958,6 +2002,7 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) We must not use this function out of bracket expressions. */ static int +internal_function peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax) { unsigned char c; @@ -1978,7 +2023,7 @@ peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax) } #endif /* RE_ENABLE_I18N */ - if (c == '\\' && (syntax & REG_BACKSLASH_ESCAPE_IN_LISTS) + if (c == '\\' && (syntax & RE_BACKSLASH_ESCAPE_IN_LISTS) && re_string_cur_idx (input) + 1 < re_string_length (input)) { /* In this case, '\' escape a character. */ @@ -2008,7 +2053,7 @@ peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax) token->type = OP_OPEN_EQUIV_CLASS; break; case ':': - if (syntax & REG_CHAR_CLASSES) + if (syntax & RE_CHAR_CLASSES) { token->type = OP_OPEN_CHAR_CLASS; break; @@ -2057,11 +2102,11 @@ static bin_tree_t * parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax, reg_errcode_t *err) { - re_dfa_t *dfa = (re_dfa_t *) preg->re_buffer; + re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree, *eor, *root; re_token_t current_token; dfa->syntax = syntax; - fetch_token (¤t_token, regexp, syntax | REG_CARET_ANCHORS_HERE); + fetch_token (¤t_token, regexp, syntax | RE_CARET_ANCHORS_HERE); tree = parse_reg_exp (regexp, preg, ¤t_token, syntax, 0, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; @@ -2091,7 +2136,7 @@ static bin_tree_t * parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err) { - re_dfa_t *dfa = (re_dfa_t *) preg->re_buffer; + re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree, *branch = NULL; tree = parse_branch (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) @@ -2099,7 +2144,7 @@ parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, while (token->type == OP_ALT) { - fetch_token (token, regexp, syntax | REG_CARET_ANCHORS_HERE); + fetch_token (token, regexp, syntax | RE_CARET_ANCHORS_HERE); if (token->type != OP_ALT && token->type != END_OF_RE && (nest == 0 || token->type != OP_CLOSE_SUBEXP)) { @@ -2132,8 +2177,8 @@ static bin_tree_t * parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err) { - bin_tree_t *tree, *exp; - re_dfa_t *dfa = (re_dfa_t *) preg->re_buffer; + bin_tree_t *tree, *expr; + re_dfa_t *dfa = (re_dfa_t *) preg->buffer; tree = parse_expression (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; @@ -2141,14 +2186,14 @@ parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token, while (token->type != OP_ALT && token->type != END_OF_RE && (nest == 0 || token->type != OP_CLOSE_SUBEXP)) { - exp = parse_expression (regexp, preg, token, syntax, nest, err); - if (BE (*err != REG_NOERROR && exp == NULL, 0)) + expr = parse_expression (regexp, preg, token, syntax, nest, err); + if (BE (*err != REG_NOERROR && expr == NULL, 0)) { return NULL; } - if (tree != NULL && exp != NULL) + if (tree != NULL && expr != NULL) { - tree = create_tree (dfa, tree, exp, CONCAT); + tree = create_tree (dfa, tree, expr, CONCAT); if (tree == NULL) { *err = REG_ESPACE; @@ -2156,8 +2201,8 @@ parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token, } } else if (tree == NULL) - tree = exp; - /* Otherwise exp == NULL, we don't need to create new tree. */ + tree = expr; + /* Otherwise expr == NULL, we don't need to create new tree. */ } return tree; } @@ -2172,7 +2217,7 @@ static bin_tree_t * parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err) { - re_dfa_t *dfa = (re_dfa_t *) preg->re_buffer; + re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree; switch (token->type) { @@ -2229,7 +2274,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token, dfa->has_mb_node = 1; break; case OP_OPEN_DUP_NUM: - if (syntax & REG_CONTEXT_INVALID_DUP) + if (syntax & RE_CONTEXT_INVALID_DUP) { *err = REG_BADRPT; return NULL; @@ -2238,12 +2283,12 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token, case OP_DUP_ASTERISK: case OP_DUP_PLUS: case OP_DUP_QUESTION: - if (syntax & REG_CONTEXT_INVALID_OPS) + if (syntax & RE_CONTEXT_INVALID_OPS) { *err = REG_BADRPT; return NULL; } - else if (syntax & REG_CONTEXT_INDEP_OPS) + else if (syntax & RE_CONTEXT_INDEP_OPS) { fetch_token (token, regexp, syntax); return parse_expression (regexp, preg, token, syntax, nest, err); @@ -2251,7 +2296,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token, /* else fall through */ case OP_CLOSE_SUBEXP: if ((token->type == OP_CLOSE_SUBEXP) && - !(syntax & REG_UNMATCHED_RIGHT_PAREN_ORD)) + !(syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)) { *err = REG_ERPAREN; return NULL; @@ -2365,7 +2410,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token, if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; /* In BRE consecutive duplications are not allowed. */ - if ((syntax & REG_CONTEXT_INVALID_DUP) + if ((syntax & RE_CONTEXT_INVALID_DUP) && (token->type == OP_DUP_ASTERISK || token->type == OP_OPEN_DUP_NUM)) { @@ -2388,12 +2433,12 @@ static bin_tree_t * parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err) { - re_dfa_t *dfa = (re_dfa_t *) preg->re_buffer; + re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree; size_t cur_nsub; cur_nsub = preg->re_nsub++; - fetch_token (token, regexp, syntax | REG_CARET_ANCHORS_HERE); + fetch_token (token, regexp, syntax | RE_CARET_ANCHORS_HERE); /* The subexpression may be a null string. */ if (token->type == OP_CLOSE_SUBEXP) @@ -2454,7 +2499,7 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa, if (BE (start == REG_ERROR || end == REG_ERROR, 0)) { /* Invalid sequence. */ - if (BE (!(syntax & REG_INVALID_INTERVAL_ORD), 0)) + if (BE (!(syntax & RE_INVALID_INTERVAL_ORD), 0)) { if (token->type == END_OF_RE) *err = REG_EBRACE; @@ -2565,11 +2610,14 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa, update it. */ static reg_errcode_t -build_range_exp (bitset sbcset, +internal_function # ifdef RE_ENABLE_I18N - re_charset_t *mbcset, Idx *range_alloc, -# endif +build_range_exp (bitset_t sbcset, re_charset_t *mbcset, Idx *range_alloc, bracket_elem_t *start_elem, bracket_elem_t *end_elem) +# else /* not RE_ENABLE_I18N */ +build_range_exp (bitset_t sbcset, bracket_elem_t *start_elem, + bracket_elem_t *end_elem) +# endif /* not RE_ENABLE_I18N */ { unsigned int start_ch, end_ch; /* Equivalence Classes and Character Classes can't be a range start/end. */ @@ -2589,7 +2637,8 @@ build_range_exp (bitset sbcset, # ifdef RE_ENABLE_I18N { wchar_t wc; - wint_t start_wc, end_wc; + wint_t start_wc; + wint_t end_wc; wchar_t cmp_buf[6] = {L'\0', L'\0', L'\0', L'\0', L'\0', L'\0'}; start_ch = ((start_elem->type == SB_CHAR) ? start_elem->opr.ch @@ -2623,11 +2672,12 @@ build_range_exp (bitset sbcset, wchar_t *new_array_start, *new_array_end; Idx new_nranges; - new_nranges = mbcset->nranges; + /* +1 in case of mbcset->nranges is 0. */ + new_nranges = 2 * mbcset->nranges + 1; /* Use realloc since mbcset->range_starts and mbcset->range_ends are NULL if *range_alloc == 0. */ - new_array_start = re_x2realloc (mbcset->range_starts, wchar_t, - &new_nranges); + new_array_start = re_realloc (mbcset->range_starts, wchar_t, + new_nranges); new_array_end = re_realloc (mbcset->range_ends, wchar_t, new_nranges); @@ -2681,7 +2731,8 @@ build_range_exp (bitset sbcset, pointer argument since we may update it. */ static reg_errcode_t -build_collating_symbol (bitset sbcset, +internal_function +build_collating_symbol (bitset_t sbcset, # ifdef RE_ENABLE_I18N re_charset_t *mbcset, Idx *coll_sym_alloc, # endif @@ -2719,27 +2770,34 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, auto inline int32_t __attribute ((always_inline)) - seek_collating_symbol_entry (const unsigned char *name, size_t name_len) + seek_collating_symbol_entry (name, name_len) + const unsigned char *name; + size_t name_len; { int32_t hash = elem_hash ((const char *) name, name_len); int32_t elem = hash % table_size; - int32_t second = hash % (table_size - 2); - while (symb_table[2 * elem] != 0) + if (symb_table[2 * elem] != 0) { - /* First compare the hashing value. */ - if (symb_table[2 * elem] == hash - /* Compare the length of the name. */ - && name_len == extra[symb_table[2 * elem + 1]] - /* Compare the name. */ - && memcmp (name, &extra[symb_table[2 * elem + 1] + 1], - name_len) == 0) - { - /* Yep, this is the entry. */ - break; - } + int32_t second = hash % (table_size - 2) + 1; - /* Next entry. */ - elem += second; + do + { + /* First compare the hashing value. */ + if (symb_table[2 * elem] == hash + /* Compare the length of the name. */ + && name_len == extra[symb_table[2 * elem + 1]] + /* Compare the name. */ + && memcmp (name, &extra[symb_table[2 * elem + 1] + 1], + name_len) == 0) + { + /* Yep, this is the entry. */ + break; + } + + /* Next entry. */ + elem += second; + } + while (symb_table[2 * elem] != 0); } return elem; } @@ -2750,7 +2808,8 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, auto inline unsigned int __attribute ((always_inline)) - lookup_collation_sequence_value (bracket_elem_t *br_elem) + lookup_collation_sequence_value (br_elem) + bracket_elem_t *br_elem; { if (br_elem->type == SB_CHAR) { @@ -2817,9 +2876,11 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, auto inline reg_errcode_t __attribute ((always_inline)) - build_range_exp (bitset sbcset, re_charset_t *mbcset, - Idx *range_alloc, - bracket_elem_t *start_elem, bracket_elem_t *end_elem) + build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem) + re_charset_t *mbcset; + Idx *range_alloc; + bitset_t sbcset; + bracket_elem_t *start_elem, *end_elem; { unsigned int ch; uint32_t start_collseq; @@ -2837,7 +2898,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, /* Check start/end collation sequence values. */ if (BE (start_collseq == UINT_MAX || end_collseq == UINT_MAX, 0)) return REG_ECOLLATE; - if (BE ((syntax & REG_NO_EMPTY_RANGES) && start_collseq > end_collseq, 0)) + if (BE ((syntax & RE_NO_EMPTY_RANGES) && start_collseq > end_collseq, 0)) return REG_ERANGE; /* Got valid collation sequence values, add them as a new entry. @@ -2854,9 +2915,10 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, uint32_t *new_array_end; Idx new_nranges; - new_nranges = mbcset->nranges; - new_array_start = re_x2realloc (mbcset->range_starts, uint32_t, - &new_nranges); + /* +1 in case of mbcset->nranges is 0. */ + new_nranges = 2 * mbcset->nranges + 1; + new_array_start = re_realloc (mbcset->range_starts, uint32_t, + new_nranges); new_array_end = re_realloc (mbcset->range_ends, uint32_t, new_nranges); @@ -2897,8 +2959,11 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, auto inline reg_errcode_t __attribute ((always_inline)) - build_collating_symbol (bitset sbcset, re_charset_t *mbcset, - Idx *coll_sym_alloc, const unsigned char *name) + build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name) + re_charset_t *mbcset; + Idx *coll_sym_alloc; + bitset_t sbcset; + const unsigned char *name; { int32_t elem, idx; size_t name_len = strlen ((const char *) name); @@ -2927,11 +2992,12 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, if (BE (*coll_sym_alloc == mbcset->ncoll_syms, 0)) { /* Not enough, realloc it. */ - Idx new_coll_sym_alloc = mbcset->ncoll_syms; + /* +1 in case of mbcset->ncoll_syms is 0. */ + Idx new_coll_sym_alloc = 2 * mbcset->ncoll_syms + 1; /* Use realloc since mbcset->coll_syms is NULL if *alloc == 0. */ - int32_t *new_coll_syms = re_x2realloc (mbcset->coll_syms, int32_t, - &new_coll_sym_alloc); + int32_t *new_coll_syms = re_realloc (mbcset->coll_syms, int32_t, + new_coll_sym_alloc); if (BE (new_coll_syms == NULL, 0)) return REG_ESPACE; mbcset->coll_syms = new_coll_syms; @@ -2973,7 +3039,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, /* if (MB_CUR_MAX > 1) */ - collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC); + collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC); table_size = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_SYMB_HASH_SIZEMB); symb_table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_TABLEMB); @@ -2981,9 +3047,9 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, _NL_COLLATE_SYMB_EXTRAMB); } #endif - sbcset = re_calloc (bitset_word, BITSET_WORDS); + sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); #ifdef RE_ENABLE_I18N - mbcset = re_calloc (re_charset_t, 1); + mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); #endif /* RE_ENABLE_I18N */ #ifdef RE_ENABLE_I18N if (BE (sbcset == NULL || mbcset == NULL, 0)) @@ -3007,7 +3073,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, mbcset->non_match = 1; #endif /* not RE_ENABLE_I18N */ non_match = true; - if (syntax & REG_HAT_LISTS_NOT_NEWLINE) + if (syntax & RE_HAT_LISTS_NOT_NEWLINE) bitset_set (sbcset, '\0'); re_string_skip_bytes (regexp, token_len); /* Skip a token. */ token_len = peek_token_bracket (token, regexp, syntax); @@ -3115,10 +3181,11 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, { wchar_t *new_mbchars; /* Not enough, realloc it. */ - mbchar_alloc = mbcset->nmbchars; + /* +1 in case of mbcset->nmbchars is 0. */ + mbchar_alloc = 2 * mbcset->nmbchars + 1; /* Use realloc since array is NULL if *alloc == 0. */ - new_mbchars = re_x2realloc (mbcset->mbchars, wchar_t, - &mbchar_alloc); + new_mbchars = re_realloc (mbcset->mbchars, wchar_t, + mbchar_alloc); if (BE (new_mbchars == NULL, 0)) goto parse_bracket_exp_espace; mbcset->mbchars = new_mbchars; @@ -3331,13 +3398,14 @@ parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp, is a pointer argument sinse we may update it. */ static reg_errcode_t -build_equiv_class (bitset sbcset, #ifdef RE_ENABLE_I18N - re_charset_t *mbcset, Idx *equiv_class_alloc, -#endif - const unsigned char *name) +build_equiv_class (bitset_t sbcset, re_charset_t *mbcset, + Idx *equiv_class_alloc, const unsigned char *name) +#else /* not RE_ENABLE_I18N */ +build_equiv_class (bitset_t sbcset, const unsigned char *name) +#endif /* not RE_ENABLE_I18N */ { -#if defined _LIBC +#ifdef _LIBC uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) { @@ -3392,11 +3460,12 @@ build_equiv_class (bitset sbcset, if (BE (*equiv_class_alloc == mbcset->nequiv_classes, 0)) { /* Not enough, realloc it. */ - Idx new_equiv_class_alloc = mbcset->nequiv_classes; + /* +1 in case of mbcset->nequiv_classes is 0. */ + Idx new_equiv_class_alloc = 2 * mbcset->nequiv_classes + 1; /* Use realloc since the array is NULL if *alloc == 0. */ - int32_t *new_equiv_classes = re_x2realloc (mbcset->equiv_classes, - int32_t, - &new_equiv_class_alloc); + int32_t *new_equiv_classes = re_realloc (mbcset->equiv_classes, + int32_t, + new_equiv_class_alloc); if (BE (new_equiv_classes == NULL, 0)) return REG_ESPACE; mbcset->equiv_classes = new_equiv_classes; @@ -3421,18 +3490,21 @@ build_equiv_class (bitset sbcset, is a pointer argument sinse we may update it. */ static reg_errcode_t -build_charclass (unsigned REG_TRANSLATE_TYPE trans, bitset sbcset, #ifdef RE_ENABLE_I18N +build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, re_charset_t *mbcset, Idx *char_class_alloc, -#endif const unsigned char *class_name, reg_syntax_t syntax) +#else /* not RE_ENABLE_I18N */ +build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, + const unsigned char *class_name, reg_syntax_t syntax) +#endif /* not RE_ENABLE_I18N */ { int i; const char *name = (const char *) class_name; /* In case of REG_ICASE "upper" and "lower" match the both of upper and lower cases. */ - if ((syntax & REG_IGNORE_CASE) + if ((syntax & RE_ICASE) && (strcmp (name, "upper") == 0 || strcmp (name, "lower") == 0)) name = "alpha"; @@ -3441,10 +3513,11 @@ build_charclass (unsigned REG_TRANSLATE_TYPE trans, bitset sbcset, if (BE (*char_class_alloc == mbcset->nchar_classes, 0)) { /* Not enough, realloc it. */ - Idx new_char_class_alloc = mbcset->nchar_classes; + /* +1 in case of mbcset->nchar_classes is 0. */ + Idx new_char_class_alloc = 2 * mbcset->nchar_classes + 1; /* Use realloc since array is NULL if *alloc == 0. */ - wctype_t *new_char_classes = re_x2realloc (mbcset->char_classes, wctype_t, - &new_char_class_alloc); + wctype_t *new_char_classes = re_realloc (mbcset->char_classes, wctype_t, + new_char_class_alloc); if (BE (new_char_classes == NULL, 0)) return REG_ESPACE; mbcset->char_classes = new_char_classes; @@ -3454,39 +3527,45 @@ build_charclass (unsigned REG_TRANSLATE_TYPE trans, bitset sbcset, #endif /* RE_ENABLE_I18N */ #define BUILD_CHARCLASS_LOOP(ctype_func) \ - for (i = 0; i < SBC_MAX; ++i) \ + do { \ + if (BE (trans != NULL, 0)) \ { \ - if (ctype_func (i)) \ - { \ - int ch = trans ? trans[i] : i; \ - bitset_set (sbcset, ch); \ - } \ - } + for (i = 0; i < SBC_MAX; ++i) \ + if (ctype_func (i)) \ + bitset_set (sbcset, trans[i]); \ + } \ + else \ + { \ + for (i = 0; i < SBC_MAX; ++i) \ + if (ctype_func (i)) \ + bitset_set (sbcset, i); \ + } \ + } while (0) if (strcmp (name, "alnum") == 0) - BUILD_CHARCLASS_LOOP (isalnum) + BUILD_CHARCLASS_LOOP (isalnum); else if (strcmp (name, "cntrl") == 0) - BUILD_CHARCLASS_LOOP (iscntrl) + BUILD_CHARCLASS_LOOP (iscntrl); else if (strcmp (name, "lower") == 0) - BUILD_CHARCLASS_LOOP (islower) + BUILD_CHARCLASS_LOOP (islower); else if (strcmp (name, "space") == 0) - BUILD_CHARCLASS_LOOP (isspace) + BUILD_CHARCLASS_LOOP (isspace); else if (strcmp (name, "alpha") == 0) - BUILD_CHARCLASS_LOOP (isalpha) + BUILD_CHARCLASS_LOOP (isalpha); else if (strcmp (name, "digit") == 0) - BUILD_CHARCLASS_LOOP (isdigit) + BUILD_CHARCLASS_LOOP (isdigit); else if (strcmp (name, "print") == 0) - BUILD_CHARCLASS_LOOP (isprint) + BUILD_CHARCLASS_LOOP (isprint); else if (strcmp (name, "upper") == 0) - BUILD_CHARCLASS_LOOP (isupper) + BUILD_CHARCLASS_LOOP (isupper); else if (strcmp (name, "blank") == 0) - BUILD_CHARCLASS_LOOP (isblank) + BUILD_CHARCLASS_LOOP (isblank); else if (strcmp (name, "graph") == 0) - BUILD_CHARCLASS_LOOP (isgraph) + BUILD_CHARCLASS_LOOP (isgraph); else if (strcmp (name, "punct") == 0) - BUILD_CHARCLASS_LOOP (ispunct) + BUILD_CHARCLASS_LOOP (ispunct); else if (strcmp (name, "xdigit") == 0) - BUILD_CHARCLASS_LOOP (isxdigit) + BUILD_CHARCLASS_LOOP (isxdigit); else return REG_ECTYPE; @@ -3494,10 +3573,10 @@ build_charclass (unsigned REG_TRANSLATE_TYPE trans, bitset sbcset, } static bin_tree_t * -build_charclass_op (re_dfa_t *dfa, unsigned REG_TRANSLATE_TYPE trans, +build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans, const unsigned char *class_name, - const unsigned char *extra, - bool non_match, reg_errcode_t *err) + const unsigned char *extra, bool non_match, + reg_errcode_t *err) { re_bitset_ptr_t sbcset; #ifdef RE_ENABLE_I18N @@ -3508,9 +3587,9 @@ build_charclass_op (re_dfa_t *dfa, unsigned REG_TRANSLATE_TYPE trans, re_token_t br_token; bin_tree_t *tree; - sbcset = re_calloc (bitset_word, BITSET_WORDS); + sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); #ifdef RE_ENABLE_I18N - mbcset = re_calloc (re_charset_t, 1); + mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); #endif /* RE_ENABLE_I18N */ #ifdef RE_ENABLE_I18N @@ -3527,7 +3606,7 @@ build_charclass_op (re_dfa_t *dfa, unsigned REG_TRANSLATE_TYPE trans, { #ifdef RE_ENABLE_I18N /* - if (syntax & REG_HAT_LISTS_NOT_NEWLINE) + if (syntax & RE_HAT_LISTS_NOT_NEWLINE) bitset_set(cset->sbcset, '\0'); */ mbcset->non_match = 1; @@ -3627,7 +3706,7 @@ fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax) || num == REG_ERROR) ? REG_ERROR : ((num == REG_MISSING) ? c - '0' : num * 10 + c - '0')); - num = (num > REG_DUP_MAX) ? REG_ERROR : num; + num = (num > RE_DUP_MAX) ? REG_ERROR : num; } return num; } diff --git a/lib/regex.c b/gl/regex.c similarity index 91% rename from lib/regex.c rename to gl/regex.c index 82e76c0..d4eb726 100644 --- a/lib/regex.c +++ b/gl/regex.c @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . @@ -17,8 +17,11 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifdef HAVE_CONFIG_H -# include +#include + +/* Make sure noone compiles this code with a C++ compiler. */ +#if defined __cplusplus && defined _LIBC +# error "This is C code, use a C compiler" #endif #ifdef _LIBC diff --git a/lib/regex.h b/gl/regex.h similarity index 58% rename from lib/regex.h rename to gl/regex.h index c06a062..6885ebd 100644 --- a/lib/regex.h +++ b/gl/regex.h @@ -1,6 +1,6 @@ /* Definitions for data structures and routines for the regular expression library. - Copyright (C) 1985,1989-93,1995-98,2000,2001,2002,2003,2005 + Copyright (C) 1985,1989-93,1995-98,2000,2001,2002,2003,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -28,19 +28,13 @@ extern "C" { #endif -/* Define _REGEX_SOURCE to get definitions that are incompatible with - POSIX. */ -#if (!defined _REGEX_SOURCE \ - && (defined _GNU_SOURCE \ - || (!defined _POSIX_C_SOURCE && !defined _POSIX_SOURCE \ - && !defined _XOPEN_SOURCE))) -# define _REGEX_SOURCE 1 -#endif - -#if defined _REGEX_SOURCE && defined VMS -/* VMS doesn't have `size_t' in , even though POSIX says it - should be there. */ -# include +/* Define __USE_GNU_REGEX to declare GNU extensions that violate the + POSIX name space rules. */ +#undef __USE_GNU_REGEX +#if (defined _GNU_SOURCE \ + || (!defined _POSIX_C_SOURCE && !defined _POSIX_SOURCE \ + && !defined _XOPEN_SOURCE)) +# define __USE_GNU_REGEX 1 #endif #ifdef _REGEX_LARGE_OFFSETS @@ -53,11 +47,13 @@ extern "C" { /* The type of the offset of a byte within a string. For historical reasons POSIX 1003.1-2004 requires that regoff_t be - at least as wide as off_t. This is a bit odd (and many common - POSIX platforms set it to the more-sensible ssize_t) but we might - as well conform. We don't know of any hosts where ssize_t is wider - than off_t, so off_t is safe. */ -typedef off_t regoff_t; + at least as wide as off_t. However, many common POSIX platforms set + regoff_t to the more-sensible ssize_t and the Open Group has + signalled its intention to change the requirement to be that + regoff_t be at least as wide as ptrdiff_t and ssize_t; see XBD ERN + 60 (2005-08-25). We don't know of any hosts where ssize_t or + ptrdiff_t is wider than ssize_t, so ssize_t is safe. */ +typedef ssize_t regoff_t; /* The type of nonnegative object indexes. Traditionally, GNU regex uses 'int' for these. Code that uses __re_idx_t should work @@ -97,20 +93,22 @@ typedef unsigned long int active_reg_t; add or remove a bit, only one other definition need change. */ typedef unsigned long int reg_syntax_t; +#ifdef __USE_GNU_REGEX + /* If this bit is not set, then \ inside a bracket expression is literal. If set, then such a \ quotes the following character. */ -#define REG_BACKSLASH_ESCAPE_IN_LISTS 1ul +# define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1) /* If this bit is not set, then + and ? are operators, and \+ and \? are literals. If set, then \+ and \? are operators and + and ? are literals. */ -#define REG_BK_PLUS_QM (1ul << 1) +# define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1) /* If this bit is set, then character classes are supported. They are: [:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:], [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:]. If not set, then character classes are not supported. */ -#define REG_CHAR_CLASSES (1ul << 2) +# define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1) /* If this bit is set, then ^ and $ are always anchors (outside bracket expressions, of course). @@ -120,11 +118,11 @@ typedef unsigned long int reg_syntax_t; $ is an anchor if it is at the end of a regular expression, or before a close-group or an alternation operator. - This bit could be (re)combined with REG_CONTEXT_INDEP_OPS, because + This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because POSIX draft 11.2 says that * etc. in leading positions is undefined. We already implemented a previous draft which made those constructs invalid, though, so we haven't changed the code back. */ -#define REG_CONTEXT_INDEP_ANCHORS (1ul << 3) +# define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1) /* If this bit is set, then special characters are always special regardless of where they are in the pattern. @@ -132,70 +130,71 @@ typedef unsigned long int reg_syntax_t; some contexts; otherwise they are ordinary. Specifically, * + ? and intervals are only special when not after the beginning, open-group, or alternation operator. */ -#define REG_CONTEXT_INDEP_OPS (1ul << 4) +# define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1) /* If this bit is set, then *, +, ?, and { cannot be first in an re or immediately after an alternation or begin-group operator. */ -#define REG_CONTEXT_INVALID_OPS (1ul << 5) +# define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1) /* If this bit is set, then . matches newline. If not set, then it doesn't. */ -#define REG_DOT_NEWLINE (1ul << 6) +# define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1) /* If this bit is set, then . doesn't match NUL. If not set, then it does. */ -#define REG_DOT_NOT_NULL (1ul << 7) +# define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1) /* If this bit is set, nonmatching lists [^...] do not match newline. If not set, they do. */ -#define REG_HAT_LISTS_NOT_NEWLINE (1ul << 8) +# define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1) /* If this bit is set, either \{...\} or {...} defines an - interval, depending on REG_NO_BK_BRACES. + interval, depending on RE_NO_BK_BRACES. If not set, \{, \}, {, and } are literals. */ -#define REG_INTERVALS (1ul << 9) +# define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1) /* If this bit is set, +, ? and | aren't recognized as operators. If not set, they are. */ -#define REG_LIMITED_OPS (1ul << 10) +# define RE_LIMITED_OPS (RE_INTERVALS << 1) /* If this bit is set, newline is an alternation operator. If not set, newline is literal. */ -#define REG_NEWLINE_ALT (1ul << 11) +# define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1) /* If this bit is set, then `{...}' defines an interval, and \{ and \} are literals. If not set, then `\{...\}' defines an interval. */ -#define REG_NO_BK_BRACES (1ul << 12) +# define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1) /* If this bit is set, (...) defines a group, and \( and \) are literals. If not set, \(...\) defines a group, and ( and ) are literals. */ -#define REG_NO_BK_PARENS (1ul << 13) +# define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1) /* If this bit is set, then \ matches . If not set, then \ is a back-reference. */ -#define REG_NO_BK_REFS (1ul << 14) +# define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1) /* If this bit is set, then | is an alternation operator, and \| is literal. If not set, then \| is an alternation operator, and | is literal. */ -#define REG_NO_BK_VBAR (1ul << 15) +# define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1) /* If this bit is set, then an ending range point collating higher than the starting range point, as in [z-a], is invalid. - If not set, the containing range is empty and does not match any string. */ -#define REG_NO_EMPTY_RANGES (1ul << 16) + If not set, then when ending range point collates higher than the + starting range point, the range is ignored. */ +# define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1) /* If this bit is set, then an unmatched ) is ordinary. If not set, then an unmatched ) is invalid. */ -#define REG_UNMATCHED_RIGHT_PAREN_ORD (1ul << 17) +# define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1) /* If this bit is set, succeed as soon as we match the whole pattern, without further backtracking. */ -#define REG_NO_POSIX_BACKTRACKING (1ul << 18) +# define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1) /* If this bit is set, do not process the GNU regex operators. If not set, then the GNU regex operators are recognized. */ -#define REG_NO_GNU_OPS (1ul << 19) +# define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1) /* If this bit is set, turn on internal regex debugging. If not set, and debugging was on, turn it off. @@ -203,29 +202,31 @@ typedef unsigned long int reg_syntax_t; We define this bit always, so that all that's needed to turn on debugging is to recompile regex.c; the calling code can always have this bit set, and it won't affect anything in the normal case. */ -#define REG_DEBUG (1ul << 20) +# define RE_DEBUG (RE_NO_GNU_OPS << 1) /* If this bit is set, a syntactically invalid interval is treated as a string of ordinary characters. For example, the ERE 'a{1' is treated as 'a\{1'. */ -#define REG_INVALID_INTERVAL_ORD (1ul << 21) +# define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1) /* If this bit is set, then ignore case when matching. If not set, then case is significant. */ -#define REG_IGNORE_CASE (1ul << 22) +# define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1) -/* This bit is used internally like REG_CONTEXT_INDEP_ANCHORS but only +/* This bit is used internally like RE_CONTEXT_INDEP_ANCHORS but only for ^, because it is difficult to scan the regex backwards to find whether ^ should be special. */ -#define REG_CARET_ANCHORS_HERE (1ul << 23) +# define RE_CARET_ANCHORS_HERE (RE_ICASE << 1) /* If this bit is set, then \{ cannot be first in an bre or immediately after an alternation or begin-group operator. */ -#define REG_CONTEXT_INVALID_DUP (1ul << 24) +# define RE_CONTEXT_INVALID_DUP (RE_CARET_ANCHORS_HERE << 1) /* If this bit is set, then no_sub will be set to 1 during re_compile_pattern. */ -#define REG_NO_SUB (1ul << 25) +# define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1) + +#endif /* defined __USE_GNU_REGEX */ /* This global variable defines the particular regexp syntax to use (for some interfaces). When a regexp is compiled, the syntax used is @@ -233,82 +234,99 @@ typedef unsigned long int reg_syntax_t; already-compiled regexps. */ extern reg_syntax_t re_syntax_options; +#ifdef __USE_GNU_REGEX /* Define combinations of the above bits for the standard possibilities. (The [[[ comments delimit what gets put into the Texinfo file, so don't delete them!) */ /* [[[begin syntaxes]]] */ -#define REG_SYNTAX_EMACS 0 +# define RE_SYNTAX_EMACS 0 -#define REG_SYNTAX_AWK \ - (REG_BACKSLASH_ESCAPE_IN_LISTS | REG_DOT_NOT_NULL \ - | REG_NO_BK_PARENS | REG_NO_BK_REFS \ - | REG_NO_BK_VBAR | REG_NO_EMPTY_RANGES \ - | REG_DOT_NEWLINE | REG_CONTEXT_INDEP_ANCHORS \ - | REG_UNMATCHED_RIGHT_PAREN_ORD | REG_NO_GNU_OPS) +# define RE_SYNTAX_AWK \ + (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \ + | RE_NO_BK_PARENS | RE_NO_BK_REFS \ + | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \ + | RE_DOT_NEWLINE | RE_CONTEXT_INDEP_ANCHORS \ + | RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS) -#define REG_SYNTAX_GNU_AWK \ - ((REG_SYNTAX_POSIX_EXTENDED | REG_BACKSLASH_ESCAPE_IN_LISTS \ - | REG_DEBUG) \ - & ~(REG_DOT_NOT_NULL | REG_INTERVALS | REG_CONTEXT_INDEP_OPS \ - | REG_CONTEXT_INVALID_OPS )) +# define RE_SYNTAX_GNU_AWK \ + ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DEBUG) \ + & ~(RE_DOT_NOT_NULL | RE_INTERVALS | RE_CONTEXT_INDEP_OPS \ + | RE_CONTEXT_INVALID_OPS )) -#define REG_SYNTAX_POSIX_AWK \ - (REG_SYNTAX_POSIX_EXTENDED | REG_BACKSLASH_ESCAPE_IN_LISTS \ - | REG_INTERVALS | REG_NO_GNU_OPS) +# define RE_SYNTAX_POSIX_AWK \ + (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \ + | RE_INTERVALS | RE_NO_GNU_OPS) -#define REG_SYNTAX_GREP \ - (REG_BK_PLUS_QM | REG_CHAR_CLASSES \ - | REG_HAT_LISTS_NOT_NEWLINE | REG_INTERVALS \ - | REG_NEWLINE_ALT) +# define RE_SYNTAX_GREP \ + (RE_BK_PLUS_QM | RE_CHAR_CLASSES \ + | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \ + | RE_NEWLINE_ALT) -#define REG_SYNTAX_EGREP \ - (REG_CHAR_CLASSES | REG_CONTEXT_INDEP_ANCHORS \ - | REG_CONTEXT_INDEP_OPS | REG_HAT_LISTS_NOT_NEWLINE \ - | REG_NEWLINE_ALT | REG_NO_BK_PARENS \ - | REG_NO_BK_VBAR) +# define RE_SYNTAX_EGREP \ + (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \ + | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \ + | RE_NEWLINE_ALT | RE_NO_BK_PARENS \ + | RE_NO_BK_VBAR) -#define REG_SYNTAX_POSIX_EGREP \ - (REG_SYNTAX_EGREP | REG_INTERVALS | REG_NO_BK_BRACES \ - | REG_INVALID_INTERVAL_ORD) +# define RE_SYNTAX_POSIX_EGREP \ + (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES \ + | RE_INVALID_INTERVAL_ORD) /* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */ -#define REG_SYNTAX_ED REG_SYNTAX_POSIX_BASIC +# define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC -#define REG_SYNTAX_SED REG_SYNTAX_POSIX_BASIC +# define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC /* Syntax bits common to both basic and extended POSIX regex syntax. */ -#define _REG_SYNTAX_POSIX_COMMON \ - (REG_CHAR_CLASSES | REG_DOT_NEWLINE | REG_DOT_NOT_NULL \ - | REG_INTERVALS | REG_NO_EMPTY_RANGES) +# define _RE_SYNTAX_POSIX_COMMON \ + (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \ + | RE_INTERVALS | RE_NO_EMPTY_RANGES) -#define REG_SYNTAX_POSIX_BASIC \ - (_REG_SYNTAX_POSIX_COMMON | REG_BK_PLUS_QM | REG_CONTEXT_INVALID_DUP) +# define RE_SYNTAX_POSIX_BASIC \ + (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM | RE_CONTEXT_INVALID_DUP) -/* Differs from ..._POSIX_BASIC only in that REG_BK_PLUS_QM becomes - REG_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this +/* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes + RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this isn't minimal, since other operators, such as \`, aren't disabled. */ -#define REG_SYNTAX_POSIX_MINIMAL_BASIC \ - (_REG_SYNTAX_POSIX_COMMON | REG_LIMITED_OPS) +# define RE_SYNTAX_POSIX_MINIMAL_BASIC \ + (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS) -#define REG_SYNTAX_POSIX_EXTENDED \ - (_REG_SYNTAX_POSIX_COMMON | REG_CONTEXT_INDEP_ANCHORS \ - | REG_CONTEXT_INDEP_OPS | REG_NO_BK_BRACES \ - | REG_NO_BK_PARENS | REG_NO_BK_VBAR \ - | REG_CONTEXT_INVALID_OPS | REG_UNMATCHED_RIGHT_PAREN_ORD) +# define RE_SYNTAX_POSIX_EXTENDED \ + (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ + | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \ + | RE_NO_BK_PARENS | RE_NO_BK_VBAR \ + | RE_CONTEXT_INVALID_OPS | RE_UNMATCHED_RIGHT_PAREN_ORD) -/* Differs from ..._POSIX_EXTENDED in that REG_CONTEXT_INDEP_OPS is - removed and REG_NO_BK_REFS is added. */ -#define REG_SYNTAX_POSIX_MINIMAL_EXTENDED \ - (_REG_SYNTAX_POSIX_COMMON | REG_CONTEXT_INDEP_ANCHORS \ - | REG_CONTEXT_INVALID_OPS | REG_NO_BK_BRACES \ - | REG_NO_BK_PARENS | REG_NO_BK_REFS \ - | REG_NO_BK_VBAR | REG_UNMATCHED_RIGHT_PAREN_ORD) +/* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INDEP_OPS is + removed and RE_NO_BK_REFS is added. */ +# define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \ + (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ + | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \ + | RE_NO_BK_PARENS | RE_NO_BK_REFS \ + | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD) /* [[[end syntaxes]]] */ + +#endif /* defined __USE_GNU_REGEX */ -/* Maximum number of duplicates an interval can allow. This is - distinct from RE_DUP_MAX, to conform to POSIX name space rules and - to avoid collisions with . */ -#define REG_DUP_MAX 32767 +#ifdef __USE_GNU_REGEX + +/* Maximum number of duplicates an interval can allow. POSIX-conforming + systems might define this in , but we want our + value, so remove any previous define. */ +# ifdef RE_DUP_MAX +# undef RE_DUP_MAX +# endif + +/* RE_DUP_MAX is 2**15 - 1 because an earlier implementation stored + the counter as a 2-byte signed integer. This is no longer true, so + RE_DUP_MAX could be increased to (INT_MAX / 10 - 1), or to + ((SIZE_MAX - 2) / 10 - 1) if _REGEX_LARGE_OFFSETS is defined. + However, there would be a huge performance problem if someone + actually used a pattern like a\{214748363\}, so RE_DUP_MAX retains + its historical value. */ +# define RE_DUP_MAX (0x7fff) + +#endif /* defined __USE_GNU_REGEX */ /* POSIX `cflags' bits (i.e., information for `regcomp'). */ @@ -354,72 +372,55 @@ extern reg_syntax_t re_syntax_options; typedef enum { _REG_ENOSYS = -1, /* This will never happen for this implementation. */ -#define REG_ENOSYS _REG_ENOSYS - - _REG_NOERROR, /* Success. */ -#define REG_NOERROR _REG_NOERROR - + _REG_NOERROR = 0, /* Success. */ _REG_NOMATCH, /* Didn't find a match (for regexec). */ -#define REG_NOMATCH _REG_NOMATCH /* POSIX regcomp return error codes. (In the order listed in the standard.) */ - _REG_BADPAT, /* Invalid pattern. */ -#define REG_BADPAT _REG_BADPAT - - _REG_ECOLLATE, /* Inalid collating element. */ -#define REG_ECOLLATE _REG_ECOLLATE - + _REG_ECOLLATE, /* Invalid collating element. */ _REG_ECTYPE, /* Invalid character class name. */ -#define REG_ECTYPE _REG_ECTYPE - _REG_EESCAPE, /* Trailing backslash. */ -#define REG_EESCAPE _REG_EESCAPE - _REG_ESUBREG, /* Invalid back reference. */ -#define REG_ESUBREG _REG_ESUBREG - _REG_EBRACK, /* Unmatched left bracket. */ -#define REG_EBRACK _REG_EBRACK - _REG_EPAREN, /* Parenthesis imbalance. */ -#define REG_EPAREN _REG_EPAREN - _REG_EBRACE, /* Unmatched \{. */ -#define REG_EBRACE _REG_EBRACE - _REG_BADBR, /* Invalid contents of \{\}. */ -#define REG_BADBR _REG_BADBR - _REG_ERANGE, /* Invalid range end. */ -#define REG_ERANGE _REG_ERANGE - _REG_ESPACE, /* Ran out of memory. */ -#define REG_ESPACE _REG_ESPACE - _REG_BADRPT, /* No preceding re for repetition op. */ -#define REG_BADRPT _REG_BADRPT /* Error codes we've added. */ - _REG_EEND, /* Premature end. */ -#define REG_EEND _REG_EEND - _REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */ -#define REG_ESIZE _REG_ESIZE - _REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */ -#define REG_ERPAREN _REG_ERPAREN - } reg_errcode_t; + +#ifdef _XOPEN_SOURCE +# define REG_ENOSYS _REG_ENOSYS +#endif +#define REG_NOERROR _REG_NOERROR +#define REG_NOMATCH _REG_NOMATCH +#define REG_BADPAT _REG_BADPAT +#define REG_ECOLLATE _REG_ECOLLATE +#define REG_ECTYPE _REG_ECTYPE +#define REG_EESCAPE _REG_EESCAPE +#define REG_ESUBREG _REG_ESUBREG +#define REG_EBRACK _REG_EBRACK +#define REG_EPAREN _REG_EPAREN +#define REG_EBRACE _REG_EBRACE +#define REG_BADBR _REG_BADBR +#define REG_ERANGE _REG_ERANGE +#define REG_ESPACE _REG_ESPACE +#define REG_BADRPT _REG_BADRPT +#define REG_EEND _REG_EEND +#define REG_ESIZE _REG_ESIZE +#define REG_ERPAREN _REG_ERPAREN -/* In the traditional GNU implementation, regex.h defined member names - like `buffer' that POSIX does not allow. These members now have - names with leading `re_' (e.g., `re_buffer'). Support the old - names only if _REGEX_SOURCE is defined. New programs should use - the new names. */ -#ifdef _REGEX_SOURCE +/* struct re_pattern_buffer normally uses member names like `buffer' + that POSIX does not allow. In POSIX mode these members have names + with leading `re_' (e.g., `re_buffer'). */ +#ifdef __USE_GNU_REGEX # define _REG_RE_NAME(id) id # define _REG_RM_NAME(id) id #else @@ -428,88 +429,87 @@ typedef enum #endif /* The user can specify the type of the re_translate member by - defining the macro REG_TRANSLATE_TYPE. In the traditional GNU - implementation, this macro was named RE_TRANSLATE_TYPE, but POSIX - does not allow this. Support the old name only if _REGEX_SOURCE - and if the new name is not defined. New programs should use the new - name. */ -#ifndef REG_TRANSLATE_TYPE -# if defined _REGEX_SOURCE && defined RE_TRANSLATE_TYPE -# define REG_TRANSLATE_TYPE RE_TRANSLATE_TYPE -# else -# define REG_TRANSLATE_TYPE char * + defining the macro RE_TRANSLATE_TYPE, which defaults to unsigned + char *. This pollutes the POSIX name space, so in POSIX mode just + use unsigned char *. */ +#ifdef __USE_GNU_REGEX +# ifndef RE_TRANSLATE_TYPE +# define RE_TRANSLATE_TYPE unsigned char * # endif +# define REG_TRANSLATE_TYPE RE_TRANSLATE_TYPE +#else +# define REG_TRANSLATE_TYPE unsigned char * #endif /* This data structure represents a compiled pattern. Before calling - the pattern compiler), the fields `re_buffer', `re_allocated', `re_fastmap', - `re_translate', and `re_no_sub' can be set. After the pattern has been + the pattern compiler, the fields `buffer', `allocated', `fastmap', + `translate', and `no_sub' can be set. After the pattern has been compiled, the `re_nsub' field is available. All other fields are private to the regex routines. */ struct re_pattern_buffer { -/* [[[begin pattern_buffer]]] */ - /* Space that holds the compiled pattern. It is declared as - `unsigned char *' because its elements are - sometimes used as array indexes. */ + /* Space that holds the compiled pattern. It is declared as + `unsigned char *' because its elements are sometimes used as + array indexes. */ unsigned char *_REG_RE_NAME (buffer); - /* Number of bytes to which `re_buffer' points. */ + /* Number of bytes to which `buffer' points. */ __re_long_size_t _REG_RE_NAME (allocated); - /* Number of bytes actually used in `re_buffer'. */ + /* Number of bytes actually used in `buffer'. */ __re_long_size_t _REG_RE_NAME (used); - /* Syntax setting with which the pattern was compiled. */ + /* Syntax setting with which the pattern was compiled. */ reg_syntax_t _REG_RE_NAME (syntax); - /* Pointer to a fastmap, if any, otherwise zero. re_search uses - the fastmap, if there is one, to skip over impossible - starting points for matches. */ + /* Pointer to a fastmap, if any, otherwise zero. re_search uses the + fastmap, if there is one, to skip over impossible starting points + for matches. */ char *_REG_RE_NAME (fastmap); - /* Either a translate table to apply to all characters before - comparing them, or zero for no translation. The translation - is applied to a pattern when it is compiled and to a string - when it is matched. */ + /* Either a translate table to apply to all characters before + comparing them, or zero for no translation. The translation is + applied to a pattern when it is compiled and to a string when it + is matched. */ REG_TRANSLATE_TYPE _REG_RE_NAME (translate); - /* Number of subexpressions found by the compiler. */ + /* Number of subexpressions found by the compiler. */ size_t re_nsub; - /* Zero if this pattern cannot match the empty string, one else. - Well, in truth it's used only in `re_search_2', to see - whether or not we should use the fastmap, so we don't set - this absolutely perfectly; see `re_compile_fastmap' (the - `duplicate' case). */ + /* Zero if this pattern cannot match the empty string, one else. + Well, in truth it's used only in `re_search_2', to see whether or + not we should use the fastmap, so we don't set this absolutely + perfectly; see `re_compile_fastmap' (the `duplicate' case). */ unsigned int _REG_RE_NAME (can_be_null) : 1; - /* If REG_UNALLOCATED, allocate space in the `regs' structure - for `max (REG_NREGS, re_nsub + 1)' groups. - If REG_REALLOCATE, reallocate space if necessary. - If REG_FIXED, use what's there. */ -#define REG_UNALLOCATED 0 -#define REG_REALLOCATE 1 -#define REG_FIXED 2 + /* If REGS_UNALLOCATED, allocate space in the `regs' structure + for `max (RE_NREGS, re_nsub + 1)' groups. + If REGS_REALLOCATE, reallocate space if necessary. + If REGS_FIXED, use what's there. */ +#ifdef __USE_GNU_REGEX +# define REGS_UNALLOCATED 0 +# define REGS_REALLOCATE 1 +# define REGS_FIXED 2 +#endif unsigned int _REG_RE_NAME (regs_allocated) : 2; - /* Set to zero when `regex_compile' compiles a pattern; set to one - by `re_compile_fastmap' if it updates the fastmap. */ + /* Set to zero when `regex_compile' compiles a pattern; set to one + by `re_compile_fastmap' if it updates the fastmap. */ unsigned int _REG_RE_NAME (fastmap_accurate) : 1; - /* If set, `re_match_2' does not return information about - subexpressions. */ + /* If set, `re_match_2' does not return information about + subexpressions. */ unsigned int _REG_RE_NAME (no_sub) : 1; - /* If set, a beginning-of-line anchor doesn't match at the - beginning of the string. */ + /* If set, a beginning-of-line anchor doesn't match at the beginning + of the string. */ unsigned int _REG_RE_NAME (not_bol) : 1; - /* Similarly for an end-of-line anchor. */ + /* Similarly for an end-of-line anchor. */ unsigned int _REG_RE_NAME (not_eol) : 1; - /* If true, an anchor at a newline matches. */ + /* If true, an anchor at a newline matches. */ unsigned int _REG_RE_NAME (newline_anchor) : 1; /* [[[end pattern_buffer]]] */ @@ -527,11 +527,11 @@ struct re_registers }; -/* If `regs_allocated' is REG_UNALLOCATED in the pattern buffer, +/* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer, `re_match_2' returns information about at least this many registers the first time a `regs' structure is passed. */ -#ifndef REG_NREGS -# define REG_NREGS 30 +#if !defined RE_NREGS && defined __USE_GNU_REGEX +# define RE_NREGS 30 #endif @@ -567,7 +567,7 @@ extern int re_compile_fastmap (struct re_pattern_buffer *__buffer); compiled into BUFFER. Start searching at position START, for RANGE characters. Return the starting position of the match, -1 for no match, or -2 for an internal error. Also return register - information in REGS (if REGS and BUFFER->re_no_sub are nonzero). */ + information in REGS (if REGS and BUFFER->no_sub are nonzero). */ extern regoff_t re_search (struct re_pattern_buffer *__buffer, const char *__string, __re_idx_t __length, __re_idx_t __start, regoff_t __range, @@ -635,13 +635,17 @@ extern int re_exec (const char *); # endif # endif #endif -/* gcc 3.1 and up support the [restrict] syntax, but g++ doesn't. */ -#ifndef __restrict_arr -# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) && !defined __cplusplus -# define __restrict_arr __restrict -# else -# define __restrict_arr -# endif +/* gcc 3.1 and up support the [restrict] syntax. Don't trust + sys/cdefs.h's definition of __restrict_arr, though, as it + mishandles gcc -ansi -pedantic. */ +#undef __restrict_arr +#if ((199901L <= __STDC_VERSION__ \ + || ((3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__)) \ + && !__STRICT_ANSI__)) \ + && !defined __GNUG__) +# define __restrict_arr __restrict +#else +# define __restrict_arr #endif /* POSIX compatibility. */ @@ -660,110 +664,8 @@ extern size_t regerror (int __errcode, const regex_t *__restrict __preg, extern void regfree (regex_t *__preg); -#ifdef _REGEX_SOURCE - -/* Define the POSIX-compatible member names in terms of the - incompatible (and deprecated) names established by _REG_RE_NAME. - New programs should use the re_* names. */ - -# define re_allocated allocated -# define re_buffer buffer -# define re_can_be_null can_be_null -# define re_fastmap fastmap -# define re_fastmap_accurate fastmap_accurate -# define re_newline_anchor newline_anchor -# define re_no_sub no_sub -# define re_not_bol not_bol -# define re_not_eol not_eol -# define re_regs_allocated regs_allocated -# define re_syntax syntax -# define re_translate translate -# define re_used used - -/* Similarly for _REG_RM_NAME. */ - -# define rm_end end -# define rm_num_regs num_regs -# define rm_start start - -/* Undef RE_DUP_MAX first, in case the user has already included a - with an incompatible definition. - - On GNU systems, the most common spelling for RE_DUP_MAX's value in - is (0x7ffff), so define RE_DUP_MAX to that, not to - REG_DUP_MAX. This avoid some duplicate-macro-definition warnings - with programs that include after this file. - - New programs should not assume that regex.h defines RE_DUP_MAX; to - get the value of RE_DUP_MAX, they should instead include - and possibly invoke the sysconf function. */ - -# undef RE_DUP_MAX -# define RE_DUP_MAX (0x7fff) - -/* Define the following symbols for backward source compatibility. - These symbols violate the POSIX name space rules, and new programs - should avoid them. */ - -# define REGS_FIXED REG_FIXED -# define REGS_REALLOCATE REG_REALLOCATE -# define REGS_UNALLOCATED REG_UNALLOCATED -# define RE_BACKSLASH_ESCAPE_IN_LISTS REG_BACKSLASH_ESCAPE_IN_LISTS -# define RE_BK_PLUS_QM REG_BK_PLUS_QM -# define RE_CARET_ANCHORS_HERE REG_CARET_ANCHORS_HERE -# define RE_CHAR_CLASSES REG_CHAR_CLASSES -# define RE_CONTEXT_INDEP_ANCHORS REG_CONTEXT_INDEP_ANCHORS -# define RE_CONTEXT_INDEP_OPS REG_CONTEXT_INDEP_OPS -# define RE_CONTEXT_INVALID_DUP REG_CONTEXT_INVALID_DUP -# define RE_CONTEXT_INVALID_OPS REG_CONTEXT_INVALID_OPS -# define RE_DEBUG REG_DEBUG -# define RE_DOT_NEWLINE REG_DOT_NEWLINE -# define RE_DOT_NOT_NULL REG_DOT_NOT_NULL -# define RE_HAT_LISTS_NOT_NEWLINE REG_HAT_LISTS_NOT_NEWLINE -# define RE_ICASE REG_IGNORE_CASE /* avoid collision with REG_ICASE */ -# define RE_INTERVALS REG_INTERVALS -# define RE_INVALID_INTERVAL_ORD REG_INVALID_INTERVAL_ORD -# define RE_LIMITED_OPS REG_LIMITED_OPS -# define RE_NEWLINE_ALT REG_NEWLINE_ALT -# define RE_NO_BK_BRACES REG_NO_BK_BRACES -# define RE_NO_BK_PARENS REG_NO_BK_PARENS -# define RE_NO_BK_REFS REG_NO_BK_REFS -# define RE_NO_BK_VBAR REG_NO_BK_VBAR -# define RE_NO_EMPTY_RANGES REG_NO_EMPTY_RANGES -# define RE_NO_GNU_OPS REG_NO_GNU_OPS -# define RE_NO_POSIX_BACKTRACKING REG_NO_POSIX_BACKTRACKING -# define RE_NO_SUB REG_NO_SUB -# define RE_NREGS REG_NREGS -# define RE_SYNTAX_AWK REG_SYNTAX_AWK -# define RE_SYNTAX_ED REG_SYNTAX_ED -# define RE_SYNTAX_EGREP REG_SYNTAX_EGREP -# define RE_SYNTAX_EMACS REG_SYNTAX_EMACS -# define RE_SYNTAX_GNU_AWK REG_SYNTAX_GNU_AWK -# define RE_SYNTAX_GREP REG_SYNTAX_GREP -# define RE_SYNTAX_POSIX_AWK REG_SYNTAX_POSIX_AWK -# define RE_SYNTAX_POSIX_BASIC REG_SYNTAX_POSIX_BASIC -# define RE_SYNTAX_POSIX_EGREP REG_SYNTAX_POSIX_EGREP -# define RE_SYNTAX_POSIX_EXTENDED REG_SYNTAX_POSIX_EXTENDED -# define RE_SYNTAX_POSIX_MINIMAL_BASIC REG_SYNTAX_POSIX_MINIMAL_BASIC -# define RE_SYNTAX_POSIX_MINIMAL_EXTENDED REG_SYNTAX_POSIX_MINIMAL_EXTENDED -# define RE_SYNTAX_SED REG_SYNTAX_SED -# define RE_UNMATCHED_RIGHT_PAREN_ORD REG_UNMATCHED_RIGHT_PAREN_ORD -# ifndef RE_TRANSLATE_TYPE -# define RE_TRANSLATE_TYPE REG_TRANSLATE_TYPE -# endif - -#endif /* defined _REGEX_SOURCE */ - #ifdef __cplusplus } #endif /* C++ */ #endif /* regex.h */ - -/* -Local variables: -make-backup-files: t -version-control: t -trim-versions-without-asking: nil -End: -*/ diff --git a/lib/regex_internal.c b/gl/regex_internal.c similarity index 84% rename from lib/regex_internal.c rename to gl/regex_internal.c index ad618cf..78e16f3 100644 --- a/lib/regex_internal.c +++ b/gl/regex_internal.c @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . @@ -19,7 +19,7 @@ static void re_string_construct_common (const char *str, Idx len, re_string_t *pstr, - REG_TRANSLATE_TYPE trans, bool icase, + RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) internal_function; static re_dfastate_t *create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes, @@ -37,7 +37,7 @@ static re_dfastate_t *create_cd_newstate (const re_dfa_t *dfa, static reg_errcode_t internal_function re_string_allocate (re_string_t *pstr, const char *str, Idx len, Idx init_len, - REG_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) + RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) { reg_errcode_t ret; Idx init_buf_len; @@ -65,7 +65,7 @@ re_string_allocate (re_string_t *pstr, const char *str, Idx len, Idx init_len, static reg_errcode_t internal_function re_string_construct (re_string_t *pstr, const char *str, Idx len, - REG_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) + RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) { reg_errcode_t ret; memset (pstr, '\0', sizeof (re_string_t)); @@ -132,13 +132,20 @@ re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len) #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) { - wint_t *new_wcs = re_xrealloc (pstr->wcs, wint_t, new_buf_len); + wint_t *new_wcs; + + /* Avoid overflow. */ + size_t max_object_size = MAX (sizeof (wint_t), sizeof (Idx)); + if (BE (SIZE_MAX / max_object_size < new_buf_len, 0)) + return REG_ESPACE; + + new_wcs = re_realloc (pstr->wcs, wint_t, new_buf_len); if (BE (new_wcs == NULL, 0)) return REG_ESPACE; pstr->wcs = new_wcs; if (pstr->offsets != NULL) { - Idx *new_offsets = re_xrealloc (pstr->offsets, Idx, new_buf_len); + Idx *new_offsets = re_realloc (pstr->offsets, Idx, new_buf_len); if (BE (new_offsets == NULL, 0)) return REG_ESPACE; pstr->offsets = new_offsets; @@ -161,13 +168,13 @@ re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len) static void internal_function re_string_construct_common (const char *str, Idx len, re_string_t *pstr, - REG_TRANSLATE_TYPE trans, bool icase, + RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) { pstr->raw_mbs = (const unsigned char *) str; pstr->len = len; pstr->raw_len = len; - pstr->trans = (unsigned REG_TRANSLATE_TYPE) trans; + pstr->trans = trans; pstr->icase = icase; pstr->mbs_allocated = (trans != NULL || icase); pstr->mb_cur_max = dfa->mb_cur_max; @@ -301,7 +308,7 @@ build_wcs_upper_buffer (re_string_t *pstr) mbclen = mbrtowc (&wc, ((const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx), remain_len, &pstr->cur_state); - if (BE ((size_t) (mbclen + 2) > 2, 1)) + if (BE (mbclen < (size_t) -2, 1)) { wchar_t wcu = wc; if (iswlower (wc)) @@ -369,7 +376,7 @@ build_wcs_upper_buffer (re_string_t *pstr) else p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + src_idx; mbclen = mbrtowc (&wc, p, remain_len, &pstr->cur_state); - if (BE ((size_t) (mbclen + 2) > 2, 1)) + if (BE (mbclen < (size_t) -2, 1)) { wchar_t wcu = wc; if (iswlower (wc)) @@ -392,7 +399,7 @@ build_wcs_upper_buffer (re_string_t *pstr) if (pstr->offsets == NULL) { - pstr->offsets = re_xmalloc (Idx, pstr->bufs_len); + pstr->offsets = re_malloc (Idx, pstr->bufs_len); if (pstr->offsets == NULL) return REG_ESPACE; @@ -481,27 +488,34 @@ re_string_skip_chars (re_string_t *pstr, Idx new_raw_idx, wint_t *last_wc) mbstate_t prev_st; Idx rawbuf_idx; size_t mbclen; - wchar_t wc = 0; + wint_t wc = WEOF; /* Skip the characters which are not necessary to check. */ for (rawbuf_idx = pstr->raw_mbs_idx + pstr->valid_raw_len; rawbuf_idx < new_raw_idx;) { + wchar_t wc2; Idx remain_len; remain_len = pstr->len - rawbuf_idx; prev_st = pstr->cur_state; - mbclen = mbrtowc (&wc, (const char *) pstr->raw_mbs + rawbuf_idx, + mbclen = mbrtowc (&wc2, (const char *) pstr->raw_mbs + rawbuf_idx, remain_len, &pstr->cur_state); if (BE (mbclen == (size_t) -2 || mbclen == (size_t) -1 || mbclen == 0, 0)) { - /* We treat these cases as a singlebyte character. */ + /* We treat these cases as a single byte character. */ + if (mbclen == 0 || remain_len == 0) + wc = L'\0'; + else + wc = *(unsigned char *) (pstr->raw_mbs + rawbuf_idx); mbclen = 1; pstr->cur_state = prev_st; } + else + wc = wc2; /* Then proceed the next character. */ rawbuf_idx += mbclen; } - *last_wc = (wint_t) wc; + *last_wc = wc; return rawbuf_idx; } #endif /* RE_ENABLE_I18N */ @@ -583,34 +597,98 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags) if (BE (offset != 0, 1)) { - /* Are the characters which are already checked remain? */ - if (BE (offset < pstr->valid_raw_len, 1) -#ifdef RE_ENABLE_I18N - /* Handling this would enlarge the code too much. - Accept a slowdown in that case. */ - && pstr->offsets_needed == 0 -#endif - ) + /* Should the already checked characters be kept? */ + if (BE (offset < pstr->valid_raw_len, 1)) { /* Yes, move them to the front of the buffer. */ - pstr->tip_context = re_string_context_at (pstr, offset - 1, eflags); #ifdef RE_ENABLE_I18N - if (pstr->mb_cur_max > 1) - memmove (pstr->wcs, pstr->wcs + offset, - (pstr->valid_len - offset) * sizeof (wint_t)); -#endif /* RE_ENABLE_I18N */ - if (BE (pstr->mbs_allocated, 0)) - memmove (pstr->mbs, pstr->mbs + offset, - pstr->valid_len - offset); - pstr->valid_len -= offset; - pstr->valid_raw_len -= offset; -#if DEBUG - assert (pstr->valid_len > 0); + if (BE (pstr->offsets_needed, 0)) + { + Idx low = 0, high = pstr->valid_len, mid; + do + { + mid = (high + low) / 2; + if (pstr->offsets[mid] > offset) + high = mid; + else if (pstr->offsets[mid] < offset) + low = mid + 1; + else + break; + } + while (low < high); + if (pstr->offsets[mid] < offset) + ++mid; + pstr->tip_context = re_string_context_at (pstr, mid - 1, + eflags); + /* This can be quite complicated, so handle specially + only the common and easy case where the character with + different length representation of lower and upper + case is present at or after offset. */ + if (pstr->valid_len > offset + && mid == offset && pstr->offsets[mid] == offset) + { + memmove (pstr->wcs, pstr->wcs + offset, + (pstr->valid_len - offset) * sizeof (wint_t)); + memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset); + pstr->valid_len -= offset; + pstr->valid_raw_len -= offset; + for (low = 0; low < pstr->valid_len; low++) + pstr->offsets[low] = pstr->offsets[low + offset] - offset; + } + else + { + /* Otherwise, just find out how long the partial multibyte + character at offset is and fill it with WEOF/255. */ + pstr->len = pstr->raw_len - idx + offset; + pstr->stop = pstr->raw_stop - idx + offset; + pstr->offsets_needed = 0; + while (mid > 0 && pstr->offsets[mid - 1] == offset) + --mid; + while (mid < pstr->valid_len) + if (pstr->wcs[mid] != WEOF) + break; + else + ++mid; + if (mid == pstr->valid_len) + pstr->valid_len = 0; + else + { + pstr->valid_len = pstr->offsets[mid] - offset; + if (pstr->valid_len) + { + for (low = 0; low < pstr->valid_len; ++low) + pstr->wcs[low] = WEOF; + memset (pstr->mbs, 255, pstr->valid_len); + } + } + pstr->valid_raw_len = pstr->valid_len; + } + } + else #endif + { + pstr->tip_context = re_string_context_at (pstr, offset - 1, + eflags); +#ifdef RE_ENABLE_I18N + if (pstr->mb_cur_max > 1) + memmove (pstr->wcs, pstr->wcs + offset, + (pstr->valid_len - offset) * sizeof (wint_t)); +#endif /* RE_ENABLE_I18N */ + if (BE (pstr->mbs_allocated, 0)) + memmove (pstr->mbs, pstr->mbs + offset, + pstr->valid_len - offset); + pstr->valid_len -= offset; + pstr->valid_raw_len -= offset; +#if DEBUG + assert (pstr->valid_len > 0); +#endif + } } else { /* No, skip all characters until IDX. */ + Idx prev_valid_len = pstr->valid_len; + #ifdef RE_ENABLE_I18N if (BE (pstr->offsets_needed, 0)) { @@ -620,7 +698,6 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags) } #endif pstr->valid_len = 0; - pstr->valid_raw_len = 0; #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) { @@ -635,60 +712,80 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags) byte other than 0x80 - 0xbf. */ raw = pstr->raw_mbs + pstr->raw_mbs_idx; end = raw + (offset - pstr->mb_cur_max); - for (p = raw + offset - 1; p >= end; --p) - if ((*p & 0xc0) != 0x80) - { - mbstate_t cur_state; - wchar_t wc2; - Idx mlen = raw + pstr->len - p; - unsigned char buf[6]; - size_t mbclen; + if (end < pstr->raw_mbs) + end = pstr->raw_mbs; + p = raw + offset - 1; +#ifdef _LIBC + /* We know the wchar_t encoding is UCS4, so for the simple + case, ASCII characters, skip the conversion step. */ + if (isascii (*p) && BE (pstr->trans == NULL, 1)) + { + memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); + /* pstr->valid_len = 0; */ + wc = (wchar_t) *p; + } + else +#endif + for (; p >= end; --p) + if ((*p & 0xc0) != 0x80) + { + mbstate_t cur_state; + wchar_t wc2; + Idx mlen = raw + pstr->len - p; + unsigned char buf[6]; + size_t mbclen; - q = p; - if (BE (pstr->trans != NULL, 0)) - { - int i = mlen < 6 ? mlen : 6; - while (--i >= 0) - buf[i] = pstr->trans[p[i]]; - q = buf; - } - /* XXX Don't use mbrtowc, we know which conversion - to use (UTF-8 -> UCS4). */ - memset (&cur_state, 0, sizeof (cur_state)); - mbclen = mbrtowc (&wc2, (const char *) p, mlen, - &cur_state); - if (raw + offset - p <= mbclen && mbclen < (size_t) -2) - { - memset (&pstr->cur_state, '\0', - sizeof (mbstate_t)); - pstr->valid_len = mbclen - (raw + offset - p); - wc = wc2; - } - break; - } + q = p; + if (BE (pstr->trans != NULL, 0)) + { + int i = mlen < 6 ? mlen : 6; + while (--i >= 0) + buf[i] = pstr->trans[p[i]]; + q = buf; + } + /* XXX Don't use mbrtowc, we know which conversion + to use (UTF-8 -> UCS4). */ + memset (&cur_state, 0, sizeof (cur_state)); + mbclen = mbrtowc (&wc2, (const char *) p, mlen, + &cur_state); + if (raw + offset - p <= mbclen + && mbclen < (size_t) -2) + { + memset (&pstr->cur_state, '\0', + sizeof (mbstate_t)); + pstr->valid_len = mbclen - (raw + offset - p); + wc = wc2; + } + break; + } } if (wc == WEOF) pstr->valid_len = re_string_skip_chars (pstr, idx, &wc) - idx; + if (wc == WEOF) + pstr->tip_context + = re_string_context_at (pstr, prev_valid_len - 1, eflags); + else + pstr->tip_context = ((BE (pstr->word_ops_used != 0, 0) + && IS_WIDE_WORD_CHAR (wc)) + ? CONTEXT_WORD + : ((IS_WIDE_NEWLINE (wc) + && pstr->newline_anchor) + ? CONTEXT_NEWLINE : 0)); if (BE (pstr->valid_len, 0)) { for (wcs_idx = 0; wcs_idx < pstr->valid_len; ++wcs_idx) pstr->wcs[wcs_idx] = WEOF; if (pstr->mbs_allocated) - memset (pstr->mbs, -1, pstr->valid_len); + memset (pstr->mbs, 255, pstr->valid_len); } pstr->valid_raw_len = pstr->valid_len; - pstr->tip_context = ((BE (pstr->word_ops_used != 0, 0) - && IS_WIDE_WORD_CHAR (wc)) - ? CONTEXT_WORD - : ((IS_WIDE_NEWLINE (wc) - && pstr->newline_anchor) - ? CONTEXT_NEWLINE : 0)); } else #endif /* RE_ENABLE_I18N */ { int c = pstr->raw_mbs[pstr->raw_mbs_idx + offset - 1]; + pstr->valid_raw_len = 0; if (pstr->trans) c = pstr->trans[c]; pstr->tip_context = (bitset_contain (pstr->word_char, c) @@ -719,15 +816,15 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags) } else #endif /* RE_ENABLE_I18N */ - if (BE (pstr->mbs_allocated, 0)) - { - if (pstr->icase) - build_upper_buffer (pstr); - else if (pstr->trans != NULL) - re_string_translate_buffer (pstr); - } - else - pstr->valid_len = pstr->len; + if (BE (pstr->mbs_allocated, 0)) + { + if (pstr->icase) + build_upper_buffer (pstr); + else if (pstr->trans != NULL) + re_string_translate_buffer (pstr); + } + else + pstr->valid_len = pstr->len; pstr->cur_idx = 0; return REG_NOERROR; @@ -873,7 +970,7 @@ re_node_set_alloc (re_node_set *set, Idx size) { set->alloc = size; set->nelem = 0; - set->elems = re_xmalloc (Idx, size); + set->elems = re_malloc (Idx, size); if (BE (set->elems == NULL, 0)) return REG_ESPACE; return REG_NOERROR; @@ -939,7 +1036,7 @@ re_node_set_init_copy (re_node_set *dest, const re_node_set *src) dest->alloc = dest->nelem = 0; return REG_ESPACE; } - memcpy (dest->elems, src->elems, src->nelem * sizeof dest->elems[0]); + memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx)); } else re_node_set_init_empty (dest); @@ -964,12 +1061,7 @@ re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1, if (src1->nelem + src2->nelem + dest->nelem > dest->alloc) { Idx new_alloc = src1->nelem + src2->nelem + dest->alloc; - Idx *new_elems; - if (sizeof (Idx) < 3 - && (new_alloc < dest->alloc - || ((Idx) (src1->nelem + src2->nelem) < src1->nelem))) - return REG_ESPACE; - new_elems = re_xrealloc (dest->elems, Idx, new_alloc); + Idx *new_elems = re_realloc (dest->elems, Idx, new_alloc); if (BE (new_elems == NULL, 0)) return REG_ESPACE; dest->elems = new_elems; @@ -1038,7 +1130,7 @@ re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1, } /* Copy remaining SRC elements. */ - memcpy (dest->elems, dest->elems + sbase, delta * sizeof dest->elems[0]); + memcpy (dest->elems, dest->elems + sbase, delta * sizeof (Idx)); return REG_NOERROR; } @@ -1055,9 +1147,7 @@ re_node_set_init_union (re_node_set *dest, const re_node_set *src1, if (src1 != NULL && src1->nelem > 0 && src2 != NULL && src2->nelem > 0) { dest->alloc = src1->nelem + src2->nelem; - if (sizeof (Idx) < 2 && dest->alloc < src1->nelem) - return REG_ESPACE; - dest->elems = re_xmalloc (Idx, dest->alloc); + dest->elems = re_malloc (Idx, dest->alloc); if (BE (dest->elems == NULL, 0)) return REG_ESPACE; } @@ -1085,13 +1175,13 @@ re_node_set_init_union (re_node_set *dest, const re_node_set *src1, if (i1 < src1->nelem) { memcpy (dest->elems + id, src1->elems + i1, - (src1->nelem - i1) * sizeof dest->elems[0]); + (src1->nelem - i1) * sizeof (Idx)); id += src1->nelem - i1; } else if (i2 < src2->nelem) { memcpy (dest->elems + id, src2->elems + i2, - (src2->nelem - i2) * sizeof dest->elems[0]); + (src2->nelem - i2) * sizeof (Idx)); id += src2->nelem - i2; } dest->nelem = id; @@ -1108,17 +1198,10 @@ re_node_set_merge (re_node_set *dest, const re_node_set *src) Idx is, id, sbase, delta; if (src == NULL || src->nelem == 0) return REG_NOERROR; - if (sizeof (Idx) < 3 - && ((Idx) (2 * src->nelem) < src->nelem - || (Idx) (2 * src->nelem + dest->nelem) < dest->nelem)) - return REG_ESPACE; if (dest->alloc < 2 * src->nelem + dest->nelem) { - Idx new_alloc = src->nelem + dest->alloc; - Idx *new_buffer; - if (sizeof (Idx) < 4 && new_alloc < dest->alloc) - return REG_ESPACE; - new_buffer = re_x2realloc (dest->elems, Idx, &new_alloc); + Idx new_alloc = 2 * (src->nelem + dest->alloc); + Idx *new_buffer = re_realloc (dest->elems, Idx, new_alloc); if (BE (new_buffer == NULL, 0)) return REG_ESPACE; dest->elems = new_buffer; @@ -1128,7 +1211,7 @@ re_node_set_merge (re_node_set *dest, const re_node_set *src) if (BE (dest->nelem == 0, 0)) { dest->nelem = src->nelem; - memcpy (dest->elems, src->elems, src->nelem * sizeof dest->elems[0]); + memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx)); return REG_NOERROR; } @@ -1150,8 +1233,7 @@ re_node_set_merge (re_node_set *dest, const re_node_set *src) { /* If DEST is exhausted, the remaining items of SRC must be unique. */ sbase -= is + 1; - memcpy (dest->elems + sbase, src->elems, - (is + 1) * sizeof dest->elems[0]); + memcpy (dest->elems + sbase, src->elems, (is + 1) * sizeof (Idx)); } id = dest->nelem - 1; @@ -1180,7 +1262,7 @@ re_node_set_merge (re_node_set *dest, const re_node_set *src) { /* Copy remaining SRC elements. */ memcpy (dest->elems, dest->elems + sbase, - delta * sizeof dest->elems[0]); + delta * sizeof (Idx)); break; } } @@ -1200,7 +1282,7 @@ re_node_set_insert (re_node_set *set, Idx elem) Idx idx; /* In case the set is empty. */ if (set->alloc == 0) - return re_node_set_init_1 (set, elem) == REG_NOERROR; + return BE (re_node_set_init_1 (set, elem) == REG_NOERROR, 1); if (BE (set->nelem, 0) == 0) { @@ -1213,7 +1295,9 @@ re_node_set_insert (re_node_set *set, Idx elem) /* Realloc if we need. */ if (set->alloc == set->nelem) { - Idx *new_elems = re_x2realloc (set->elems, Idx, &set->alloc); + Idx *new_elems; + set->alloc = set->alloc * 2; + new_elems = re_realloc (set->elems, Idx, set->alloc); if (BE (new_elems == NULL, 0)) return false; set->elems = new_elems; @@ -1251,7 +1335,8 @@ re_node_set_insert_last (re_node_set *set, Idx elem) if (set->alloc == set->nelem) { Idx *new_elems; - new_elems = re_x2realloc (set->elems, Idx, &set->alloc); + set->alloc = (set->alloc + 1) * 2; + new_elems = re_realloc (set->elems, Idx, set->alloc); if (BE (new_elems == NULL, 0)) return false; set->elems = new_elems; @@ -1321,21 +1406,28 @@ static Idx internal_function re_dfa_add_node (re_dfa_t *dfa, re_token_t token) { - int type = token.type; if (BE (dfa->nodes_len >= dfa->nodes_alloc, 0)) { - Idx new_nodes_alloc = dfa->nodes_alloc; + size_t new_nodes_alloc = dfa->nodes_alloc * 2; Idx *new_nexts, *new_indices; re_node_set *new_edests, *new_eclosures; + re_token_t *new_nodes; + size_t max_object_size = + MAX (sizeof (re_token_t), + MAX (sizeof (re_node_set), + sizeof (Idx))); - re_token_t *new_nodes = re_x2realloc (dfa->nodes, re_token_t, - &new_nodes_alloc); + /* Avoid overflows. */ + if (BE (SIZE_MAX / 2 / max_object_size < dfa->nodes_alloc, 0)) + return REG_MISSING; + + new_nodes = re_realloc (dfa->nodes, re_token_t, new_nodes_alloc); if (BE (new_nodes == NULL, 0)) return REG_MISSING; dfa->nodes = new_nodes; new_nexts = re_realloc (dfa->nexts, Idx, new_nodes_alloc); new_indices = re_realloc (dfa->org_indices, Idx, new_nodes_alloc); - new_edests = re_xrealloc (dfa->edests, re_node_set, new_nodes_alloc); + new_edests = re_realloc (dfa->edests, re_node_set, new_nodes_alloc); new_eclosures = re_realloc (dfa->eclosures, re_node_set, new_nodes_alloc); if (BE (new_nexts == NULL || new_indices == NULL || new_edests == NULL || new_eclosures == NULL, 0)) @@ -1349,8 +1441,11 @@ re_dfa_add_node (re_dfa_t *dfa, re_token_t token) dfa->nodes[dfa->nodes_len] = token; dfa->nodes[dfa->nodes_len].constraint = 0; #ifdef RE_ENABLE_I18N + { + int type = token.type; dfa->nodes[dfa->nodes_len].accept_mb = (type == OP_PERIOD && dfa->mb_cur_max > 1) || type == COMPLEX_BRACKET; + } #endif dfa->nexts[dfa->nodes_len] = REG_MISSING; re_node_set_init_empty (dfa->edests + dfa->nodes_len); @@ -1378,9 +1473,10 @@ calc_state_hash (const re_node_set *nodes, unsigned int context) - We never return non-NULL value in case of any errors, it is for optimization. */ -static re_dfastate_t* +static re_dfastate_t * internal_function -re_acquire_state (reg_errcode_t *err, re_dfa_t *dfa, const re_node_set *nodes) +re_acquire_state (reg_errcode_t *err, const re_dfa_t *dfa, + const re_node_set *nodes) { re_hashval_t hash; re_dfastate_t *new_state; @@ -1409,13 +1505,10 @@ re_acquire_state (reg_errcode_t *err, re_dfa_t *dfa, const re_node_set *nodes) /* There are no appropriate state in the dfa, create the new one. */ new_state = create_ci_newstate (dfa, nodes, hash); - if (BE (new_state != NULL, 1)) - return new_state; - else - { - *err = REG_ESPACE; - return NULL; - } + if (BE (new_state == NULL, 0)) + *err = REG_ESPACE; + + return new_state; } /* Search for the state whose node_set is equivalent to NODES and @@ -1428,9 +1521,9 @@ re_acquire_state (reg_errcode_t *err, re_dfa_t *dfa, const re_node_set *nodes) - We never return non-NULL value in case of any errors, it is for optimization. */ -static re_dfastate_t* +static re_dfastate_t * internal_function -re_acquire_state_context (reg_errcode_t *err, re_dfa_t *dfa, +re_acquire_state_context (reg_errcode_t *err, const re_dfa_t *dfa, const re_node_set *nodes, unsigned int context) { re_hashval_t hash; @@ -1459,13 +1552,10 @@ re_acquire_state_context (reg_errcode_t *err, re_dfa_t *dfa, } /* There are no appropriate state in `dfa', create the new one. */ new_state = create_cd_newstate (dfa, nodes, context, hash); - if (BE (new_state != NULL, 1)) - return new_state; - else - { - *err = REG_ESPACE; - return NULL; - } + if (BE (new_state == NULL, 0)) + *err = REG_ESPACE; + + return new_state; } /* Finish initialization of the new state NEWSTATE, and using its hash value @@ -1473,8 +1563,8 @@ re_acquire_state_context (reg_errcode_t *err, re_dfa_t *dfa, indicates the error code if failed. */ static reg_errcode_t -internal_function -register_state (const re_dfa_t *dfa, re_dfastate_t *newstate, re_hashval_t hash) +register_state (const re_dfa_t *dfa, re_dfastate_t *newstate, + re_hashval_t hash) { struct re_state_table_entry *spot; reg_errcode_t err; @@ -1488,19 +1578,16 @@ register_state (const re_dfa_t *dfa, re_dfastate_t *newstate, re_hashval_t hash) { Idx elem = newstate->nodes.elems[i]; if (!IS_EPSILON_NODE (dfa->nodes[elem].type)) - { - bool ok = re_node_set_insert_last (&newstate->non_eps_nodes, elem); - if (BE (! ok, 0)) - return REG_ESPACE; - } + if (BE (! re_node_set_insert_last (&newstate->non_eps_nodes, elem), 0)) + return REG_ESPACE; } spot = dfa->state_table + (hash & dfa->state_hash_mask); if (BE (spot->alloc <= spot->num, 0)) { - Idx new_alloc = spot->num; - re_dfastate_t **new_array = re_x2realloc (spot->array, re_dfastate_t *, - &new_alloc); + Idx new_alloc = 2 * spot->num + 2; + re_dfastate_t **new_array = re_realloc (spot->array, re_dfastate_t *, + new_alloc); if (BE (new_array == NULL, 0)) return REG_ESPACE; spot->array = new_array; @@ -1510,6 +1597,22 @@ register_state (const re_dfa_t *dfa, re_dfastate_t *newstate, re_hashval_t hash) return REG_NOERROR; } +static void +free_state (re_dfastate_t *state) +{ + re_node_set_free (&state->non_eps_nodes); + re_node_set_free (&state->inveclosure); + if (state->entrance_nodes != &state->nodes) + { + re_node_set_free (state->entrance_nodes); + re_free (state->entrance_nodes); + } + re_node_set_free (&state->nodes); + re_free (state->word_trtable); + re_free (state->trtable); + re_free (state); +} + /* Create the new state which is independ of contexts. Return the new state if succeeded, otherwise return NULL. */ @@ -1522,7 +1625,7 @@ create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes, reg_errcode_t err; re_dfastate_t *newstate; - newstate = re_calloc (re_dfastate_t, 1); + newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1); if (BE (newstate == NULL, 0)) return NULL; err = re_node_set_init_copy (&newstate->nodes, nodes); @@ -1572,7 +1675,7 @@ create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes, reg_errcode_t err; re_dfastate_t *newstate; - newstate = re_calloc (re_dfastate_t, 1); + newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1); if (BE (newstate == NULL, 0)) return NULL; err = re_node_set_init_copy (&newstate->nodes, nodes); @@ -1637,20 +1740,3 @@ create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes, } return newstate; } - -static void -internal_function -free_state (re_dfastate_t *state) -{ - re_node_set_free (&state->non_eps_nodes); - re_node_set_free (&state->inveclosure); - if (state->entrance_nodes != &state->nodes) - { - re_node_set_free (state->entrance_nodes); - re_free (state->entrance_nodes); - } - re_node_set_free (&state->nodes); - re_free (state->word_trtable); - re_free (state->trtable); - re_free (state); -} diff --git a/lib/regex_internal.h b/gl/regex_internal.h similarity index 82% rename from lib/regex_internal.h rename to gl/regex_internal.h index a36ae4c..b0f7e65 100644 --- a/lib/regex_internal.h +++ b/gl/regex_internal.h @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . @@ -37,23 +37,20 @@ #if defined HAVE_LOCALE_H || defined _LIBC # include #endif -#if defined HAVE_WCHAR_H || defined _LIBC -# include -#endif /* HAVE_WCHAR_H || _LIBC */ -#if defined HAVE_WCTYPE_H || defined _LIBC -# include -#endif /* HAVE_WCTYPE_H || _LIBC */ + +#include +#include +#include #if defined _LIBC # include #else -# define __libc_lock_define(CLASS,NAME) # define __libc_lock_init(NAME) do { } while (0) # define __libc_lock_lock(NAME) do { } while (0) # define __libc_lock_unlock(NAME) do { } while (0) #endif /* In case that the system doesn't have isblank(). */ -#if !defined _LIBC && !defined HAVE_ISBLANK && !defined isblank +#if !defined _LIBC && !HAVE_DECL_ISBLANK && !defined isblank # define isblank(ch) ((ch) == ' ' || (ch) == '\t') #endif @@ -84,7 +81,12 @@ # define gettext_noop(String) String #endif -#if (defined MB_CUR_MAX && HAVE_LOCALE_H && HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_WCRTOMB && HAVE_MBRTOWC && HAVE_WCSCOLL) || _LIBC +/* For loser systems without the definition. */ +#ifndef SIZE_MAX +# define SIZE_MAX ((size_t) -1) +#endif + +#if (defined MB_CUR_MAX && HAVE_LOCALE_H && HAVE_WCTYPE_H && HAVE_ISWCTYPE && HAVE_WCRTOMB && HAVE_MBRTOWC && HAVE_WCSCOLL) || _LIBC # define RE_ENABLE_I18N #endif @@ -92,10 +94,16 @@ # define BE(expr, val) __builtin_expect (expr, val) #else # define BE(expr, val) (expr) +# ifdef _LIBC +# define inline +# endif #endif -/* Number of single byte character. */ -#define SBC_MAX 256 +/* Number of ASCII characters. */ +#define ASCII_CHARS 0x80 + +/* Number of single byte characters. */ +#define SBC_MAX (UCHAR_MAX + 1) #define COLL_ELEM_LEN_MAX 8 @@ -122,9 +130,6 @@ # define __attribute(arg) #endif -extern const char __re_error_msgid[] attribute_hidden; -extern const size_t __re_error_msgid_idx[] attribute_hidden; - typedef __re_idx_t Idx; /* Special return value for failure to match. */ @@ -152,15 +157,15 @@ typedef __re_size_t re_hashval_t; /* An integer used to represent a set of bits. It must be unsigned, and must be at least as wide as unsigned int. */ -typedef unsigned long int bitset_word; - -/* Maximum value of a bitset word. It must be useful in preprocessor - contexts, and must be consistent with bitset_word. */ +typedef unsigned long int bitset_word_t; +/* All bits set in a bitset_word_t. */ #define BITSET_WORD_MAX ULONG_MAX -/* Number of bits in a bitset word. Avoid greater-than-32-bit - integers and unconditional shifts by more than 31 bits, as they're - not portable. */ +/* Number of bits in a bitset_word_t. For portability to hosts with + padding bits, do not use '(sizeof (bitset_word_t) * CHAR_BIT)'; + instead, deduce it directly from BITSET_WORD_MAX. Avoid + greater-than-32-bit integers and unconditional shifts by more than + 31 bits, as they're not portable. */ #if BITSET_WORD_MAX == 0xffffffff # define BITSET_WORD_BITS 32 #elif BITSET_WORD_MAX >> 31 >> 5 == 1 @@ -182,16 +187,20 @@ typedef unsigned long int bitset_word; # if BITSET_WORD_BITS <= SBC_MAX # error "Invalid SBC_MAX" # endif +#elif BITSET_WORD_MAX == (0xffffffff + 2) * 0xffffffff +/* Work around a bug in 64-bit PGC (before version 6.1-2), where the + preprocessor mishandles large unsigned values as if they were signed. */ +# define BITSET_WORD_BITS 64 #else -# error "Add case for new bitset_word size" +# error "Add case for new bitset_word_t size" #endif -/* Number of bitset words in a bitset. */ +/* Number of bitset_word_t values in a bitset_t. */ #define BITSET_WORDS ((SBC_MAX + BITSET_WORD_BITS - 1) / BITSET_WORD_BITS) -typedef bitset_word bitset[BITSET_WORDS]; -typedef bitset_word *re_bitset_ptr_t; -typedef const bitset_word *re_const_bitset_ptr_t; +typedef bitset_word_t bitset_t[BITSET_WORDS]; +typedef bitset_word_t *re_bitset_ptr_t; +typedef const bitset_word_t *re_const_bitset_ptr_t; #define PREV_WORD_CONSTRAINT 0x0001 #define PREV_NOTWORD_CONSTRAINT 0x0002 @@ -336,7 +345,7 @@ typedef struct Idx idx; /* for BACK_REF */ re_context_type ctx_type; /* for ANCHOR */ } opr; -#if __GNUC__ >= 2 +#if __GNUC__ >= 2 && !__STRICT_ANSI__ re_token_type_t type : 8; #else re_token_type_t type; @@ -397,7 +406,7 @@ struct re_string_t the beginning of the input string. */ unsigned int tip_context; /* The translation passed as a part of an argument of re_compile_pattern. */ - unsigned REG_TRANSLATE_TYPE trans; + RE_TRANSLATE_TYPE trans; /* Copy of re_dfa_t's word_char. */ re_const_bitset_ptr_t word_char; /* true if REG_ICASE. */ @@ -434,10 +443,9 @@ static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr) #endif /* RE_ENABLE_I18N */ static void build_upper_buffer (re_string_t *pstr) internal_function; static void re_string_translate_buffer (re_string_t *pstr) internal_function; -static unsigned int re_string_context_at (const re_string_t *input, - Idx idx, int eflags) +static unsigned int re_string_context_at (const re_string_t *input, Idx idx, + int eflags) internal_function __attribute ((pure)); - #define re_string_peek_byte(pstr, offset) \ ((pstr)->mbs[(pstr)->cur_idx + offset]) #define re_string_fetch_byte(pstr) \ @@ -470,70 +478,13 @@ static unsigned int re_string_context_at (const re_string_t *input, # endif #endif -#define re_malloc(t,n) ((t *) malloc ((n) * sizeof (t))) -#define re_xmalloc(t,n) ((t *) re_xnmalloc (n, sizeof (t))) -#define re_calloc(t,n) ((t *) calloc (n, sizeof (t))) -#define re_realloc(p,t,n) ((t *) realloc (p, (n) * sizeof (t))) -#define re_xrealloc(p,t,n) ((t *) re_xnrealloc (p, n, sizeof (t))) -#define re_x2realloc(p,t,pn) ((t *) re_x2nrealloc (p, pn, sizeof (t))) -#define re_free(p) free (p) - -#ifndef SIZE_MAX -# define SIZE_MAX ((size_t) -1) +#ifndef MAX +# define MAX(a,b) ((a) < (b) ? (b) : (a)) #endif -/* Return true if an array of N objects, each of size S, cannot exist - due to size arithmetic overflow. S must be nonzero. */ -static inline bool -re_alloc_oversized (size_t n, size_t s) -{ - return BE (SIZE_MAX / s < n, 0); -} - -/* Return true if an array of (2 * N + 1) objects, each of size S, - cannot exist due to size arithmetic overflow. S must be nonzero. */ -static inline bool -re_x2alloc_oversized (size_t n, size_t s) -{ - return BE ((SIZE_MAX / s - 1) / 2 < n, 0); -} - -/* Allocate an array of N objects, each with S bytes of memory, - dynamically, with error checking. S must be nonzero. */ -static inline void * -re_xnmalloc (size_t n, size_t s) -{ - return re_alloc_oversized (n, s) ? NULL : malloc (n * s); -} - -/* Change the size of an allocated block of memory P to an array of N - objects each of S bytes, with error checking. S must be nonzero. */ -static inline void * -re_xnrealloc (void *p, size_t n, size_t s) -{ - return re_alloc_oversized (n, s) ? NULL : realloc (p, n * s); -} - -/* Reallocate a block of memory P to an array of (2 * (*PN) + 1) - objects each of S bytes, with error checking. S must be nonzero. - If the allocation is successful, set *PN to the new allocation - count and return the resulting pointer. Otherwise, return - NULL. */ -static inline void * -re_x2nrealloc (void *p, size_t *pn, size_t s) -{ - if (re_x2alloc_oversized (*pn, s)) - return NULL; - else - { - /* Add 1 in case *PN is zero. */ - size_t n1 = 2 * *pn + 1; - p = realloc (p, n1 * s); - if (BE (p != NULL, 1)) - *pn = n1; - return p; - } -} +#define re_malloc(t,n) ((t *) malloc ((n) * sizeof (t))) +#define re_realloc(p,t,n) ((t *) realloc (p, (n) * sizeof (t))) +#define re_free(p) free (p) struct bin_tree_t { @@ -664,9 +615,9 @@ typedef struct /* The string object corresponding to the input string. */ re_string_t input; #if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) - re_dfa_t *const dfa; + const re_dfa_t *const dfa; #else - re_dfa_t *dfa; + const re_dfa_t *dfa; #endif /* EFLAGS of the argument of regexec. */ int eflags; @@ -713,8 +664,8 @@ struct re_fail_stack_t struct re_dfa_t { re_token_t *nodes; - Idx nodes_alloc; - Idx nodes_len; + size_t nodes_alloc; + size_t nodes_len; Idx *nexts; Idx *org_indices; re_node_set *edests; @@ -736,8 +687,8 @@ struct re_dfa_t Idx nbackref; /* The number of backreference in this dfa. */ /* Bitmap expressing which backreference is used. */ - bitset_word used_bkref_map; - bitset_word completed_bkref_map; + bitset_word_t used_bkref_map; + bitset_word_t completed_bkref_map; unsigned int has_plural_match : 1; /* If this dfa has "multibyte node", which is a backreference or @@ -748,13 +699,15 @@ struct re_dfa_t unsigned int map_notascii : 1; unsigned int word_ops_used : 1; int mb_cur_max; - bitset word_char; + bitset_t word_char; reg_syntax_t syntax; Idx *subexp_map; #ifdef DEBUG char* re_str; #endif +#ifdef _LIBC __libc_lock_define (, lock) +#endif }; #define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set)) @@ -762,8 +715,6 @@ struct re_dfa_t (re_node_set_remove_at (set, re_node_set_contains (set, id) - 1)) #define re_node_set_empty(p) ((p)->nelem = 0) #define re_node_set_free(set) re_free ((set)->elems) - -static void free_state (re_dfastate_t *state) internal_function; typedef enum @@ -787,76 +738,76 @@ typedef struct } bracket_elem_t; -/* Inline functions for bitset operation. */ +/* Inline functions for bitset_t operation. */ static inline void -bitset_set (bitset set, Idx i) +bitset_set (bitset_t set, Idx i) { - set[i / BITSET_WORD_BITS] |= (bitset_word) 1 << i % BITSET_WORD_BITS; + set[i / BITSET_WORD_BITS] |= (bitset_word_t) 1 << i % BITSET_WORD_BITS; } static inline void -bitset_clear (bitset set, Idx i) +bitset_clear (bitset_t set, Idx i) { - set[i / BITSET_WORD_BITS] &= ~ ((bitset_word) 1 << i % BITSET_WORD_BITS); + set[i / BITSET_WORD_BITS] &= ~ ((bitset_word_t) 1 << i % BITSET_WORD_BITS); } static inline bool -bitset_contain (const bitset set, Idx i) +bitset_contain (const bitset_t set, Idx i) { return (set[i / BITSET_WORD_BITS] >> i % BITSET_WORD_BITS) & 1; } static inline void -bitset_empty (bitset set) +bitset_empty (bitset_t set) { - memset (set, 0, sizeof (bitset)); + memset (set, '\0', sizeof (bitset_t)); } static inline void -bitset_set_all (bitset set) +bitset_set_all (bitset_t set) { - memset (set, -1, sizeof (bitset_word) * (SBC_MAX / BITSET_WORD_BITS)); + memset (set, -1, sizeof (bitset_word_t) * (SBC_MAX / BITSET_WORD_BITS)); if (SBC_MAX % BITSET_WORD_BITS != 0) set[BITSET_WORDS - 1] = - ((bitset_word) 1 << SBC_MAX % BITSET_WORD_BITS) - 1; + ((bitset_word_t) 1 << SBC_MAX % BITSET_WORD_BITS) - 1; } static inline void -bitset_copy (bitset dest, const bitset src) +bitset_copy (bitset_t dest, const bitset_t src) { - memcpy (dest, src, sizeof (bitset)); + memcpy (dest, src, sizeof (bitset_t)); } static inline void -bitset_not (bitset set) +bitset_not (bitset_t set) { - int i; - for (i = 0; i < SBC_MAX / BITSET_WORD_BITS; ++i) - set[i] = ~set[i]; + int bitset_i; + for (bitset_i = 0; bitset_i < SBC_MAX / BITSET_WORD_BITS; ++bitset_i) + set[bitset_i] = ~set[bitset_i]; if (SBC_MAX % BITSET_WORD_BITS != 0) set[BITSET_WORDS - 1] = - ((((bitset_word) 1 << SBC_MAX % BITSET_WORD_BITS) - 1) + ((((bitset_word_t) 1 << SBC_MAX % BITSET_WORD_BITS) - 1) & ~set[BITSET_WORDS - 1]); } static inline void -bitset_merge (bitset dest, const bitset src) +bitset_merge (bitset_t dest, const bitset_t src) { - int i; - for (i = 0; i < BITSET_WORDS; ++i) - dest[i] |= src[i]; + int bitset_i; + for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i) + dest[bitset_i] |= src[bitset_i]; } static inline void -bitset_mask (bitset dest, const bitset src) +bitset_mask (bitset_t dest, const bitset_t src) { - int i; - for (i = 0; i < BITSET_WORDS; ++i) - dest[i] &= src[i]; + int bitset_i; + for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i) + dest[bitset_i] &= src[bitset_i]; } -#if defined RE_ENABLE_I18N +#ifdef RE_ENABLE_I18N /* Inline functions for re_string. */ static inline int internal_function __attribute ((pure)) @@ -884,11 +835,11 @@ static int internal_function __attribute ((pure)) re_string_elem_size_at (const re_string_t *pstr, Idx idx) { -#ifdef _LIBC +# ifdef _LIBC const unsigned char *p, *extra; const int32_t *table, *indirect; int32_t tmp; -# include +# include uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) @@ -903,7 +854,7 @@ re_string_elem_size_at (const re_string_t *pstr, Idx idx) return p - pstr->mbs - idx; } else -#endif /* _LIBC */ +# endif /* _LIBC */ return 1; } #endif /* RE_ENABLE_I18N */ diff --git a/lib/regexec.c b/gl/regexec.c similarity index 88% rename from lib/regexec.c rename to gl/regexec.c index a85077c..7c186aa 100644 --- a/lib/regexec.c +++ b/gl/regexec.c @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . @@ -51,68 +51,79 @@ static regoff_t re_search_stub (struct re_pattern_buffer *bufp, regoff_t range, Idx stop, struct re_registers *regs, bool ret_len) internal_function; -static unsigned re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, - Idx nregs, int regs_allocated) internal_function; +static unsigned int re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, + Idx nregs, int regs_allocated) + internal_function; static reg_errcode_t prune_impossible_nodes (re_match_context_t *mctx) internal_function; static Idx check_matching (re_match_context_t *mctx, bool fl_longest_match, - Idx *p_match_first) - internal_function; + Idx *p_match_first) internal_function; static Idx check_halt_state_context (const re_match_context_t *mctx, const re_dfastate_t *state, Idx idx) internal_function; -static void update_regs (re_dfa_t *dfa, regmatch_t *pmatch, +static void update_regs (const re_dfa_t *dfa, regmatch_t *pmatch, regmatch_t *prev_idx_match, Idx cur_node, Idx cur_idx, Idx nmatch) internal_function; static reg_errcode_t push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node, Idx nregs, regmatch_t *regs, - re_node_set *eps_via_nodes) internal_function; + re_node_set *eps_via_nodes) + internal_function; static reg_errcode_t set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch, regmatch_t *pmatch, bool fl_backtrack) internal_function; -static reg_errcode_t free_fail_stack_return (struct re_fail_stack_t *fs) internal_function; +static reg_errcode_t free_fail_stack_return (struct re_fail_stack_t *fs) + internal_function; #ifdef RE_ENABLE_I18N static int sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, - Idx node_idx, Idx str_idx, Idx max_str_idx) internal_function; + Idx node_idx, Idx str_idx, Idx max_str_idx) + internal_function; #endif /* RE_ENABLE_I18N */ -static reg_errcode_t sift_states_backward (re_match_context_t *mctx, - re_sift_context_t *sctx) internal_function; -static reg_errcode_t build_sifted_states (re_match_context_t *mctx, +static reg_errcode_t sift_states_backward (const re_match_context_t *mctx, + re_sift_context_t *sctx) + internal_function; +static reg_errcode_t build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, - re_node_set *cur_dest) internal_function; -static reg_errcode_t update_cur_sifted_state (re_match_context_t *mctx, + re_node_set *cur_dest) + internal_function; +static reg_errcode_t update_cur_sifted_state (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, - re_node_set *dest_nodes) internal_function; -static reg_errcode_t add_epsilon_src_nodes (re_dfa_t *dfa, + re_node_set *dest_nodes) + internal_function; +static reg_errcode_t add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes, - const re_node_set *candidates) internal_function; + const re_node_set *candidates) + internal_function; static bool check_dst_limits (const re_match_context_t *mctx, const re_node_set *limits, Idx dst_node, Idx dst_idx, Idx src_node, Idx src_idx) internal_function; static int check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries, Idx subexp_idx, - Idx from_node, Idx bkref_idx) internal_function; + Idx from_node, Idx bkref_idx) + internal_function; static int check_dst_limits_calc_pos (const re_match_context_t *mctx, Idx limit, Idx subexp_idx, Idx node, Idx str_idx, Idx bkref_idx) internal_function; -static reg_errcode_t check_subexp_limits (re_dfa_t *dfa, +static reg_errcode_t check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates, re_node_set *limits, struct re_backref_cache_entry *bkref_ents, Idx str_idx) internal_function; -static reg_errcode_t sift_states_bkref (re_match_context_t *mctx, +static reg_errcode_t sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx, - Idx str_idx, const re_node_set *candidates) internal_function; -static reg_errcode_t merge_state_array (re_dfa_t *dfa, re_dfastate_t **dst, - re_dfastate_t **src, Idx num) internal_function; + Idx str_idx, const re_node_set *candidates) + internal_function; +static reg_errcode_t merge_state_array (const re_dfa_t *dfa, + re_dfastate_t **dst, + re_dfastate_t **src, Idx num) + internal_function; static re_dfastate_t *find_recover_state (reg_errcode_t *err, re_match_context_t *mctx) internal_function; static re_dfastate_t *transit_state (reg_errcode_t *err, @@ -120,27 +131,33 @@ static re_dfastate_t *transit_state (reg_errcode_t *err, re_dfastate_t *state) internal_function; static re_dfastate_t *merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx, - re_dfastate_t *next_state) internal_function; + re_dfastate_t *next_state) + internal_function; static reg_errcode_t check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes, Idx str_idx) internal_function; #if 0 static re_dfastate_t *transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx, - re_dfastate_t *pstate) internal_function; + re_dfastate_t *pstate) + internal_function; #endif #ifdef RE_ENABLE_I18N static reg_errcode_t transit_state_mb (re_match_context_t *mctx, - re_dfastate_t *pstate) internal_function; + re_dfastate_t *pstate) + internal_function; #endif /* RE_ENABLE_I18N */ static reg_errcode_t transit_state_bkref (re_match_context_t *mctx, - const re_node_set *nodes) internal_function; + const re_node_set *nodes) + internal_function; static reg_errcode_t get_subexp (re_match_context_t *mctx, - Idx bkref_node, Idx bkref_str_idx) internal_function; + Idx bkref_node, Idx bkref_str_idx) + internal_function; static reg_errcode_t get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top, re_sub_match_last_t *sub_last, - Idx bkref_node, Idx bkref_str) internal_function; + Idx bkref_node, Idx bkref_str) + internal_function; static Idx find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes, Idx subexp_idx, int type) internal_function; static reg_errcode_t check_arrival (re_match_context_t *mctx, @@ -150,35 +167,41 @@ static reg_errcode_t check_arrival (re_match_context_t *mctx, static reg_errcode_t check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx, re_node_set *cur_nodes, - re_node_set *next_nodes) internal_function; -static reg_errcode_t check_arrival_expand_ecl (re_dfa_t *dfa, + re_node_set *next_nodes) + internal_function; +static reg_errcode_t check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes, - Idx ex_subexp, int type) internal_function; -static reg_errcode_t check_arrival_expand_ecl_sub (re_dfa_t *dfa, + Idx ex_subexp, int type) + internal_function; +static reg_errcode_t check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes, Idx target, Idx ex_subexp, int type) internal_function; static reg_errcode_t expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes, Idx cur_str, - Idx subexp_num, int type) internal_function; -static bool build_trtable (re_dfa_t *dfa, + Idx subexp_num, int type) + internal_function; +static bool build_trtable (const re_dfa_t *dfa, re_dfastate_t *state) internal_function; #ifdef RE_ENABLE_I18N -static int check_node_accept_bytes (re_dfa_t *dfa, Idx node_idx, - const re_string_t *input, Idx idx) internal_function; +static int check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, + const re_string_t *input, Idx idx) + internal_function; # ifdef _LIBC static unsigned int find_collation_sequence_value (const unsigned char *mbs, - size_t name_len) internal_function; + size_t name_len) + internal_function; # endif /* _LIBC */ #endif /* RE_ENABLE_I18N */ static Idx group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, re_node_set *states_node, - bitset *states_ch) internal_function; + bitset_t *states_ch) internal_function; static bool check_node_accept (const re_match_context_t *mctx, const re_token_t *node, Idx idx) internal_function; -static reg_errcode_t extend_buffers (re_match_context_t *mctx) internal_function; +static reg_errcode_t extend_buffers (re_match_context_t *mctx) + internal_function; /* Entry point for POSIX code. */ @@ -197,13 +220,17 @@ static reg_errcode_t extend_buffers (re_match_context_t *mctx) internal_function We return 0 if we find a match and REG_NOMATCH if not. */ int -regexec (const regex_t *__restrict preg, const char *__restrict string, - size_t nmatch, regmatch_t pmatch[], int eflags) +regexec (preg, string, nmatch, pmatch, eflags) + const regex_t *__restrict preg; + const char *__restrict string; + size_t nmatch; + regmatch_t pmatch[]; + int eflags; { reg_errcode_t err; Idx start, length; #ifdef _LIBC - re_dfa_t *dfa = (re_dfa_t *) preg->re_buffer; + re_dfa_t *dfa = (re_dfa_t *) preg->buffer; #endif if (eflags & ~(REG_NOTBOL | REG_NOTEOL | REG_STARTEND)) @@ -221,7 +248,7 @@ regexec (const regex_t *__restrict preg, const char *__restrict string, } __libc_lock_lock (dfa->lock); - if (preg->re_no_sub) + if (preg->no_sub) err = re_search_internal (preg, string, length, start, length, length, 0, NULL, eflags); else @@ -271,8 +298,8 @@ compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0); the first STOP characters of the concatenation of the strings should be concerned. - If REGS is not NULL, and BUFP->re_no_sub is not set, the offsets of the match - and all groups is stroed in REGS. (For the "_2" variants, the offsets are + If REGS is not NULL, and BUFP->no_sub is not set, the offsets of the match + and all groups is stored in REGS. (For the "_2" variants, the offsets are computed relative to the concatenation, not relative to the individual strings.) @@ -281,8 +308,11 @@ compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0); match was found and -2 indicates an internal error. */ regoff_t -re_match (struct re_pattern_buffer *bufp, const char *string, - Idx length, Idx start, struct re_registers *regs) +re_match (bufp, string, length, start, regs) + struct re_pattern_buffer *bufp; + const char *string; + Idx length, start; + struct re_registers *regs; { return re_search_stub (bufp, string, length, start, 0, length, regs, true); } @@ -291,8 +321,12 @@ weak_alias (__re_match, re_match) #endif regoff_t -re_search (struct re_pattern_buffer *bufp, const char *string, - Idx length, Idx start, regoff_t range, struct re_registers *regs) +re_search (bufp, string, length, start, range, regs) + struct re_pattern_buffer *bufp; + const char *string; + Idx length, start; + regoff_t range; + struct re_registers *regs; { return re_search_stub (bufp, string, length, start, range, length, regs, false); @@ -302,10 +336,11 @@ weak_alias (__re_search, re_search) #endif regoff_t -re_match_2 (struct re_pattern_buffer *bufp, - const char *string1, Idx length1, - const char *string2, Idx length2, - Idx start, struct re_registers *regs, Idx stop) +re_match_2 (bufp, string1, length1, string2, length2, start, regs, stop) + struct re_pattern_buffer *bufp; + const char *string1, *string2; + Idx length1, length2, start, stop; + struct re_registers *regs; { return re_search_2_stub (bufp, string1, length1, string2, length2, start, 0, regs, stop, true); @@ -315,10 +350,12 @@ weak_alias (__re_match_2, re_match_2) #endif regoff_t -re_search_2 (struct re_pattern_buffer *bufp, - const char *string1, Idx length1, - const char *string2, Idx length2, - Idx start, regoff_t range, struct re_registers *regs, Idx stop) +re_search_2 (bufp, string1, length1, string2, length2, start, range, regs, stop) + struct re_pattern_buffer *bufp; + const char *string1, *string2; + Idx length1, length2, start, stop; + regoff_t range; + struct re_registers *regs; { return re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs, stop, false); @@ -351,8 +388,12 @@ re_search_2_stub (struct re_pattern_buffer *bufp, if (BE (s == NULL, 0)) return -2; +#ifdef _LIBC + memcpy (__mempcpy (s, string1, length1), string2, length2); +#else memcpy (s, string1, length1); memcpy (s + length1, string2, length2); +#endif str = s; } else @@ -384,59 +425,37 @@ re_search_stub (struct re_pattern_buffer *bufp, regoff_t rval; int eflags = 0; #ifdef _LIBC - re_dfa_t *dfa = (re_dfa_t *) bufp->re_buffer; + re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; #endif Idx last_start = start + range; /* Check for out-of-range. */ if (BE (start < 0 || start > length, 0)) return -1; - if (sizeof start < sizeof range) - { - regoff_t length_offset = length; - regoff_t start_offset = start; - if (BE (length_offset - start_offset < range, 0)) - last_start = length; - else if (BE (range < - start_offset, 0)) - last_start = 0; - } - else - { - if (BE ((last_start < start) != (range < 0), 0)) - { - /* Overflow occurred when computing last_start; substitute - the extreme value. */ - last_start = range < 0 ? 0 : length; - } - else - { - if (BE (length < last_start, 0)) - last_start = length; - else if (BE (last_start < 0, 0)) - last_start = 0; - } - } + if (BE (length < last_start || (0 <= range && last_start < start), 0)) + last_start = length; + else if (BE (last_start < 0 || (range < 0 && start <= last_start), 0)) + last_start = 0; __libc_lock_lock (dfa->lock); - eflags |= (bufp->re_not_bol) ? REG_NOTBOL : 0; - eflags |= (bufp->re_not_eol) ? REG_NOTEOL : 0; + eflags |= (bufp->not_bol) ? REG_NOTBOL : 0; + eflags |= (bufp->not_eol) ? REG_NOTEOL : 0; /* Compile fastmap if we haven't yet. */ - if (start < last_start && bufp->re_fastmap != NULL - && !bufp->re_fastmap_accurate) + if (start < last_start && bufp->fastmap != NULL && !bufp->fastmap_accurate) re_compile_fastmap (bufp); - if (BE (bufp->re_no_sub, 0)) + if (BE (bufp->no_sub, 0)) regs = NULL; /* We need at least 1 register. */ if (regs == NULL) nregs = 1; - else if (BE (bufp->re_regs_allocated == REG_FIXED - && regs->rm_num_regs <= bufp->re_nsub, 0)) + else if (BE (bufp->regs_allocated == REGS_FIXED + && regs->num_regs <= bufp->re_nsub, 0)) { - nregs = regs->rm_num_regs; + nregs = regs->num_regs; if (BE (nregs < 1, 0)) { /* Nothing can be copied to regs. */ @@ -446,7 +465,7 @@ re_search_stub (struct re_pattern_buffer *bufp, } else nregs = bufp->re_nsub + 1; - pmatch = re_xmalloc (regmatch_t, nregs); + pmatch = re_malloc (regmatch_t, nregs); if (BE (pmatch == NULL, 0)) { rval = -2; @@ -464,9 +483,9 @@ re_search_stub (struct re_pattern_buffer *bufp, else if (regs != NULL) { /* If caller wants register contents data back, copy them. */ - bufp->re_regs_allocated = re_copy_regs (regs, pmatch, nregs, - bufp->re_regs_allocated); - if (BE (bufp->re_regs_allocated == REG_UNALLOCATED, 0)) + bufp->regs_allocated = re_copy_regs (regs, pmatch, nregs, + bufp->regs_allocated); + if (BE (bufp->regs_allocated == REGS_UNALLOCATED, 0)) rval = -2; } @@ -486,58 +505,68 @@ re_search_stub (struct re_pattern_buffer *bufp, return rval; } -static unsigned +static unsigned int internal_function re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs, int regs_allocated) { - int rval = REG_REALLOCATE; + int rval = REGS_REALLOCATE; Idx i; Idx need_regs = nregs + 1; - /* We need one extra element beyond `rm_num_regs' for the `-1' marker GNU code + /* We need one extra element beyond `num_regs' for the `-1' marker GNU code uses. */ /* Have the register data arrays been allocated? */ - if (regs_allocated == REG_UNALLOCATED) + if (regs_allocated == REGS_UNALLOCATED) { /* No. So allocate them with malloc. */ - regs->rm_start = re_xmalloc (regoff_t, need_regs); - regs->rm_end = re_malloc (regoff_t, need_regs); - if (BE (regs->rm_start == NULL, 0) || BE (regs->rm_end == NULL, 0)) - return REG_UNALLOCATED; - regs->rm_num_regs = need_regs; + regs->start = re_malloc (regoff_t, need_regs); + if (BE (regs->start == NULL, 0)) + return REGS_UNALLOCATED; + regs->end = re_malloc (regoff_t, need_regs); + if (BE (regs->end == NULL, 0)) + { + re_free (regs->start); + return REGS_UNALLOCATED; + } + regs->num_regs = need_regs; } - else if (regs_allocated == REG_REALLOCATE) + else if (regs_allocated == REGS_REALLOCATE) { /* Yes. If we need more elements than were already allocated, reallocate them. If we need fewer, just leave it alone. */ - if (BE (need_regs > regs->rm_num_regs, 0)) + if (BE (need_regs > regs->num_regs, 0)) { - regoff_t *new_start = - re_xrealloc (regs->rm_start, regoff_t, need_regs); - regoff_t *new_end = re_realloc (regs->rm_end, regoff_t, need_regs); - if (BE (new_start == NULL, 0) || BE (new_end == NULL, 0)) - return REG_UNALLOCATED; - regs->rm_start = new_start; - regs->rm_end = new_end; - regs->rm_num_regs = need_regs; + regoff_t *new_start = re_realloc (regs->start, regoff_t, need_regs); + regoff_t *new_end; + if (BE (new_start == NULL, 0)) + return REGS_UNALLOCATED; + new_end = re_realloc (regs->end, regoff_t, need_regs); + if (BE (new_end == NULL, 0)) + { + re_free (new_start); + return REGS_UNALLOCATED; + } + regs->start = new_start; + regs->end = new_end; + regs->num_regs = need_regs; } } else { - assert (regs_allocated == REG_FIXED); - /* This function may not be called with REG_FIXED and nregs too big. */ - assert (regs->rm_num_regs >= nregs); - rval = REG_FIXED; + assert (regs_allocated == REGS_FIXED); + /* This function may not be called with REGS_FIXED and nregs too big. */ + assert (regs->num_regs >= nregs); + rval = REGS_FIXED; } /* Copy the regs. */ for (i = 0; i < nregs; ++i) { - regs->rm_start[i] = pmatch[i].rm_so; - regs->rm_end[i] = pmatch[i].rm_eo; + regs->start[i] = pmatch[i].rm_so; + regs->end[i] = pmatch[i].rm_eo; } - for ( ; i < regs->rm_num_regs; ++i) - regs->rm_start[i] = regs->rm_end[i] = -1; + for ( ; i < regs->num_regs; ++i) + regs->start[i] = regs->end[i] = -1; return rval; } @@ -556,21 +585,24 @@ re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs, freeing the old data. */ void -re_set_registers (struct re_pattern_buffer *bufp, struct re_registers *regs, - __re_size_t num_regs, regoff_t *starts, regoff_t *ends) +re_set_registers (bufp, regs, num_regs, starts, ends) + struct re_pattern_buffer *bufp; + struct re_registers *regs; + __re_size_t num_regs; + regoff_t *starts, *ends; { if (num_regs) { - bufp->re_regs_allocated = REG_REALLOCATE; - regs->rm_num_regs = num_regs; - regs->rm_start = starts; - regs->rm_end = ends; + bufp->regs_allocated = REGS_REALLOCATE; + regs->num_regs = num_regs; + regs->start = starts; + regs->end = ends; } else { - bufp->re_regs_allocated = REG_UNALLOCATED; - regs->rm_num_regs = 0; - regs->rm_start = regs->rm_end = NULL; + bufp->regs_allocated = REGS_UNALLOCATED; + regs->num_regs = 0; + regs->start = regs->end = NULL; } } #ifdef _LIBC @@ -585,7 +617,8 @@ int # ifdef _LIBC weak_function # endif -re_exec (const char *s) +re_exec (s) + const char *s; { return 0 == regexec (&re_comp_buf, s, 0, NULL, 0); } @@ -611,12 +644,13 @@ re_search_internal (const regex_t *preg, int eflags) { reg_errcode_t err; - re_dfa_t *dfa = (re_dfa_t *) preg->re_buffer; + const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer; Idx left_lim, right_lim; int incr; bool fl_longest_match; int match_kind; - Idx match_first, match_last = REG_MISSING; + Idx match_first; + Idx match_last = REG_MISSING; Idx extra_nmatch; bool sb; int ch; @@ -625,11 +659,10 @@ re_search_internal (const regex_t *preg, #else re_match_context_t mctx; #endif - char *fastmap = ((preg->re_fastmap != NULL && preg->re_fastmap_accurate - && start != last_start && !preg->re_can_be_null) - ? preg->re_fastmap : NULL); - unsigned REG_TRANSLATE_TYPE t = - (unsigned REG_TRANSLATE_TYPE) preg->re_translate; + char *fastmap = ((preg->fastmap != NULL && preg->fastmap_accurate + && start != last_start && !preg->can_be_null) + ? preg->fastmap : NULL); + RE_TRANSLATE_TYPE t = preg->translate; #if !(defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) memset (&mctx, '\0', sizeof (re_match_context_t)); @@ -640,7 +673,7 @@ re_search_internal (const regex_t *preg, nmatch -= extra_nmatch; /* Check if the DFA haven't been compiled. */ - if (BE (preg->re_used == 0 || dfa->init_state == NULL + if (BE (preg->used == 0 || dfa->init_state == NULL || dfa->init_state_word == NULL || dfa->init_state_nl == NULL || dfa->init_state_begbuf == NULL, 0)) return REG_NOMATCH; @@ -651,12 +684,12 @@ re_search_internal (const regex_t *preg, #endif /* If initial states with non-begbuf contexts have no elements, - the regex must be anchored. If preg->re_newline_anchor is set, + the regex must be anchored. If preg->newline_anchor is set, we'll never use init_state_nl, so do not check it. */ if (dfa->init_state->nodes.nelem == 0 && dfa->init_state_word->nodes.nelem == 0 && (dfa->init_state_nl->nodes.nelem == 0 - || !preg->re_newline_anchor)) + || !preg->newline_anchor)) { if (start != 0 && last_start != 0) return REG_NOMATCH; @@ -667,13 +700,12 @@ re_search_internal (const regex_t *preg, fl_longest_match = (nmatch != 0 || dfa->nbackref); err = re_string_allocate (&mctx.input, string, length, dfa->nodes_len + 1, - preg->re_translate, - preg->re_syntax & REG_IGNORE_CASE, dfa); + preg->translate, preg->syntax & RE_ICASE, dfa); if (BE (err != REG_NOERROR, 0)) goto free_return; mctx.input.stop = stop; mctx.input.raw_stop = stop; - mctx.input.newline_anchor = preg->re_newline_anchor; + mctx.input.newline_anchor = preg->newline_anchor; err = match_ctx_init (&mctx, eflags, dfa->nbackref * 2); if (BE (err != REG_NOERROR, 0)) @@ -685,7 +717,14 @@ re_search_internal (const regex_t *preg, multi character collating element. */ if (nmatch > 1 || dfa->has_mb_node) { - mctx.state_log = re_xmalloc (re_dfastate_t *, mctx.input.bufs_len + 1); + /* Avoid overflow. */ + if (BE (SIZE_MAX / sizeof (re_dfastate_t *) <= mctx.input.bufs_len, 0)) + { + err = REG_ESPACE; + goto free_return; + } + + mctx.state_log = re_malloc (re_dfastate_t *, mctx.input.bufs_len + 1); if (BE (mctx.state_log == NULL, 0)) { err = REG_ESPACE; @@ -706,7 +745,7 @@ re_search_internal (const regex_t *preg, sb = dfa->mb_cur_max == 1; match_kind = (fastmap - ? ((sb || !(preg->re_syntax & REG_IGNORE_CASE || t) ? 4 : 0) + ? ((sb || !(preg->syntax & RE_ICASE || t) ? 4 : 0) | (start <= last_start ? 2 : 0) | (t != NULL ? 1 : 0)) : 8); @@ -828,13 +867,13 @@ re_search_internal (const regex_t *preg, else { mctx.match_last = match_last; - if ((!preg->re_no_sub && nmatch > 1) || dfa->nbackref) + if ((!preg->no_sub && nmatch > 1) || dfa->nbackref) { re_dfastate_t *pstate = mctx.state_log[match_last]; mctx.last_node = check_halt_state_context (&mctx, pstate, match_last); } - if ((!preg->re_no_sub && nmatch > 1 && dfa->has_plural_match) + if ((!preg->no_sub && nmatch > 1 && dfa->has_plural_match) || dfa->nbackref) { err = prune_impossible_nodes (&mctx); @@ -873,7 +912,7 @@ re_search_internal (const regex_t *preg, the maximum possible regoff_t value. We need a new error code REG_OVERFLOW. */ - if (!preg->re_no_sub && nmatch > 1) + if (!preg->no_sub && nmatch > 1) { err = set_regs (preg, &mctx, nmatch, pmatch, dfa->has_plural_match && dfa->nbackref > 0); @@ -934,7 +973,7 @@ static reg_errcode_t internal_function prune_impossible_nodes (re_match_context_t *mctx) { - re_dfa_t *const dfa = mctx->dfa; + const re_dfa_t *const dfa = mctx->dfa; Idx halt_node, match_last; reg_errcode_t ret; re_dfastate_t **sifted_states; @@ -945,7 +984,12 @@ prune_impossible_nodes (re_match_context_t *mctx) #endif match_last = mctx->match_last; halt_node = mctx->last_node; - sifted_states = re_xmalloc (re_dfastate_t *, match_last + 1); + + /* Avoid overflow. */ + if (BE (SIZE_MAX / sizeof (re_dfastate_t *) <= match_last, 0)) + return REG_ESPACE; + + sifted_states = re_malloc (re_dfastate_t *, match_last + 1); if (BE (sifted_states == NULL, 0)) { ret = REG_ESPACE; @@ -953,7 +997,7 @@ prune_impossible_nodes (re_match_context_t *mctx) } if (dfa->nbackref) { - lim_states = re_xmalloc (re_dfastate_t *, match_last + 1); + lim_states = re_malloc (re_dfastate_t *, match_last + 1); if (BE (lim_states == NULL, 0)) { ret = REG_ESPACE; @@ -1021,7 +1065,7 @@ __attribute ((always_inline)) internal_function acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx, Idx idx) { - re_dfa_t *const dfa = mctx->dfa; + const re_dfa_t *const dfa = mctx->dfa; if (dfa->init_state->has_constraint) { unsigned int context; @@ -1063,7 +1107,7 @@ internal_function check_matching (re_match_context_t *mctx, bool fl_longest_match, Idx *p_match_first) { - re_dfa_t *const dfa = mctx->dfa; + const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; Idx match = 0; Idx match_last = REG_MISSING; @@ -1233,11 +1277,11 @@ check_halt_state_context (const re_match_context_t *mctx, static Idx internal_function -proceed_next_node (const re_match_context_t *mctx, - Idx nregs, regmatch_t *regs, Idx *pidx, Idx node, - re_node_set *eps_via_nodes, struct re_fail_stack_t *fs) +proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs, + Idx *pidx, Idx node, re_node_set *eps_via_nodes, + struct re_fail_stack_t *fs) { - re_dfa_t *const dfa = mctx->dfa; + const re_dfa_t *const dfa = mctx->dfa; Idx i; bool ok; if (IS_EPSILON_NODE (dfa->nodes[node].type)) @@ -1342,15 +1386,17 @@ push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node, Idx num = fs->num++; if (fs->num == fs->alloc) { - struct re_fail_stack_ent_t *new_array = - re_x2realloc (fs->stack, struct re_fail_stack_ent_t, &fs->alloc); + struct re_fail_stack_ent_t *new_array; + new_array = realloc (fs->stack, (sizeof (struct re_fail_stack_ent_t) + * fs->alloc * 2)); if (new_array == NULL) return REG_ESPACE; + fs->alloc *= 2; fs->stack = new_array; } fs->stack[num].idx = str_idx; fs->stack[num].node = dest_node; - fs->stack[num].regs = re_xmalloc (regmatch_t, nregs); + fs->stack[num].regs = re_malloc (regmatch_t, nregs); if (fs->stack[num].regs == NULL) return REG_ESPACE; memcpy (fs->stack[num].regs, regs, sizeof (regmatch_t) * nregs); @@ -1360,8 +1406,8 @@ push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node, static Idx internal_function -pop_fail_stack (struct re_fail_stack_t *fs, Idx *pidx, - Idx nregs, regmatch_t *regs, re_node_set *eps_via_nodes) +pop_fail_stack (struct re_fail_stack_t *fs, Idx *pidx, Idx nregs, + regmatch_t *regs, re_node_set *eps_via_nodes) { Idx num = --fs->num; assert (REG_VALID_INDEX (num)); @@ -1380,10 +1426,10 @@ pop_fail_stack (struct re_fail_stack_t *fs, Idx *pidx, static reg_errcode_t internal_function -set_regs (const regex_t *preg, const re_match_context_t *mctx, - size_t nmatch, regmatch_t *pmatch, bool fl_backtrack) +set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch, + regmatch_t *pmatch, bool fl_backtrack) { - re_dfa_t *dfa = (re_dfa_t *) preg->re_buffer; + const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer; Idx idx, cur_node; re_node_set eps_via_nodes; struct re_fail_stack_t *fs; @@ -1398,7 +1444,7 @@ set_regs (const regex_t *preg, const re_match_context_t *mctx, if (fl_backtrack) { fs = &fs_body; - fs->stack = re_xmalloc (struct re_fail_stack_ent_t, fs->alloc); + fs->stack = re_malloc (struct re_fail_stack_ent_t, fs->alloc); if (fs->stack == NULL) return REG_ESPACE; } @@ -1408,11 +1454,6 @@ set_regs (const regex_t *preg, const re_match_context_t *mctx, cur_node = dfa->init_node; re_node_set_init_empty (&eps_via_nodes); - if (re_alloc_oversized (nmatch, sizeof (regmatch_t))) - { - free_fail_stack_return (fs); - return REG_ESPACE; - } if (__libc_use_alloca (nmatch * sizeof (regmatch_t))) prev_idx_match = (regmatch_t *) alloca (nmatch * sizeof (regmatch_t)); else @@ -1509,8 +1550,8 @@ free_fail_stack_return (struct re_fail_stack_t *fs) static void internal_function -update_regs (re_dfa_t *dfa, regmatch_t *pmatch, regmatch_t *prev_idx_match, - Idx cur_node, Idx cur_idx, Idx nmatch) +update_regs (const re_dfa_t *dfa, regmatch_t *pmatch, + regmatch_t *prev_idx_match, Idx cur_node, Idx cur_idx, Idx nmatch) { int type = dfa->nodes[cur_node].type; if (type == OP_OPEN_SUBEXP) @@ -1581,7 +1622,7 @@ update_regs (re_dfa_t *dfa, regmatch_t *pmatch, regmatch_t *prev_idx_match, static reg_errcode_t internal_function -sift_states_backward (re_match_context_t *mctx, re_sift_context_t *sctx) +sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx) { reg_errcode_t err; int null_cnt = 0; @@ -1639,11 +1680,11 @@ sift_states_backward (re_match_context_t *mctx, re_sift_context_t *sctx) static reg_errcode_t internal_function -build_sifted_states (re_match_context_t *mctx, re_sift_context_t *sctx, +build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, re_node_set *cur_dest) { - re_dfa_t *const dfa = mctx->dfa; - re_node_set *cur_src = &mctx->state_log[str_idx]->non_eps_nodes; + const re_dfa_t *const dfa = mctx->dfa; + const re_node_set *cur_src = &mctx->state_log[str_idx]->non_eps_nodes; Idx i; /* Then build the next sifted state. @@ -1726,8 +1767,8 @@ clean_state_log_if_needed (re_match_context_t *mctx, Idx next_state_log_idx) static reg_errcode_t internal_function -merge_state_array (re_dfa_t *dfa, re_dfastate_t **dst, re_dfastate_t **src, - Idx num) +merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst, + re_dfastate_t **src, Idx num) { Idx st_idx; reg_errcode_t err; @@ -1753,11 +1794,12 @@ merge_state_array (re_dfa_t *dfa, re_dfastate_t **dst, re_dfastate_t **src, static reg_errcode_t internal_function -update_cur_sifted_state (re_match_context_t *mctx, re_sift_context_t *sctx, - Idx str_idx, re_node_set *dest_nodes) +update_cur_sifted_state (const re_match_context_t *mctx, + re_sift_context_t *sctx, Idx str_idx, + re_node_set *dest_nodes) { - re_dfa_t *const dfa = mctx->dfa; - reg_errcode_t err; + const re_dfa_t *const dfa = mctx->dfa; + reg_errcode_t err = REG_NOERROR; const re_node_set *candidates; candidates = ((mctx->state_log[str_idx] == NULL) ? NULL : &mctx->state_log[str_idx]->nodes); @@ -1800,7 +1842,7 @@ update_cur_sifted_state (re_match_context_t *mctx, re_sift_context_t *sctx, static reg_errcode_t internal_function -add_epsilon_src_nodes (re_dfa_t *dfa, re_node_set *dest_nodes, +add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates) { reg_errcode_t err = REG_NOERROR; @@ -1825,7 +1867,7 @@ add_epsilon_src_nodes (re_dfa_t *dfa, re_node_set *dest_nodes, static reg_errcode_t internal_function -sub_epsilon_src_nodes (re_dfa_t *dfa, Idx node, re_node_set *dest_nodes, +sub_epsilon_src_nodes (const re_dfa_t *dfa, Idx node, re_node_set *dest_nodes, const re_node_set *candidates) { Idx ecl_idx; @@ -1877,7 +1919,7 @@ internal_function check_dst_limits (const re_match_context_t *mctx, const re_node_set *limits, Idx dst_node, Idx dst_idx, Idx src_node, Idx src_idx) { - re_dfa_t *const dfa = mctx->dfa; + const re_dfa_t *const dfa = mctx->dfa; Idx lim_idx, src_pos, dst_pos; Idx dst_bkref_idx = search_cur_bkref_entry (mctx, dst_idx); @@ -1913,8 +1955,8 @@ internal_function check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries, Idx subexp_idx, Idx from_node, Idx bkref_idx) { - re_dfa_t *const dfa = mctx->dfa; - re_node_set *eclosures = dfa->eclosures + from_node; + const re_dfa_t *const dfa = mctx->dfa; + const re_node_set *eclosures = dfa->eclosures + from_node; Idx node_idx; /* Else, we are on the boundary: examine the nodes on the epsilon @@ -1938,7 +1980,7 @@ check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries, if (subexp_idx < BITSET_WORD_BITS && !(ent->eps_reachable_subexps_map - & ((bitset_word) 1 << subexp_idx))) + & ((bitset_word_t) 1 << subexp_idx))) continue; /* Recurse trying to reach the OP_OPEN_SUBEXP and @@ -1965,8 +2007,8 @@ check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries, return 0; if (subexp_idx < BITSET_WORD_BITS) - ent->eps_reachable_subexps_map &= - ~ ((bitset_word) 1 << subexp_idx); + ent->eps_reachable_subexps_map + &= ~((bitset_word_t) 1 << subexp_idx); } while (ent++->more); } @@ -1992,9 +2034,9 @@ check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries, static int internal_function -check_dst_limits_calc_pos (const re_match_context_t *mctx, - Idx limit, Idx subexp_idx, - Idx from_node, Idx str_idx, Idx bkref_idx) +check_dst_limits_calc_pos (const re_match_context_t *mctx, Idx limit, + Idx subexp_idx, Idx from_node, Idx str_idx, + Idx bkref_idx) { struct re_backref_cache_entry *lim = mctx->bkref_ents + limit; int boundaries; @@ -2022,7 +2064,7 @@ check_dst_limits_calc_pos (const re_match_context_t *mctx, static reg_errcode_t internal_function -check_subexp_limits (re_dfa_t *dfa, re_node_set *dest_nodes, +check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates, re_node_set *limits, struct re_backref_cache_entry *bkref_ents, Idx str_idx) { @@ -2110,10 +2152,10 @@ check_subexp_limits (re_dfa_t *dfa, re_node_set *dest_nodes, static reg_errcode_t internal_function -sift_states_bkref (re_match_context_t *mctx, re_sift_context_t *sctx, +sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, const re_node_set *candidates) { - re_dfa_t *const dfa = mctx->dfa; + const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; Idx node_idx, node; re_sift_context_t local_sctx; @@ -2141,8 +2183,10 @@ sift_states_bkref (re_match_context_t *mctx, re_sift_context_t *sctx, enabled_idx = first_idx; do { + Idx subexp_len; + Idx to_idx; + Idx dst_node; bool ok; - Idx subexp_len, to_idx, dst_node; re_dfastate_t *cur_state; if (entry->node != node) @@ -2211,7 +2255,7 @@ internal_function sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx node_idx, Idx str_idx, Idx max_str_idx) { - re_dfa_t *const dfa = mctx->dfa; + const re_dfa_t *const dfa = mctx->dfa; int naccepted; /* Check the node can accept `multi byte'. */ naccepted = check_node_accept_bytes (dfa, node_idx, &mctx->input, str_idx); @@ -2299,7 +2343,7 @@ internal_function merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *next_state) { - re_dfa_t *const dfa = mctx->dfa; + const re_dfa_t *const dfa = mctx->dfa; Idx cur_idx = re_string_cur_idx (&mctx->input); if (cur_idx > mctx->state_log_top) @@ -2377,7 +2421,7 @@ static re_dfastate_t * internal_function find_recover_state (reg_errcode_t *err, re_match_context_t *mctx) { - re_dfastate_t *cur_state = NULL; + re_dfastate_t *cur_state; do { Idx max = mctx->state_log_top; @@ -2409,7 +2453,7 @@ internal_function check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes, Idx str_idx) { - re_dfa_t *const dfa = mctx->dfa; + const re_dfa_t *const dfa = mctx->dfa; Idx node_idx; reg_errcode_t err; @@ -2424,7 +2468,7 @@ check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes, if (dfa->nodes[node].type == OP_OPEN_SUBEXP && dfa->nodes[node].opr.idx < BITSET_WORD_BITS && (dfa->used_bkref_map - & ((bitset_word) 1 << dfa->nodes[node].opr.idx))) + & ((bitset_word_t) 1 << dfa->nodes[node].opr.idx))) { err = match_ctx_add_subtop (mctx, node, str_idx); if (BE (err != REG_NOERROR, 0)) @@ -2442,7 +2486,7 @@ static re_dfastate_t * transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *state) { - re_dfa_t *const dfa = mctx->dfa; + const re_dfa_t *const dfa = mctx->dfa; re_node_set next_nodes; re_dfastate_t *next_state; Idx node_cnt, cur_str_idx = re_string_cur_idx (&mctx->input); @@ -2481,7 +2525,7 @@ static reg_errcode_t internal_function transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate) { - re_dfa_t *const dfa = mctx->dfa; + const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; Idx i; @@ -2535,7 +2579,8 @@ transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate) if (BE (err != REG_NOERROR, 0)) return err; } - context = re_string_context_at (&mctx->input, dest_idx - 1, mctx->eflags); + context = re_string_context_at (&mctx->input, dest_idx - 1, + mctx->eflags); mctx->state_log[dest_idx] = re_acquire_state_context (&err, dfa, &dest_nodes, context); if (dest_state != NULL) @@ -2551,7 +2596,7 @@ static reg_errcode_t internal_function transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes) { - re_dfa_t *const dfa = mctx->dfa; + const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; Idx i; Idx cur_str_idx = re_string_cur_idx (&mctx->input); @@ -2665,14 +2710,15 @@ static reg_errcode_t internal_function get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx) { - re_dfa_t *const dfa = mctx->dfa; + const re_dfa_t *const dfa = mctx->dfa; Idx subexp_num, sub_top_idx; const char *buf = (const char *) re_string_get_buffer (&mctx->input); /* Return if we have already checked BKREF_NODE at BKREF_STR_IDX. */ Idx cache_idx = search_cur_bkref_entry (mctx, bkref_str_idx); if (cache_idx != REG_MISSING) { - const struct re_backref_cache_entry *entry = mctx->bkref_ents + cache_idx; + const struct re_backref_cache_entry *entry + = mctx->bkref_ents + cache_idx; do if (entry->node == bkref_node) return REG_NOERROR; /* We already checked it. */ @@ -2719,7 +2765,8 @@ get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx) buf = (const char *) re_string_get_buffer (&mctx->input); } if (memcmp (buf + bkref_str_off, buf + sl_str, sl_str_diff) != 0) - break; /* We don't need to search this sub expression any more. */ + /* We don't need to search this sub expression any more. */ + break; } bkref_str_off += sl_str_diff; sl_str += sl_str_diff; @@ -2771,20 +2818,22 @@ get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx) continue; /* Does this state have a ')' of the sub expression? */ nodes = &mctx->state_log[sl_str]->nodes; - cls_node = find_subexp_node (dfa, nodes, subexp_num, OP_CLOSE_SUBEXP); + cls_node = find_subexp_node (dfa, nodes, subexp_num, + OP_CLOSE_SUBEXP); if (cls_node == REG_MISSING) continue; /* No. */ if (sub_top->path == NULL) { - sub_top->path = re_calloc (state_array_t, - sl_str - sub_top->str_idx + 1); + sub_top->path = calloc (sizeof (state_array_t), + sl_str - sub_top->str_idx + 1); if (sub_top->path == NULL) return REG_ESPACE; } /* Can the OP_OPEN_SUBEXP node arrive the OP_CLOSE_SUBEXP node in the current context? */ err = check_arrival (mctx, sub_top->path, sub_top->node, - sub_top->str_idx, cls_node, sl_str, OP_CLOSE_SUBEXP); + sub_top->str_idx, cls_node, sl_str, + OP_CLOSE_SUBEXP); if (err == REG_NOMATCH) continue; if (BE (err != REG_NOERROR, 0)) @@ -2816,7 +2865,8 @@ get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top, Idx to_idx; /* Can the subexpression arrive the back reference? */ err = check_arrival (mctx, &sub_last->path, sub_last->node, - sub_last->str_idx, bkref_node, bkref_str, OP_OPEN_SUBEXP); + sub_last->str_idx, bkref_node, bkref_str, + OP_OPEN_SUBEXP); if (err != REG_NOERROR) return err; err = match_ctx_add_entry (mctx, bkref_node, bkref_str, sub_top->str_idx, @@ -2859,12 +2909,11 @@ find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes, static reg_errcode_t internal_function -check_arrival (re_match_context_t *mctx, state_array_t *path, - Idx top_node, Idx top_str, Idx last_node, Idx last_str, - int type) +check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node, + Idx top_str, Idx last_node, Idx last_str, int type) { - re_dfa_t *const dfa = mctx->dfa; - reg_errcode_t err; + const re_dfa_t *const dfa = mctx->dfa; + reg_errcode_t err = REG_NOERROR; Idx subexp_num, backup_cur_idx, str_idx, null_cnt; re_dfastate_t *cur_state = NULL; re_node_set *cur_nodes, next_nodes; @@ -2878,18 +2927,19 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, re_dfastate_t **new_array; Idx old_alloc = path->alloc; Idx new_alloc = old_alloc + last_str + mctx->max_mb_elem_len + 1; - if (BE (new_alloc < old_alloc, 0)) + if (BE (new_alloc < old_alloc, 0) + || BE (SIZE_MAX / sizeof (re_dfastate_t *) < new_alloc, 0)) return REG_ESPACE; - new_array = re_xrealloc (path->array, re_dfastate_t *, new_alloc); + new_array = re_realloc (path->array, re_dfastate_t *, new_alloc); if (BE (new_array == NULL, 0)) return REG_ESPACE; path->array = new_array; path->alloc = new_alloc; memset (new_array + old_alloc, '\0', - sizeof (re_dfastate_t *) * (new_alloc - old_alloc)); + sizeof (re_dfastate_t *) * (path->alloc - old_alloc)); } - str_idx = path->next_idx == 0 ? top_str : path->next_idx; + str_idx = path->next_idx ? path->next_idx : top_str; /* Temporary modify MCTX. */ backup_state_log = mctx->state_log; @@ -2917,7 +2967,7 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, if (cur_state && cur_state->has_backref) { err = re_node_set_init_copy (&next_nodes, &cur_state->nodes); - if (BE ( err != REG_NOERROR, 0)) + if (BE (err != REG_NOERROR, 0)) return err; } else @@ -2929,7 +2979,7 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, { err = expand_bkref_cache (mctx, &next_nodes, str_idx, subexp_num, type); - if (BE ( err != REG_NOERROR, 0)) + if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; @@ -2960,7 +3010,8 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, if (cur_state) { err = check_arrival_add_next_nodes (mctx, str_idx, - &cur_state->non_eps_nodes, &next_nodes); + &cur_state->non_eps_nodes, + &next_nodes); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); @@ -2978,7 +3029,7 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, } err = expand_bkref_cache (mctx, &next_nodes, str_idx, subexp_num, type); - if (BE ( err != REG_NOERROR, 0)) + if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; @@ -3021,13 +3072,12 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, static reg_errcode_t internal_function check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx, - re_node_set *cur_nodes, - re_node_set *next_nodes) + re_node_set *cur_nodes, re_node_set *next_nodes) { - re_dfa_t *const dfa = mctx->dfa; + const re_dfa_t *const dfa = mctx->dfa; bool ok; Idx cur_idx; - reg_errcode_t err; + reg_errcode_t err = REG_NOERROR; re_node_set union_set; re_node_set_init_empty (&union_set); for (cur_idx = 0; cur_idx < cur_nodes->nelem; ++cur_idx) @@ -3100,7 +3150,7 @@ check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx, static reg_errcode_t internal_function -check_arrival_expand_ecl (re_dfa_t *dfa, re_node_set *cur_nodes, +check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes, Idx ex_subexp, int type) { reg_errcode_t err; @@ -3118,7 +3168,7 @@ check_arrival_expand_ecl (re_dfa_t *dfa, re_node_set *cur_nodes, for (idx = 0; idx < cur_nodes->nelem; ++idx) { Idx cur_node = cur_nodes->elems[idx]; - re_node_set *eclosure = dfa->eclosures + cur_node; + const re_node_set *eclosure = dfa->eclosures + cur_node; outside_node = find_subexp_node (dfa, eclosure, ex_subexp, type); if (outside_node == REG_MISSING) { @@ -3153,7 +3203,7 @@ check_arrival_expand_ecl (re_dfa_t *dfa, re_node_set *cur_nodes, static reg_errcode_t internal_function -check_arrival_expand_ecl_sub (re_dfa_t *dfa, re_node_set *dst_nodes, +check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes, Idx target, Idx ex_subexp, int type) { Idx cur_node; @@ -3179,12 +3229,12 @@ check_arrival_expand_ecl_sub (re_dfa_t *dfa, re_node_set *dst_nodes, break; if (dfa->edests[cur_node].nelem == 2) { - reg_errcode_t ret = - check_arrival_expand_ecl_sub (dfa, dst_nodes, - dfa->edests[cur_node].elems[1], - ex_subexp, type); - if (BE (ret != REG_NOERROR, 0)) - return ret; + reg_errcode_t err; + err = check_arrival_expand_ecl_sub (dfa, dst_nodes, + dfa->edests[cur_node].elems[1], + ex_subexp, type); + if (BE (err != REG_NOERROR, 0)) + return err; } cur_node = dfa->edests[cur_node].elems[0]; } @@ -3201,7 +3251,7 @@ internal_function expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes, Idx cur_str, Idx subexp_num, int type) { - re_dfa_t *const dfa = mctx->dfa; + const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; Idx cache_idx_start = search_cur_bkref_entry (mctx, cur_str); struct re_backref_cache_entry *ent; @@ -3287,25 +3337,26 @@ expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes, static bool internal_function -build_trtable (re_dfa_t *dfa, re_dfastate_t *state) +build_trtable (const re_dfa_t *dfa, re_dfastate_t *state) { reg_errcode_t err; Idx i, j; int ch; bool need_word_trtable = false; - bitset_word elem, mask; - bool dests_node_malloced = false, dest_states_malloced = false; + bitset_word_t elem, mask; + bool dests_node_malloced = false; + bool dest_states_malloced = false; Idx ndests; /* Number of the destination states from `state'. */ re_dfastate_t **trtable; re_dfastate_t **dest_states = NULL, **dest_states_word, **dest_states_nl; re_node_set follows, *dests_node; - bitset *dests_ch; - bitset acceptable; + bitset_t *dests_ch; + bitset_t acceptable; struct dests_alloc { re_node_set dests_node[SBC_MAX]; - bitset dests_ch[SBC_MAX]; + bitset_t dests_ch[SBC_MAX]; } *dests_alloc; /* We build DFA states which corresponds to the destination nodes @@ -3313,7 +3364,7 @@ build_trtable (re_dfa_t *dfa, re_dfastate_t *state) destination state contains, and `dests_ch[i]' represents the characters which i-th destination state accepts. */ if (__libc_use_alloca (sizeof (struct dests_alloc))) - dests_alloc = (struct dests_alloc *) alloca (sizeof dests_alloc[0]); + dests_alloc = (struct dests_alloc *) alloca (sizeof (struct dests_alloc)); else { dests_alloc = re_malloc (struct dests_alloc, 1); @@ -3336,7 +3387,8 @@ build_trtable (re_dfa_t *dfa, re_dfastate_t *state) free (dests_alloc); if (ndests == 0) { - state->trtable = re_calloc (re_dfastate_t *, SBC_MAX); + state->trtable = (re_dfastate_t **) + calloc (sizeof (re_dfastate_t *), SBC_MAX); return true; } return false; @@ -3347,12 +3399,13 @@ build_trtable (re_dfa_t *dfa, re_dfastate_t *state) goto out_free; /* Avoid arithmetic overflow in size calculation. */ - if (BE (((SIZE_MAX - (sizeof (re_node_set) + sizeof (bitset)) * SBC_MAX) - / (3 * sizeof (re_dfastate_t *))) - < ndests, 0)) + if (BE ((((SIZE_MAX - (sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX) + / (3 * sizeof (re_dfastate_t *))) + < ndests), + 0)) goto out_free; - if (__libc_use_alloca ((sizeof (re_node_set) + sizeof (bitset)) * SBC_MAX + if (__libc_use_alloca ((sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX + ndests * 3 * sizeof (re_dfastate_t *))) dest_states = (re_dfastate_t **) alloca (ndests * 3 * sizeof (re_dfastate_t *)); @@ -3428,7 +3481,8 @@ out_free: character, or we are in a single-byte character set so we can discern by looking at the character code: allocate a 256-entry transition table. */ - trtable = state->trtable = re_calloc (re_dfastate_t *, SBC_MAX); + trtable = state->trtable = + (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), SBC_MAX); if (BE (trtable == NULL, 0)) goto out_free; @@ -3458,7 +3512,8 @@ out_free: by looking at the character code: build two 256-entry transition tables, one starting at trtable[0] and one starting at trtable[SBC_MAX]. */ - trtable = state->word_trtable = re_calloc (re_dfastate_t *, 2 * SBC_MAX); + trtable = state->word_trtable = + (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), 2 * SBC_MAX); if (BE (trtable == NULL, 0)) goto out_free; @@ -3518,13 +3573,13 @@ out_free: static Idx internal_function group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, - re_node_set *dests_node, bitset *dests_ch) + re_node_set *dests_node, bitset_t *dests_ch) { reg_errcode_t err; bool ok; Idx i, j, k; Idx ndests; /* Number of the destinations from `state'. */ - bitset accepts; /* Characters a node can accept. */ + bitset_t accepts; /* Characters a node can accept. */ const re_node_set *cur_nodes = &state->nodes; bitset_empty (accepts); ndests = 0; @@ -3551,21 +3606,21 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, else #endif bitset_set_all (accepts); - if (!(dfa->syntax & REG_DOT_NEWLINE)) + if (!(dfa->syntax & RE_DOT_NEWLINE)) bitset_clear (accepts, '\n'); - if (dfa->syntax & REG_DOT_NOT_NULL) + if (dfa->syntax & RE_DOT_NOT_NULL) bitset_clear (accepts, '\0'); } #ifdef RE_ENABLE_I18N else if (type == OP_UTF8_PERIOD) { - if (SBC_MAX / 2 % BITSET_WORD_BITS == 0) - memset (accepts, -1, sizeof accepts / 2); + if (ASCII_CHARS % BITSET_WORD_BITS == 0) + memset (accepts, -1, ASCII_CHARS / CHAR_BIT); else bitset_merge (accepts, utf8_sb_map); - if (!(dfa->syntax & REG_DOT_NEWLINE)) + if (!(dfa->syntax & RE_DOT_NEWLINE)) bitset_clear (accepts, '\n'); - if (dfa->syntax & REG_DOT_NOT_NULL) + if (dfa->syntax & RE_DOT_NOT_NULL) bitset_clear (accepts, '\0'); } #endif @@ -3593,7 +3648,7 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, if (constraint & NEXT_WORD_CONSTRAINT) { - bitset_word any_set = 0; + bitset_word_t any_set = 0; if (type == CHARACTER && !node->word_char) { bitset_empty (accepts); @@ -3612,7 +3667,7 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, } if (constraint & NEXT_NOTWORD_CONSTRAINT) { - bitset_word any_set = 0; + bitset_word_t any_set = 0; if (type == CHARACTER && node->word_char) { bitset_empty (accepts); @@ -3635,10 +3690,10 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, state. Above, we make sure that accepts is not empty. */ for (j = 0; j < ndests; ++j) { - bitset intersec; /* Intersection sets, see below. */ - bitset remains; + bitset_t intersec; /* Intersection sets, see below. */ + bitset_t remains; /* Flags, see below. */ - bitset_word has_intersec, not_subset, not_consumed; + bitset_word_t has_intersec, not_subset, not_consumed; /* Optimization, skip if this state doesn't accept the character. */ if (type == CHARACTER && !bitset_contain (dests_ch[j], node->opr.c)) @@ -3710,7 +3765,7 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, static int internal_function -check_node_accept_bytes (re_dfa_t *dfa, Idx node_idx, +check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, const re_string_t *input, Idx str_idx) { const re_token_t *node = dfa->nodes + node_idx; @@ -3776,9 +3831,9 @@ check_node_accept_bytes (re_dfa_t *dfa, Idx node_idx, /* FIXME: I don't think this if is needed, as both '\n' and '\0' are char_len == 1. */ /* '.' accepts any one character except the following two cases. */ - if ((!(dfa->syntax & REG_DOT_NEWLINE) && + if ((!(dfa->syntax & RE_DOT_NEWLINE) && re_string_byte_at (input, str_idx) == '\n') || - ((dfa->syntax & REG_DOT_NOT_NULL) && + ((dfa->syntax & RE_DOT_NOT_NULL) && re_string_byte_at (input, str_idx) == '\0')) return 0; return char_len; @@ -3911,7 +3966,7 @@ check_node_accept_bytes (re_dfa_t *dfa, Idx node_idx, # endif /* _LIBC */ { /* match with range expression? */ -#if __GNUC__ >= 2 +#if __GNUC__ >= 2 && ! (__STDC_VERSION__ < 199901L && __STRICT_ANSI__) wchar_t cmp_buf[] = {L'\0', L'\0', wc, L'\0', L'\0', L'\0'}; #else wchar_t cmp_buf[] = {L'\0', L'\0', L'\0', L'\0', L'\0', L'\0'}; @@ -3945,6 +4000,7 @@ check_node_accept_bytes (re_dfa_t *dfa, Idx node_idx, # ifdef _LIBC static unsigned int +internal_function find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len) { uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); @@ -4028,13 +4084,13 @@ check_node_accept (const re_match_context_t *mctx, const re_token_t *node, #ifdef RE_ENABLE_I18N case OP_UTF8_PERIOD: - if (ch >= 0x80) + if (ch >= ASCII_CHARS) return false; /* FALLTHROUGH */ #endif case OP_PERIOD: - if ((ch == '\n' && !(mctx->dfa->syntax & REG_DOT_NEWLINE)) - || (ch == '\0' && (mctx->dfa->syntax & REG_DOT_NOT_NULL))) + if ((ch == '\n' && !(mctx->dfa->syntax & RE_DOT_NEWLINE)) + || (ch == '\0' && (mctx->dfa->syntax & RE_DOT_NOT_NULL))) return false; break; @@ -4064,6 +4120,10 @@ extend_buffers (re_match_context_t *mctx) reg_errcode_t ret; re_string_t *pstr = &mctx->input; + /* Avoid overflow. */ + if (BE (SIZE_MAX / 2 / sizeof (re_dfastate_t *) <= pstr->bufs_len, 0)) + return REG_ESPACE; + /* Double the lengthes of the buffers. */ ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2); if (BE (ret != REG_NOERROR, 0)) @@ -4075,8 +4135,8 @@ extend_buffers (re_match_context_t *mctx) /* XXX We have no indication of the size of this buffer. If this allocation fail we have no indication that the state_log array does not have the right size. */ - re_dfastate_t **new_array = re_xrealloc (mctx->state_log, re_dfastate_t *, - pstr->bufs_len + 1); + re_dfastate_t **new_array = re_realloc (mctx->state_log, re_dfastate_t *, + pstr->bufs_len + 1); if (BE (new_array == NULL, 0)) return REG_ESPACE; mctx->state_log = new_array; @@ -4124,8 +4184,15 @@ match_ctx_init (re_match_context_t *mctx, int eflags, Idx n) mctx->match_last = REG_MISSING; if (n > 0) { - mctx->bkref_ents = re_xmalloc (struct re_backref_cache_entry, n); - mctx->sub_tops = re_xmalloc (re_sub_match_top_t *, n); + /* Avoid overflow. */ + size_t max_object_size = + MAX (sizeof (struct re_backref_cache_entry), + sizeof (re_sub_match_top_t *)); + if (BE (SIZE_MAX / max_object_size < n, 0)) + return REG_ESPACE; + + mctx->bkref_ents = re_malloc (struct re_backref_cache_entry, n); + mctx->sub_tops = re_malloc (re_sub_match_top_t *, n); if (BE (mctx->bkref_ents == NULL || mctx->sub_tops == NULL, 0)) return REG_ESPACE; } @@ -4191,14 +4258,14 @@ match_ctx_free (re_match_context_t *mctx) static reg_errcode_t internal_function -match_ctx_add_entry (re_match_context_t *mctx, Idx node, Idx str_idx, - Idx from, Idx to) +match_ctx_add_entry (re_match_context_t *mctx, Idx node, Idx str_idx, Idx from, + Idx to) { if (mctx->nbkref_ents >= mctx->abkref_ents) { struct re_backref_cache_entry* new_entry; - new_entry = re_x2realloc (mctx->bkref_ents, struct re_backref_cache_entry, - &mctx->abkref_ents); + new_entry = re_realloc (mctx->bkref_ents, struct re_backref_cache_entry, + mctx->abkref_ents * 2); if (BE (new_entry == NULL, 0)) { re_free (mctx->bkref_ents); @@ -4206,8 +4273,8 @@ match_ctx_add_entry (re_match_context_t *mctx, Idx node, Idx str_idx, } mctx->bkref_ents = new_entry; memset (mctx->bkref_ents + mctx->nbkref_ents, '\0', - (sizeof (struct re_backref_cache_entry) - * (mctx->abkref_ents - mctx->nbkref_ents))); + sizeof (struct re_backref_cache_entry) * mctx->abkref_ents); + mctx->abkref_ents *= 2; } if (mctx->nbkref_ents > 0 && mctx->bkref_ents[mctx->nbkref_ents - 1].str_idx == str_idx) @@ -4271,16 +4338,16 @@ match_ctx_add_subtop (re_match_context_t *mctx, Idx node, Idx str_idx) #endif if (BE (mctx->nsub_tops == mctx->asub_tops, 0)) { - Idx new_asub_tops = mctx->asub_tops; - re_sub_match_top_t **new_array = re_x2realloc (mctx->sub_tops, - re_sub_match_top_t *, - &new_asub_tops); + Idx new_asub_tops = mctx->asub_tops * 2; + re_sub_match_top_t **new_array = re_realloc (mctx->sub_tops, + re_sub_match_top_t *, + new_asub_tops); if (BE (new_array == NULL, 0)) return REG_ESPACE; mctx->sub_tops = new_array; mctx->asub_tops = new_asub_tops; } - mctx->sub_tops[mctx->nsub_tops] = re_calloc (re_sub_match_top_t, 1); + mctx->sub_tops[mctx->nsub_tops] = calloc (1, sizeof (re_sub_match_top_t)); if (BE (mctx->sub_tops[mctx->nsub_tops] == NULL, 0)) return REG_ESPACE; mctx->sub_tops[mctx->nsub_tops]->node = node; @@ -4298,16 +4365,16 @@ match_ctx_add_sublast (re_sub_match_top_t *subtop, Idx node, Idx str_idx) re_sub_match_last_t *new_entry; if (BE (subtop->nlasts == subtop->alasts, 0)) { - Idx new_alasts = subtop->alasts; - re_sub_match_last_t **new_array = re_x2realloc (subtop->lasts, - re_sub_match_last_t *, - &new_alasts); + Idx new_alasts = 2 * subtop->alasts + 1; + re_sub_match_last_t **new_array = re_realloc (subtop->lasts, + re_sub_match_last_t *, + new_alasts); if (BE (new_array == NULL, 0)) return NULL; subtop->lasts = new_array; subtop->alasts = new_alasts; } - new_entry = re_calloc (re_sub_match_last_t, 1); + new_entry = calloc (1, sizeof (re_sub_match_last_t)); if (BE (new_entry != NULL, 1)) { subtop->lasts[subtop->nlasts] = new_entry; @@ -4320,10 +4387,8 @@ match_ctx_add_sublast (re_sub_match_top_t *subtop, Idx node, Idx str_idx) static void internal_function -sift_ctx_init (re_sift_context_t *sctx, - re_dfastate_t **sifted_sts, - re_dfastate_t **limited_sts, - Idx last_node, Idx last_str_idx) +sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts, + re_dfastate_t **limited_sts, Idx last_node, Idx last_str_idx) { sctx->sifted_states = sifted_sts; sctx->limited_states = limited_sts; diff --git a/lib/safe-read.c b/gl/safe-read.c similarity index 93% rename from lib/safe-read.c rename to gl/safe-read.c index 9caf846..b7bf1d5 100644 --- a/lib/safe-read.c +++ b/gl/safe-read.c @@ -1,7 +1,7 @@ /* An interface to read and write that retries after interrupts. - Copyright (C) 1993, 1994, 1998, 2002, 2003, 2004, 2005 Free Software - Foundation, Inc. + Copyright (C) 1993, 1994, 1998, 2002, 2003, 2004, 2005, 2006 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 @@ -17,9 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include /* Specification. */ #ifdef SAFE_WRITE diff --git a/lib/safe-read.h b/gl/safe-read.h similarity index 89% rename from lib/safe-read.h rename to gl/safe-read.h index 9f8a59b..3451955 100644 --- a/lib/safe-read.h +++ b/gl/safe-read.h @@ -1,5 +1,5 @@ /* An interface to read() that retries after interrupts. - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2006 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 @@ -17,9 +17,19 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + + #define SAFE_READ_ERROR ((size_t) -1) /* Read up to COUNT bytes at BUF from descriptor FD, retrying if interrupted. Return the actual number of bytes read, zero for EOF, or SAFE_READ_ERROR upon error. */ extern size_t safe_read (int fd, void *buf, size_t count); + + +#ifdef __cplusplus +} +#endif diff --git a/lib/safe-write.c b/gl/safe-write.c similarity index 100% rename from lib/safe-write.c rename to gl/safe-write.c diff --git a/lib/safe-write.h b/gl/safe-write.h similarity index 100% rename from lib/safe-write.h rename to gl/safe-write.h diff --git a/gl/size_max.h b/gl/size_max.h new file mode 100644 index 0000000..ed0bc13 --- /dev/null +++ b/gl/size_max.h @@ -0,0 +1,31 @@ +/* size_max.h -- declare SIZE_MAX through system headers + Copyright (C) 2005-2006 Free Software Foundation, Inc. + Written by Simon Josefsson. + + 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef GNULIB_SIZE_MAX_H +#define GNULIB_SIZE_MAX_H + +/* Get SIZE_MAX declaration on systems like Solaris 7/8/9. */ +# include +/* Get SIZE_MAX declaration on systems like glibc 2. */ +# if HAVE_STDINT_H +# include +# endif +/* On systems where these include files don't define it, SIZE_MAX is defined + in config.h. */ + +#endif /* GNULIB_SIZE_MAX_H */ diff --git a/gl/snprintf.c b/gl/snprintf.c new file mode 100644 index 0000000..db1ca9a --- /dev/null +++ b/gl/snprintf.c @@ -0,0 +1,76 @@ +/* Formatted output to strings. + Copyright (C) 2004, 2006 Free Software Foundation, Inc. + Written by Simon Josefsson and Paul Eggert. + + 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#include + +#include "snprintf.h" + +#include +#include +#include +#include +#include + +#include "vasnprintf.h" + +/* Some systems, like OSF/1 4.0 and Woe32, don't have EOVERFLOW. */ +#ifndef EOVERFLOW +# define EOVERFLOW E2BIG +#endif + +/* Print formatted output to string STR. Similar to sprintf, but + additional length SIZE limit how much is written into STR. Returns + string length of formatted string (which may be larger than SIZE). + STR may be NULL, in which case nothing will be written. On error, + return a negative value. */ +int +snprintf (char *str, size_t size, const char *format, ...) +{ + char *output; + size_t len; + size_t lenbuf = size; + va_list args; + + va_start (args, format); + output = vasnprintf (str, &lenbuf, format, args); + len = lenbuf; + va_end (args); + + if (!output) + return -1; + + if (output != str) + { + if (size) + { + size_t pruned_len = (len < size ? len : size - 1); + memcpy (str, output, pruned_len); + str[pruned_len] = '\0'; + } + + free (output); + } + + if (INT_MAX < len) + { + errno = EOVERFLOW; + return -1; + } + + return len; +} diff --git a/gl/snprintf.h b/gl/snprintf.h new file mode 100644 index 0000000..5032b9e --- /dev/null +++ b/gl/snprintf.h @@ -0,0 +1,29 @@ +/* Formatted output to strings. + Copyright (C) 2004 Free Software Foundation, Inc. + Written by Simon Josefsson. + + 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef SNPRINTF_H +#define SNPRINTF_H + +/* Get snprintf declaration, if available. */ +#include + +#if defined HAVE_DECL_SNPRINTF && !HAVE_DECL_SNPRINTF +int snprintf (char *str, size_t size, const char *format, ...); +#endif + +#endif /* SNPRINTF_H */ diff --git a/gl/socket_.h b/gl/socket_.h new file mode 100644 index 0000000..8b28b5e --- /dev/null +++ b/gl/socket_.h @@ -0,0 +1,70 @@ +/* Provide a sys/socket header file for systems lacking it (read: MinGW). + Copyright (C) 2005, 2006 Free Software Foundation, Inc. + Written by Simon Josefsson. + + 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _SYS_SOCKET_H +#define _SYS_SOCKET_H + +/* This file is supposed to be used on platforms that lack + sys/socket.h. It is intended to provide definitions and prototypes + needed by an application. + + Currently only MinGW is supported. See the gnulib manual regarding + Windows sockets. MinGW has the header files winsock2.h and + ws2tcpip.h that declare the sys/socket.h definitions we need. Note + that you can influence which definitions you get by setting the + WINVER symbol before including these two files. For example, + getaddrinfo is only available if _WIN32_WINNT >= 0x0501 (that + symbol is set indiriectly through WINVER). You can set this by + adding AC_DEFINE(WINVER, 0x0501) to configure.ac. Note that your + code may not run on older Windows releases then. My Windows 2000 + box was not able to run the code, for example. The situation is + slightly confusing because: + http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/getaddrinfo_2.asp + suggests that getaddrinfo should be available on all Windows + releases. */ + + +#if HAVE_WINSOCK2_H +# include +#endif +#if HAVE_WS2TCPIP_H +# include +#endif + +/* For shutdown(). */ +#if !defined SHUT_RD && defined SD_RECEIVE +# define SHUT_RD SD_RECEIVE +#endif +#if !defined SHUT_WR && defined SD_SEND +# define SHUT_WR SD_SEND +#endif +#if !defined SHUT_RDWR && defined SD_BOTH +# define SHUT_RDWR SD_BOTH +#endif + +#if defined _WIN32 || defined __WIN32__ +# define ENOTSOCK WSAENOTSOCK +# define EADDRINUSE WSAEADDRINUSE +# define ENETRESET WSAENETRESET +# define ECONNABORTED WSAECONNABORTED +# define ECONNRESET WSAECONNRESET +# define ENOTCONN WSAENOTCONN +# define ESHUTDOWN WSAESHUTDOWN +#endif + +#endif /* _SYS_SOCKET_H */ diff --git a/lib/stdbool_.h b/gl/stdbool_.h similarity index 56% rename from lib/stdbool_.h rename to gl/stdbool_.h index 7cd2da8..efa80ba 100644 --- a/lib/stdbool_.h +++ b/gl/stdbool_.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc. Written by Bruno Haible , 2001. This program is free software; you can redistribute it and/or modify @@ -54,47 +54,57 @@ /* 7.16. Boolean type and values */ /* BeOS already #defines false 0, true 1. We use the same - definitions below, which is OK. */ + definitions below, but temporarily we have to #undef them. */ #ifdef __BEOS__ # include /* defines bool but not _Bool */ +# undef false +# undef true #endif -/* C++ and BeOS have a reliable bool (and _Bool, if it exists). - Otherwise, since this file is being compiled, the system - is not reliable so assume that the system _Bool is not - reliable either. Under that assumption, it is tempting to write - - typedef enum { false, true } _Bool; - - so that gdb prints values of type 'bool' symbolically. But if we do +/* For the sake of symbolic names in gdb, we define true and false as + enum constants, not only as macros. + It is tempting to write + typedef enum { false = 0, true = 1 } _Bool; + so that gdb prints values of type 'bool' symbolically. But if we do this, values of type '_Bool' may promote to 'int' or 'unsigned int' (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int' - (see ISO C 99 6.3.1.1.(2)). We could instead try this: - - typedef enum { _Bool_dummy = -1, false, true } _Bool; - - as the negative value ensures that '_Bool' promotes to 'int'. - However, this runs into some other problems. First, Sun's C - compiler when (__SUNPRO_C < 0x550 || __STDC__ == 1) issues a stupid - "warning: _Bool is a keyword in ISO C99". Second, IBM's AIX cc - compiler 6.0.0.0 (and presumably other versions) mishandles - subscripts involving _Bool (effectively, _Bool promotes to unsigned - int in this case), and we need to redefine _Bool in that case. - Third, HP-UX 10.20's C compiler lacks but has _Bool and - mishandles comparisons of _Bool to int (it promotes _Bool to - unsigned int). - - The simplest way to work around these problems is to ignore any - existing definition of _Bool and use our own. */ - + (see ISO C 99 6.3.1.1.(2)). So we add a negative value to the + enum; this ensures that '_Bool' promotes to 'int'. */ #if defined __cplusplus || defined __BEOS__ + /* A compiler known to have 'bool'. */ + /* If the compiler already has both 'bool' and '_Bool', we can assume they + are the same types. */ # if !@HAVE__BOOL@ typedef bool _Bool; # endif #else -# define _Bool signed char +# if !defined __GNUC__ + /* If @HAVE__BOOL@: + Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when + the built-in _Bool type is used. See + http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html + http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html + http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html + Similar bugs are likely with other compilers as well; this file + wouldn't be used if was working. + So we override the _Bool type. + If !@HAVE__BOOL@: + Need to define _Bool ourselves. As 'signed char' or as an enum type? + Use of a typedef, with SunPRO C, leads to a stupid + "warning: _Bool is a keyword in ISO C99". + Use of an enum type, with IRIX cc, leads to a stupid + "warning(1185): enumerated type mixed with another type". + The only benefit of the enum type, debuggability, is not important + with these compilers. So use 'signed char' and no typedef. */ +# define _Bool signed char +enum { false = 0, true = 1 }; +# else + /* With this compiler, trust the _Bool type if the compiler has it. */ +# if !@HAVE__BOOL@ +typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool; +# endif +# endif #endif - #define bool _Bool /* The other macros must be usable in preprocessor directives. */ diff --git a/gl/stdint_.h b/gl/stdint_.h new file mode 100644 index 0000000..64ec8c5 --- /dev/null +++ b/gl/stdint_.h @@ -0,0 +1,489 @@ +/* Copyright (C) 2001-2002, 2004-2007 Free Software Foundation, Inc. + Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. + This file is part of gnulib. + + 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _GL_STDINT_H +#define _GL_STDINT_H + +/* + * ISO C 99 for platforms that lack it. + * + */ + +/* Get those types that are already defined in other system include + files, so that we can "#define int8_t signed char" below without + worrying about a later system include file containing a "typedef + signed char int8_t;" that will get messed up by our macro. Our + macros should all be consistent with the system versions, except + for the "fast" types and macros, which we recommend against using + in public interfaces due to compiler differences. */ + +#if @HAVE_STDINT_H@ +# if defined __sgi && ! defined __c99 + /* Bypass IRIX's if in C89 mode, since it merely annoys users + with "This header file is to be used only for c99 mode compilations" + diagnostics. */ +# define __STDINT_H__ +# endif + /* Other systems may have an incomplete or buggy . + Include it before , since any "#include " + in would reinclude us, skipping our contents because + _GL_STDINT_H is defined. */ +# include @ABSOLUTE_STDINT_H@ +#endif + +/* defines some of the stdint.h types as well, on glibc, + IRIX 6.5, and OpenBSD 3.8 (via ). + AIX 5.2 isn't needed and causes troubles. + MacOS X 10.4.6 includes (which is us), but + relies on the system definitions, so include + after @ABSOLUTE_STDINT_H@. */ +#if @HAVE_SYS_TYPES_H@ && ! defined _AIX +# include +#endif + +/* Get LONG_MIN, LONG_MAX, ULONG_MAX. */ +#include + +#if @HAVE_INTTYPES_H@ + /* In OpenBSD 3.8, includes , which defines + int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. + also defines intptr_t and uintptr_t. */ +# define _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H +# include +# undef _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H +#elif @HAVE_SYS_INTTYPES_H@ + /* Solaris 7 has the types except the *_fast*_t types, and + the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */ +# include +#endif + +#if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__ + /* Linux libc4 >= 4.6.7 and libc5 have a that defines + int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is + included by . */ +# include +#endif + +#if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS + +/* Get WCHAR_MIN, WCHAR_MAX. */ +# if ! (defined WCHAR_MIN && defined WCHAR_MAX) +# include +# endif + +#endif + +/* Minimum and maximum values for a integer type under the usual assumption. + Return an unspecified value if BITS == 0, adding a check to pacify + picky compilers. */ + +#define _STDINT_MIN(signed, bits, zero) \ + ((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero)) + +#define _STDINT_MAX(signed, bits, zero) \ + ((signed) \ + ? ~ _STDINT_MIN (signed, bits, zero) \ + : ((((zero) + 1) << ((bits) ? (bits) - 1 : 0)) - 1) * 2 + 1) + +/* 7.18.1.1. Exact-width integer types */ + +/* Here we assume a standard architecture where the hardware integer + types have 8, 16, 32, optionally 64 bits. */ + +#undef int8_t +#undef uint8_t +#define int8_t signed char +#define uint8_t unsigned char + +#undef int16_t +#undef uint16_t +#define int16_t short int +#define uint16_t unsigned short int + +#undef int32_t +#undef uint32_t +#define int32_t int +#define uint32_t unsigned int + +#undef int64_t +#if LONG_MAX >> 31 >> 31 == 1 +# define int64_t long int +#elif defined _MSC_VER +# define int64_t __int64 +#elif @HAVE_LONG_LONG_INT@ +# define int64_t long long int +#endif + +#undef uint64_t +#if ULONG_MAX >> 31 >> 31 >> 1 == 1 +# define uint64_t unsigned long int +#elif defined _MSC_VER +# define uint64_t unsigned __int64 +#elif @HAVE_UNSIGNED_LONG_LONG_INT@ +# define uint64_t unsigned long long int +#endif + +/* Avoid collision with Solaris 2.5.1 etc. */ +#define _UINT8_T +#define _UINT32_T +#define _UINT64_T + + +/* 7.18.1.2. Minimum-width integer types */ + +/* Here we assume a standard architecture where the hardware integer + types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types + are the same as the corresponding N_t types. */ + +#undef int_least8_t +#undef uint_least8_t +#undef int_least16_t +#undef uint_least16_t +#undef int_least32_t +#undef uint_least32_t +#undef int_least64_t +#undef uint_least64_t +#define int_least8_t int8_t +#define uint_least8_t uint8_t +#define int_least16_t int16_t +#define uint_least16_t uint16_t +#define int_least32_t int32_t +#define uint_least32_t uint32_t +#ifdef int64_t +# define int_least64_t int64_t +#endif +#ifdef uint64_t +# define uint_least64_t uint64_t +#endif + +/* 7.18.1.3. Fastest minimum-width integer types */ + +/* Note: Other substitutes may define these types differently. + It is not recommended to use these types in public header files. */ + +/* Here we assume a standard architecture where the hardware integer + types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types + are taken from the same list of types. Assume that 'long int' + is fast enough for all narrower integers. */ + +#undef int_fast8_t +#undef uint_fast8_t +#undef int_fast16_t +#undef uint_fast16_t +#undef int_fast32_t +#undef uint_fast32_t +#undef int_fast64_t +#undef uint_fast64_t +#define int_fast8_t long int +#define uint_fast8_t unsigned int_fast8_t +#define int_fast16_t long int +#define uint_fast16_t unsigned int_fast16_t +#define int_fast32_t long int +#define uint_fast32_t unsigned int_fast32_t +#ifdef int64_t +# define int_fast64_t int64_t +#endif +#ifdef uint64_t +# define uint_fast64_t uint64_t +#endif + +/* 7.18.1.4. Integer types capable of holding object pointers */ + +#undef intptr_t +#undef uintptr_t +#define intptr_t long int +#define uintptr_t unsigned long int + +/* 7.18.1.5. Greatest-width integer types */ + +/* Note: These types are compiler dependent. It may be unwise to use them in + public header files. */ + +#undef intmax_t +#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 +# define intmax_t long long int +#elif defined int64_t +# define intmax_t int64_t +#else +# define intmax_t long int +#endif + +#undef uintmax_t +#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 +# define uintmax_t unsigned long long int +#elif defined uint64_t +# define uintmax_t uint64_t +#else +# define uintmax_t unsigned long int +#endif + +/* 7.18.2. Limits of specified-width integer types */ + +#if ! defined __cplusplus || defined __STDC_LIMIT_MACROS + +/* 7.18.2.1. Limits of exact-width integer types */ + +/* Here we assume a standard architecture where the hardware integer + types have 8, 16, 32, optionally 64 bits. */ + +#undef INT8_MIN +#undef INT8_MAX +#undef UINT8_MAX +#define INT8_MIN (~ INT8_MAX) +#define INT8_MAX 127 +#define UINT8_MAX 255 + +#undef INT16_MIN +#undef INT16_MAX +#undef UINT16_MAX +#define INT16_MIN (~ INT16_MAX) +#define INT16_MAX 32767 +#define UINT16_MAX 65535 + +#undef INT32_MIN +#undef INT32_MAX +#undef UINT32_MAX +#define INT32_MIN (~ INT32_MAX) +#define INT32_MAX 2147483647 +#define UINT32_MAX 4294967295U + +#undef INT64_MIN +#undef INT64_MAX +#ifdef int64_t +# define INT64_MIN (~ INT64_MAX) +# define INT64_MAX INTMAX_C (9223372036854775807) +#endif + +#undef UINT64_MAX +#ifdef uint64_t +# define UINT64_MAX UINTMAX_C (18446744073709551615) +#endif + +/* 7.18.2.2. Limits of minimum-width integer types */ + +/* Here we assume a standard architecture where the hardware integer + types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types + are the same as the corresponding N_t types. */ + +#undef INT_LEAST8_MIN +#undef INT_LEAST8_MAX +#undef UINT_LEAST8_MAX +#define INT_LEAST8_MIN INT8_MIN +#define INT_LEAST8_MAX INT8_MAX +#define UINT_LEAST8_MAX UINT8_MAX + +#undef INT_LEAST16_MIN +#undef INT_LEAST16_MAX +#undef UINT_LEAST16_MAX +#define INT_LEAST16_MIN INT16_MIN +#define INT_LEAST16_MAX INT16_MAX +#define UINT_LEAST16_MAX UINT16_MAX + +#undef INT_LEAST32_MIN +#undef INT_LEAST32_MAX +#undef UINT_LEAST32_MAX +#define INT_LEAST32_MIN INT32_MIN +#define INT_LEAST32_MAX INT32_MAX +#define UINT_LEAST32_MAX UINT32_MAX + +#undef INT_LEAST64_MIN +#undef INT_LEAST64_MAX +#ifdef int64_t +# define INT_LEAST64_MIN INT64_MIN +# define INT_LEAST64_MAX INT64_MAX +#endif + +#undef UINT_LEAST64_MAX +#ifdef uint64_t +# define UINT_LEAST64_MAX UINT64_MAX +#endif + +/* 7.18.2.3. Limits of fastest minimum-width integer types */ + +/* Here we assume a standard architecture where the hardware integer + types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types + are taken from the same list of types. */ + +#undef INT_FAST8_MIN +#undef INT_FAST8_MAX +#undef UINT_FAST8_MAX +#define INT_FAST8_MIN LONG_MIN +#define INT_FAST8_MAX LONG_MAX +#define UINT_FAST8_MAX ULONG_MAX + +#undef INT_FAST16_MIN +#undef INT_FAST16_MAX +#undef UINT_FAST16_MAX +#define INT_FAST16_MIN LONG_MIN +#define INT_FAST16_MAX LONG_MAX +#define UINT_FAST16_MAX ULONG_MAX + +#undef INT_FAST32_MIN +#undef INT_FAST32_MAX +#undef UINT_FAST32_MAX +#define INT_FAST32_MIN LONG_MIN +#define INT_FAST32_MAX LONG_MAX +#define UINT_FAST32_MAX ULONG_MAX + +#undef INT_FAST64_MIN +#undef INT_FAST64_MAX +#ifdef int64_t +# define INT_FAST64_MIN INT64_MIN +# define INT_FAST64_MAX INT64_MAX +#endif + +#undef UINT_FAST64_MAX +#ifdef uint64_t +# define UINT_FAST64_MAX UINT64_MAX +#endif + +/* 7.18.2.4. Limits of integer types capable of holding object pointers */ + +#undef INTPTR_MIN +#undef INTPTR_MAX +#undef UINTPTR_MAX +#define INTPTR_MIN LONG_MIN +#define INTPTR_MAX LONG_MAX +#define UINTPTR_MAX ULONG_MAX + +/* 7.18.2.5. Limits of greatest-width integer types */ + +#undef INTMAX_MIN +#undef INTMAX_MAX +#define INTMAX_MIN (~ INTMAX_MAX) +#ifdef INT64_MAX +# define INTMAX_MAX INT64_MAX +#else +# define INTMAX_MAX INT32_MAX +#endif + +#undef UINTMAX_MAX +#ifdef UINT64_MAX +# define UINTMAX_MAX UINT64_MAX +#else +# define UINTMAX_MAX UINT32_MAX +#endif + +/* 7.18.3. Limits of other integer types */ + +/* ptrdiff_t limits */ +#undef PTRDIFF_MIN +#undef PTRDIFF_MAX +#define PTRDIFF_MIN \ + _STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) +#define PTRDIFF_MAX \ + _STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) + +/* sig_atomic_t limits */ +#undef SIG_ATOMIC_MIN +#undef SIG_ATOMIC_MAX +#define SIG_ATOMIC_MIN \ + _STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ + 0@SIG_ATOMIC_T_SUFFIX@) +#define SIG_ATOMIC_MAX \ + _STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ + 0@SIG_ATOMIC_T_SUFFIX@) + + +/* size_t limit */ +#undef SIZE_MAX +#define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@) + +/* wchar_t limits */ +#undef WCHAR_MIN +#undef WCHAR_MAX +#define WCHAR_MIN \ + _STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) +#define WCHAR_MAX \ + _STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) + +/* wint_t limits */ +#undef WINT_MIN +#undef WINT_MAX +#define WINT_MIN \ + _STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) +#define WINT_MAX \ + _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) + +#endif /* !defined __cplusplus || defined __STDC_LIMIT_MACROS */ + +/* 7.18.4. Macros for integer constants */ + +#if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS + +/* 7.18.4.1. Macros for minimum-width integer constants */ +/* According to ISO C 99 Technical Corrigendum 1 */ + +/* Here we assume a standard architecture where the hardware integer + types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */ + +#undef INT8_C +#undef UINT8_C +#define INT8_C(x) x +#define UINT8_C(x) x + +#undef INT16_C +#undef UINT16_C +#define INT16_C(x) x +#define UINT16_C(x) x + +#undef INT32_C +#undef UINT32_C +#define INT32_C(x) x +#define UINT32_C(x) x ## U + +#undef INT64_C +#undef UINT64_C +#if LONG_MAX >> 31 >> 31 == 1 +# define INT64_C(x) x##L +#elif defined _MSC_VER +# define INT64_C(x) x##i64 +#elif @HAVE_LONG_LONG_INT@ +# define INT64_C(x) x##LL +#endif +#if ULONG_MAX >> 31 >> 31 >> 1 == 1 +# define UINT64_C(x) x##UL +#elif defined _MSC_VER +# define UINT64_C(x) x##ui64 +#elif @HAVE_UNSIGNED_LONG_LONG_INT@ +# define UINT64_C(x) x##ULL +#endif + +/* 7.18.4.2. Macros for greatest-width integer constants */ + +#undef INTMAX_C +#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 +# define INTMAX_C(x) x##LL +#elif defined int64_t +# define INTMAX_C(x) INT64_C(x) +#else +# define INTMAX_C(x) x##L +#endif + +#undef UINTMAX_C +#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 +# define UINTMAX_C(x) x##ULL +#elif defined uint64_t +# define UINTMAX_C(x) UINT64_C(x) +#else +# define UINTMAX_C(x) x##UL +#endif + +#endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */ + +#endif /* _GL_STDINT_H */ diff --git a/lib/strcase.h b/gl/strcase.h similarity index 75% rename from lib/strcase.h rename to gl/strcase.h index e420798..07d4c9a 100644 --- a/lib/strcase.h +++ b/gl/strcase.h @@ -1,5 +1,5 @@ /* Case-insensitive string comparison functions. - Copyright (C) 1995-1996, 2001, 2003, 2005 Free Software Foundation, Inc. + Copyright (C) 1995-1996, 2001, 2003, 2005-2006 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 @@ -19,13 +19,19 @@ #define _STRCASE_H #include - +/* Include header files with a possibly conflicting declarations of strcasecmp + before we define it as a macro, so that they will be no-ops if included + after strcasecmp is defined as a macro. */ +#include #ifdef __cplusplus extern "C" { #endif +/* No known system has a strcasecmp() function that works correctly in + multibyte locales. Therefore we use our version always. */ +#define strcasecmp rpl_strcasecmp /* Compare strings S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. @@ -37,7 +43,9 @@ extern int strcasecmp (const char *s1, const char *s2); returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. Note: This function can not work correctly in multibyte locales. */ +#if ! HAVE_DECL_STRNCASECMP extern int strncasecmp (const char *s1, const char *s2, size_t n); +#endif #ifdef __cplusplus diff --git a/gl/strcasecmp.c b/gl/strcasecmp.c new file mode 100644 index 0000000..99d5dd2 --- /dev/null +++ b/gl/strcasecmp.c @@ -0,0 +1,103 @@ +/* Case-insensitive string comparison function. + Copyright (C) 1998-1999, 2005-2006 Free Software Foundation, Inc. + Written by Bruno Haible , 2005, + based on earlier glibc code. + + 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#include + +/* Specification. */ +#include "strcase.h" + +#include +#include + +#if HAVE_MBRTOWC +# include "mbuiter.h" +#endif + +#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) + +/* Compare strings S1 and S2, ignoring case, returning less than, equal to or + greater than zero if S1 is lexicographically less than, equal to or greater + than S2. + Note: This function may, in multibyte locales, return 0 for strings of + different lengths! */ +int +strcasecmp (const char *s1, const char *s2) +{ + if (s1 == s2) + return 0; + + /* Be careful not to look at the entire extent of s1 or s2 until needed. + This is useful because when two strings differ, the difference is + most often already in the very few first characters. */ +#if HAVE_MBRTOWC + if (MB_CUR_MAX > 1) + { + mbui_iterator_t iter1; + mbui_iterator_t iter2; + + mbui_init (iter1, s1); + mbui_init (iter2, s2); + + while (mbui_avail (iter1) && mbui_avail (iter2)) + { + int cmp = mb_casecmp (mbui_cur (iter1), mbui_cur (iter2)); + + if (cmp != 0) + return cmp; + + mbui_advance (iter1); + mbui_advance (iter2); + } + if (mbui_avail (iter1)) + /* s2 terminated before s1. */ + return 1; + if (mbui_avail (iter2)) + /* s1 terminated before s2. */ + return -1; + return 0; + } + else +#endif + { + const unsigned char *p1 = (const unsigned char *) s1; + const unsigned char *p2 = (const unsigned char *) s2; + unsigned char c1, c2; + + do + { + c1 = TOLOWER (*p1); + c2 = TOLOWER (*p2); + + if (c1 == '\0') + break; + + ++p1; + ++p2; + } + while (c1 == c2); + + if (UCHAR_MAX <= INT_MAX) + return c1 - c2; + else + /* On machines where 'char' and 'int' are types of the same size, the + difference of two 'unsigned char' values - including the sign bit - + doesn't fit in an 'int'. */ + return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); + } +} diff --git a/gl/strdup.c b/gl/strdup.c new file mode 100644 index 0000000..17d40d6 --- /dev/null +++ b/gl/strdup.c @@ -0,0 +1,55 @@ +/* Copyright (C) 1991, 1996, 1997, 1998, 2002, 2003, 2004, 2006 Free + Software Foundation, Inc. + + This file is part of the GNU C Library. + + 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _LIBC +# include +/* Get specification. */ +# include "strdup.h" +#endif + +#include +#include + +#undef __strdup +#ifdef _LIBC +# undef strdup +#endif + +#ifndef weak_alias +# define __strdup strdup +#endif + +/* Duplicate S, returning an identical malloc'd string. */ +char * +__strdup (const char *s) +{ + size_t len = strlen (s) + 1; + void *new = malloc (len); + + if (new == NULL) + return NULL; + + return (char *) memcpy (new, s, len); +} +#ifdef libc_hidden_def +libc_hidden_def (__strdup) +#endif +#ifdef weak_alias +weak_alias (__strdup, strdup) +#endif diff --git a/gl/strdup.h b/gl/strdup.h new file mode 100644 index 0000000..73e66e3 --- /dev/null +++ b/gl/strdup.h @@ -0,0 +1,39 @@ +/* strdup.h -- duplicate a string + Copyright (C) 2004, 2006 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef STRDUP_H_ +#define STRDUP_H_ + +/* Get strdup declaration, if available. */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + + +#if defined HAVE_DECL_STRDUP && !HAVE_DECL_STRDUP && !defined strdup +/* Duplicate S, returning an identical malloc'd string. */ +extern char *strdup (const char *s); +#endif + + +#ifdef __cplusplus +} +#endif + +#endif /* STRDUP_H_ */ diff --git a/gl/stripslash.c b/gl/stripslash.c new file mode 100644 index 0000000..342d497 --- /dev/null +++ b/gl/stripslash.c @@ -0,0 +1,45 @@ +/* stripslash.c -- remove redundant trailing slashes from a file name + + Copyright (C) 1990, 2001, 2003-2006 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#include + +#include "dirname.h" + +/* Remove trailing slashes from FILE. Return true if a trailing slash + was removed. This is useful when using file name completion from a + shell that adds a "/" after directory names (such as tcsh and + bash), because on symlinks to directories, several system calls + have different semantics according to whether a trailing slash is + present. */ + +bool +strip_trailing_slashes (char *file) +{ + char *base = last_component (file); + char *base_lim; + bool had_slash; + + /* last_component returns "" for file system roots, but we need to turn + `///' into `/'. */ + if (! *base) + base = file; + base_lim = base + base_len (base); + had_slash = (*base_lim != '\0'); + *base_lim = '\0'; + return had_slash; +} diff --git a/gl/strncasecmp.c b/gl/strncasecmp.c new file mode 100644 index 0000000..f59b953 --- /dev/null +++ b/gl/strncasecmp.c @@ -0,0 +1,63 @@ +/* strncasecmp.c -- case insensitive string comparator + Copyright (C) 1998-1999, 2005-2006 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#include + +/* Specification. */ +#include "strcase.h" + +#include +#include + +#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) + +/* Compare no more than N bytes of strings S1 and S2, + ignoring case, returning less than, equal to or + greater than zero if S1 is lexicographically less + than, equal to or greater than S2. */ + +int +strncasecmp (const char *s1, const char *s2, size_t n) +{ + register const unsigned char *p1 = (const unsigned char *) s1; + register const unsigned char *p2 = (const unsigned char *) s2; + unsigned char c1, c2; + + if (p1 == p2 || n == 0) + return 0; + + do + { + c1 = TOLOWER (*p1); + c2 = TOLOWER (*p2); + + if (--n == 0 || c1 == '\0') + break; + + ++p1; + ++p2; + } + while (c1 == c2); + + if (UCHAR_MAX <= INT_MAX) + return c1 - c2; + else + /* On machines where 'char' and 'int' are types of the same size, the + difference of two 'unsigned char' values - including the sign bit - + doesn't fit in an 'int'. */ + return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); +} diff --git a/gl/strndup.c b/gl/strndup.c new file mode 100644 index 0000000..290f494 --- /dev/null +++ b/gl/strndup.c @@ -0,0 +1,39 @@ +/* A replacement function, for systems that lack strndup. + + Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003, 2005, 2006 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#include +#include "strndup.h" + +#include +#include + +#include "strnlen.h" + +char * +strndup (char const *s, size_t n) +{ + size_t len = strnlen (s, n); + char *new = malloc (len + 1); + + if (new == NULL) + return NULL; + + new[len] = '\0'; + return memcpy (new, s, len); +} diff --git a/gl/strndup.h b/gl/strndup.h new file mode 100644 index 0000000..b983dd2 --- /dev/null +++ b/gl/strndup.h @@ -0,0 +1,32 @@ +/* Duplicate a size-bounded string. + Copyright (C) 2003, 2006 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* Get size_t. */ +#include +/* If HAVE_STRNDUP, get the strndup declaration. + If !HAVE_STRNDUP, include now so that it doesn't cause + trouble if included later. */ +#include + +#if !HAVE_STRNDUP +# undef strndup +# define strndup rpl_strndup +# if !HAVE_DECL_STRNDUP /* Don't risk conflicting declarations. */ +/* Return a newly allocated copy of at most N bytes of STRING. */ +extern char *strndup (const char *string, size_t n); +# endif +#endif diff --git a/gl/strnlen.c b/gl/strnlen.c new file mode 100644 index 0000000..593fd1b --- /dev/null +++ b/gl/strnlen.c @@ -0,0 +1,31 @@ +/* Find the length of STRING, but scan at most MAXLEN characters. + Copyright (C) 2005, 2006 Free Software Foundation, Inc. + Written by Simon Josefsson. + + 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#include + +#include "strnlen.h" + +/* Find the length of STRING, but scan at most MAXLEN characters. + If no '\0' terminator is found in that many characters, return MAXLEN. */ + +size_t +strnlen (const char *string, size_t maxlen) +{ + const char *end = memchr (string, '\0', maxlen); + return end ? (size_t) (end - string) : maxlen; +} diff --git a/gl/strnlen.h b/gl/strnlen.h new file mode 100644 index 0000000..ba74dba --- /dev/null +++ b/gl/strnlen.h @@ -0,0 +1,32 @@ +/* Find the length of STRING, but scan at most MAXLEN characters. + Copyright (C) 2005 Free Software Foundation, Inc. + Written by Simon Josefsson. + + 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef STRNLEN_H +#define STRNLEN_H + +/* Get strnlen declaration, if available. */ +#include + +#if defined HAVE_DECL_STRNLEN && !HAVE_DECL_STRNLEN +/* Find the length (number of bytes) of STRING, but scan at most + MAXLEN bytes. If no '\0' terminator is found in that many bytes, + return MAXLEN. */ +extern size_t strnlen(const char *string, size_t maxlen); +#endif + +#endif /* STRNLEN_H */ diff --git a/gl/strnlen1.c b/gl/strnlen1.c new file mode 100644 index 0000000..422ed9e --- /dev/null +++ b/gl/strnlen1.c @@ -0,0 +1,36 @@ +/* Find the length of STRING + 1, but scan at most MAXLEN bytes. + Copyright (C) 2005-2006 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#include + +/* Specification. */ +#include "strnlen1.h" + +#include + +/* Find the length of STRING + 1, but scan at most MAXLEN bytes. + If no '\0' terminator is found in that many characters, return MAXLEN. */ +/* This is the same as strnlen (string, maxlen - 1) + 1. */ +size_t +strnlen1 (const char *string, size_t maxlen) +{ + const char *end = (const char *) memchr (string, '\0', maxlen); + if (end != NULL) + return end - string + 1; + else + return maxlen; +} diff --git a/lib/realloc.c b/gl/strnlen1.h similarity index 53% rename from lib/realloc.c rename to gl/strnlen1.h index fe94822..7ce7d0c 100644 --- a/lib/realloc.c +++ b/gl/strnlen1.h @@ -1,5 +1,5 @@ -/* realloc() function that is glibc compatible. - Copyright (C) 1997, 2003, 2004 Free Software Foundation, Inc. +/* Find the length of STRING + 1, but scan at most MAXLEN bytes. + Copyright (C) 2005 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 @@ -15,32 +15,26 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* written by Jim Meyering */ +#ifndef _STRNLEN1_H +#define _STRNLEN1_H -#ifdef HAVE_CONFIG_H -# include +#include + + +#ifdef __cplusplus +extern "C" { #endif -#undef realloc -#include -/* Change the size of an allocated block of memory P to N bytes, - with error checking. If N is zero, change it to 1. If P is NULL, - use malloc. */ +/* Find the length of STRING + 1, but scan at most MAXLEN bytes. + If no '\0' terminator is found in that many characters, return MAXLEN. */ +/* This is the same as strnlen (string, maxlen - 1) + 1. */ +extern size_t strnlen1 (const char *string, size_t maxlen); -void * -rpl_realloc (void *p, size_t n) -{ - if (n == 0) - { - n = 1; - /* In theory realloc might fail, so don't rely on it to free. */ - free (p); - p = NULL; - } - - if (p == NULL) - return malloc (n); - return realloc (p, n); +#ifdef __cplusplus } +#endif + + +#endif /* _STRNLEN1_H */ diff --git a/lib/unistd--.h b/gl/unistd--.h similarity index 100% rename from lib/unistd--.h rename to gl/unistd--.h diff --git a/lib/unistd-safer.h b/gl/unistd-safer.h similarity index 100% rename from lib/unistd-safer.h rename to gl/unistd-safer.h diff --git a/gl/unistd_.h b/gl/unistd_.h new file mode 100644 index 0000000..36fa673 --- /dev/null +++ b/gl/unistd_.h @@ -0,0 +1,52 @@ +/* Substitute for and wrapper around . + Copyright (C) 2006 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _GL_UNISTD_H +#define _GL_UNISTD_H + +#if HAVE_UNISTD_H +# include @ABSOLUTE_UNISTD_H@ +#endif + + +/* Declare overridden functions. */ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef FCHDIR_REPLACEMENT + +/* Change the process' current working directory to the directory on which + the given file descriptor is open. */ +extern int fchdir (int /*fd*/); + +# define close rpl_close +extern int close (int); +# define dup rpl_dup +extern int dup (int); +# define dup2 rpl_dup2 +extern int dup2 (int, int); + +#endif + +#ifdef __cplusplus +} +#endif + + +#endif /* _GL_UNISTD_H */ diff --git a/gl/vasnprintf.c b/gl/vasnprintf.c new file mode 100644 index 0000000..0fe2aad --- /dev/null +++ b/gl/vasnprintf.c @@ -0,0 +1,889 @@ +/* vsprintf with automatic memory allocation. + Copyright (C) 1999, 2002-2006 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* Tell glibc's to provide a prototype for snprintf(). + This must come before because may include + , and once has been included, it's too late. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif + +#include +#ifndef IN_LIBINTL +# include +#endif + +/* Specification. */ +#if WIDE_CHAR_VERSION +# include "vasnwprintf.h" +#else +# include "vasnprintf.h" +#endif + +#include /* snprintf(), sprintf() */ +#include /* abort(), malloc(), realloc(), free() */ +#include /* memcpy(), strlen() */ +#include /* errno */ +#include /* CHAR_BIT */ +#include /* DBL_MAX_EXP, LDBL_MAX_EXP */ +#if WIDE_CHAR_VERSION +# include "wprintf-parse.h" +#else +# include "printf-parse.h" +#endif + +/* Checked size_t computations. */ +#include "xsize.h" + +#ifdef HAVE_WCHAR_T +# ifdef HAVE_WCSLEN +# define local_wcslen wcslen +# else + /* Solaris 2.5.1 has wcslen() in a separate library libw.so. To avoid + a dependency towards this library, here is a local substitute. + Define this substitute only once, even if this file is included + twice in the same compilation unit. */ +# ifndef local_wcslen_defined +# define local_wcslen_defined 1 +static size_t +local_wcslen (const wchar_t *s) +{ + const wchar_t *ptr; + + for (ptr = s; *ptr != (wchar_t) 0; ptr++) + ; + return ptr - s; +} +# endif +# endif +#endif + +#if WIDE_CHAR_VERSION +# define VASNPRINTF vasnwprintf +# define CHAR_T wchar_t +# define DIRECTIVE wchar_t_directive +# define DIRECTIVES wchar_t_directives +# define PRINTF_PARSE wprintf_parse +# define USE_SNPRINTF 1 +# if HAVE_DECL__SNWPRINTF + /* On Windows, the function swprintf() has a different signature than + on Unix; we use the _snwprintf() function instead. */ +# define SNPRINTF _snwprintf +# else + /* Unix. */ +# define SNPRINTF swprintf +# endif +#else +# define VASNPRINTF vasnprintf +# define CHAR_T char +# define DIRECTIVE char_directive +# define DIRECTIVES char_directives +# define PRINTF_PARSE printf_parse +# define USE_SNPRINTF (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF) +# if HAVE_DECL__SNPRINTF + /* Windows. */ +# define SNPRINTF _snprintf +# else + /* Unix. */ +# define SNPRINTF snprintf +# endif +#endif + +CHAR_T * +VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list args) +{ + DIRECTIVES d; + arguments a; + + if (PRINTF_PARSE (format, &d, &a) < 0) + { + errno = EINVAL; + return NULL; + } + +#define CLEANUP() \ + free (d.dir); \ + if (a.arg) \ + free (a.arg); + + if (printf_fetchargs (args, &a) < 0) + { + CLEANUP (); + errno = EINVAL; + return NULL; + } + + { + size_t buf_neededlength; + CHAR_T *buf; + CHAR_T *buf_malloced; + const CHAR_T *cp; + size_t i; + DIRECTIVE *dp; + /* Output string accumulator. */ + CHAR_T *result; + size_t allocated; + size_t length; + + /* Allocate a small buffer that will hold a directive passed to + sprintf or snprintf. */ + buf_neededlength = + xsum4 (7, d.max_width_length, d.max_precision_length, 6); +#if HAVE_ALLOCA + if (buf_neededlength < 4000 / sizeof (CHAR_T)) + { + buf = (CHAR_T *) alloca (buf_neededlength * sizeof (CHAR_T)); + buf_malloced = NULL; + } + else +#endif + { + size_t buf_memsize = xtimes (buf_neededlength, sizeof (CHAR_T)); + if (size_overflow_p (buf_memsize)) + goto out_of_memory_1; + buf = (CHAR_T *) malloc (buf_memsize); + if (buf == NULL) + goto out_of_memory_1; + buf_malloced = buf; + } + + if (resultbuf != NULL) + { + result = resultbuf; + allocated = *lengthp; + } + else + { + result = NULL; + allocated = 0; + } + length = 0; + /* Invariants: + result is either == resultbuf or == NULL or malloc-allocated. + If length > 0, then result != NULL. */ + + /* Ensures that allocated >= needed. Aborts through a jump to + out_of_memory if needed is SIZE_MAX or otherwise too big. */ +#define ENSURE_ALLOCATION(needed) \ + if ((needed) > allocated) \ + { \ + size_t memory_size; \ + CHAR_T *memory; \ + \ + allocated = (allocated > 0 ? xtimes (allocated, 2) : 12); \ + if ((needed) > allocated) \ + allocated = (needed); \ + memory_size = xtimes (allocated, sizeof (CHAR_T)); \ + if (size_overflow_p (memory_size)) \ + goto out_of_memory; \ + if (result == resultbuf || result == NULL) \ + memory = (CHAR_T *) malloc (memory_size); \ + else \ + memory = (CHAR_T *) realloc (result, memory_size); \ + if (memory == NULL) \ + goto out_of_memory; \ + if (result == resultbuf && length > 0) \ + memcpy (memory, result, length * sizeof (CHAR_T)); \ + result = memory; \ + } + + for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++) + { + if (cp != dp->dir_start) + { + size_t n = dp->dir_start - cp; + size_t augmented_length = xsum (length, n); + + ENSURE_ALLOCATION (augmented_length); + memcpy (result + length, cp, n * sizeof (CHAR_T)); + length = augmented_length; + } + if (i == d.count) + break; + + /* Execute a single directive. */ + if (dp->conversion == '%') + { + size_t augmented_length; + + if (!(dp->arg_index == ARG_NONE)) + abort (); + augmented_length = xsum (length, 1); + ENSURE_ALLOCATION (augmented_length); + result[length] = '%'; + length = augmented_length; + } + else + { + if (!(dp->arg_index != ARG_NONE)) + abort (); + + if (dp->conversion == 'n') + { + switch (a.arg[dp->arg_index].type) + { + case TYPE_COUNT_SCHAR_POINTER: + *a.arg[dp->arg_index].a.a_count_schar_pointer = length; + break; + case TYPE_COUNT_SHORT_POINTER: + *a.arg[dp->arg_index].a.a_count_short_pointer = length; + break; + case TYPE_COUNT_INT_POINTER: + *a.arg[dp->arg_index].a.a_count_int_pointer = length; + break; + case TYPE_COUNT_LONGINT_POINTER: + *a.arg[dp->arg_index].a.a_count_longint_pointer = length; + break; +#ifdef HAVE_LONG_LONG_INT + case TYPE_COUNT_LONGLONGINT_POINTER: + *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length; + break; +#endif + default: + abort (); + } + } + else + { + arg_type type = a.arg[dp->arg_index].type; + CHAR_T *p; + unsigned int prefix_count; + int prefixes[2]; +#if !USE_SNPRINTF + size_t tmp_length; + CHAR_T tmpbuf[700]; + CHAR_T *tmp; + + /* Allocate a temporary buffer of sufficient size for calling + sprintf. */ + { + size_t width; + size_t precision; + + width = 0; + if (dp->width_start != dp->width_end) + { + if (dp->width_arg_index != ARG_NONE) + { + int arg; + + if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) + abort (); + arg = a.arg[dp->width_arg_index].a.a_int; + width = (arg < 0 ? (unsigned int) (-arg) : arg); + } + else + { + const CHAR_T *digitp = dp->width_start; + + do + width = xsum (xtimes (width, 10), *digitp++ - '0'); + while (digitp != dp->width_end); + } + } + + precision = 6; + if (dp->precision_start != dp->precision_end) + { + if (dp->precision_arg_index != ARG_NONE) + { + int arg; + + if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) + abort (); + arg = a.arg[dp->precision_arg_index].a.a_int; + precision = (arg < 0 ? 0 : arg); + } + else + { + const CHAR_T *digitp = dp->precision_start + 1; + + precision = 0; + while (digitp != dp->precision_end) + precision = xsum (xtimes (precision, 10), *digitp++ - '0'); + } + } + + switch (dp->conversion) + { + + case 'd': case 'i': case 'u': +# ifdef HAVE_LONG_LONG_INT + if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) + tmp_length = + (unsigned int) (sizeof (unsigned long long) * CHAR_BIT + * 0.30103 /* binary -> decimal */ + ) + + 1; /* turn floor into ceil */ + else +# endif + if (type == TYPE_LONGINT || type == TYPE_ULONGINT) + tmp_length = + (unsigned int) (sizeof (unsigned long) * CHAR_BIT + * 0.30103 /* binary -> decimal */ + ) + + 1; /* turn floor into ceil */ + else + tmp_length = + (unsigned int) (sizeof (unsigned int) * CHAR_BIT + * 0.30103 /* binary -> decimal */ + ) + + 1; /* turn floor into ceil */ + if (tmp_length < precision) + tmp_length = precision; + /* Multiply by 2, as an estimate for FLAG_GROUP. */ + tmp_length = xsum (tmp_length, tmp_length); + /* Add 1, to account for a leading sign. */ + tmp_length = xsum (tmp_length, 1); + break; + + case 'o': +# ifdef HAVE_LONG_LONG_INT + if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) + tmp_length = + (unsigned int) (sizeof (unsigned long long) * CHAR_BIT + * 0.333334 /* binary -> octal */ + ) + + 1; /* turn floor into ceil */ + else +# endif + if (type == TYPE_LONGINT || type == TYPE_ULONGINT) + tmp_length = + (unsigned int) (sizeof (unsigned long) * CHAR_BIT + * 0.333334 /* binary -> octal */ + ) + + 1; /* turn floor into ceil */ + else + tmp_length = + (unsigned int) (sizeof (unsigned int) * CHAR_BIT + * 0.333334 /* binary -> octal */ + ) + + 1; /* turn floor into ceil */ + if (tmp_length < precision) + tmp_length = precision; + /* Add 1, to account for a leading sign. */ + tmp_length = xsum (tmp_length, 1); + break; + + case 'x': case 'X': +# ifdef HAVE_LONG_LONG_INT + if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) + tmp_length = + (unsigned int) (sizeof (unsigned long long) * CHAR_BIT + * 0.25 /* binary -> hexadecimal */ + ) + + 1; /* turn floor into ceil */ + else +# endif + if (type == TYPE_LONGINT || type == TYPE_ULONGINT) + tmp_length = + (unsigned int) (sizeof (unsigned long) * CHAR_BIT + * 0.25 /* binary -> hexadecimal */ + ) + + 1; /* turn floor into ceil */ + else + tmp_length = + (unsigned int) (sizeof (unsigned int) * CHAR_BIT + * 0.25 /* binary -> hexadecimal */ + ) + + 1; /* turn floor into ceil */ + if (tmp_length < precision) + tmp_length = precision; + /* Add 2, to account for a leading sign or alternate form. */ + tmp_length = xsum (tmp_length, 2); + break; + + case 'f': case 'F': +# ifdef HAVE_LONG_DOUBLE + if (type == TYPE_LONGDOUBLE) + tmp_length = + (unsigned int) (LDBL_MAX_EXP + * 0.30103 /* binary -> decimal */ + * 2 /* estimate for FLAG_GROUP */ + ) + + 1 /* turn floor into ceil */ + + 10; /* sign, decimal point etc. */ + else +# endif + tmp_length = + (unsigned int) (DBL_MAX_EXP + * 0.30103 /* binary -> decimal */ + * 2 /* estimate for FLAG_GROUP */ + ) + + 1 /* turn floor into ceil */ + + 10; /* sign, decimal point etc. */ + tmp_length = xsum (tmp_length, precision); + break; + + case 'e': case 'E': case 'g': case 'G': + case 'a': case 'A': + tmp_length = + 12; /* sign, decimal point, exponent etc. */ + tmp_length = xsum (tmp_length, precision); + break; + + case 'c': +# if defined HAVE_WINT_T && !WIDE_CHAR_VERSION + if (type == TYPE_WIDE_CHAR) + tmp_length = MB_CUR_MAX; + else +# endif + tmp_length = 1; + break; + + case 's': +# ifdef HAVE_WCHAR_T + if (type == TYPE_WIDE_STRING) + { + tmp_length = + local_wcslen (a.arg[dp->arg_index].a.a_wide_string); + +# if !WIDE_CHAR_VERSION + tmp_length = xtimes (tmp_length, MB_CUR_MAX); +# endif + } + else +# endif + tmp_length = strlen (a.arg[dp->arg_index].a.a_string); + break; + + case 'p': + tmp_length = + (unsigned int) (sizeof (void *) * CHAR_BIT + * 0.25 /* binary -> hexadecimal */ + ) + + 1 /* turn floor into ceil */ + + 2; /* account for leading 0x */ + break; + + default: + abort (); + } + + if (tmp_length < width) + tmp_length = width; + + tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ + } + + if (tmp_length <= sizeof (tmpbuf) / sizeof (CHAR_T)) + tmp = tmpbuf; + else + { + size_t tmp_memsize = xtimes (tmp_length, sizeof (CHAR_T)); + + if (size_overflow_p (tmp_memsize)) + /* Overflow, would lead to out of memory. */ + goto out_of_memory; + tmp = (CHAR_T *) malloc (tmp_memsize); + if (tmp == NULL) + /* Out of memory. */ + goto out_of_memory; + } +#endif + + /* Construct the format string for calling snprintf or + sprintf. */ + p = buf; + *p++ = '%'; + if (dp->flags & FLAG_GROUP) + *p++ = '\''; + if (dp->flags & FLAG_LEFT) + *p++ = '-'; + if (dp->flags & FLAG_SHOWSIGN) + *p++ = '+'; + if (dp->flags & FLAG_SPACE) + *p++ = ' '; + if (dp->flags & FLAG_ALT) + *p++ = '#'; + if (dp->flags & FLAG_ZERO) + *p++ = '0'; + if (dp->width_start != dp->width_end) + { + size_t n = dp->width_end - dp->width_start; + memcpy (p, dp->width_start, n * sizeof (CHAR_T)); + p += n; + } + if (dp->precision_start != dp->precision_end) + { + size_t n = dp->precision_end - dp->precision_start; + memcpy (p, dp->precision_start, n * sizeof (CHAR_T)); + p += n; + } + + switch (type) + { +#ifdef HAVE_LONG_LONG_INT + case TYPE_LONGLONGINT: + case TYPE_ULONGLONGINT: + *p++ = 'l'; + /*FALLTHROUGH*/ +#endif + case TYPE_LONGINT: + case TYPE_ULONGINT: +#ifdef HAVE_WINT_T + case TYPE_WIDE_CHAR: +#endif +#ifdef HAVE_WCHAR_T + case TYPE_WIDE_STRING: +#endif + *p++ = 'l'; + break; +#ifdef HAVE_LONG_DOUBLE + case TYPE_LONGDOUBLE: + *p++ = 'L'; + break; +#endif + default: + break; + } + *p = dp->conversion; +#if USE_SNPRINTF + p[1] = '%'; + p[2] = 'n'; + p[3] = '\0'; +#else + p[1] = '\0'; +#endif + + /* Construct the arguments for calling snprintf or sprintf. */ + prefix_count = 0; + if (dp->width_arg_index != ARG_NONE) + { + if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) + abort (); + prefixes[prefix_count++] = a.arg[dp->width_arg_index].a.a_int; + } + if (dp->precision_arg_index != ARG_NONE) + { + if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) + abort (); + prefixes[prefix_count++] = a.arg[dp->precision_arg_index].a.a_int; + } + +#if USE_SNPRINTF + /* Prepare checking whether snprintf returns the count + via %n. */ + ENSURE_ALLOCATION (xsum (length, 1)); + result[length] = '\0'; +#endif + + for (;;) + { + size_t maxlen; + int count; + int retcount; + + maxlen = allocated - length; + count = -1; + retcount = 0; + +#if USE_SNPRINTF +# define SNPRINTF_BUF(arg) \ + switch (prefix_count) \ + { \ + case 0: \ + retcount = SNPRINTF (result + length, maxlen, buf, \ + arg, &count); \ + break; \ + case 1: \ + retcount = SNPRINTF (result + length, maxlen, buf, \ + prefixes[0], arg, &count); \ + break; \ + case 2: \ + retcount = SNPRINTF (result + length, maxlen, buf, \ + prefixes[0], prefixes[1], arg, \ + &count); \ + break; \ + default: \ + abort (); \ + } +#else +# define SNPRINTF_BUF(arg) \ + switch (prefix_count) \ + { \ + case 0: \ + count = sprintf (tmp, buf, arg); \ + break; \ + case 1: \ + count = sprintf (tmp, buf, prefixes[0], arg); \ + break; \ + case 2: \ + count = sprintf (tmp, buf, prefixes[0], prefixes[1],\ + arg); \ + break; \ + default: \ + abort (); \ + } +#endif + + switch (type) + { + case TYPE_SCHAR: + { + int arg = a.arg[dp->arg_index].a.a_schar; + SNPRINTF_BUF (arg); + } + break; + case TYPE_UCHAR: + { + unsigned int arg = a.arg[dp->arg_index].a.a_uchar; + SNPRINTF_BUF (arg); + } + break; + case TYPE_SHORT: + { + int arg = a.arg[dp->arg_index].a.a_short; + SNPRINTF_BUF (arg); + } + break; + case TYPE_USHORT: + { + unsigned int arg = a.arg[dp->arg_index].a.a_ushort; + SNPRINTF_BUF (arg); + } + break; + case TYPE_INT: + { + int arg = a.arg[dp->arg_index].a.a_int; + SNPRINTF_BUF (arg); + } + break; + case TYPE_UINT: + { + unsigned int arg = a.arg[dp->arg_index].a.a_uint; + SNPRINTF_BUF (arg); + } + break; + case TYPE_LONGINT: + { + long int arg = a.arg[dp->arg_index].a.a_longint; + SNPRINTF_BUF (arg); + } + break; + case TYPE_ULONGINT: + { + unsigned long int arg = a.arg[dp->arg_index].a.a_ulongint; + SNPRINTF_BUF (arg); + } + break; +#ifdef HAVE_LONG_LONG_INT + case TYPE_LONGLONGINT: + { + long long int arg = a.arg[dp->arg_index].a.a_longlongint; + SNPRINTF_BUF (arg); + } + break; + case TYPE_ULONGLONGINT: + { + unsigned long long int arg = a.arg[dp->arg_index].a.a_ulonglongint; + SNPRINTF_BUF (arg); + } + break; +#endif + case TYPE_DOUBLE: + { + double arg = a.arg[dp->arg_index].a.a_double; + SNPRINTF_BUF (arg); + } + break; +#ifdef HAVE_LONG_DOUBLE + case TYPE_LONGDOUBLE: + { + long double arg = a.arg[dp->arg_index].a.a_longdouble; + SNPRINTF_BUF (arg); + } + break; +#endif + case TYPE_CHAR: + { + int arg = a.arg[dp->arg_index].a.a_char; + SNPRINTF_BUF (arg); + } + break; +#ifdef HAVE_WINT_T + case TYPE_WIDE_CHAR: + { + wint_t arg = a.arg[dp->arg_index].a.a_wide_char; + SNPRINTF_BUF (arg); + } + break; +#endif + case TYPE_STRING: + { + const char *arg = a.arg[dp->arg_index].a.a_string; + SNPRINTF_BUF (arg); + } + break; +#ifdef HAVE_WCHAR_T + case TYPE_WIDE_STRING: + { + const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string; + SNPRINTF_BUF (arg); + } + break; +#endif + case TYPE_POINTER: + { + void *arg = a.arg[dp->arg_index].a.a_pointer; + SNPRINTF_BUF (arg); + } + break; + default: + abort (); + } + +#if USE_SNPRINTF + /* Portability: Not all implementations of snprintf() + are ISO C 99 compliant. Determine the number of + bytes that snprintf() has produced or would have + produced. */ + if (count >= 0) + { + /* Verify that snprintf() has NUL-terminated its + result. */ + if (count < maxlen && result[length + count] != '\0') + abort (); + /* Portability hack. */ + if (retcount > count) + count = retcount; + } + else + { + /* snprintf() doesn't understand the '%n' + directive. */ + if (p[1] != '\0') + { + /* Don't use the '%n' directive; instead, look + at the snprintf() return value. */ + p[1] = '\0'; + continue; + } + else + { + /* Look at the snprintf() return value. */ + if (retcount < 0) + { + /* HP-UX 10.20 snprintf() is doubly deficient: + It doesn't understand the '%n' directive, + *and* it returns -1 (rather than the length + that would have been required) when the + buffer is too small. */ + size_t bigger_need = + xsum (xtimes (allocated, 2), 12); + ENSURE_ALLOCATION (bigger_need); + continue; + } + else + count = retcount; + } + } +#endif + + /* Attempt to handle failure. */ + if (count < 0) + { + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + errno = EINVAL; + return NULL; + } + +#if !USE_SNPRINTF + if (count >= tmp_length) + /* tmp_length was incorrectly calculated - fix the + code above! */ + abort (); +#endif + + /* Make room for the result. */ + if (count >= maxlen) + { + /* Need at least count bytes. But allocate + proportionally, to avoid looping eternally if + snprintf() reports a too small count. */ + size_t n = + xmax (xsum (length, count), xtimes (allocated, 2)); + + ENSURE_ALLOCATION (n); +#if USE_SNPRINTF + continue; +#endif + } + +#if USE_SNPRINTF + /* The snprintf() result did fit. */ +#else + /* Append the sprintf() result. */ + memcpy (result + length, tmp, count * sizeof (CHAR_T)); + if (tmp != tmpbuf) + free (tmp); +#endif + + length += count; + break; + } + } + } + } + + /* Add the final NUL. */ + ENSURE_ALLOCATION (xsum (length, 1)); + result[length] = '\0'; + + if (result != resultbuf && length + 1 < allocated) + { + /* Shrink the allocated memory if possible. */ + CHAR_T *memory; + + memory = (CHAR_T *) realloc (result, (length + 1) * sizeof (CHAR_T)); + if (memory != NULL) + result = memory; + } + + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + *lengthp = length; + /* Note that we can produce a big string of a length > INT_MAX. POSIX + says that snprintf() fails with errno = EOVERFLOW in this case, but + that's only because snprintf() returns an 'int'. This function does + not have this limitation. */ + return result; + + out_of_memory: + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + out_of_memory_1: + CLEANUP (); + errno = ENOMEM; + return NULL; + } +} + +#undef SNPRINTF +#undef USE_SNPRINTF +#undef PRINTF_PARSE +#undef DIRECTIVES +#undef DIRECTIVE +#undef CHAR_T +#undef VASNPRINTF diff --git a/gl/vasnprintf.h b/gl/vasnprintf.h new file mode 100644 index 0000000..894008c --- /dev/null +++ b/gl/vasnprintf.h @@ -0,0 +1,77 @@ +/* vsprintf with automatic memory allocation. + Copyright (C) 2002-2004 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _VASNPRINTF_H +#define _VASNPRINTF_H + +/* Get va_list. */ +#include + +/* Get size_t. */ +#include + +#ifndef __attribute__ +/* This feature is available in gcc versions 2.5 and later. */ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ +# define __attribute__(Spec) /* empty */ +# endif +/* The __-protected variants of `format' and `printf' attributes + are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) +# define __format__ format +# define __printf__ printf +# endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Write formatted output to a string dynamically allocated with malloc(). + You can pass a preallocated buffer for the result in RESULTBUF and its + size in *LENGTHP; otherwise you pass RESULTBUF = NULL. + If successful, return the address of the string (this may be = RESULTBUF + if no dynamic memory allocation was necessary) and set *LENGTHP to the + number of resulting bytes, excluding the trailing NUL. Upon error, set + errno and return NULL. + + When dynamic memory allocation occurs, the preallocated buffer is left + alone (with possibly modified contents). This makes it possible to use + a statically allocated or stack-allocated buffer, like this: + + char buf[100]; + size_t len = sizeof (buf); + char *output = vasnprintf (buf, &len, format, args); + if (output == NULL) + ... error handling ...; + else + { + ... use the output string ...; + if (output != buf) + free (output); + } + */ +extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) + __attribute__ ((__format__ (__printf__, 3, 4))); +extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args) + __attribute__ ((__format__ (__printf__, 3, 0))); + +#ifdef __cplusplus +} +#endif + +#endif /* _VASNPRINTF_H */ diff --git a/gl/vasprintf.c b/gl/vasprintf.c new file mode 100644 index 0000000..8247073 --- /dev/null +++ b/gl/vasprintf.c @@ -0,0 +1,52 @@ +/* Formatted output to strings. + Copyright (C) 1999, 2002, 2006 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#include + +/* Specification. */ +#include "vasprintf.h" + +#include +#include +#include + +#include "vasnprintf.h" + +/* Some systems, like OSF/1 4.0 and Woe32, don't have EOVERFLOW. */ +#ifndef EOVERFLOW +# define EOVERFLOW E2BIG +#endif + +int +vasprintf (char **resultp, const char *format, va_list args) +{ + size_t length; + char *result = vasnprintf (NULL, &length, format, args); + if (result == NULL) + return -1; + + if (length > INT_MAX) + { + free (result); + errno = EOVERFLOW; + return -1; + } + + *resultp = result; + /* Return the number of resulting bytes, excluding the trailing NUL. */ + return length; +} diff --git a/gl/vasprintf.h b/gl/vasprintf.h new file mode 100644 index 0000000..ab5515c --- /dev/null +++ b/gl/vasprintf.h @@ -0,0 +1,63 @@ +/* vsprintf with automatic memory allocation. + Copyright (C) 2002-2003 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _VASPRINTF_H +#define _VASPRINTF_H + +#if HAVE_VASPRINTF + +/* Get asprintf(), vasprintf() declarations. */ +#include + +#else + +/* Get va_list. */ +#include + +#ifndef __attribute__ +/* This feature is available in gcc versions 2.5 and later. */ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ +# define __attribute__(Spec) /* empty */ +# endif +/* The __-protected variants of `format' and `printf' attributes + are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) +# define __format__ format +# define __printf__ printf +# endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Write formatted output to a string dynamically allocated with malloc(). + If the memory allocation succeeds, store the address of the string in + *RESULT and return the number of resulting bytes, excluding the trailing + NUL. Upon memory allocation error, or some other error, return -1. */ +extern int asprintf (char **result, const char *format, ...) + __attribute__ ((__format__ (__printf__, 2, 3))); +extern int vasprintf (char **result, const char *format, va_list args) + __attribute__ ((__format__ (__printf__, 2, 0))); + +#ifdef __cplusplus +} +#endif + +#endif + +#endif /* _VASPRINTF_H */ diff --git a/gl/vsnprintf.c b/gl/vsnprintf.c new file mode 100644 index 0000000..af567d2 --- /dev/null +++ b/gl/vsnprintf.c @@ -0,0 +1,77 @@ +/* Formatted output to strings. + Copyright (C) 2004, 2006 Free Software Foundation, Inc. + Written by Simon Josefsson and Yoann Vandoorselaere . + + 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +/* Specification. */ +#include "vsnprintf.h" + +#include +#include +#include +#include +#include +#include + +#include "vasnprintf.h" + +/* Some systems, like OSF/1 4.0 and Woe32, don't have EOVERFLOW. */ +#ifndef EOVERFLOW +# define EOVERFLOW E2BIG +#endif + +/* Print formatted output to string STR. Similar to vsprintf, but + additional length SIZE limit how much is written into STR. Returns + string length of formatted string (which may be larger than SIZE). + STR may be NULL, in which case nothing will be written. On error, + return a negative value. */ +int +vsnprintf (char *str, size_t size, const char *format, va_list args) +{ + char *output; + size_t len; + size_t lenbuf = size; + + output = vasnprintf (str, &lenbuf, format, args); + len = lenbuf; + + if (!output) + return -1; + + if (output != str) + { + if (size) + { + size_t pruned_len = (len < size ? len : size - 1); + memcpy (str, output, pruned_len); + str[pruned_len] = '\0'; + } + + free (output); + } + + if (len > INT_MAX) + { + errno = EOVERFLOW; + return -1; + } + + return len; +} diff --git a/gl/vsnprintf.h b/gl/vsnprintf.h new file mode 100644 index 0000000..f80c77a --- /dev/null +++ b/gl/vsnprintf.h @@ -0,0 +1,31 @@ +/* Formatted output to strings. + Copyright (C) 2004 Free Software Foundation, Inc. + Written by Simon Josefsson and Yoann Vandoorselaere . + + 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef VSNPRINTF_H +#define VSNPRINTF_H + +#include + +/* Get vsnprintf declaration, if available. */ +#include + +#if defined HAVE_DECL_VSNPRINTF && !HAVE_DECL_VSNPRINTF +int vsnprintf (char *str, size_t size, const char *format, va_list args); +#endif + +#endif /* VSNPRINTF_H */ diff --git a/gl/wchar_.h b/gl/wchar_.h new file mode 100644 index 0000000..6813a21 --- /dev/null +++ b/gl/wchar_.h @@ -0,0 +1,42 @@ +/* A substitute for ISO C99 , for platforms that have issues. + + Copyright (C) 2007 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* Written by Eric Blake. */ + +/* + * ISO C 99 for platforms that have issues. + * + * + * For now, this just ensures proper prerequisite inclusion order. + */ + +#ifndef _GL_WCHAR_H +#define _GL_WCHAR_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 the original . */ +#include @ABSOLUTE_WCHAR_H@ + +#endif /* _GL_WCHAR_H */ diff --git a/gl/wctype_.h b/gl/wctype_.h new file mode 100644 index 0000000..1297c61 --- /dev/null +++ b/gl/wctype_.h @@ -0,0 +1,154 @@ +/* A substitute for ISO C99 , for platforms that lack it. + + Copyright (C) 2006, 2007 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* Written by Bruno Haible and Paul Eggert. */ + +/* + * ISO C 99 for platforms that lack it. + * + * + * iswctype, towctrans, towlower, towupper, wctrans, wctype, + * wctrans_t, and wctype_t are not yet implemented. + */ + +#ifndef _GL_WCTYPE_H +#define _GL_WCTYPE_H + +#if @HAVE_WINT_T@ +/* Solaris 2.5 has a bug: must be included before . + 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 +typedef wint_t __wctype_wint_t; +#else +typedef int __wctype_wint_t; +#endif + +/* Include the original if it exists. + BeOS 5 has the functions but no . */ +#if @HAVE_WCTYPE_H@ +# include @ABSOLUTE_WCTYPE_H@ +#endif + +/* FreeBSD 4.4 to 4.11 has but lacks the functions. + Assume all 12 functions are implemented the same way, or not at all. */ +#if ! HAVE_ISWCNTRL + +/* IRIX 5.3 has macros but no functions, its isw* macros refer to an + undefined variable _ctmp_ and to macros like _P, and they + refer to system functions like _iswctype that are not in the + standard C library. Rather than try to get ancient buggy + implementations like this to work, just disable them. */ +# undef iswalnum +# undef iswalpha +# undef iswblank +# undef iswcntrl +# undef iswdigit +# undef iswgraph +# undef iswlower +# undef iswprint +# undef iswpunct +# undef iswspace +# undef iswupper +# undef iswxdigit + +static inline int +iswalnum (__wctype_wint_t wc) +{ + return ((wc >= '0' && wc <= '9') + || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z')); +} + +static inline int +iswalpha (__wctype_wint_t wc) +{ + return (wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'; +} + +static inline int +iswblank (__wctype_wint_t wc) +{ + return wc == ' ' || wc == '\t'; +} + +static inline int +iswcntrl (__wctype_wint_t wc) +{ + return (wc & ~0x1f) == 0 || wc == 0x7f; +} + +static inline int +iswdigit (__wctype_wint_t wc) +{ + return wc >= '0' && wc <= '9'; +} + +static inline int +iswgraph (__wctype_wint_t wc) +{ + return wc >= '!' && wc <= '~'; +} + +static inline int +iswlower (__wctype_wint_t wc) +{ + return wc >= 'a' && wc <= 'z'; +} + +static inline int +iswprint (__wctype_wint_t wc) +{ + return wc >= ' ' && wc <= '~'; +} + +static inline int +iswpunct (__wctype_wint_t wc) +{ + return (wc >= '!' && wc <= '~' + && !((wc >= '0' && wc <= '9') + || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'))); +} + +static inline int +iswspace (__wctype_wint_t wc) +{ + return (wc == ' ' || wc == '\t' + || wc == '\n' || wc == '\v' || wc == '\f' || wc == '\r'); +} + +static inline int +iswupper (__wctype_wint_t wc) +{ + return wc >= 'A' && wc <= 'Z'; +} + +static inline int +iswxdigit (__wctype_wint_t wc) +{ + return ((wc >= '0' && wc <= '9') + || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F')); +} + +# endif /* ! HAVE_ISWCNTRL */ + +#endif /* _GL_WCTYPE_H */ diff --git a/gl/wcwidth.h b/gl/wcwidth.h new file mode 100644 index 0000000..8ed5ff8 --- /dev/null +++ b/gl/wcwidth.h @@ -0,0 +1,57 @@ +/* Determine the number of screen columns needed for a character. + Copyright (C) 2006, 2007 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _gl_WCWIDTH_H +#define _gl_WCWIDTH_H + +#if HAVE_WCHAR_T + +/* Get wcwidth if available, along with wchar_t. */ +# include + +/* Get iswprint. */ +# include + +# ifndef HAVE_DECL_WCWIDTH +"this configure-time declaration test was not run" +# endif +# ifndef wcwidth +# if !HAVE_WCWIDTH + +/* wcwidth doesn't exist, so assume all printable characters have + width 1. */ +static inline int +wcwidth (wchar_t wc) +{ + return wc == 0 ? 0 : iswprint (wc) ? 1 : -1; +} + +# elif !HAVE_DECL_WCWIDTH + +/* wcwidth exists but is not declared. */ +extern +# ifdef __cplusplus +"C" +# endif +int wcwidth (int /* actually wchar_t */); + +# endif +# endif + +#endif /* HAVE_WCHAR_T */ + +#endif /* _gl_WCWIDTH_H */ diff --git a/lib/xalloc-die.c b/gl/xalloc-die.c similarity index 90% rename from lib/xalloc-die.c rename to gl/xalloc-die.c index ff5ac9e..090f060 100644 --- a/lib/xalloc-die.c +++ b/gl/xalloc-die.c @@ -1,6 +1,6 @@ /* Report a memory allocation failure and exit. - Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004 Free + Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -17,9 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include #include "xalloc.h" @@ -30,7 +28,6 @@ #include "gettext.h" #define _(msgid) gettext (msgid) -#define N_(msgid) msgid void xalloc_die (void) diff --git a/gl/xalloc.h b/gl/xalloc.h new file mode 100644 index 0000000..17ab514 --- /dev/null +++ b/gl/xalloc.h @@ -0,0 +1,267 @@ +/* xalloc.h -- malloc with out-of-memory checking + + Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000, 2003, 2004, 2006 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef XALLOC_H_ +# define XALLOC_H_ + +# include + + +# ifdef __cplusplus +extern "C" { +# endif + + +# ifndef __attribute__ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__ +# define __attribute__(x) +# endif +# endif + +# ifndef ATTRIBUTE_NORETURN +# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) +# endif + +/* This function is always triggered when memory is exhausted. + It must be defined by the application, either explicitly + or by using gnulib's xalloc-die module. This is the + function to call when one wants the program to die because of a + memory allocation failure. */ +extern void xalloc_die (void) ATTRIBUTE_NORETURN; + +void *xmalloc (size_t s); +void *xzalloc (size_t s); +void *xcalloc (size_t n, size_t s); +void *xrealloc (void *p, size_t s); +void *x2realloc (void *p, size_t *pn); +void *xmemdup (void const *p, size_t s); +char *xstrdup (char const *str); + +/* Return 1 if an array of N objects, each of size S, cannot exist due + to size arithmetic overflow. S must be positive and N must be + nonnegative. This is a macro, not an inline function, so that it + works correctly even when SIZE_MAX < N. + + By gnulib convention, SIZE_MAX represents overflow in size + calculations, so the conservative dividend to use here is + SIZE_MAX - 1, since SIZE_MAX might represent an overflowed value. + However, malloc (SIZE_MAX) fails on all known hosts where + sizeof (ptrdiff_t) <= sizeof (size_t), so do not bother to test for + exactly-SIZE_MAX allocations on such hosts; this avoids a test and + branch when S is known to be 1. */ +# define xalloc_oversized(n, s) \ + ((size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) < (n)) + + +/* In the following macros, T must be an elementary or structure/union or + typedef'ed type, or a pointer to such a type. To apply one of the + following macros to a function pointer or array type, you need to typedef + it first and use the typedef name. */ + +/* Allocate an object of type T dynamically, with error checking. */ +/* extern t *XMALLOC (typename t); */ +# define XMALLOC(t) ((t *) xmalloc (sizeof (t))) + +/* Allocate memory for N elements of type T, with error checking. */ +/* extern t *XNMALLOC (size_t n, typename t); */ +# define XNMALLOC(n, t) \ + ((t *) (sizeof (t) == 1 ? xmalloc (n) : xnmalloc (n, sizeof (t)))) + +/* Allocate an object of type T dynamically, with error checking, + and zero it. */ +/* extern t *XZALLOC (typename t); */ +# define XZALLOC(t) ((t *) xzalloc (sizeof (t))) + +/* Allocate memory for N elements of type T, with error checking, + and zero it. */ +/* extern t *XCALLOC (size_t n, typename t); */ +# define XCALLOC(n, t) \ + ((t *) (sizeof (t) == 1 ? xzalloc (n) : xcalloc (n, sizeof (t)))) + + +# if HAVE_INLINE +# define static_inline static inline +# else + void *xnmalloc (size_t n, size_t s); + void *xnrealloc (void *p, size_t n, size_t s); + void *x2nrealloc (void *p, size_t *pn, size_t s); + char *xcharalloc (size_t n); +# endif + +# ifdef static_inline + +/* Allocate an array of N objects, each with S bytes of memory, + dynamically, with error checking. S must be nonzero. */ + +static_inline void * +xnmalloc (size_t n, size_t s) +{ + if (xalloc_oversized (n, s)) + xalloc_die (); + return xmalloc (n * s); +} + +/* Change the size of an allocated block of memory P to an array of N + objects each of S bytes, with error checking. S must be nonzero. */ + +static_inline void * +xnrealloc (void *p, size_t n, size_t s) +{ + if (xalloc_oversized (n, s)) + xalloc_die (); + return xrealloc (p, n * s); +} + +/* If P is null, allocate a block of at least *PN such objects; + otherwise, reallocate P so that it contains more than *PN objects + each of S bytes. *PN must be nonzero unless P is null, and S must + be nonzero. Set *PN to the new number of objects, and return the + pointer to the new block. *PN is never set to zero, and the + returned pointer is never null. + + Repeated reallocations are guaranteed to make progress, either by + allocating an initial block with a nonzero size, or by allocating a + larger block. + + In the following implementation, nonzero sizes are doubled so that + repeated reallocations have O(N log N) overall cost rather than + O(N**2) cost, but the specification for this function does not + guarantee that sizes are doubled. + + Here is an example of use: + + int *p = NULL; + size_t used = 0; + size_t allocated = 0; + + void + append_int (int value) + { + if (used == allocated) + p = x2nrealloc (p, &allocated, sizeof *p); + p[used++] = value; + } + + This causes x2nrealloc to allocate a block of some nonzero size the + first time it is called. + + To have finer-grained control over the initial size, set *PN to a + nonzero value before calling this function with P == NULL. For + example: + + int *p = NULL; + size_t used = 0; + size_t allocated = 0; + size_t allocated1 = 1000; + + void + append_int (int value) + { + if (used == allocated) + { + p = x2nrealloc (p, &allocated1, sizeof *p); + allocated = allocated1; + } + p[used++] = value; + } + + */ + +static_inline void * +x2nrealloc (void *p, size_t *pn, size_t s) +{ + size_t n = *pn; + + if (! p) + { + if (! n) + { + /* The approximate size to use for initial small allocation + requests, when the invoking code specifies an old size of + zero. 64 bytes is the largest "small" request for the + GNU C library malloc. */ + enum { DEFAULT_MXFAST = 64 }; + + n = DEFAULT_MXFAST / s; + n += !n; + } + } + else + { + if (((size_t) -1) / 2 / s < n) + xalloc_die (); + n *= 2; + } + + *pn = n; + return xrealloc (p, n * s); +} + +/* Return a pointer to a new buffer of N bytes. This is like xmalloc, + except it returns char *. */ + +static_inline char * +xcharalloc (size_t n) +{ + return XNMALLOC (n, char); +} + +# endif + +# ifdef __cplusplus +} + +/* C++ does not allow conversions from void * to other pointer types + without a cast. Use templates to work around the problem when + possible. */ + +template inline T * +xrealloc (T *p, size_t s) +{ + return (T *) xrealloc ((void *) p, s); +} + +template inline T * +xnrealloc (T *p, size_t n, size_t s) +{ + return (T *) xnrealloc ((void *) p, n, s); +} + +template inline T * +x2realloc (T *p, size_t *pn) +{ + return (T *) x2realloc ((void *) p, pn); +} + +template inline T * +x2nrealloc (T *p, size_t *pn, size_t s) +{ + return (T *) x2nrealloc ((void *) p, pn, s); +} + +template inline T * +xmemdup (T const *p, size_t s) +{ + return (T *) xmemdup ((void const *) p, s); +} + +# endif + + +#endif /* !XALLOC_H_ */ diff --git a/gl/xmalloc.c b/gl/xmalloc.c new file mode 100644 index 0000000..318e0dd --- /dev/null +++ b/gl/xmalloc.c @@ -0,0 +1,123 @@ +/* xmalloc.c -- malloc with out of memory checking + + Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000, 2002, 2003, 2004, 2005, 2006 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#include + +#if ! HAVE_INLINE +# define static_inline +#endif +#include "xalloc.h" +#undef static_inline + +#include +#include + +#ifndef SIZE_MAX +# define SIZE_MAX ((size_t) -1) +#endif + +/* 1 if calloc is known to be compatible with GNU calloc. This + matters if we are not also using the calloc module, which defines + HAVE_CALLOC and supports the GNU API even on non-GNU platforms. */ +#if defined HAVE_CALLOC || defined __GLIBC__ +enum { HAVE_GNU_CALLOC = 1 }; +#else +enum { HAVE_GNU_CALLOC = 0 }; +#endif + +/* Allocate N bytes of memory dynamically, with error checking. */ + +void * +xmalloc (size_t n) +{ + void *p = malloc (n); + if (!p && n != 0) + xalloc_die (); + return p; +} + +/* Change the size of an allocated block of memory P to N bytes, + with error checking. */ + +void * +xrealloc (void *p, size_t n) +{ + p = realloc (p, n); + if (!p && n != 0) + xalloc_die (); + return p; +} + +/* If P is null, allocate a block of at least *PN bytes; otherwise, + reallocate P so that it contains more than *PN bytes. *PN must be + nonzero unless P is null. Set *PN to the new block's size, and + return the pointer to the new block. *PN is never set to zero, and + the returned pointer is never null. */ + +void * +x2realloc (void *p, size_t *pn) +{ + return x2nrealloc (p, pn, 1); +} + +/* Allocate S bytes of zeroed memory dynamically, with error checking. + There's no need for xnzalloc (N, S), since it would be equivalent + to xcalloc (N, S). */ + +void * +xzalloc (size_t s) +{ + return memset (xmalloc (s), 0, s); +} + +/* Allocate zeroed memory for N elements of S bytes, with error + checking. S must be nonzero. */ + +void * +xcalloc (size_t n, size_t s) +{ + void *p; + /* Test for overflow, since some calloc implementations don't have + proper overflow checks. But omit overflow and size-zero tests if + HAVE_GNU_CALLOC, since GNU calloc catches overflow and never + returns NULL if successful. */ + if ((! HAVE_GNU_CALLOC && xalloc_oversized (n, s)) + || (! (p = calloc (n, s)) && (HAVE_GNU_CALLOC || n != 0))) + xalloc_die (); + return p; +} + +/* Clone an object P of size S, with error checking. There's no need + for xnmemdup (P, N, S), since xmemdup (P, N * S) works without any + need for an arithmetic overflow check. */ + +void * +xmemdup (void const *p, size_t s) +{ + return memcpy (xmalloc (s), p, s); +} + +/* Clone STRING. */ + +char * +xstrdup (char const *string) +{ + return xmemdup (string, strlen (string) + 1); +} diff --git a/gl/xsize.h b/gl/xsize.h new file mode 100644 index 0000000..341fb16 --- /dev/null +++ b/gl/xsize.h @@ -0,0 +1,108 @@ +/* xsize.h -- Checked size_t computations. + + Copyright (C) 2003 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _XSIZE_H +#define _XSIZE_H + +/* Get size_t. */ +#include + +/* Get SIZE_MAX. */ +#include +#if HAVE_STDINT_H +# include +#endif + +/* The size of memory objects is often computed through expressions of + type size_t. Example: + void* p = malloc (header_size + n * element_size). + These computations can lead to overflow. When this happens, malloc() + returns a piece of memory that is way too small, and the program then + crashes while attempting to fill the memory. + To avoid this, the functions and macros in this file check for overflow. + The convention is that SIZE_MAX represents overflow. + malloc (SIZE_MAX) is not guaranteed to fail -- think of a malloc + implementation that uses mmap --, it's recommended to use size_overflow_p() + or size_in_bounds_p() before invoking malloc(). + The example thus becomes: + size_t size = xsum (header_size, xtimes (n, element_size)); + void *p = (size_in_bounds_p (size) ? malloc (size) : NULL); +*/ + +/* Convert an arbitrary value >= 0 to type size_t. */ +#define xcast_size_t(N) \ + ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX) + +/* Sum of two sizes, with overflow check. */ +static inline size_t +#if __GNUC__ >= 3 +__attribute__ ((__pure__)) +#endif +xsum (size_t size1, size_t size2) +{ + size_t sum = size1 + size2; + return (sum >= size1 ? sum : SIZE_MAX); +} + +/* Sum of three sizes, with overflow check. */ +static inline size_t +#if __GNUC__ >= 3 +__attribute__ ((__pure__)) +#endif +xsum3 (size_t size1, size_t size2, size_t size3) +{ + return xsum (xsum (size1, size2), size3); +} + +/* Sum of four sizes, with overflow check. */ +static inline size_t +#if __GNUC__ >= 3 +__attribute__ ((__pure__)) +#endif +xsum4 (size_t size1, size_t size2, size_t size3, size_t size4) +{ + return xsum (xsum (xsum (size1, size2), size3), size4); +} + +/* Maximum of two sizes, with overflow check. */ +static inline size_t +#if __GNUC__ >= 3 +__attribute__ ((__pure__)) +#endif +xmax (size_t size1, size_t size2) +{ + /* No explicit check is needed here, because for any n: + max (SIZE_MAX, n) == SIZE_MAX and max (n, SIZE_MAX) == SIZE_MAX. */ + return (size1 >= size2 ? size1 : size2); +} + +/* Multiplication of a count with an element size, with overflow check. + The count must be >= 0 and the element size must be > 0. + This is a macro, not an inline function, so that it works correctly even + when N is of a wider tupe and N > SIZE_MAX. */ +#define xtimes(N, ELSIZE) \ + ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX) + +/* Check for overflow. */ +#define size_overflow_p(SIZE) \ + ((SIZE) == SIZE_MAX) +/* Check against overflow. */ +#define size_in_bounds_p(SIZE) \ + ((SIZE) != SIZE_MAX) + +#endif /* _XSIZE_H */ diff --git a/gl/xstrndup.c b/gl/xstrndup.c new file mode 100644 index 0000000..afcbc1a --- /dev/null +++ b/gl/xstrndup.c @@ -0,0 +1,37 @@ +/* Duplicate a bounded initial segment of a string, with out-of-memory + checking. + Copyright (C) 2003, 2006 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#include + +/* Specification. */ +#include "xstrndup.h" + +#include "strndup.h" +#include "xalloc.h" + +/* Return a newly allocated copy of at most N bytes of STRING. + In other words, return a copy of the initial segment of length N of + STRING. */ +char * +xstrndup (const char *string, size_t n) +{ + char *s = strndup (string, n); + if (! s) + xalloc_die (); + return s; +} diff --git a/gl/xstrndup.h b/gl/xstrndup.h new file mode 100644 index 0000000..88354cf --- /dev/null +++ b/gl/xstrndup.h @@ -0,0 +1,24 @@ +/* Duplicate a bounded initial segment of a string, with out-of-memory + checking. + Copyright (C) 2003 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#include + +/* Return a newly allocated copy of at most N bytes of STRING. + In other words, return a copy of the initial segment of length N of + STRING. */ +extern char *xstrndup (const char *string, size_t n); diff --git a/lib/Makefile.am b/lib/Makefile.am index 8045569..3909bb9 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -2,73 +2,14 @@ SUBDIRS = tests -noinst_LIBRARIES = libcoreutils.a libnagiosplug.a - -# Will auto pick up fsusage.c mountlist.c -libcoreutils_a_SOURCES = \ - cloexec.c cloexec.h \ - exit.h \ - full-read.c full-read.h \ - full-write.c full-write.h \ - gettext.h \ - safe-read.c safe-read.h \ - safe-write.c safe-write.h strcase.h xalloc-die.c - -# intprops.h required for getloadavg.c -# This needs to be an EXTRA_DIST because the m4s -# that have AC_LIBSOURCES for intprops.h are not necessary and -# the getloadavg m4 is an autoconf one, so doesn't -# know about intprops.h. Confused? You will be! -EXTRA_DIST = intprops.h - -other_coreutils_files = \ - error.c error.h \ - fsusage.c \ - getloadavg.c \ - malloc.c \ - mountlist.c \ - realloc.c \ - strtod.c \ - exitfail.c exitfail.h \ - fsusage.h \ - getopt.c getopt1.c \ - mountlist.h \ - unlocked-io.h \ - xalloc.h \ - xmalloc.c +noinst_LIBRARIES = libnagiosplug.a -libcoreutils_a_LIBADD = $(LIBOBJS) -libcoreutils_a_DEPENDENCIES = $(libcoreutils_a_LIBADD) +libnagiosplug_a_SOURCES = utils_base.c utils_disk.c +EXTRA_DIST = utils_base.h utils_disk.h -libnagiosplug_a_SOURCES = snprintf.c utils_base.c utils_disk.c -EXTRA_DIST += utils_base.h utils_disk.h - -INCLUDES = -I$(srcdir) -I$(top_srcdir)/intl -I$(top_srcdir)/plugins - -print_coreutil_files: - @echo $(libcoreutils_a_SOURCES) $(other_coreutils_files) $(EXTRA_DIST) +INCLUDES = -I$(srcdir) -I$(top_srcdir)/gl -I$(top_srcdir)/intl -I$(top_srcdir)/plugins test: cd tests && make test -# Below are from coreutil's lib/Makefile.am -BUILT_SOURCES = $(STDBOOL_H) -EXTRA_DIST += stdbool_.h -MOSTLYCLEANFILES = stdbool.h stdbool.ht -# Create stdbool.h on systems that lack a working one. -stdbool.h: stdbool_.h - sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' $(srcdir)/stdbool_.h > $@t - mv $@t $@ - -BUILT_SOURCES += $(GETOPT_H) -EXTRA_DIST += getopt_.h getopt_int.h - -# We need the following in order to create an when the system -# doesn't have one that works with the given compiler. -all-local $(lib_OBJECTS): $(GETOPT_H) -getopt.h: getopt_.h - cp $(srcdir)/getopt_.h $@-t - mv $@-t $@ -MOSTLYCLEANFILES += getopt.h getopt.h-t - diff --git a/lib/Makefile.in b/lib/Makefile.in index 43d192f..b4ca74d 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.4 from Makefile.am. +# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# 2003, 2004, 2005 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. @@ -14,8 +14,6 @@ @SET_MAKE@ -SOURCES = $(libcoreutils_a_SOURCES) $(libnagiosplug_a_SOURCES) - srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -38,54 +36,76 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = lib -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in basename.c \ - c-strtod.c c-strtod.h c-strtold.c creat-safer.c dirname.h \ - dup-safer.c error.c error.h exitfail.c exitfail.h fcntl--.h \ - fcntl-safer.h fd-safer.c fsusage.c fsusage.h getloadavg.c \ - getopt.c getopt1.c malloc.c mountlist.c mountlist.h \ - open-safer.c pipe-safer.c realloc.c regcomp.c regex.c regex.h \ - regex_internal.c regex_internal.h regexec.c strtod.c \ - unistd--.h unistd-safer.h unlocked-io.h xalloc.h xmalloc.c +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/afs.m4 \ - $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/basename.m4 \ - $(top_srcdir)/m4/c-strtod.m4 $(top_srcdir)/m4/codeset.m4 \ - $(top_srcdir)/m4/dos.m4 $(top_srcdir)/m4/exitfail.m4 \ - $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fcntl-safer.m4 \ - $(top_srcdir)/m4/fstypename.m4 $(top_srcdir)/m4/fsusage.m4 \ - $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/inttypes_h.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/ls-mntd-fs.m4 \ - $(top_srcdir)/m4/mountlist.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/np_coreutils.m4 $(top_srcdir)/m4/np_curl.m4 \ - $(top_srcdir)/m4/onceonly_2_57.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/regex.m4 \ - $(top_srcdir)/m4/restrict.m4 $(top_srcdir)/m4/stdbool.m4 \ - $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \ - $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/unistd-safer.m4 \ - $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/xalloc.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in +am__aclocal_m4_deps = $(top_srcdir)/m4/np_mysqlclient.m4 \ + $(top_srcdir)/gl/m4/absolute-header.m4 \ + $(top_srcdir)/gl/m4/alloca.m4 \ + $(top_srcdir)/gl/m4/arpa_inet_h.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/double-slash-root.m4 \ + $(top_srcdir)/gl/m4/eoverflow.m4 $(top_srcdir)/gl/m4/error.m4 \ + $(top_srcdir)/gl/m4/exitfail.m4 \ + $(top_srcdir)/gl/m4/extensions.m4 \ + $(top_srcdir)/gl/m4/fcntl-safer.m4 \ + $(top_srcdir)/gl/m4/fstypename.m4 \ + $(top_srcdir)/gl/m4/fsusage.m4 \ + $(top_srcdir)/gl/m4/getaddrinfo.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 \ + $(top_srcdir)/gl/m4/gnulib-common.m4 \ + $(top_srcdir)/gl/m4/gnulib-comp.m4 \ + $(top_srcdir)/gl/m4/iconv.m4 $(top_srcdir)/gl/m4/inet_ntop.m4 \ + $(top_srcdir)/gl/m4/inline.m4 $(top_srcdir)/gl/m4/intmax_t.m4 \ + $(top_srcdir)/gl/m4/inttypes_h.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/lock.m4 \ + $(top_srcdir)/gl/m4/longdouble.m4 \ + $(top_srcdir)/gl/m4/longlong.m4 \ + $(top_srcdir)/gl/m4/ls-mntd-fs.m4 \ + $(top_srcdir)/gl/m4/mbchar.m4 $(top_srcdir)/gl/m4/mbiter.m4 \ + $(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/memchr.m4 \ + $(top_srcdir)/gl/m4/minmax.m4 $(top_srcdir)/gl/m4/mountlist.m4 \ + $(top_srcdir)/gl/m4/netinet_in_h.m4 $(top_srcdir)/gl/m4/nls.m4 \ + $(top_srcdir)/gl/m4/onceonly_2_57.m4 $(top_srcdir)/gl/m4/po.m4 \ + $(top_srcdir)/gl/m4/progtest.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/size_max.m4 \ + $(top_srcdir)/gl/m4/snprintf.m4 $(top_srcdir)/gl/m4/socklen.m4 \ + $(top_srcdir)/gl/m4/sockpfaf.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \ + $(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stdint.m4 \ + $(top_srcdir)/gl/m4/stdint_h.m4 $(top_srcdir)/gl/m4/strcase.m4 \ + $(top_srcdir)/gl/m4/strdup.m4 $(top_srcdir)/gl/m4/strndup.m4 \ + $(top_srcdir)/gl/m4/strnlen.m4 \ + $(top_srcdir)/gl/m4/sys_socket_h.m4 \ + $(top_srcdir)/gl/m4/ulonglong.m4 \ + $(top_srcdir)/gl/m4/unistd-safer.m4 \ + $(top_srcdir)/gl/m4/unistd_h.m4 \ + $(top_srcdir)/gl/m4/vasnprintf.m4 \ + $(top_srcdir)/gl/m4/vasprintf.m4 \ + $(top_srcdir)/gl/m4/vsnprintf.m4 $(top_srcdir)/gl/m4/wchar.m4 \ + $(top_srcdir)/gl/m4/wchar_t.m4 $(top_srcdir)/gl/m4/wctype.m4 \ + $(top_srcdir)/gl/m4/wcwidth.m4 $(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) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru -libcoreutils_a_AR = $(AR) $(ARFLAGS) -am__DEPENDENCIES_1 = @LIBOBJS@ -am_libcoreutils_a_OBJECTS = cloexec.$(OBJEXT) full-read.$(OBJEXT) \ - full-write.$(OBJEXT) safe-read.$(OBJEXT) safe-write.$(OBJEXT) \ - xalloc-die.$(OBJEXT) -libcoreutils_a_OBJECTS = $(am_libcoreutils_a_OBJECTS) libnagiosplug_a_AR = $(AR) $(ARFLAGS) libnagiosplug_a_LIBADD = -am_libnagiosplug_a_OBJECTS = snprintf.$(OBJEXT) utils_base.$(OBJEXT) \ - utils_disk.$(OBJEXT) +am_libnagiosplug_a_OBJECTS = utils_base.$(OBJEXT) utils_disk.$(OBJEXT) libnagiosplug_a_OBJECTS = $(am_libnagiosplug_a_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -95,8 +115,8 @@ LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(libcoreutils_a_SOURCES) $(libnagiosplug_a_SOURCES) -DIST_SOURCES = $(libcoreutils_a_SOURCES) $(libnagiosplug_a_SOURCES) +SOURCES = $(libnagiosplug_a_SOURCES) +DIST_SOURCES = $(libnagiosplug_a_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ @@ -108,6 +128,10 @@ CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ +ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@ +ABSOLUTE_UNISTD_H = @ABSOLUTE_UNISTD_H@ +ABSOLUTE_WCHAR_H = @ABSOLUTE_WCHAR_H@ +ABSOLUTE_WCTYPE_H = @ABSOLUTE_WCTYPE_H@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ @@ -115,11 +139,17 @@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ +ARPA_INET_H = @ARPA_INET_H@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ +BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ +BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ +BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ +BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ +BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -138,6 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +EOVERFLOW = @EOVERFLOW@ EXEEXT = @EXEEXT@ EXTRAS = @EXTRAS@ EXTRAS_ROOT = @EXTRAS_ROOT@ @@ -147,7 +178,22 @@ F77 = @F77@ FFLAGS = @FFLAGS@ GETLOADAVG_LIBS = @GETLOADAVG_LIBS@ GETOPT_H = @GETOPT_H@ +GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@ +GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@ GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ +HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ +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_STDINT_H = @HAVE_STDINT_H@ +HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ +HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ +HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ +HAVE_WINT_T = @HAVE_WINT_T@ HAVE__BOOL = @HAVE__BOOL@ HOSTNAME = @HOSTNAME@ INSTALL_DATA = @INSTALL_DATA@ @@ -162,6 +208,8 @@ LDAPINCLUDE = @LDAPINCLUDE@ LDAPLIBS = @LDAPLIBS@ LDFLAGS = @LDFLAGS@ LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ +LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ @@ -173,15 +221,15 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MATHLIBS = @MATHLIBS@ -MKINSTALLDIRS = @MKINSTALLDIRS@ +MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ MYSQLCFLAGS = @MYSQLCFLAGS@ -MYSQLCONFIG = @MYSQLCONFIG@ MYSQLINCLUDE = @MYSQLINCLUDE@ MYSQLLIBS = @MYSQLLIBS@ NEED_SETGID = @NEED_SETGID@ -NEED_VA_LIST = @NEED_VA_LIST@ +NETINET_IN_H = @NETINET_IN_H@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -219,6 +267,7 @@ PKG_ARCH = @PKG_ARCH@ PLUGIN_TEST = @PLUGIN_TEST@ POSUB = @POSUB@ POW_LIB = @POW_LIB@ +PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RADIUSLIBS = @RADIUSLIBS@ RANLIB = @RANLIB@ @@ -229,16 +278,26 @@ SCRIPT_TEST = @SCRIPT_TEST@ SET_MAKE = @SET_MAKE@ SH = @SH@ SHELL = @SHELL@ +SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ +SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SOCKETLIBS = @SOCKETLIBS@ SSLINCLUDE = @SSLINCLUDE@ SSLLIBS = @SSLLIBS@ STDBOOL_H = @STDBOOL_H@ +STDINT_H = @STDINT_H@ STRIP = @STRIP@ SUPPORT = @SUPPORT@ +SYS_SOCKET_H = @SYS_SOCKET_H@ +UNISTD_H = @UNISTD_H@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARRANTY = @WARRANTY@ +WCHAR_H = @WCHAR_H@ +WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WCTYPE_H = @WCTYPE_H@ +WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ @@ -263,6 +322,8 @@ build_vendor = @build_vendor@ check_tcp_ssl = @check_tcp_ssl@ datadir = @datadir@ exec_prefix = @exec_prefix@ +gl_LIBOBJS = @gl_LIBOBJS@ +gl_LTLIBOBJS = @gl_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -273,9 +334,11 @@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +np_mysql_config = @np_mysql_config@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ @@ -285,52 +348,11 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ with_trusted_path = @with_trusted_path@ SUBDIRS = tests -noinst_LIBRARIES = libcoreutils.a libnagiosplug.a - -# Will auto pick up fsusage.c mountlist.c -libcoreutils_a_SOURCES = \ - cloexec.c cloexec.h \ - exit.h \ - full-read.c full-read.h \ - full-write.c full-write.h \ - gettext.h \ - safe-read.c safe-read.h \ - safe-write.c safe-write.h strcase.h xalloc-die.c - - -# intprops.h required for getloadavg.c -# This needs to be an EXTRA_DIST because the m4s -# that have AC_LIBSOURCES for intprops.h are not necessary and -# the getloadavg m4 is an autoconf one, so doesn't -# know about intprops.h. Confused? You will be! -EXTRA_DIST = intprops.h utils_base.h utils_disk.h stdbool_.h getopt_.h \ - getopt_int.h -other_coreutils_files = \ - error.c error.h \ - fsusage.c \ - getloadavg.c \ - malloc.c \ - mountlist.c \ - realloc.c \ - strtod.c \ - exitfail.c exitfail.h \ - fsusage.h \ - getopt.c getopt1.c \ - mountlist.h \ - unlocked-io.h \ - xalloc.h \ - xmalloc.c - -libcoreutils_a_LIBADD = $(LIBOBJS) -libcoreutils_a_DEPENDENCIES = $(libcoreutils_a_LIBADD) -libnagiosplug_a_SOURCES = snprintf.c utils_base.c utils_disk.c -INCLUDES = -I$(srcdir) -I$(top_srcdir)/intl -I$(top_srcdir)/plugins - -# Below are from coreutil's lib/Makefile.am -BUILT_SOURCES = $(STDBOOL_H) $(GETOPT_H) -MOSTLYCLEANFILES = stdbool.h stdbool.ht getopt.h getopt.h-t -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-recursive +noinst_LIBRARIES = libnagiosplug.a +libnagiosplug_a_SOURCES = utils_base.c utils_disk.c +EXTRA_DIST = utils_base.h utils_disk.h +INCLUDES = -I$(srcdir) -I$(top_srcdir)/gl -I$(top_srcdir)/intl -I$(top_srcdir)/plugins +all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj @@ -366,10 +388,6 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libcoreutils.a: $(libcoreutils_a_OBJECTS) $(libcoreutils_a_DEPENDENCIES) - -rm -f libcoreutils.a - $(libcoreutils_a_AR) libcoreutils.a $(libcoreutils_a_OBJECTS) $(libcoreutils_a_LIBADD) - $(RANLIB) libcoreutils.a libnagiosplug.a: $(libnagiosplug_a_OBJECTS) $(libnagiosplug_a_DEPENDENCIES) -rm -f libnagiosplug.a $(libnagiosplug_a_AR) libnagiosplug.a $(libnagiosplug_a_OBJECTS) $(libnagiosplug_a_LIBADD) @@ -381,38 +399,8 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/basename.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/c-strtod.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/c-strtold.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/creat-safer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/dup-safer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/error.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/exitfail.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/fd-safer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/fsusage.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getloadavg.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt1.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/malloc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/mountlist.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/open-safer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pipe-safer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/realloc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/regcomp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/regex.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/regex_internal.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/regexec.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strtod.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/xmalloc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cloexec.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/full-read.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/full-write.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/safe-read.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/safe-write.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snprintf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils_base.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils_disk.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xalloc-die.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @@ -452,7 +440,13 @@ uninstall-info-am: # (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): - @set fnord $$MAKEFLAGS; amf=$$2; \ + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ @@ -464,7 +458,7 @@ $(RECURSIVE_TARGETS): local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ @@ -472,7 +466,13 @@ $(RECURSIVE_TARGETS): mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: - @set fnord $$MAKEFLAGS; amf=$$2; \ + @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)' ;; \ @@ -493,7 +493,7 @@ maintainer-clean-recursive: local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ @@ -608,13 +608,11 @@ distdir: $(DISTFILES) fi; \ done check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-recursive +check: check-recursive all-am: Makefile $(LIBRARIES) installdirs: installdirs-recursive installdirs-am: -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-recursive +install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive @@ -629,7 +627,6 @@ install-strip: `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: - -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: @@ -639,14 +636,13 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-recursive clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ mostlyclean-am distclean: distclean-recursive - -rm -rf $(DEPDIR) ./$(DEPDIR) + -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags @@ -672,7 +668,7 @@ install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive - -rm -rf $(DEPDIR) ./$(DEPDIR) + -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -708,22 +704,8 @@ uninstall-info: uninstall-info-recursive tags tags-recursive uninstall uninstall-am uninstall-info-am -print_coreutil_files: - @echo $(libcoreutils_a_SOURCES) $(other_coreutils_files) $(EXTRA_DIST) - test: cd tests && make test -# Create stdbool.h on systems that lack a working one. -stdbool.h: stdbool_.h - sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' $(srcdir)/stdbool_.h > $@t - mv $@t $@ - -# We need the following in order to create an when the system -# doesn't have one that works with the given compiler. -all-local $(lib_OBJECTS): $(GETOPT_H) -getopt.h: getopt_.h - cp $(srcdir)/getopt_.h $@-t - mv $@-t $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/lib/basename.c b/lib/basename.c deleted file mode 100644 index 5cc97cd..0000000 --- a/lib/basename.c +++ /dev/null @@ -1,79 +0,0 @@ -/* basename.c -- return the last element in a file name - - Copyright (C) 1990, 1998, 1999, 2000, 2001, 2003, 2004, 2005 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, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "dirname.h" -#include - -/* In general, we can't use the builtin `basename' function if available, - since it has different meanings in different environments. - In some environments the builtin `basename' modifies its argument. - - Return the address of the last file name component of NAME. If - NAME has no file name components because it is all slashes, return - NAME if it is empty, the address of its last slash otherwise. */ - -char * -base_name (char const *name) -{ - char const *base = name + FILE_SYSTEM_PREFIX_LEN (name); - char const *p; - - for (p = base; *p; p++) - { - if (ISSLASH (*p)) - { - /* Treat multiple adjacent slashes like a single slash. */ - do p++; - while (ISSLASH (*p)); - - /* If the file name ends in slash, use the trailing slash as - the basename if no non-slashes have been found. */ - if (! *p) - { - if (ISSLASH (*base)) - base = p - 1; - break; - } - - /* *P is a non-slash preceded by a slash. */ - base = p; - } - } - - return (char *) base; -} - -/* Return the length of of the basename NAME. Typically NAME is the - value returned by base_name. Act like strlen (NAME), except omit - redundant trailing slashes. */ - -size_t -base_len (char const *name) -{ - size_t len; - - for (len = strlen (name); 1 < len && ISSLASH (name[len - 1]); len--) - continue; - - return len; -} diff --git a/lib/c-strtold.c b/lib/c-strtold.c deleted file mode 100644 index 5510e4a..0000000 --- a/lib/c-strtold.c +++ /dev/null @@ -1,2 +0,0 @@ -#define LONG 1 -#include "c-strtod.c" diff --git a/lib/gettext.h b/lib/gettext.h deleted file mode 100644 index 285cb31..0000000 --- a/lib/gettext.h +++ /dev/null @@ -1,78 +0,0 @@ -/* Convenience header for conditional use of GNU . - Copyright (C) 1995-1998, 2000-2002, 2004 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, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _LIBGETTEXT_H -#define _LIBGETTEXT_H 1 - -/* NLS can be disabled through the configure --disable-nls option. */ -#if ENABLE_NLS - -/* Get declarations of GNU message catalog functions. */ -# include - -#else - -/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which - chokes if dcgettext is defined as a macro. So include it now, to make - later inclusions of a NOP. We don't include - as well because people using "gettext.h" will not include , - and also including would fail on SunOS 4, whereas - is OK. */ -#if defined(__sun) -# include -#endif - -/* Many header files from the libstdc++ coming with g++ 3.3 or newer include - , which chokes if dcgettext is defined as a macro. So include - it now, to make later inclusions of a NOP. */ -#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) -# include -# if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H -# include -# endif -#endif - -/* Disabled NLS. - The casts to 'const char *' serve the purpose of producing warnings - for invalid uses of the value returned from these functions. - On pre-ANSI systems without 'const', the config.h file is supposed to - contain "#define const". */ -# define gettext(Msgid) ((const char *) (Msgid)) -# define dgettext(Domainname, Msgid) ((const char *) (Msgid)) -# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid)) -# define ngettext(Msgid1, Msgid2, N) \ - ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) -# define dngettext(Domainname, Msgid1, Msgid2, N) \ - ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) -# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ - ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) -# define textdomain(Domainname) ((const char *) (Domainname)) -# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname)) -# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset)) - -#endif - -/* A pseudo function call that serves as a marker for the automated - extraction of messages, but does not call gettext(). The run-time - translation is done at a different place in the code. - The argument, String, should be a literal string. Concatenated strings - and other string expressions won't work. - The macro's expansion is not parenthesized, so that it is suitable as - initializer for static 'char[]' or 'const char[]' variables. */ -#define gettext_noop(String) String - -#endif /* _LIBGETTEXT_H */ diff --git a/lib/snprintf.c b/lib/snprintf.c deleted file mode 100644 index 633517d..0000000 --- a/lib/snprintf.c +++ /dev/null @@ -1,1023 +0,0 @@ -/* - * NOTE: If you change this file, please merge it into rsync, samba, etc. - */ - -/* - * Copyright Patrick Powell 1995 - * This code is based on code written by Patrick Powell (papowell@astart.com) - * It may be used for any purpose as long as this notice remains intact - * on all source code distributions - */ - -/************************************************************** - * Original: - * Patrick Powell Tue Apr 11 09:48:21 PDT 1995 - * A bombproof version of doprnt (dopr) included. - * Sigh. This sort of thing is always nasty do deal with. Note that - * the version here does not include floating point... - * - * snprintf() is used instead of sprintf() as it does limit checks - * for string length. This covers a nasty loophole. - * - * The other functions are there to prevent NULL pointers from - * causing nast effects. - * - * More Recently: - * Brandon Long 9/15/96 for mutt 0.43 - * This was ugly. It is still ugly. I opted out of floating point - * numbers, but the formatter understands just about everything - * from the normal C string format, at least as far as I can tell from - * the Solaris 2.5 printf(3S) man page. - * - * Brandon Long 10/22/97 for mutt 0.87.1 - * Ok, added some minimal floating point support, which means this - * probably requires libm on most operating systems. Don't yet - * support the exponent (e,E) and sigfig (g,G). Also, fmtint() - * was pretty badly broken, it just wasn't being exercised in ways - * which showed it, so that's been fixed. Also, formated the code - * to mutt conventions, and removed dead code left over from the - * original. Also, there is now a builtin-test, just compile with: - * gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm - * and run snprintf for results. - * - * Thomas Roessler 01/27/98 for mutt 0.89i - * The PGP code was using unsigned hexadecimal formats. - * Unfortunately, unsigned formats simply didn't work. - * - * Michael Elkins 03/05/98 for mutt 0.90.8 - * The original code assumed that both snprintf() and vsnprintf() were - * missing. Some systems only have snprintf() but not vsnprintf(), so - * the code is now broken down under HAVE_SNPRINTF and HAVE_VSNPRINTF. - * - * Andrew Tridgell (tridge@samba.org) Oct 1998 - * fixed handling of %.0f - * added test for HAVE_LONG_DOUBLE - * - * tridge@samba.org, idra@samba.org, April 2001 - * got rid of fcvt code (twas buggy and made testing harder) - * added C99 semantics - * - * date: 2002/12/19 19:56:31; author: herb; state: Exp; lines: +2 -0 - * actually print args for %g and %e - * - * date: 2002/06/03 13:37:52; author: jmcd; state: Exp; lines: +8 -0 - * Since includes.h isn't included here, VA_COPY has to be defined here. I don't - * see any include file that is guaranteed to be here, so I'm defining it - * locally. Fixes AIX and Solaris builds. - * - * date: 2002/06/03 03:07:24; author: tridge; state: Exp; lines: +5 -13 - * put the ifdef for HAVE_VA_COPY in one place rather than in lots of - * functions - * - * date: 2002/05/17 14:51:22; author: jmcd; state: Exp; lines: +21 -4 - * Fix usage of va_list passed as an arg. Use __va_copy before using it - * when it exists. - * - * date: 2002/04/16 22:38:04; author: idra; state: Exp; lines: +20 -14 - * Fix incorrect zpadlen handling in fmtfp. - * Thanks to Ollie Oldham for spotting it. - * few mods to make it easier to compile the tests. - * addedd the "Ollie" test to the floating point ones. - * - * Martin Pool (mbp@samba.org) April 2003 - * Remove NO_CONFIG_H so that the test case can be built within a source - * tree with less trouble. - * Remove unnecessary SAFE_FREE() definition. - * - * Martin Pool (mbp@samba.org) May 2003 - * Put in a prototype for dummy_snprintf() to quiet compiler warnings. - * - * Move #endif to make sure VA_COPY, LDOUBLE, etc are defined even - * if the C library has some snprintf functions already. - **************************************************************/ - -#ifndef NO_CONFIG_H -#include "config.h" -#else -#define NULL 0 -#endif - -#ifdef TEST_SNPRINTF /* need math library headers for testing */ - -/* In test mode, we pretend that this system doesn't have any snprintf - * functions, regardless of what config.h says. */ -# undef HAVE_SNPRINTF -# undef HAVE_VSNPRINTF -# undef HAVE_C99_VSNPRINTF -# undef HAVE_ASPRINTF -# undef HAVE_VASPRINTF -# include -#endif /* TEST_SNPRINTF */ - -#ifdef HAVE_STRING_H -#include -#endif - -#ifdef HAVE_STRINGS_H -#include -#endif -#ifdef HAVE_CTYPE_H -#include -#endif -#include -#include -#ifdef HAVE_STDLIB_H -#include -#endif - -#if defined(HAVE_SNPRINTF) && defined(HAVE_VSNPRINTF) && defined(HAVE_C99_VSNPRINTF) -/* only include stdio.h if we are not re-defining snprintf or vsnprintf */ -#include - /* make the compiler happy with an empty file */ - void dummy_snprintf(void); - void dummy_snprintf(void) {} -#endif /* HAVE_SNPRINTF, etc */ - -#ifdef HAVE_LONG_DOUBLE -#define LDOUBLE long double -#else -#define LDOUBLE double -#endif - -#ifdef HAVE_LONG_LONG -#define LLONG long long -#else -#define LLONG long -#endif - -#ifndef VA_COPY -#ifdef HAVE_VA_COPY -#define VA_COPY(dest, src) va_copy(dest, src) -#else -#ifdef HAVE___VA_COPY -#define VA_COPY(dest, src) __va_copy(dest, src) -#else -#define VA_COPY(dest, src) (dest) = (src) -#endif -#endif - -/* - * dopr(): poor man's version of doprintf - */ - -/* format read states */ -#define DP_S_DEFAULT 0 -#define DP_S_FLAGS 1 -#define DP_S_MIN 2 -#define DP_S_DOT 3 -#define DP_S_MAX 4 -#define DP_S_MOD 5 -#define DP_S_CONV 6 -#define DP_S_DONE 7 - -/* format flags - Bits */ -#define DP_F_MINUS (1 << 0) -#define DP_F_PLUS (1 << 1) -#define DP_F_SPACE (1 << 2) -#define DP_F_NUM (1 << 3) -#define DP_F_ZERO (1 << 4) -#define DP_F_UP (1 << 5) -#define DP_F_UNSIGNED (1 << 6) - -/* Conversion Flags */ -#define DP_C_SHORT 1 -#define DP_C_LONG 2 -#define DP_C_LDOUBLE 3 -#define DP_C_LLONG 4 - -#define char_to_int(p) ((p)- '0') -#ifndef MAX -#define MAX(p,q) (((p) >= (q)) ? (p) : (q)) -#endif - -/* yes this really must be a ||. Don't muck with this (tridge) */ -#if !defined(HAVE_VSNPRINTF) || !defined(HAVE_C99_VSNPRINTF) - -static size_t dopr(char *buffer, size_t maxlen, const char *format, - va_list args_in); -static void fmtstr(char *buffer, size_t *currlen, size_t maxlen, - char *value, int flags, int min, int max); -static void fmtint(char *buffer, size_t *currlen, size_t maxlen, - long value, int base, int min, int max, int flags); -static void fmtfp(char *buffer, size_t *currlen, size_t maxlen, - LDOUBLE fvalue, int min, int max, int flags); -static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c); - -static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args_in) -{ - char ch; - LLONG value; - LDOUBLE fvalue; - char *strvalue; - int min; - int max; - int state; - int flags; - int cflags; - size_t currlen; - va_list args; - - VA_COPY(args, args_in); - - state = DP_S_DEFAULT; - currlen = flags = cflags = min = 0; - max = -1; - ch = *format++; - - while (state != DP_S_DONE) { - if (ch == '\0') - state = DP_S_DONE; - - switch(state) { - case DP_S_DEFAULT: - if (ch == '%') - state = DP_S_FLAGS; - else - dopr_outch (buffer, &currlen, maxlen, ch); - ch = *format++; - break; - case DP_S_FLAGS: - switch (ch) { - case '-': - flags |= DP_F_MINUS; - ch = *format++; - break; - case '+': - flags |= DP_F_PLUS; - ch = *format++; - break; - case ' ': - flags |= DP_F_SPACE; - ch = *format++; - break; - case '#': - flags |= DP_F_NUM; - ch = *format++; - break; - case '0': - flags |= DP_F_ZERO; - ch = *format++; - break; - default: - state = DP_S_MIN; - break; - } - break; - case DP_S_MIN: - if (isdigit((unsigned char)ch)) { - min = 10*min + char_to_int (ch); - ch = *format++; - } else if (ch == '*') { - min = va_arg (args, int); - ch = *format++; - state = DP_S_DOT; - } else { - state = DP_S_DOT; - } - break; - case DP_S_DOT: - if (ch == '.') { - state = DP_S_MAX; - ch = *format++; - } else { - state = DP_S_MOD; - } - break; - case DP_S_MAX: - if (isdigit((unsigned char)ch)) { - if (max < 0) - max = 0; - max = 10*max + char_to_int (ch); - ch = *format++; - } else if (ch == '*') { - max = va_arg (args, int); - ch = *format++; - state = DP_S_MOD; - } else { - state = DP_S_MOD; - } - break; - case DP_S_MOD: - switch (ch) { - case 'h': - cflags = DP_C_SHORT; - ch = *format++; - break; - case 'l': - cflags = DP_C_LONG; - ch = *format++; - if (ch == 'l') { /* It's a long long */ - cflags = DP_C_LLONG; - ch = *format++; - } - break; - case 'L': - cflags = DP_C_LDOUBLE; - ch = *format++; - break; - default: - break; - } - state = DP_S_CONV; - break; - case DP_S_CONV: - switch (ch) { - case 'd': - case 'i': - if (cflags == DP_C_SHORT) - value = va_arg (args, int); - else if (cflags == DP_C_LONG) - value = va_arg (args, long int); - else if (cflags == DP_C_LLONG) - value = va_arg (args, LLONG); - else - value = va_arg (args, int); - fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags); - break; - case 'o': - flags |= DP_F_UNSIGNED; - if (cflags == DP_C_SHORT) - value = va_arg (args, unsigned int); - else if (cflags == DP_C_LONG) - value = (long)va_arg (args, unsigned long int); - else if (cflags == DP_C_LLONG) - value = (long)va_arg (args, unsigned LLONG); - else - value = (long)va_arg (args, unsigned int); - fmtint (buffer, &currlen, maxlen, value, 8, min, max, flags); - break; - case 'u': - flags |= DP_F_UNSIGNED; - if (cflags == DP_C_SHORT) - value = va_arg (args, unsigned int); - else if (cflags == DP_C_LONG) - value = (long)va_arg (args, unsigned long int); - else if (cflags == DP_C_LLONG) - value = (LLONG)va_arg (args, unsigned LLONG); - else - value = (long)va_arg (args, unsigned int); - fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags); - break; - case 'X': - flags |= DP_F_UP; - case 'x': - flags |= DP_F_UNSIGNED; - if (cflags == DP_C_SHORT) - value = va_arg (args, unsigned int); - else if (cflags == DP_C_LONG) - value = (long)va_arg (args, unsigned long int); - else if (cflags == DP_C_LLONG) - value = (LLONG)va_arg (args, unsigned LLONG); - else - value = (long)va_arg (args, unsigned int); - fmtint (buffer, &currlen, maxlen, value, 16, min, max, flags); - break; - case 'f': - if (cflags == DP_C_LDOUBLE) - fvalue = va_arg (args, LDOUBLE); - else - fvalue = va_arg (args, double); - /* um, floating point? */ - fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags); - break; - case 'E': - flags |= DP_F_UP; - case 'e': - if (cflags == DP_C_LDOUBLE) - fvalue = va_arg (args, LDOUBLE); - else - fvalue = va_arg (args, double); - fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags); - break; - case 'G': - flags |= DP_F_UP; - case 'g': - if (cflags == DP_C_LDOUBLE) - fvalue = va_arg (args, LDOUBLE); - else - fvalue = va_arg (args, double); - fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags); - break; - case 'c': - dopr_outch (buffer, &currlen, maxlen, va_arg (args, int)); - break; - case 's': - strvalue = va_arg (args, char *); - if (!strvalue) strvalue = "(NULL)"; - if (max == -1) { - max = strlen(strvalue); - } - if (min > 0 && max >= 0 && min > max) max = min; - fmtstr (buffer, &currlen, maxlen, strvalue, flags, min, max); - break; - case 'p': - strvalue = va_arg (args, void *); - fmtint (buffer, &currlen, maxlen, (long) strvalue, 16, min, max, flags); - break; - case 'n': - if (cflags == DP_C_SHORT) { - short int *num; - num = va_arg (args, short int *); - *num = currlen; - } else if (cflags == DP_C_LONG) { - long int *num; - num = va_arg (args, long int *); - *num = (long int)currlen; - } else if (cflags == DP_C_LLONG) { - LLONG *num; - num = va_arg (args, LLONG *); - *num = (LLONG)currlen; - } else { - int *num; - num = va_arg (args, int *); - *num = currlen; - } - break; - case '%': - dopr_outch (buffer, &currlen, maxlen, ch); - break; - case 'w': - /* not supported yet, treat as next char */ - ch = *format++; - break; - default: - /* Unknown, skip */ - break; - } - ch = *format++; - state = DP_S_DEFAULT; - flags = cflags = min = 0; - max = -1; - break; - case DP_S_DONE: - break; - default: - /* hmm? */ - break; /* some picky compilers need this */ - } - } - if (maxlen != 0) { - if (currlen < maxlen - 1) - buffer[currlen] = '\0'; - else if (maxlen > 0) - buffer[maxlen - 1] = '\0'; - } - - return currlen; -} - -static void fmtstr(char *buffer, size_t *currlen, size_t maxlen, - char *value, int flags, int min, int max) -{ - int padlen, strln; /* amount to pad */ - int cnt = 0; - -#ifdef DEBUG_SNPRINTF - printf("fmtstr min=%d max=%d s=[%s]\n", min, max, value); -#endif - if (value == 0) { - value = ""; - } - - for (strln = 0; value[strln]; ++strln); /* strlen */ - padlen = min - strln; - if (padlen < 0) - padlen = 0; - if (flags & DP_F_MINUS) - padlen = -padlen; /* Left Justify */ - - while ((padlen > 0) && (cnt < max)) { - dopr_outch (buffer, currlen, maxlen, ' '); - --padlen; - ++cnt; - } - while (*value && (cnt < max)) { - dopr_outch (buffer, currlen, maxlen, *value++); - ++cnt; - } - while ((padlen < 0) && (cnt < max)) { - dopr_outch (buffer, currlen, maxlen, ' '); - ++padlen; - ++cnt; - } -} - -/* Have to handle DP_F_NUM (ie 0x and 0 alternates) */ - -static void fmtint(char *buffer, size_t *currlen, size_t maxlen, - long value, int base, int min, int max, int flags) -{ - int signvalue = 0; - unsigned long uvalue; - char convert[20]; - int place = 0; - int spadlen = 0; /* amount to space pad */ - int zpadlen = 0; /* amount to zero pad */ - int caps = 0; - - if (max < 0) - max = 0; - - uvalue = value; - - if(!(flags & DP_F_UNSIGNED)) { - if( value < 0 ) { - signvalue = '-'; - uvalue = -value; - } else { - if (flags & DP_F_PLUS) /* Do a sign (+/i) */ - signvalue = '+'; - else if (flags & DP_F_SPACE) - signvalue = ' '; - } - } - - if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */ - - do { - convert[place++] = - (caps? "0123456789ABCDEF":"0123456789abcdef") - [uvalue % (unsigned)base ]; - uvalue = (uvalue / (unsigned)base ); - } while(uvalue && (place < 20)); - if (place == 20) place--; - convert[place] = 0; - - zpadlen = max - place; - spadlen = min - MAX (max, place) - (signvalue ? 1 : 0); - if (zpadlen < 0) zpadlen = 0; - if (spadlen < 0) spadlen = 0; - if (flags & DP_F_ZERO) { - zpadlen = MAX(zpadlen, spadlen); - spadlen = 0; - } - if (flags & DP_F_MINUS) - spadlen = -spadlen; /* Left Justifty */ - -#ifdef DEBUG_SNPRINTF - printf("zpad: %d, spad: %d, min: %d, max: %d, place: %d\n", - zpadlen, spadlen, min, max, place); -#endif - - /* Spaces */ - while (spadlen > 0) { - dopr_outch (buffer, currlen, maxlen, ' '); - --spadlen; - } - - /* Sign */ - if (signvalue) - dopr_outch (buffer, currlen, maxlen, signvalue); - - /* Zeros */ - if (zpadlen > 0) { - while (zpadlen > 0) { - dopr_outch (buffer, currlen, maxlen, '0'); - --zpadlen; - } - } - - /* Digits */ - while (place > 0) - dopr_outch (buffer, currlen, maxlen, convert[--place]); - - /* Left Justified spaces */ - while (spadlen < 0) { - dopr_outch (buffer, currlen, maxlen, ' '); - ++spadlen; - } -} - -static LDOUBLE abs_val(LDOUBLE value) -{ - LDOUBLE result = value; - - if (value < 0) - result = -value; - - return result; -} - -static LDOUBLE POW10(int exp) -{ - LDOUBLE result = 1; - - while (exp) { - result *= 10; - exp--; - } - - return result; -} - -static LLONG ROUND(LDOUBLE value) -{ - LLONG intpart; - - intpart = (LLONG)value; - value = value - intpart; - if (value >= 0.5) intpart++; - - return intpart; -} - -/* a replacement for modf that doesn't need the math library. Should - be portable, but slow */ -static double my_modf(double x0, double *iptr) -{ - int i; - long l; - double x = x0; - double f = 1.0; - - for (i=0;i<100;i++) { - l = (long)x; - if (l <= (x+1) && l >= (x-1)) break; - x *= 0.1; - f *= 10.0; - } - - if (i == 100) { - /* yikes! the number is beyond what we can handle. What do we do? */ - (*iptr) = 0; - return 0; - } - - if (i != 0) { - double i2; - double ret; - - ret = my_modf(x0-l*f, &i2); - (*iptr) = l*f + i2; - return ret; - } - - (*iptr) = l; - return x - (*iptr); -} - - -static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, - LDOUBLE fvalue, int min, int max, int flags) -{ - int signvalue = 0; - double ufvalue; - char iconvert[311]; - char fconvert[311]; - int iplace = 0; - int fplace = 0; - int padlen = 0; /* amount to pad */ - int zpadlen = 0; - int caps = 0; - int idx; - double intpart; - double fracpart; - double temp; - - /* - * AIX manpage says the default is 0, but Solaris says the default - * is 6, and sprintf on AIX defaults to 6 - */ - if (max < 0) - max = 6; - - ufvalue = abs_val (fvalue); - - if (fvalue < 0) { - signvalue = '-'; - } else { - if (flags & DP_F_PLUS) { /* Do a sign (+/i) */ - signvalue = '+'; - } else { - if (flags & DP_F_SPACE) - signvalue = ' '; - } - } - -#if 0 - if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */ -#endif - -#if 0 - if (max == 0) ufvalue += 0.5; /* if max = 0 we must round */ -#endif - - /* - * Sorry, we only support 16 digits past the decimal because of our - * conversion method - */ - if (max > 16) - max = 16; - - /* We "cheat" by converting the fractional part to integer by - * multiplying by a factor of 10 - */ - - temp = ufvalue; - my_modf(temp, &intpart); - - fracpart = ROUND((POW10(max)) * (ufvalue - intpart)); - - if (fracpart >= POW10(max)) { - intpart++; - fracpart -= POW10(max); - } - - - /* Convert integer part */ - do { - temp = intpart*0.1; - my_modf(temp, &intpart); - idx = (int) ((temp -intpart +0.05)* 10.0); - /* idx = (int) (((double)(temp*0.1) -intpart +0.05) *10.0); */ - /* printf ("%llf, %f, %x\n", temp, intpart, idx); */ - iconvert[iplace++] = - (caps? "0123456789ABCDEF":"0123456789abcdef")[idx]; - } while (intpart && (iplace < 311)); - if (iplace == 311) iplace--; - iconvert[iplace] = 0; - - /* Convert fractional part */ - if (fracpart) - { - do { - temp = fracpart*0.1; - my_modf(temp, &fracpart); - idx = (int) ((temp -fracpart +0.05)* 10.0); - /* idx = (int) ((((temp/10) -fracpart) +0.05) *10); */ - /* printf ("%lf, %lf, %ld\n", temp, fracpart, idx ); */ - fconvert[fplace++] = - (caps? "0123456789ABCDEF":"0123456789abcdef")[idx]; - } while(fracpart && (fplace < 311)); - if (fplace == 311) fplace--; - } - fconvert[fplace] = 0; - - /* -1 for decimal point, another -1 if we are printing a sign */ - padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0); - zpadlen = max - fplace; - if (zpadlen < 0) zpadlen = 0; - if (padlen < 0) - padlen = 0; - if (flags & DP_F_MINUS) - padlen = -padlen; /* Left Justifty */ - - if ((flags & DP_F_ZERO) && (padlen > 0)) { - if (signvalue) { - dopr_outch (buffer, currlen, maxlen, signvalue); - --padlen; - signvalue = 0; - } - while (padlen > 0) { - dopr_outch (buffer, currlen, maxlen, '0'); - --padlen; - } - } - while (padlen > 0) { - dopr_outch (buffer, currlen, maxlen, ' '); - --padlen; - } - if (signvalue) - dopr_outch (buffer, currlen, maxlen, signvalue); - - while (iplace > 0) - dopr_outch (buffer, currlen, maxlen, iconvert[--iplace]); - -#ifdef DEBUG_SNPRINTF - printf("fmtfp: fplace=%d zpadlen=%d\n", fplace, zpadlen); -#endif - - /* - * Decimal point. This should probably use locale to find the correct - * char to print out. - */ - if (max > 0) { - dopr_outch (buffer, currlen, maxlen, '.'); - - while (zpadlen > 0) { - dopr_outch (buffer, currlen, maxlen, '0'); - --zpadlen; - } - - while (fplace > 0) - dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]); - } - - while (padlen < 0) { - dopr_outch (buffer, currlen, maxlen, ' '); - ++padlen; - } -} - -static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c) -{ - if (*currlen < maxlen) { - buffer[(*currlen)] = c; - } - (*currlen)++; -} - - int smb_vsnprintf (char *str, size_t count, const char *fmt, va_list args) -{ - return dopr(str, count, fmt, args); -} -#define vsnprintf smb_vsnprintf -#endif - -/* yes this really must be a ||. Don't muck with this (tridge) - * - * The logic for these two is that we need our own definition if the - * OS *either* has no definition of *sprintf, or if it does have one - * that doesn't work properly according to the autoconf test. - */ -#if !defined(HAVE_SNPRINTF) || !defined(HAVE_C99_VSNPRINTF) -int smb_snprintf(char *str,size_t count,const char *fmt,...) -{ - size_t ret; - va_list ap; - - va_start(ap, fmt); - ret = vsnprintf(str, count, fmt, ap); - va_end(ap); - return ret; -} -#define snprintf smb_snprintf -#endif - -#endif - -#ifndef HAVE_VASPRINTF - int vasprintf(char **ptr, const char *format, va_list ap) -{ - int ret; - va_list ap2; - - VA_COPY(ap2, ap); - - ret = vsnprintf(NULL, 0, format, ap2); - if (ret <= 0) return ret; - - (*ptr) = (char *)malloc(ret+1); - if (!*ptr) return -1; - - VA_COPY(ap2, ap); - - ret = vsnprintf(*ptr, ret+1, format, ap2); - - return ret; -} -#endif - - -#ifndef HAVE_ASPRINTF - int asprintf(char **ptr, const char *format, ...) -{ - va_list ap; - int ret; - - *ptr = NULL; - va_start(ap, format); - ret = vasprintf(ptr, format, ap); - va_end(ap); - - return ret; -} -#endif - -#ifdef TEST_SNPRINTF - - int sprintf(char *str,const char *fmt,...); - - int main (void) -{ - char buf1[1024]; - char buf2[1024]; - char *fp_fmt[] = { - "%1.1f", - "%-1.5f", - "%1.5f", - "%123.9f", - "%10.5f", - "% 10.5f", - "%+22.9f", - "%+4.9f", - "%01.3f", - "%4f", - "%3.1f", - "%3.2f", - "%.0f", - "%f", - "-16.16f", - NULL - }; - double fp_nums[] = { 6442452944.1234, -1.5, 134.21, 91340.2, 341.1234, 203.9, 0.96, 0.996, - 0.9996, 1.996, 4.136, 5.030201, 0.00205, - /* END LIST */ 0}; - char *int_fmt[] = { - "%-1.5d", - "%1.5d", - "%123.9d", - "%5.5d", - "%10.5d", - "% 10.5d", - "%+22.33d", - "%01.3d", - "%4d", - "%d", - NULL - }; - long int_nums[] = { -1, 134, 91340, 341, 0203, 0}; - char *str_fmt[] = { - "10.5s", - "5.10s", - "10.1s", - "0.10s", - "10.0s", - "1.10s", - "%s", - "%.1s", - "%.10s", - "%10s", - NULL - }; - char *str_vals[] = {"hello", "a", "", "a longer string", NULL}; - int x, y; - int fail = 0; - int num = 0; - - printf ("Testing snprintf format codes against system sprintf...\n"); - - for (x = 0; fp_fmt[x] ; x++) { - for (y = 0; fp_nums[y] != 0 ; y++) { - int l1 = snprintf(NULL, 0, fp_fmt[x], fp_nums[y]); - int l2 = snprintf(buf1, sizeof(buf1), fp_fmt[x], fp_nums[y]); - sprintf (buf2, fp_fmt[x], fp_nums[y]); - if (strcmp (buf1, buf2)) { - printf("snprintf doesn't match Format: %s\n\tsnprintf = [%s]\n\t sprintf = [%s]\n", - fp_fmt[x], buf1, buf2); - fail++; - } - if (l1 != l2) { - printf("snprintf l1 != l2 (%d %d) %s\n", l1, l2, fp_fmt[x]); - fail++; - } - num++; - } - } - - for (x = 0; int_fmt[x] ; x++) { - for (y = 0; int_nums[y] != 0 ; y++) { - int l1 = snprintf(NULL, 0, int_fmt[x], int_nums[y]); - int l2 = snprintf(buf1, sizeof(buf1), int_fmt[x], int_nums[y]); - sprintf (buf2, int_fmt[x], int_nums[y]); - if (strcmp (buf1, buf2)) { - printf("snprintf doesn't match Format: %s\n\tsnprintf = [%s]\n\t sprintf = [%s]\n", - int_fmt[x], buf1, buf2); - fail++; - } - if (l1 != l2) { - printf("snprintf l1 != l2 (%d %d) %s\n", l1, l2, int_fmt[x]); - fail++; - } - num++; - } - } - - for (x = 0; str_fmt[x] ; x++) { - for (y = 0; str_vals[y] != 0 ; y++) { - int l1 = snprintf(NULL, 0, str_fmt[x], str_vals[y]); - int l2 = snprintf(buf1, sizeof(buf1), str_fmt[x], str_vals[y]); - sprintf (buf2, str_fmt[x], str_vals[y]); - if (strcmp (buf1, buf2)) { - printf("snprintf doesn't match Format: %s\n\tsnprintf = [%s]\n\t sprintf = [%s]\n", - str_fmt[x], buf1, buf2); - fail++; - } - if (l1 != l2) { - printf("snprintf l1 != l2 (%d %d) %s\n", l1, l2, str_fmt[x]); - fail++; - } - num++; - } - } - - printf ("%d tests failed out of %d.\n", fail, num); - - printf("seeing how many digits we support\n"); - { - double v0 = 0.12345678901234567890123456789012345678901; - for (x=0; x<100; x++) { - double p = pow(10, x); - double r = v0*p; - snprintf(buf1, sizeof(buf1), "%1.1f", r); - sprintf(buf2, "%1.1f", r); - if (strcmp(buf1, buf2)) { - printf("we seem to support %d digits\n", x-1); - break; - } - } - } - - return 0; -} -#endif /* TEST_SNPRINTF */ diff --git a/lib/strtod.c b/lib/strtod.c deleted file mode 100644 index 7b48754..0000000 --- a/lib/strtod.c +++ /dev/null @@ -1,189 +0,0 @@ -/* Copyright (C) 1991, 1992, 1997, 1999, 2003 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, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#ifndef errno -extern int errno; -#endif - -#include - -#if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII)) -# define IN_CTYPE_DOMAIN(c) 1 -#else -# define IN_CTYPE_DOMAIN(c) isascii(c) -#endif - -#define ISSPACE(c) (IN_CTYPE_DOMAIN (c) && isspace (c)) -#define ISDIGIT(c) (IN_CTYPE_DOMAIN (c) && isdigit (c)) -#define TOLOWER(c) (IN_CTYPE_DOMAIN (c) ? tolower(c) : (c)) - -#include - -#include -#include -#include - -/* Convert NPTR to a double. If ENDPTR is not NULL, a pointer to the - character after the last one used in the number is put in *ENDPTR. */ -double -strtod (const char *nptr, char **endptr) -{ - register const char *s; - short int sign; - - /* The number so far. */ - double num; - - int got_dot; /* Found a decimal point. */ - int got_digit; /* Seen any digits. */ - - /* The exponent of the number. */ - long int exponent; - - if (nptr == NULL) - { - errno = EINVAL; - goto noconv; - } - - s = nptr; - - /* Eat whitespace. */ - while (ISSPACE (*s)) - ++s; - - /* Get the sign. */ - sign = *s == '-' ? -1 : 1; - if (*s == '-' || *s == '+') - ++s; - - num = 0.0; - got_dot = 0; - got_digit = 0; - exponent = 0; - for (;; ++s) - { - if (ISDIGIT (*s)) - { - got_digit = 1; - - /* Make sure that multiplication by 10 will not overflow. */ - if (num > DBL_MAX * 0.1) - /* The value of the digit doesn't matter, since we have already - gotten as many digits as can be represented in a `double'. - This doesn't necessarily mean the result will overflow. - The exponent may reduce it to within range. - - We just need to record that there was another - digit so that we can multiply by 10 later. */ - ++exponent; - else - num = (num * 10.0) + (*s - '0'); - - /* Keep track of the number of digits after the decimal point. - If we just divided by 10 here, we would lose precision. */ - if (got_dot) - --exponent; - } - else if (!got_dot && *s == '.') - /* Record that we have found the decimal point. */ - got_dot = 1; - else - /* Any other character terminates the number. */ - break; - } - - if (!got_digit) - goto noconv; - - if (TOLOWER (*s) == 'e') - { - /* Get the exponent specified after the `e' or `E'. */ - int save = errno; - char *end; - long int exp; - - errno = 0; - ++s; - exp = strtol (s, &end, 10); - if (errno == ERANGE) - { - /* The exponent overflowed a `long int'. It is probably a safe - assumption that an exponent that cannot be represented by - a `long int' exceeds the limits of a `double'. */ - if (endptr != NULL) - *endptr = end; - if (exp < 0) - goto underflow; - else - goto overflow; - } - else if (end == s) - /* There was no exponent. Reset END to point to - the 'e' or 'E', so *ENDPTR will be set there. */ - end = (char *) s - 1; - errno = save; - s = end; - exponent += exp; - } - - if (endptr != NULL) - *endptr = (char *) s; - - if (num == 0.0) - return 0.0; - - /* Multiply NUM by 10 to the EXPONENT power, - checking for overflow and underflow. */ - - if (exponent < 0) - { - if (num < DBL_MIN * pow (10.0, (double) -exponent)) - goto underflow; - } - else if (exponent > 0) - { - if (num > DBL_MAX * pow (10.0, (double) -exponent)) - goto overflow; - } - - num *= pow (10.0, (double) exponent); - - return num * sign; - -overflow: - /* Return an overflow error. */ - errno = ERANGE; - return HUGE_VAL * sign; - -underflow: - /* Return an underflow error. */ - if (endptr != NULL) - *endptr = (char *) nptr; - errno = ERANGE; - return 0.0; - -noconv: - /* There was no number. */ - if (endptr != NULL) - *endptr = (char *) nptr; - return 0.0; -} diff --git a/lib/tests/Makefile.am b/lib/tests/Makefile.am index 63dee76..cd9234e 100644 --- a/lib/tests/Makefile.am +++ b/lib/tests/Makefile.am @@ -5,7 +5,7 @@ noinst_PROGRAMS = @EXTRA_TEST@ TESTS = @EXTRA_TEST@ check_PROGRAMS = @EXTRA_TEST@ -INCLUDES = -I$(top_srcdir)/lib -I$(top_srcdir)/intl -I$(top_srcdir)/plugins +INCLUDES = -I$(top_srcdir)/lib -I$(top_srcdir)/gl -I$(top_srcdir)/intl -I$(top_srcdir)/plugins EXTRA_PROGRAMS = test_utils test_disk @@ -21,7 +21,7 @@ test_utils_LDADD = ../utils_base.o test_disk_SOURCES = test_disk.c test_disk_CFLAGS = -g -I.. test_disk_LDFLAGS = -L/usr/local/lib -ltap -test_disk_LDADD = ../utils_disk.o +test_disk_LDADD = ../utils_disk.o $(top_srcdir)/gl/libgnu.a test: ${noinst_PROGRAMS} perl -MTest::Harness -e '$$Test::Harness::switches=""; runtests(map {$$_ .= ".t"} @ARGV)' $(EXTRA_PROGRAMS) diff --git a/lib/tests/Makefile.in b/lib/tests/Makefile.in index 7ef6fcb..0a15b36 100644 --- a/lib/tests/Makefile.in +++ b/lib/tests/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.4 from Makefile.am. +# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# 2003, 2004, 2005 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. @@ -14,8 +14,6 @@ @SET_MAKE@ -SOURCES = $(test_disk_SOURCES) $(test_utils_SOURCES) - srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -43,39 +41,75 @@ EXTRA_PROGRAMS = test_utils$(EXEEXT) test_disk$(EXEEXT) subdir = lib/tests DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/afs.m4 \ - $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/basename.m4 \ - $(top_srcdir)/m4/c-strtod.m4 $(top_srcdir)/m4/codeset.m4 \ - $(top_srcdir)/m4/dos.m4 $(top_srcdir)/m4/exitfail.m4 \ - $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fcntl-safer.m4 \ - $(top_srcdir)/m4/fstypename.m4 $(top_srcdir)/m4/fsusage.m4 \ - $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/inttypes_h.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/ls-mntd-fs.m4 \ - $(top_srcdir)/m4/mountlist.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/np_coreutils.m4 $(top_srcdir)/m4/np_curl.m4 \ - $(top_srcdir)/m4/onceonly_2_57.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/regex.m4 \ - $(top_srcdir)/m4/restrict.m4 $(top_srcdir)/m4/stdbool.m4 \ - $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \ - $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/unistd-safer.m4 \ - $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/xalloc.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in +am__aclocal_m4_deps = $(top_srcdir)/m4/np_mysqlclient.m4 \ + $(top_srcdir)/gl/m4/absolute-header.m4 \ + $(top_srcdir)/gl/m4/alloca.m4 \ + $(top_srcdir)/gl/m4/arpa_inet_h.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/double-slash-root.m4 \ + $(top_srcdir)/gl/m4/eoverflow.m4 $(top_srcdir)/gl/m4/error.m4 \ + $(top_srcdir)/gl/m4/exitfail.m4 \ + $(top_srcdir)/gl/m4/extensions.m4 \ + $(top_srcdir)/gl/m4/fcntl-safer.m4 \ + $(top_srcdir)/gl/m4/fstypename.m4 \ + $(top_srcdir)/gl/m4/fsusage.m4 \ + $(top_srcdir)/gl/m4/getaddrinfo.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 \ + $(top_srcdir)/gl/m4/gnulib-common.m4 \ + $(top_srcdir)/gl/m4/gnulib-comp.m4 \ + $(top_srcdir)/gl/m4/iconv.m4 $(top_srcdir)/gl/m4/inet_ntop.m4 \ + $(top_srcdir)/gl/m4/inline.m4 $(top_srcdir)/gl/m4/intmax_t.m4 \ + $(top_srcdir)/gl/m4/inttypes_h.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/lock.m4 \ + $(top_srcdir)/gl/m4/longdouble.m4 \ + $(top_srcdir)/gl/m4/longlong.m4 \ + $(top_srcdir)/gl/m4/ls-mntd-fs.m4 \ + $(top_srcdir)/gl/m4/mbchar.m4 $(top_srcdir)/gl/m4/mbiter.m4 \ + $(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/memchr.m4 \ + $(top_srcdir)/gl/m4/minmax.m4 $(top_srcdir)/gl/m4/mountlist.m4 \ + $(top_srcdir)/gl/m4/netinet_in_h.m4 $(top_srcdir)/gl/m4/nls.m4 \ + $(top_srcdir)/gl/m4/onceonly_2_57.m4 $(top_srcdir)/gl/m4/po.m4 \ + $(top_srcdir)/gl/m4/progtest.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/size_max.m4 \ + $(top_srcdir)/gl/m4/snprintf.m4 $(top_srcdir)/gl/m4/socklen.m4 \ + $(top_srcdir)/gl/m4/sockpfaf.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \ + $(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stdint.m4 \ + $(top_srcdir)/gl/m4/stdint_h.m4 $(top_srcdir)/gl/m4/strcase.m4 \ + $(top_srcdir)/gl/m4/strdup.m4 $(top_srcdir)/gl/m4/strndup.m4 \ + $(top_srcdir)/gl/m4/strnlen.m4 \ + $(top_srcdir)/gl/m4/sys_socket_h.m4 \ + $(top_srcdir)/gl/m4/ulonglong.m4 \ + $(top_srcdir)/gl/m4/unistd-safer.m4 \ + $(top_srcdir)/gl/m4/unistd_h.m4 \ + $(top_srcdir)/gl/m4/vasnprintf.m4 \ + $(top_srcdir)/gl/m4/vasprintf.m4 \ + $(top_srcdir)/gl/m4/vsnprintf.m4 $(top_srcdir)/gl/m4/wchar.m4 \ + $(top_srcdir)/gl/m4/wchar_t.m4 $(top_srcdir)/gl/m4/wctype.m4 \ + $(top_srcdir)/gl/m4/wcwidth.m4 $(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) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = PROGRAMS = $(noinst_PROGRAMS) am_test_disk_OBJECTS = test_disk-test_disk.$(OBJEXT) test_disk_OBJECTS = $(am_test_disk_OBJECTS) -test_disk_DEPENDENCIES = ../utils_disk.o +test_disk_DEPENDENCIES = ../utils_disk.o $(top_srcdir)/gl/libgnu.a am_test_utils_OBJECTS = test_utils-test_utils.$(OBJEXT) test_utils_OBJECTS = $(am_test_utils_OBJECTS) test_utils_DEPENDENCIES = ../utils_base.o DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -91,6 +125,10 @@ ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ +ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@ +ABSOLUTE_UNISTD_H = @ABSOLUTE_UNISTD_H@ +ABSOLUTE_WCHAR_H = @ABSOLUTE_WCHAR_H@ +ABSOLUTE_WCTYPE_H = @ABSOLUTE_WCTYPE_H@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ @@ -98,11 +136,17 @@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ +ARPA_INET_H = @ARPA_INET_H@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ +BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ +BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ +BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ +BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ +BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -121,6 +165,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +EOVERFLOW = @EOVERFLOW@ EXEEXT = @EXEEXT@ EXTRAS = @EXTRAS@ EXTRAS_ROOT = @EXTRAS_ROOT@ @@ -130,7 +175,22 @@ F77 = @F77@ FFLAGS = @FFLAGS@ GETLOADAVG_LIBS = @GETLOADAVG_LIBS@ GETOPT_H = @GETOPT_H@ +GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@ +GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@ GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ +HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ +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_STDINT_H = @HAVE_STDINT_H@ +HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ +HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ +HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ +HAVE_WINT_T = @HAVE_WINT_T@ HAVE__BOOL = @HAVE__BOOL@ HOSTNAME = @HOSTNAME@ INSTALL_DATA = @INSTALL_DATA@ @@ -145,6 +205,8 @@ LDAPINCLUDE = @LDAPINCLUDE@ LDAPLIBS = @LDAPLIBS@ LDFLAGS = @LDFLAGS@ LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ +LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ @@ -156,15 +218,15 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MATHLIBS = @MATHLIBS@ -MKINSTALLDIRS = @MKINSTALLDIRS@ +MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ MYSQLCFLAGS = @MYSQLCFLAGS@ -MYSQLCONFIG = @MYSQLCONFIG@ MYSQLINCLUDE = @MYSQLINCLUDE@ MYSQLLIBS = @MYSQLLIBS@ NEED_SETGID = @NEED_SETGID@ -NEED_VA_LIST = @NEED_VA_LIST@ +NETINET_IN_H = @NETINET_IN_H@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -202,6 +264,7 @@ PKG_ARCH = @PKG_ARCH@ PLUGIN_TEST = @PLUGIN_TEST@ POSUB = @POSUB@ POW_LIB = @POW_LIB@ +PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RADIUSLIBS = @RADIUSLIBS@ RANLIB = @RANLIB@ @@ -212,16 +275,26 @@ SCRIPT_TEST = @SCRIPT_TEST@ SET_MAKE = @SET_MAKE@ SH = @SH@ SHELL = @SHELL@ +SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ +SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SOCKETLIBS = @SOCKETLIBS@ SSLINCLUDE = @SSLINCLUDE@ SSLLIBS = @SSLLIBS@ STDBOOL_H = @STDBOOL_H@ +STDINT_H = @STDINT_H@ STRIP = @STRIP@ SUPPORT = @SUPPORT@ +SYS_SOCKET_H = @SYS_SOCKET_H@ +UNISTD_H = @UNISTD_H@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARRANTY = @WARRANTY@ +WCHAR_H = @WCHAR_H@ +WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WCTYPE_H = @WCTYPE_H@ +WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ @@ -246,6 +319,8 @@ build_vendor = @build_vendor@ check_tcp_ssl = @check_tcp_ssl@ datadir = @datadir@ exec_prefix = @exec_prefix@ +gl_LIBOBJS = @gl_LIBOBJS@ +gl_LTLIBOBJS = @gl_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -256,9 +331,11 @@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +np_mysql_config = @np_mysql_config@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ @@ -270,7 +347,7 @@ with_trusted_path = @with_trusted_path@ # These two lines support "make check", but we use "make test" TESTS = @EXTRA_TEST@ -INCLUDES = -I$(top_srcdir)/lib -I$(top_srcdir)/intl -I$(top_srcdir)/plugins +INCLUDES = -I$(top_srcdir)/lib -I$(top_srcdir)/gl -I$(top_srcdir)/intl -I$(top_srcdir)/plugins EXTRA_DIST = test_utils.t test_disk.t test_utils_SOURCES = test_utils.c test_utils_CFLAGS = -g -I.. @@ -279,7 +356,7 @@ test_utils_LDADD = ../utils_base.o test_disk_SOURCES = test_disk.c test_disk_CFLAGS = -g -I.. test_disk_LDFLAGS = -L/usr/local/lib -ltap -test_disk_LDADD = ../utils_disk.o +test_disk_LDADD = ../utils_disk.o $(top_srcdir)/gl/libgnu.a all: all-am .SUFFIXES: diff --git a/lib/tests/test_disk.c b/lib/tests/test_disk.c index f0cdbbc..7ee0a44 100644 --- a/lib/tests/test_disk.c +++ b/lib/tests/test_disk.c @@ -14,13 +14,19 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: test_disk.c,v 1.2 2006/10/18 12:05:10 tonvoon Exp $ + $Id: test_disk.c,v 1.3 2007/03/30 09:00:05 psychotrahe Exp $ ******************************************************************************/ #include "common.h" #include "utils_disk.h" #include "tap.h" +#include "regex.h" + +void np_test_mount_entry_regex (struct mount_entry *dummy_mount_list, + char *regstr, int cflags, int expect, + char *desc); + int main (int argc, char **argv) @@ -35,8 +41,9 @@ main (int argc, char **argv) struct mount_entry *dummy_mount_list; struct mount_entry *me; struct mount_entry **mtail = &dummy_mount_list; + int cflags = REG_NOSUB | REG_EXTENDED; - plan_tests(18); + plan_tests(29); ok( np_find_name(exclude_filesystem, "/var/log") == FALSE, "/var/log not in list"); np_add_name(&exclude_filesystem, "/var/log"); @@ -76,6 +83,37 @@ main (int argc, char **argv) *mtail = me; mtail = &me->me_next; + np_test_mount_entry_regex(dummy_mount_list, strdup("/"), + cflags, 3, strdup("a")); + np_test_mount_entry_regex(dummy_mount_list, strdup("/dev"), + cflags, 3,strdup("regex on dev names:")); + np_test_mount_entry_regex(dummy_mount_list, strdup("/foo"), + cflags, 0, + strdup("regex on non existant dev/path:")); + np_test_mount_entry_regex(dummy_mount_list, strdup("/Foo"), + cflags | REG_ICASE,0, + strdup("regi on non existant dev/path:")); + np_test_mount_entry_regex(dummy_mount_list, strdup("/c.t0"), + cflags, 3, + strdup("partial devname regex match:")); + np_test_mount_entry_regex(dummy_mount_list, strdup("c0t0"), + cflags, 1, + strdup("partial devname regex match:")); + np_test_mount_entry_regex(dummy_mount_list, strdup("C0t0"), + cflags | REG_ICASE, 1, + strdup("partial devname regi match:")); + np_test_mount_entry_regex(dummy_mount_list, strdup("home"), + cflags, 1, + strdup("partial pathname regex match:")); + np_test_mount_entry_regex(dummy_mount_list, strdup("hOme"), + cflags | REG_ICASE, 1, + strdup("partial pathname regi match:")); + np_test_mount_entry_regex(dummy_mount_list, strdup("(/home)|(/var)"), + cflags, 2, + strdup("grouped regex pathname match:")); + np_test_mount_entry_regex(dummy_mount_list, strdup("(/homE)|(/Var)"), + cflags | REG_ICASE, 2, + strdup("grouped regi pathname match:")); np_add_parameter(&paths, "/home/groups"); np_add_parameter(&paths, "/var"); @@ -125,3 +163,22 @@ main (int argc, char **argv) return exit_status(); } + +void +np_test_mount_entry_regex (struct mount_entry *dummy_mount_list, char *regstr, int cflags, int expect, char *desc) +{ + int matches = 0; + regex_t re; + struct mount_entry *me; + if (regcomp(&re,regstr, cflags) == 0) { + for (me = dummy_mount_list; me; me= me->me_next) { + if(np_regex_match_mount_entry(me,&re)) + matches++; + } + ok( matches == expect, + "%s '%s' matched %i/3 entries. ok: %i/3", + desc, regstr, expect, matches); + + } else + ok ( false, "regex '%s' not compileable", regstr); +} diff --git a/lib/unlocked-io.h b/lib/unlocked-io.h deleted file mode 100644 index d009303..0000000 --- a/lib/unlocked-io.h +++ /dev/null @@ -1,137 +0,0 @@ -/* Prefer faster, non-thread-safe stdio functions if available. - - Copyright (C) 2001, 2002, 2003, 2004 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, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* Written by Jim Meyering. */ - -#ifndef UNLOCKED_IO_H -# define UNLOCKED_IO_H 1 - -/* These are wrappers for functions/macros from the GNU C library, and - from other C libraries supporting POSIX's optional thread-safe functions. - - The standard I/O functions are thread-safe. These *_unlocked ones are - more efficient but not thread-safe. That they're not thread-safe is - fine since all of the applications in this package are single threaded. - - Also, some code that is shared with the GNU C library may invoke - the *_unlocked functions directly. On hosts that lack those - functions, invoke the non-thread-safe versions instead. */ - -# include - -# if HAVE_DECL_CLEARERR_UNLOCKED -# undef clearerr -# define clearerr(x) clearerr_unlocked (x) -# else -# define clearerr_unlocked(x) clearerr (x) -# endif - -# if HAVE_DECL_FEOF_UNLOCKED -# undef feof -# define feof(x) feof_unlocked (x) -# else -# define feof_unlocked(x) feof (x) -# endif - -# if HAVE_DECL_FERROR_UNLOCKED -# undef ferror -# define ferror(x) ferror_unlocked (x) -# else -# define ferror_unlocked(x) ferror (x) -# endif - -# if HAVE_DECL_FFLUSH_UNLOCKED -# undef fflush -# define fflush(x) fflush_unlocked (x) -# else -# define fflush_unlocked(x) fflush (x) -# endif - -# if HAVE_DECL_FGETS_UNLOCKED -# undef fgets -# define fgets(x,y,z) fgets_unlocked (x,y,z) -# else -# define fgets_unlocked(x,y,z) fgets (x,y,z) -# endif - -# if HAVE_DECL_FPUTC_UNLOCKED -# undef fputc -# define fputc(x,y) fputc_unlocked (x,y) -# else -# define fputc_unlocked(x,y) fputc (x,y) -# endif - -# if HAVE_DECL_FPUTS_UNLOCKED -# undef fputs -# define fputs(x,y) fputs_unlocked (x,y) -# else -# define fputs_unlocked(x,y) fputs (x,y) -# endif - -# if HAVE_DECL_FREAD_UNLOCKED -# undef fread -# define fread(w,x,y,z) fread_unlocked (w,x,y,z) -# else -# define fread_unlocked(w,x,y,z) fread (w,x,y,z) -# endif - -# if HAVE_DECL_FWRITE_UNLOCKED -# undef fwrite -# define fwrite(w,x,y,z) fwrite_unlocked (w,x,y,z) -# else -# define fwrite_unlocked(w,x,y,z) fwrite (w,x,y,z) -# endif - -# if HAVE_DECL_GETC_UNLOCKED -# undef getc -# define getc(x) getc_unlocked (x) -# else -# define getc_unlocked(x) getc (x) -# endif - -# if HAVE_DECL_GETCHAR_UNLOCKED -# undef getchar -# define getchar() getchar_unlocked () -# else -# define getchar_unlocked() getchar () -# endif - -# if HAVE_DECL_PUTC_UNLOCKED -# undef putc -# define putc(x,y) putc_unlocked (x,y) -# else -# define putc_unlocked(x,y) putc (x,y) -# endif - -# if HAVE_DECL_PUTCHAR_UNLOCKED -# undef putchar -# define putchar(x) putchar_unlocked (x) -# else -# define putchar_unlocked(x) putchar (x) -# endif - -# undef flockfile -# define flockfile(x) ((void) 0) - -# undef ftrylockfile -# define ftrylockfile(x) 0 - -# undef funlockfile -# define funlockfile(x) ((void) 0) - -#endif /* UNLOCKED_IO_H */ diff --git a/lib/utils_base.c b/lib/utils_base.c index e660877..254248c 100644 --- a/lib/utils_base.c +++ b/lib/utils_base.c @@ -8,8 +8,8 @@ * Copyright (c) 2006 Nagios Plugin Development Team * License: GPL * - * $Revision: 1.3 $ - * $Date: 2006/10/18 12:03:10 $ + * $Revision: 1.4 $ + * $Date: 2007/01/27 17:49:08 $ ****************************************************************************/ #include @@ -151,34 +151,34 @@ void print_thresholds(const char *threshold_name, thresholds *my_threshold) { int check_range(double value, range *my_range) { - int false = FALSE; - int true = TRUE; + int no = FALSE; + int yes = TRUE; if (my_range->alert_on == INSIDE) { - false = TRUE; - true = FALSE; + no = TRUE; + yes = FALSE; } if (my_range->end_infinity == FALSE && my_range->start_infinity == FALSE) { if ((my_range->start <= value) && (value <= my_range->end)) { - return false; + return no; } else { - return true; + return yes; } } else if (my_range->start_infinity == FALSE && my_range->end_infinity == TRUE) { if (my_range->start <= value) { - return false; + return no; } else { - return true; + return yes; } } else if (my_range->start_infinity == TRUE && my_range->end_infinity == FALSE) { if (value <= my_range->end) { - return false; + return no; } else { - return true; + return yes; } } else { - return false; + return no; } } diff --git a/lib/utils_disk.c b/lib/utils_disk.c index fe9d4c5..a0493e1 100644 --- a/lib/utils_disk.c +++ b/lib/utils_disk.c @@ -4,7 +4,7 @@ * License: GPL * Copyright (c) 1999-2006 nagios-plugins team * -* Last Modified: $Date: 2006/07/13 23:58:00 $ +* Last Modified: $Date: 2007/04/01 11:17:16 $ * * Description: * @@ -26,7 +26,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -* $Id: utils_disk.c,v 1.1 2006/07/13 23:58:00 tonvoon Exp $ +* $Id: utils_disk.c,v 1.6 2007/04/01 11:17:16 psychotrahe Exp $ * *****************************************************************************/ @@ -60,6 +60,8 @@ np_add_parameter(struct parameter_list **list, const char *name) new_path->usedspace_units = NULL; new_path->usedspace_percent = NULL; new_path->usedinodes_percent = NULL; + new_path->freeinodes_percent = NULL; + new_path->group = NULL; if (current == NULL) { *list = new_path; @@ -72,39 +74,55 @@ np_add_parameter(struct parameter_list **list, const char *name) return new_path; } +/* returns a pointer to the struct found in the list */ +struct parameter_list * +np_find_parameter(struct parameter_list *list, const char *name) +{ + struct parameter_list *temp_list; + for (temp_list = list; temp_list; temp_list = temp_list->name_next) { + if (! strcmp(temp_list->name, name)) + return temp_list; + } + + return NULL; +} + void np_set_best_match(struct parameter_list *desired, struct mount_entry *mount_list, int exact) { struct parameter_list *d; for (d = desired; d; d= d->name_next) { - struct mount_entry *me; - size_t name_len = strlen(d->name); - size_t best_match_len = 0; - struct mount_entry *best_match = NULL; + if (! d->best_match) { + struct mount_entry *me; + size_t name_len = strlen(d->name); + size_t best_match_len = 0; + struct mount_entry *best_match = NULL; - for (me = mount_list; me; me = me->me_next) { - size_t len = strlen (me->me_mountdir); - if ((exact == FALSE && (best_match_len <= len && len <= name_len && - (len == 1 || strncmp (me->me_mountdir, d->name, len) == 0))) - || (exact == TRUE && strcmp(me->me_mountdir, d->name)==0)) - { - best_match = me; - best_match_len = len; - } else { - len = strlen (me->me_devname); - if ((exact == FALSE && (best_match_len <= len && len <= name_len && - (len == 1 || strncmp (me->me_devname, d->name, len) == 0))) - || (exact == TRUE && strcmp(me->me_devname, d->name)==0)) - { + /* set best match if path name exactly matches a mounted device name */ + for (me = mount_list; me; me = me->me_next) { + if (strcmp(me->me_devname, d->name)==0) best_match = me; - best_match_len = len; + } + + /* set best match by directory name if no match was found by devname */ + if (! best_match) { + for (me = mount_list; me; me = me->me_next) { + size_t len = strlen (me->me_mountdir); + if ((exact == FALSE && (best_match_len <= len && len <= name_len && + (len == 1 || strncmp (me->me_mountdir, d->name, len) == 0))) + || (exact == TRUE && strcmp(me->me_mountdir, d->name)==0)) + { + best_match = me; + best_match_len = len; + } } } - } - if (best_match) { - d->best_match = best_match; - } else { - d->best_match = NULL; /* Not sure why this is needed as it should be null on initialisation */ + + if (best_match) { + d->best_match = best_match; + } else { + d->best_match = NULL; /* Not sure why this is needed as it should be null on initialisation */ + } } } } @@ -138,3 +156,13 @@ np_seen_name(struct name_list *list, const char *name) return FALSE; } +int +np_regex_match_mount_entry (struct mount_entry* me, regex_t* re) +{ + if (regexec(re, me->me_devname, (size_t) 0, NULL, 0) == 0 || + regexec(re, me->me_mountdir, (size_t) 0, NULL, 0) == 0 ) { + return true; + } else { + return false; + } +} diff --git a/lib/utils_disk.h b/lib/utils_disk.h index 700f5d2..6263339 100644 --- a/lib/utils_disk.h +++ b/lib/utils_disk.h @@ -2,6 +2,7 @@ #include "mountlist.h" #include "utils_base.h" +#include "regex.h" struct name_list { @@ -19,6 +20,8 @@ struct parameter_list thresholds *usedspace_units; thresholds *usedspace_percent; thresholds *usedinodes_percent; + thresholds *freeinodes_percent; + char *group; struct mount_entry *best_match; struct parameter_list *name_next; }; @@ -27,5 +30,7 @@ void np_add_name (struct name_list **list, const char *name); int np_find_name (struct name_list *list, const char *name); int np_seen_name (struct name_list *list, const char *name); struct parameter_list *np_add_parameter(struct parameter_list **list, const char *name); +struct parameter_list *np_find_parameter(struct parameter_list *list, const char *name); int search_parameter_list (struct parameter_list *list, const char *name); void np_set_best_match(struct parameter_list *desired, struct mount_entry *mount_list, int exact); +int np_regex_match_mount_entry (struct mount_entry* me, regex_t* re); diff --git a/lib/xalloc.h b/lib/xalloc.h deleted file mode 100644 index f80977e..0000000 --- a/lib/xalloc.h +++ /dev/null @@ -1,79 +0,0 @@ -/* xalloc.h -- malloc with out-of-memory checking - - Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2003, 2004 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, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef XALLOC_H_ -# define XALLOC_H_ - -# include - - -# ifdef __cplusplus -extern "C" { -# endif - - -# ifndef __attribute__ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__ -# define __attribute__(x) -# endif -# endif - -# ifndef ATTRIBUTE_NORETURN -# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) -# endif - -/* This function is always triggered when memory is exhausted. - It must be defined by the application, either explicitly - or by using gnulib's xalloc-die module. This is the - function to call when one wants the program to die because of a - memory allocation failure. */ -extern void xalloc_die (void) ATTRIBUTE_NORETURN; - -void *xmalloc (size_t s); -void *xnmalloc (size_t n, size_t s); -void *xzalloc (size_t s); -void *xcalloc (size_t n, size_t s); -void *xrealloc (void *p, size_t s); -void *xnrealloc (void *p, size_t n, size_t s); -void *x2realloc (void *p, size_t *pn); -void *x2nrealloc (void *p, size_t *pn, size_t s); -void *xmemdup (void const *p, size_t s); -char *xstrdup (char const *str); - -/* Return 1 if an array of N objects, each of size S, cannot exist due - to size arithmetic overflow. S must be positive and N must be - nonnegative. This is a macro, not an inline function, so that it - works correctly even when SIZE_MAX < N. - - By gnulib convention, SIZE_MAX represents overflow in size - calculations, so the conservative dividend to use here is - SIZE_MAX - 1, since SIZE_MAX might represent an overflowed value. - However, malloc (SIZE_MAX) fails on all known hosts where - sizeof (ptrdiff_t) <= sizeof (size_t), so do not bother to test for - exactly-SIZE_MAX allocations on such hosts; this avoids a test and - branch when S is known to be 1. */ -# define xalloc_oversized(n, s) \ - ((size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) < (n)) - -# ifdef __cplusplus -} -# endif - - -#endif /* !XALLOC_H_ */ diff --git a/lib/xmalloc.c b/lib/xmalloc.c deleted file mode 100644 index 687633c..0000000 --- a/lib/xmalloc.c +++ /dev/null @@ -1,241 +0,0 @@ -/* xmalloc.c -- malloc with out of memory checking - - Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2002, 2003, 2004, 2005 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, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "xalloc.h" - -#include -#include - -#ifndef SIZE_MAX -# define SIZE_MAX ((size_t) -1) -#endif - -/* 1 if calloc is known to be compatible with GNU calloc. This - matters if we are not also using the calloc module, which defines - HAVE_CALLOC and supports the GNU API even on non-GNU platforms. */ -#if defined HAVE_CALLOC || defined __GLIBC__ -enum { HAVE_GNU_CALLOC = 1 }; -#else -enum { HAVE_GNU_CALLOC = 0 }; -#endif - -/* Allocate an array of N objects, each with S bytes of memory, - dynamically, with error checking. S must be nonzero. */ - -static inline void * -xnmalloc_inline (size_t n, size_t s) -{ - void *p; - if (xalloc_oversized (n, s) || (! (p = malloc (n * s)) && n != 0)) - xalloc_die (); - return p; -} - -void * -xnmalloc (size_t n, size_t s) -{ - return xnmalloc_inline (n, s); -} - -/* Allocate N bytes of memory dynamically, with error checking. */ - -void * -xmalloc (size_t n) -{ - return xnmalloc_inline (n, 1); -} - -/* Change the size of an allocated block of memory P to an array of N - objects each of S bytes, with error checking. S must be nonzero. */ - -static inline void * -xnrealloc_inline (void *p, size_t n, size_t s) -{ - if (xalloc_oversized (n, s) || (! (p = realloc (p, n * s)) && n != 0)) - xalloc_die (); - return p; -} - -void * -xnrealloc (void *p, size_t n, size_t s) -{ - return xnrealloc_inline (p, n, s); -} - -/* Change the size of an allocated block of memory P to N bytes, - with error checking. */ - -void * -xrealloc (void *p, size_t n) -{ - return xnrealloc_inline (p, n, 1); -} - - -/* If P is null, allocate a block of at least *PN such objects; - otherwise, reallocate P so that it contains more than *PN objects - each of S bytes. *PN must be nonzero unless P is null, and S must - be nonzero. Set *PN to the new number of objects, and return the - pointer to the new block. *PN is never set to zero, and the - returned pointer is never null. - - Repeated reallocations are guaranteed to make progress, either by - allocating an initial block with a nonzero size, or by allocating a - larger block. - - In the following implementation, nonzero sizes are doubled so that - repeated reallocations have O(N log N) overall cost rather than - O(N**2) cost, but the specification for this function does not - guarantee that sizes are doubled. - - Here is an example of use: - - int *p = NULL; - size_t used = 0; - size_t allocated = 0; - - void - append_int (int value) - { - if (used == allocated) - p = x2nrealloc (p, &allocated, sizeof *p); - p[used++] = value; - } - - This causes x2nrealloc to allocate a block of some nonzero size the - first time it is called. - - To have finer-grained control over the initial size, set *PN to a - nonzero value before calling this function with P == NULL. For - example: - - int *p = NULL; - size_t used = 0; - size_t allocated = 0; - size_t allocated1 = 1000; - - void - append_int (int value) - { - if (used == allocated) - { - p = x2nrealloc (p, &allocated1, sizeof *p); - allocated = allocated1; - } - p[used++] = value; - } - - */ - -static inline void * -x2nrealloc_inline (void *p, size_t *pn, size_t s) -{ - size_t n = *pn; - - if (! p) - { - if (! n) - { - /* The approximate size to use for initial small allocation - requests, when the invoking code specifies an old size of - zero. 64 bytes is the largest "small" request for the - GNU C library malloc. */ - enum { DEFAULT_MXFAST = 64 }; - - n = DEFAULT_MXFAST / s; - n += !n; - } - } - else - { - if (SIZE_MAX / 2 / s < n) - xalloc_die (); - n *= 2; - } - - *pn = n; - return xrealloc (p, n * s); -} - -void * -x2nrealloc (void *p, size_t *pn, size_t s) -{ - return x2nrealloc_inline (p, pn, s); -} - -/* If P is null, allocate a block of at least *PN bytes; otherwise, - reallocate P so that it contains more than *PN bytes. *PN must be - nonzero unless P is null. Set *PN to the new block's size, and - return the pointer to the new block. *PN is never set to zero, and - the returned pointer is never null. */ - -void * -x2realloc (void *p, size_t *pn) -{ - return x2nrealloc_inline (p, pn, 1); -} - -/* Allocate S bytes of zeroed memory dynamically, with error checking. - There's no need for xnzalloc (N, S), since it would be equivalent - to xcalloc (N, S). */ - -void * -xzalloc (size_t s) -{ - return memset (xmalloc (s), 0, s); -} - -/* Allocate zeroed memory for N elements of S bytes, with error - checking. S must be nonzero. */ - -void * -xcalloc (size_t n, size_t s) -{ - void *p; - /* Test for overflow, since some calloc implementations don't have - proper overflow checks. But omit overflow and size-zero tests if - HAVE_GNU_CALLOC, since GNU calloc catches overflow and never - returns NULL if successful. */ - if ((! HAVE_GNU_CALLOC && xalloc_oversized (n, s)) - || (! (p = calloc (n, s)) && (HAVE_GNU_CALLOC || n != 0))) - xalloc_die (); - return p; -} - -/* Clone an object P of size S, with error checking. There's no need - for xnmemdup (P, N, S), since xmemdup (P, N * S) works without any - need for an arithmetic overflow check. */ - -void * -xmemdup (void const *p, size_t s) -{ - return memcpy (xmalloc (s), p, s); -} - -/* Clone STRING. */ - -char * -xstrdup (char const *string) -{ - return xmemdup (string, strlen (string) + 1); -} diff --git a/m4/Makefile.am b/m4/Makefile.am deleted file mode 100644 index f8553e7..0000000 --- a/m4/Makefile.am +++ /dev/null @@ -1,61 +0,0 @@ -## Process this file with automake to produce Makefile.in. -EXTRA_DIST = -EXTRA_DIST += Makefile.am.in -EXTRA_DIST += afs.m4 -EXTRA_DIST += alloca.m4 -EXTRA_DIST += basename.m4 -EXTRA_DIST += c-strtod.m4 -EXTRA_DIST += codeset.m4 -EXTRA_DIST += dos.m4 -EXTRA_DIST += error.m4 -EXTRA_DIST += exitfail.m4 -EXTRA_DIST += extensions.m4 -EXTRA_DIST += fcntl-safer.m4 -EXTRA_DIST += fstypename.m4 -EXTRA_DIST += fsusage.m4 -EXTRA_DIST += getopt.m4 -EXTRA_DIST += gettext.m4 -EXTRA_DIST += glibc21.m4 -EXTRA_DIST += iconv.m4 -EXTRA_DIST += inttypes-pri.m4 -EXTRA_DIST += inttypes.m4 -EXTRA_DIST += inttypes_h.m4 -EXTRA_DIST += lib-ld.m4 -EXTRA_DIST += lib-link.m4 -EXTRA_DIST += lib-prefix.m4 -EXTRA_DIST += longdouble.m4 -EXTRA_DIST += longlong.m4 -EXTRA_DIST += ls-mntd-fs.m4 -EXTRA_DIST += mountlist.m4 -EXTRA_DIST += nls.m4 -EXTRA_DIST += np_coreutils.m4 -EXTRA_DIST += np_curl.m4 -EXTRA_DIST += onceonly_2_57.m4 -EXTRA_DIST += po.m4 -EXTRA_DIST += progtest.m4 -EXTRA_DIST += regex.m4 -EXTRA_DIST += restrict.m4 -EXTRA_DIST += signed.m4 -EXTRA_DIST += stdbool.m4 -EXTRA_DIST += stdint_h.m4 -EXTRA_DIST += uintmax_t.m4 -EXTRA_DIST += ulonglong.m4 -EXTRA_DIST += unistd-safer.m4 -EXTRA_DIST += unlocked-io.m4 -EXTRA_DIST += wchar_t.m4 -EXTRA_DIST += wint_t.m4 -EXTRA_DIST += xalloc.m4 - -Makefile.am: Makefile.am.in - rm -f $@ $@t - (echo "## Process this file with automake to produce Makefile.in."; \ - echo EXTRA_DIST =; \ - echo "EXTRA_DIST += Makefile.am.in"; \ - ls -1 *.m4 | sed 's/^/EXTRA_DIST += /'; echo ) \ - >> $@t - sed -n '/^Makefile\.am:/,$$p' $@.in >> $@t - chmod a-w $@t - mv $@t $@ - -print_coreutil_files: - @echo $(EXTRA_DIST) diff --git a/m4/Makefile.am.in b/m4/Makefile.am.in deleted file mode 100644 index fb60ada..0000000 --- a/m4/Makefile.am.in +++ /dev/null @@ -1,15 +0,0 @@ -## This is a template from which Makefile.am is generated. -*-Makefile-*- - -Makefile.am: Makefile.am.in - rm -f $@ $@t - (echo "## Process this file with automake to produce Makefile.in."; \ - echo EXTRA_DIST =; \ - echo "EXTRA_DIST += Makefile.am.in"; \ - ls -1 *.m4 | sed 's/^/EXTRA_DIST += /'; echo ) \ - >> $@t - sed -n '/^Makefile\.am:/,$$p' $@.in >> $@t - chmod a-w $@t - mv $@t $@ - -print_coreutil_files: - @echo $(EXTRA_DIST) diff --git a/m4/Makefile.in b/m4/Makefile.in deleted file mode 100644 index 35f747f..0000000 --- a/m4/Makefile.in +++ /dev/null @@ -1,429 +0,0 @@ -# Makefile.in generated by automake 1.9.4 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 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. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = m4 -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/afs.m4 \ - $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/basename.m4 \ - $(top_srcdir)/m4/c-strtod.m4 $(top_srcdir)/m4/codeset.m4 \ - $(top_srcdir)/m4/dos.m4 $(top_srcdir)/m4/exitfail.m4 \ - $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fcntl-safer.m4 \ - $(top_srcdir)/m4/fstypename.m4 $(top_srcdir)/m4/fsusage.m4 \ - $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/inttypes_h.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/ls-mntd-fs.m4 \ - $(top_srcdir)/m4/mountlist.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/np_coreutils.m4 $(top_srcdir)/m4/np_curl.m4 \ - $(top_srcdir)/m4/onceonly_2_57.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/regex.m4 \ - $(top_srcdir)/m4/restrict.m4 $(top_srcdir)/m4/stdbool.m4 \ - $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \ - $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/unistd-safer.m4 \ - $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/xalloc.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -INSTALL = @INSTALL@ -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -ALLOCA_H = @ALLOCA_H@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BASENAME = @BASENAME@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DEPLIBS = @DEPLIBS@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXTRAS = @EXTRAS@ -EXTRAS_ROOT = @EXTRAS_ROOT@ -EXTRA_NETOBJS = @EXTRA_NETOBJS@ -EXTRA_TEST = @EXTRA_TEST@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GETLOADAVG_LIBS = @GETLOADAVG_LIBS@ -GETOPT_H = @GETOPT_H@ -GMSGFMT = @GMSGFMT@ -HAVE__BOOL = @HAVE__BOOL@ -HOSTNAME = @HOSTNAME@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INTLLIBS = @INTLLIBS@ -INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -KMEM_GROUP = @KMEM_GROUP@ -KRBINCLUDE = @KRBINCLUDE@ -LDAPINCLUDE = @LDAPINCLUDE@ -LDAPLIBS = @LDAPLIBS@ -LDFLAGS = @LDFLAGS@ -LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ -LIBICONV = @LIBICONV@ -LIBINTL = @LIBINTL@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBICONV = @LTLIBICONV@ -LTLIBINTL = @LTLIBINTL@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MATHLIBS = @MATHLIBS@ -MKINSTALLDIRS = @MKINSTALLDIRS@ -MSGFMT = @MSGFMT@ -MSGMERGE = @MSGMERGE@ -MYSQLCFLAGS = @MYSQLCFLAGS@ -MYSQLCONFIG = @MYSQLCONFIG@ -MYSQLINCLUDE = @MYSQLINCLUDE@ -MYSQLLIBS = @MYSQLLIBS@ -NEED_SETGID = @NEED_SETGID@ -NEED_VA_LIST = @NEED_VA_LIST@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PATH_TO_APTGET = @PATH_TO_APTGET@ -PATH_TO_DIG = @PATH_TO_DIG@ -PATH_TO_FPING = @PATH_TO_FPING@ -PATH_TO_LMSTAT = @PATH_TO_LMSTAT@ -PATH_TO_LSPS = @PATH_TO_LSPS@ -PATH_TO_MAILQ = @PATH_TO_MAILQ@ -PATH_TO_NSLOOKUP = @PATH_TO_NSLOOKUP@ -PATH_TO_PING = @PATH_TO_PING@ -PATH_TO_PING6 = @PATH_TO_PING6@ -PATH_TO_PS = @PATH_TO_PS@ -PATH_TO_QMAIL_QSTAT = @PATH_TO_QMAIL_QSTAT@ -PATH_TO_QSTAT = @PATH_TO_QSTAT@ -PATH_TO_QUAKESTAT = @PATH_TO_QUAKESTAT@ -PATH_TO_RPCINFO = @PATH_TO_RPCINFO@ -PATH_TO_SMBCLIENT = @PATH_TO_SMBCLIENT@ -PATH_TO_SNMPGET = @PATH_TO_SNMPGET@ -PATH_TO_SNMPGETNEXT = @PATH_TO_SNMPGETNEXT@ -PATH_TO_SSH = @PATH_TO_SSH@ -PATH_TO_SWAP = @PATH_TO_SWAP@ -PATH_TO_SWAPINFO = @PATH_TO_SWAPINFO@ -PATH_TO_UPTIME = @PATH_TO_UPTIME@ -PATH_TO_WHO = @PATH_TO_WHO@ -PERL = @PERL@ -PGINCLUDE = @PGINCLUDE@ -PGLIBS = @PGLIBS@ -PKG_ARCH = @PKG_ARCH@ -PLUGIN_TEST = @PLUGIN_TEST@ -POSUB = @POSUB@ -POW_LIB = @POW_LIB@ -PYTHON = @PYTHON@ -RADIUSLIBS = @RADIUSLIBS@ -RANLIB = @RANLIB@ -RELEASE = @RELEASE@ -REV_DATESTAMP = @REV_DATESTAMP@ -REV_TIMESTAMP = @REV_TIMESTAMP@ -SCRIPT_TEST = @SCRIPT_TEST@ -SET_MAKE = @SET_MAKE@ -SH = @SH@ -SHELL = @SHELL@ -SOCKETLIBS = @SOCKETLIBS@ -SSLINCLUDE = @SSLINCLUDE@ -SSLLIBS = @SSLLIBS@ -STDBOOL_H = @STDBOOL_H@ -STRIP = @STRIP@ -SUPPORT = @SUPPORT@ -USE_NLS = @USE_NLS@ -VERSION = @VERSION@ -WARRANTY = @WARRANTY@ -XGETTEXT = @XGETTEXT@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -check_tcp_ssl = @check_tcp_ssl@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -with_trusted_path = @with_trusted_path@ -EXTRA_DIST = Makefile.am.in afs.m4 alloca.m4 basename.m4 c-strtod.m4 \ - codeset.m4 dos.m4 error.m4 exitfail.m4 extensions.m4 \ - fcntl-safer.m4 fstypename.m4 fsusage.m4 getopt.m4 gettext.m4 \ - glibc21.m4 iconv.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 \ - lib-ld.m4 lib-link.m4 lib-prefix.m4 longdouble.m4 longlong.m4 \ - ls-mntd-fs.m4 mountlist.m4 nls.m4 np_coreutils.m4 np_curl.m4 \ - onceonly_2_57.m4 po.m4 progtest.m4 regex.m4 restrict.m4 \ - signed.m4 stdbool.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 \ - unistd-safer.m4 unlocked-io.m4 wchar_t.m4 wint_t.m4 xalloc.m4 -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu m4/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -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 -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-info-am - - -Makefile.am: Makefile.am.in - rm -f $@ $@t - (echo "## Process this file with automake to produce Makefile.in."; \ - echo EXTRA_DIST =; \ - echo "EXTRA_DIST += Makefile.am.in"; \ - ls -1 *.m4 | sed 's/^/EXTRA_DIST += /'; echo ) \ - >> $@t - sed -n '/^Makefile\.am:/,$$p' $@.in >> $@t - chmod a-w $@t - mv $@t $@ - -print_coreutil_files: - @echo $(EXTRA_DIST) -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/m4/afs.m4 b/m4/afs.m4 deleted file mode 100644 index 6f7a56c..0000000 --- a/m4/afs.m4 +++ /dev/null @@ -1,17 +0,0 @@ -#serial 8 - -# Copyright (C) 1999, 2000, 2001, 2004 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. - -AC_DEFUN([gl_AFS], - [ - AC_ARG_WITH(afs, - AC_HELP_STRING([--with-afs], - [support for the Andrew File System [[default=no]]]), - test "$withval" = no || with_afs=yes, with_afs=no) - if test "$with_afs" = yes; then - AC_DEFINE(AFS, 1, [Define if you have the Andrew File System.]) - fi - ]) diff --git a/m4/basename.m4 b/m4/basename.m4 deleted file mode 100644 index 69a0996..0000000 --- a/m4/basename.m4 +++ /dev/null @@ -1,14 +0,0 @@ -# basename.m4 serial 1 -dnl Copyright (C) 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_BASENAME], -[ - AC_LIBSOURCES([basename.c, dirname.h]) - AC_LIBOBJ([basename]) - - dnl Prerequisites of lib/basename.c. - AC_REQUIRE([gl_AC_DOS]) -]) diff --git a/m4/extensions.m4 b/m4/extensions.m4 deleted file mode 100644 index e71845f..0000000 --- a/m4/extensions.m4 +++ /dev/null @@ -1,30 +0,0 @@ -# Enable extensions on systems that normally disable them. - -# Copyright (C) 2003 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. - -# gl_USE_SYSTEM_EXTENSIONS -# ------------------------ -# Enable extensions on systems that normally disable them, -# typically due to standards-conformance issues. -AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS], [ - AC_BEFORE([$0], [AC_COMPILE_IFELSE]) - AC_BEFORE([$0], [AC_RUN_IFELSE]) - - AC_REQUIRE([AC_GNU_SOURCE]) - AC_REQUIRE([AC_AIX]) - AC_REQUIRE([AC_MINIX]) - - AH_VERBATIM([__EXTENSIONS__], -[/* Enable extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ -#endif -#ifndef _POSIX_PTHREAD_SEMANTICS -# undef _POSIX_PTHREAD_SEMANTICS -#endif]) - AC_DEFINE([__EXTENSIONS__]) - AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) -]) diff --git a/m4/fstypename.m4 b/m4/fstypename.m4 deleted file mode 100644 index 7ff33e2..0000000 --- a/m4/fstypename.m4 +++ /dev/null @@ -1,37 +0,0 @@ -#serial 5 - -dnl From Jim Meyering. -dnl -dnl See if struct statfs has the f_fstypename member. -dnl If so, define HAVE_F_FSTYPENAME_IN_STATFS. -dnl - -# Copyright (C) 1998, 1999, 2001, 2004 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. - -AC_DEFUN([gl_FSTYPENAME], - [ - AC_CACHE_CHECK([for f_fstypename in struct statfs], - fu_cv_sys_f_fstypename_in_statfs, - [ - AC_TRY_COMPILE( - [ -#include -#include -#include - ], - [struct statfs s; int i = sizeof s.f_fstypename;], - fu_cv_sys_f_fstypename_in_statfs=yes, - fu_cv_sys_f_fstypename_in_statfs=no - ) - ] - ) - - if test $fu_cv_sys_f_fstypename_in_statfs = yes; then - AC_DEFINE(HAVE_F_FSTYPENAME_IN_STATFS, 1, - [Define if struct statfs has the f_fstypename member.]) - fi - ] -) diff --git a/m4/glibc21.m4 b/m4/glibc21.m4 deleted file mode 100644 index d95fd98..0000000 --- a/m4/glibc21.m4 +++ /dev/null @@ -1,30 +0,0 @@ -# glibc21.m4 serial 3 -dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Test for the GNU C Library, version 2.1 or newer. -# From Bruno Haible. - -AC_DEFUN([gl_GLIBC21], - [ - AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, - ac_cv_gnu_library_2_1, - [AC_EGREP_CPP([Lucky GNU user], - [ -#include -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) - Lucky GNU user - #endif -#endif - ], - ac_cv_gnu_library_2_1=yes, - ac_cv_gnu_library_2_1=no) - ] - ) - AC_SUBST(GLIBC21) - GLIBC21="$ac_cv_gnu_library_2_1" - ] -) diff --git a/m4/inttypes-pri.m4 b/m4/inttypes-pri.m4 deleted file mode 100644 index 4d56a9a..0000000 --- a/m4/inttypes-pri.m4 +++ /dev/null @@ -1,30 +0,0 @@ -# inttypes-pri.m4 serial 1 (gettext-0.11.4) -dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -# Define PRI_MACROS_BROKEN if exists and defines the PRI* -# macros to non-string values. This is the case on AIX 4.3.3. - -AC_DEFUN([gt_INTTYPES_PRI], -[ - AC_REQUIRE([gt_HEADER_INTTYPES_H]) - if test $gt_cv_header_inttypes_h = yes; then - AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], - gt_cv_inttypes_pri_broken, - [ - AC_TRY_COMPILE([#include -#ifdef PRId32 -char *p = PRId32; -#endif -], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes) - ]) - fi - if test "$gt_cv_inttypes_pri_broken" = yes; then - AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1, - [Define if exists and defines unusable PRI* macros.]) - fi -]) diff --git a/m4/inttypes.m4 b/m4/inttypes.m4 deleted file mode 100644 index 779bcea..0000000 --- a/m4/inttypes.m4 +++ /dev/null @@ -1,25 +0,0 @@ -# inttypes.m4 serial 1 (gettext-0.11.4) -dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -# Define HAVE_INTTYPES_H if exists and doesn't clash with -# . - -AC_DEFUN([gt_HEADER_INTTYPES_H], -[ - AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h, - [ - AC_TRY_COMPILE( - [#include -#include ], - [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no) - ]) - if test $gt_cv_header_inttypes_h = yes; then - AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1, - [Define if exists and doesn't clash with .]) - fi -]) diff --git a/m4/longlong.m4 b/m4/longlong.m4 deleted file mode 100644 index 7b399e0..0000000 --- a/m4/longlong.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# longlong.m4 serial 5 -dnl Copyright (C) 1999-2004 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -# Define HAVE_LONG_LONG if 'long long' works. - -AC_DEFUN([gl_AC_TYPE_LONG_LONG], -[ - AC_CACHE_CHECK([for long long], ac_cv_type_long_long, - [AC_TRY_LINK([long long ll = 1LL; int i = 63;], - [long long llmax = (long long) -1; - return ll << i | ll >> i | llmax / ll | llmax % ll;], - ac_cv_type_long_long=yes, - ac_cv_type_long_long=no)]) - if test $ac_cv_type_long_long = yes; then - AC_DEFINE(HAVE_LONG_LONG, 1, - [Define if you have the 'long long' type.]) - fi -]) diff --git a/m4/np_coreutils.m4 b/m4/np_coreutils.m4 deleted file mode 100644 index 77cb9f6..0000000 --- a/m4/np_coreutils.m4 +++ /dev/null @@ -1,29 +0,0 @@ -dnl These are for the libs and macros from coreutils -dnl Currently utilising v5.2.1 - -dnl We use jm_ for non Autoconf macros. -m4_pattern_forbid([^np_[ABCDEFGHIJKLMNOPQRSTUVXYZ]])dnl -m4_pattern_forbid([^jm_[ABCDEFGHIJKLMNOPQRSTUVXYZ]])dnl -m4_pattern_forbid([^gl_[ABCDEFGHIJKLMNOPQRSTUVXYZ]])dnl - -dnl These are all m4 things that need to be called -dnl Usually in coreutils' prereq.m4, but this is a subset that we need -AC_DEFUN([np_COREUTILS], -[ - AC_REQUIRE([AM_STDBOOL_H]) - AC_REQUIRE([gl_BASENAME]) - AC_REQUIRE([gl_C_STRTOLD]) - AC_REQUIRE([gl_EXITFAIL]) - AC_REQUIRE([gl_FCNTL_SAFER]) - AC_REQUIRE([gl_FSUSAGE]) - AC_REQUIRE([gl_FUNC_ALLOCA]) - AC_REQUIRE([gl_GETOPT]) - AC_REQUIRE([gl_MOUNTLIST]) - AC_REQUIRE([gl_REGEX]) - AC_REQUIRE([gl_UNISTD_SAFER]) - AC_REQUIRE([gl_XALLOC]) - AC_REQUIRE([gl_FUNC_GLIBC_UNLOCKED_IO]) - -dnl This is in jm-macros.m4, which calls prereq.m4, and then calls this afterwards - AC_REQUIRE([gl_AFS]) -]) diff --git a/m4/np_curl.m4 b/m4/np_curl.m4 deleted file mode 100644 index 64c3db5..0000000 --- a/m4/np_curl.m4 +++ /dev/null @@ -1,60 +0,0 @@ -dnl These are for the libs and macros from curl -dnl Currently utilising v7.12.3 - -dnl We use jm_ for non Autoconf macros. -dnl m4_pattern_forbid([^np_[ABCDEFGHIJKLMNOPQRSTUVXYZ]])dnl -dnl m4_pattern_forbid([^jm_[ABCDEFGHIJKLMNOPQRSTUVXYZ]])dnl -dnl m4_pattern_forbid([^gl_[ABCDEFGHIJKLMNOPQRSTUVXYZ]])dnl - -dnl These are all m4 things that need to be called -dnl Usually in coreutils' prereq.m4, but this is a subset that we need -AC_DEFUN([np_CURL], -[ - AC_REQUIRE([TYPE_SOCKLEN_T]) -]) - -dnl Check for socklen_t: historically on BSD it is an int, and in -dnl POSIX 1g it is a type of its own, but some platforms use different -dnl types for the argument to getsockopt, getpeername, etc. So we -dnl have to test to find something that will work. -AC_DEFUN([TYPE_SOCKLEN_T], -[ - AC_CHECK_TYPE([socklen_t], ,[ - AC_MSG_CHECKING([for socklen_t equivalent]) - AC_CACHE_VAL([curl_cv_socklen_t_equiv], - [ - # Systems have either "struct sockaddr *" or - # "void *" as the second argument to getpeername - curl_cv_socklen_t_equiv= - for arg2 in "struct sockaddr" void; do - for t in int size_t unsigned long "unsigned long"; do - AC_TRY_COMPILE([ - #ifdef HAVE_SYS_TYPES_H - #include - #endif - #ifdef HAVE_SYS_SOCKET_H - #include - #endif - - int getpeername (int, $arg2 *, $t *); - ],[ - $t len; - getpeername(0,0,&len); - ],[ - curl_cv_socklen_t_equiv="$t" - break - ]) - done - done - - if test "x$curl_cv_socklen_t_equiv" = x; then - AC_MSG_ERROR([Cannot find a type to use in place of socklen_t]) - fi - ]) - AC_MSG_RESULT($curl_cv_socklen_t_equiv) - AC_DEFINE_UNQUOTED(socklen_t, $curl_cv_socklen_t_equiv, - [type to use in place of socklen_t if not defined])], - [#include -#include ]) -]) - diff --git a/m4/np_mysqlclient.m4 b/m4/np_mysqlclient.m4 new file mode 100644 index 0000000..9bbe63c --- /dev/null +++ b/m4/np_mysqlclient.m4 @@ -0,0 +1,71 @@ +# np_mysqlclient.m4 +dnl Copyright (C) 2007 Nagios Plugins Team +dnl This file is free software; the Nagios Plugin Team +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Test for mysql availability using mysql_config +dnl Uses --with-mysql= yes(autodetection - default) | no | path +dnl Sets 4 variables: +dnl with_mysql = path/to/mysql_config (if found and can compile mysqlclient) or "no" +dnl np_mysql_include = flags for include, from mysql_config --include (will be guessed as $with_mysql/include if --include not found) +dnl np_mysql_libs = flags for libs, from mysql_config --libs +dnl np_mysql_cflags = flags for cflags, from mysql_config --cflags +dnl Also sets in config.h: +dnl HAVE_MYSQLCLIENT +dnl Copile your code with: +dnl $(CC) $(np_mysql_include) code.c $(np_mysql_libs) + +AC_DEFUN([np_mysqlclient], +[ + AC_ARG_WITH(mysql, + AS_HELP_STRING([--with-mysql=DIR], + [Locates mysql libraries. Expects DIR/bin/mysql_config. Default to search for mysql_config in PATH]), + with_mysql=$withval, + with_mysql=yes) + + if test "x$with_mysql" != "xno" ; then + if test "x$with_mysql" = "xyes" ; then + AC_PATH_PROG(np_mysql_config, mysql_config) + else + if test -x $with_mysql/bin/mysql_config ; then + np_mysql_config="$with_mysql/bin/mysql_config" + fi + fi + if test -z "$np_mysql_config"; then + with_mysql="no" + else + np_mysql_include="`$np_mysql_config --include`" + # Mysql 3 does not support --include. --cflags should be sufficient + if test $? -ne 0; then + np_mysql_include="-I$with_mysql/include" # Guessed location + fi + np_mysql_libs="`$np_mysql_config --libs`" + np_mysql_cflags="`$np_mysql_config --cflags`" + + dnl Test a mysql_init. Some systems have mysql_config, but no headers + _savedcppflags="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $np_mysql_include" + + dnl Putting $np_mysql_libs as other libraries ensures that all mysql dependencies are linked in + dnl Although -lmysqlclient is duplicated, it is not a problem + AC_CHECK_LIB([mysqlclient], [mysql_init], [ + with_mysql=$np_mysql_config + AC_DEFINE(HAVE_MYSQLCLIENT, 1, [Defined if mysqlclient is found and can compile]) + ], [with_mysql=no], [$np_mysql_libs]) + CPPFLAGS=$_savedcppflags + + fi + fi +]) + +dnl Will take $1, find last occurrance of -LDIR and add DIR to LD_RUN_PATH +AC_DEFUN([np_add_to_runpath], +[ + dnl Need [[ ]] so autoconf gives us just one set + np_libdir=`echo "$1" | sed -e 's/.*-L\([[^ ]]*\) .*/\1/'` + if test "x$np_libdir" != x ; then + LD_RUN_PATH="${np_libdir}${LD_RUN_PATH:+:}${LD_RUN_PATH}" + fi +]) + diff --git a/m4/restrict.m4 b/m4/restrict.m4 deleted file mode 100644 index 1f3bbb9..0000000 --- a/m4/restrict.m4 +++ /dev/null @@ -1,38 +0,0 @@ -#serial 1003 -dnl Copyright (C) 2003 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# This macro can be removed once we can rely on Autoconf 2.57a or later, -# since we can then use its AC_C_RESTRICT. - -# gl_C_RESTRICT -# -------------- -# Determine whether the C/C++ compiler supports the "restrict" keyword -# introduced in ANSI C99, or an equivalent. Do nothing if the compiler -# accepts it. Otherwise, if the compiler supports an equivalent, -# define "restrict" to be that. Here are some variants: -# - GCC supports both __restrict and __restrict__ -# - older DEC Alpha C compilers support only __restrict -# - _Restrict is the only spelling accepted by Sun WorkShop 6 update 2 C -# Otherwise, define "restrict" to be empty. -AC_DEFUN([gl_C_RESTRICT], -[AC_CACHE_CHECK([for C/C++ restrict keyword], gl_cv_c_restrict, - [gl_cv_c_restrict=no - # Try the official restrict keyword, then gcc's __restrict, and - # the less common variants. - for ac_kw in restrict __restrict __restrict__ _Restrict; do - AC_COMPILE_IFELSE([AC_LANG_SOURCE( - [float * $ac_kw x;])], - [gl_cv_c_restrict=$ac_kw; break]) - done - ]) - case $gl_cv_c_restrict in - restrict) ;; - no) AC_DEFINE(restrict,, - [Define to equivalent of C99 restrict keyword, or to nothing if this - is not supported. Do not define if restrict is supported directly.]) ;; - *) AC_DEFINE_UNQUOTED(restrict, $gl_cv_c_restrict) ;; - esac -]) diff --git a/m4/signed.m4 b/m4/signed.m4 deleted file mode 100644 index 048f593..0000000 --- a/m4/signed.m4 +++ /dev/null @@ -1,17 +0,0 @@ -# signed.m4 serial 1 (gettext-0.10.40) -dnl Copyright (C) 2001-2002 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -AC_DEFUN([bh_C_SIGNED], -[ - AC_CACHE_CHECK([for signed], bh_cv_c_signed, - [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)]) - if test $bh_cv_c_signed = no; then - AC_DEFINE(signed, , - [Define to empty if the C compiler doesn't support this keyword.]) - fi -]) diff --git a/m4/uintmax_t.m4 b/m4/uintmax_t.m4 deleted file mode 100644 index bf83ed7..0000000 --- a/m4/uintmax_t.m4 +++ /dev/null @@ -1,30 +0,0 @@ -# uintmax_t.m4 serial 9 -dnl Copyright (C) 1997-2004 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -AC_PREREQ(2.13) - -# Define uintmax_t to 'unsigned long' or 'unsigned long long' -# if it is not already defined in or . - -AC_DEFUN([gl_AC_TYPE_UINTMAX_T], -[ - AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) - AC_REQUIRE([gl_AC_HEADER_STDINT_H]) - if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then - AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG]) - test $ac_cv_type_unsigned_long_long = yes \ - && ac_type='unsigned long long' \ - || ac_type='unsigned long' - AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, - [Define to unsigned long or unsigned long long - if and don't define.]) - else - AC_DEFINE(HAVE_UINTMAX_T, 1, - [Define if you have the 'uintmax_t' type in or .]) - fi -]) diff --git a/m4/ulonglong.m4 b/m4/ulonglong.m4 deleted file mode 100644 index dee10cc..0000000 --- a/m4/ulonglong.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# ulonglong.m4 serial 4 -dnl Copyright (C) 1999-2004 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works. - -AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG], -[ - AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long, - [AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;], - [unsigned long long ullmax = (unsigned long long) -1; - return ull << i | ull >> i | ullmax / ull | ullmax % ull;], - ac_cv_type_unsigned_long_long=yes, - ac_cv_type_unsigned_long_long=no)]) - if test $ac_cv_type_unsigned_long_long = yes; then - AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, - [Define if you have the 'unsigned long long' type.]) - fi -]) diff --git a/m4/unlocked-io.m4 b/m4/unlocked-io.m4 deleted file mode 100644 index 6cbacb0..0000000 --- a/m4/unlocked-io.m4 +++ /dev/null @@ -1,36 +0,0 @@ -# unlocked-io.m4 serial 12 - -# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 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. - -dnl From Jim Meyering. -dnl -dnl See if the glibc *_unlocked I/O macros or functions are available. -dnl Use only those *_unlocked macros or functions that are declared -dnl (because some of them were declared in Solaris 2.5.1 but were removed -dnl in Solaris 2.6, whereas we want binaries built on Solaris 2.5.1 to run -dnl on Solaris 2.6). - -AC_DEFUN([gl_FUNC_GLIBC_UNLOCKED_IO], -[ - AC_LIBSOURCES([unlocked-io.h]) - - AC_DEFINE([USE_UNLOCKED_IO], 1, - [Define to 1 if you want getc etc. to use unlocked I/O if available. - Unlocked I/O can improve performance in unithreaded apps, - but it is not safe for multithreaded apps.]) - - dnl Persuade glibc and Solaris to declare - dnl fgets_unlocked(), fputs_unlocked() etc. - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - - AC_CHECK_DECLS_ONCE( - [clearerr_unlocked feof_unlocked ferror_unlocked - fflush_unlocked fgets_unlocked fputc_unlocked fputs_unlocked - fread_unlocked fwrite_unlocked getc_unlocked - getchar_unlocked putc_unlocked putchar_unlocked]) -]) diff --git a/mkinstalldirs b/mkinstalldirs index 6fbe5e1..259dbfc 100755 --- a/mkinstalldirs +++ b/mkinstalldirs @@ -1,7 +1,7 @@ #! /bin/sh # mkinstalldirs --- make directory hierarchy -scriptversion=2004-02-15.20 +scriptversion=2005-06-29.22 # Original author: Noah Friedman # Created: 1993-05-16 @@ -12,7 +12,7 @@ scriptversion=2004-02-15.20 # . errstatus=0 -dirmode="" +dirmode= usage="\ Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... @@ -27,7 +27,7 @@ while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" - exit 0 + exit $? ;; -m) # -m PERM arg shift @@ -37,7 +37,7 @@ while test $# -gt 0 ; do ;; --version) echo "$0 $scriptversion" - exit 0 + exit $? ;; --) # stop option processing shift @@ -103,13 +103,21 @@ esac for file do - set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + case $file in + /*) pathcomp=/ ;; + *) pathcomp= ;; + esac + oIFS=$IFS + IFS=/ + set fnord $file shift + IFS=$oIFS - pathcomp= for d do - pathcomp="$pathcomp$d" + test "x$d" = x && continue + + pathcomp=$pathcomp$d case $pathcomp in -*) pathcomp=./$pathcomp ;; esac @@ -124,7 +132,7 @@ do else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" - lasterr="" + lasterr= chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then @@ -134,7 +142,7 @@ do fi fi - pathcomp="$pathcomp/" + pathcomp=$pathcomp/ done done diff --git a/nagios-plugins.spec b/nagios-plugins.spec index 689a842..4175383 100644 --- a/nagios-plugins.spec +++ b/nagios-plugins.spec @@ -1,5 +1,5 @@ Name: nagios-plugins -Version: 1.4.5 +Version: 1.4.8 Release: 1 Summary: Host/service/network monitoring program plugins for Nagios diff --git a/pkg/CVS/Entries b/pkg/CVS/Entries deleted file mode 100644 index 1dd63b9..0000000 --- a/pkg/CVS/Entries +++ /dev/null @@ -1,3 +0,0 @@ -D/fedora//// -D/redhat//// -D/solaris//// diff --git a/pkg/CVS/Repository b/pkg/CVS/Repository deleted file mode 100644 index b27628b..0000000 --- a/pkg/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -nagiosplug/pkg diff --git a/pkg/CVS/Root b/pkg/CVS/Root deleted file mode 100644 index f4a2783..0000000 --- a/pkg/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:ext:tonvoon@nagiosplug.cvs.sourceforge.net:/cvsroot/nagiosplug diff --git a/pkg/CVS/Tag b/pkg/CVS/Tag deleted file mode 100644 index be20aa1..0000000 --- a/pkg/CVS/Tag +++ /dev/null @@ -1 +0,0 @@ -Tr1_4_5 diff --git a/pkg/fedora/CVS/Entries b/pkg/fedora/CVS/Entries deleted file mode 100644 index 56815a1..0000000 --- a/pkg/fedora/CVS/Entries +++ /dev/null @@ -1,2 +0,0 @@ -/requires/1.2/Tue Mar 2 17:44:46 2004//Tr1_4_5 -D diff --git a/pkg/fedora/CVS/Repository b/pkg/fedora/CVS/Repository deleted file mode 100644 index d7b8d7c..0000000 --- a/pkg/fedora/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -nagiosplug/pkg/fedora diff --git a/pkg/fedora/CVS/Root b/pkg/fedora/CVS/Root deleted file mode 100644 index f4a2783..0000000 --- a/pkg/fedora/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:ext:tonvoon@nagiosplug.cvs.sourceforge.net:/cvsroot/nagiosplug diff --git a/pkg/fedora/CVS/Tag b/pkg/fedora/CVS/Tag deleted file mode 100644 index 65ed4ef..0000000 --- a/pkg/fedora/CVS/Tag +++ /dev/null @@ -1 +0,0 @@ -Nr1_4_5 diff --git a/pkg/redhat/CVS/Entries b/pkg/redhat/CVS/Entries deleted file mode 100644 index 7cb58b3..0000000 --- a/pkg/redhat/CVS/Entries +++ /dev/null @@ -1,2 +0,0 @@ -/requires/1.1/Tue Mar 2 17:44:45 2004//Tr1_4_5 -D diff --git a/pkg/redhat/CVS/Repository b/pkg/redhat/CVS/Repository deleted file mode 100644 index 3278ee7..0000000 --- a/pkg/redhat/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -nagiosplug/pkg/redhat diff --git a/pkg/redhat/CVS/Root b/pkg/redhat/CVS/Root deleted file mode 100644 index f4a2783..0000000 --- a/pkg/redhat/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:ext:tonvoon@nagiosplug.cvs.sourceforge.net:/cvsroot/nagiosplug diff --git a/pkg/redhat/CVS/Tag b/pkg/redhat/CVS/Tag deleted file mode 100644 index 65ed4ef..0000000 --- a/pkg/redhat/CVS/Tag +++ /dev/null @@ -1 +0,0 @@ -Nr1_4_5 diff --git a/pkg/solaris/CVS/Entries b/pkg/solaris/CVS/Entries deleted file mode 100644 index 2882a01..0000000 --- a/pkg/solaris/CVS/Entries +++ /dev/null @@ -1,4 +0,0 @@ -/.cvsignore/1.1/Mon Mar 24 17:45:00 2003//Tr1_4_5 -/pkginfo.in/1.3/Wed May 14 21:39:48 2003//Tr1_4_5 -/solpkg/1.4/Wed Jun 4 21:17:58 2003//Tr1_4_5 -D diff --git a/pkg/solaris/CVS/Repository b/pkg/solaris/CVS/Repository deleted file mode 100644 index f93e6c5..0000000 --- a/pkg/solaris/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -nagiosplug/pkg/solaris diff --git a/pkg/solaris/CVS/Root b/pkg/solaris/CVS/Root deleted file mode 100644 index f4a2783..0000000 --- a/pkg/solaris/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:ext:tonvoon@nagiosplug.cvs.sourceforge.net:/cvsroot/nagiosplug diff --git a/pkg/solaris/CVS/Tag b/pkg/solaris/CVS/Tag deleted file mode 100644 index 65ed4ef..0000000 --- a/pkg/solaris/CVS/Tag +++ /dev/null @@ -1 +0,0 @@ -Nr1_4_5 diff --git a/pkg/solaris/pkginfo b/pkg/solaris/pkginfo index 5212fb5..8d26463 100644 --- a/pkg/solaris/pkginfo +++ b/pkg/solaris/pkginfo @@ -1,12 +1,12 @@ PKG="NAGplugin" NAME="nagios-plugins" DESC="Nagios network monitoring plugins" -ARCH="powerpc" -VERSION="1.4.5,REV=2006.11.01.21.25" +ARCH="" +VERSION="1.4.8,REV=2007.04.11.13.13" CATEGORY="application" VENDOR="Nagios Plugin Development Team" EMAIL="nagiosplug-devel@lists.sourceforge.net" -PSTAMP="nag20061101212546" +PSTAMP="nag20070411131329" BASEDIR="/" CLASSES="none" diff --git a/plugins-root/Makefile.am b/plugins-root/Makefile.am index 8d33b48..9623212 100644 --- a/plugins-root/Makefile.am +++ b/plugins-root/Makefile.am @@ -2,7 +2,7 @@ VPATH = $(top_srcdir) $(top_srcdir)/lib $(top_srcdir)/plugins $(top_srcdir)/plugins/t -INCLUDES = -I.. -I$(top_srcdir)/lib -I$(top_srcdir)/intl -I$(top_srcdir)/plugins @SSLINCLUDE@ +INCLUDES = -I.. -I$(top_srcdir)/lib -I$(top_srcdir)/gl -I$(top_srcdir)/intl -I$(top_srcdir)/plugins @SSLINCLUDE@ datadir = @datadir@ localedir = $(datadir)/locale @@ -15,7 +15,7 @@ EXTRA_PROGRAMS = pst3 EXTRA_DIST = pst3.c -BASEOBJS = ../plugins/utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a +BASEOBJS = ../plugins/utils.o ../lib/libnagiosplug.a ../gl/libgnu.a NETOBJS = ../plugins/netutils.o $(BASEOBJS) $(EXTRA_NETOBJS) NETLIBS = $(NETOBJS) $(SOCKETLIBS) @@ -26,7 +26,7 @@ TESTS = @PLUGIN_TEST@ test: perl -I $(top_builddir) -I $(top_srcdir) ../test.pl -setuid_root_mode = 4550 +setuid_root_mode = ug=rx,u+s # /* Author Coreutils team - see ACKNOWLEDGEMENTS */ diff --git a/plugins-root/Makefile.in b/plugins-root/Makefile.in index cf7e414..7f1ddf9 100644 --- a/plugins-root/Makefile.in +++ b/plugins-root/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.4 from Makefile.am. +# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# 2003, 2004, 2005 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. @@ -14,8 +14,6 @@ @SET_MAKE@ -SOURCES = check_dhcp.c check_icmp.c pst3.c - srcdir = @srcdir@ top_srcdir = @top_srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ @@ -42,35 +40,71 @@ EXTRA_PROGRAMS = pst3$(EXEEXT) subdir = plugins-root DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/afs.m4 \ - $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/basename.m4 \ - $(top_srcdir)/m4/c-strtod.m4 $(top_srcdir)/m4/codeset.m4 \ - $(top_srcdir)/m4/dos.m4 $(top_srcdir)/m4/exitfail.m4 \ - $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fcntl-safer.m4 \ - $(top_srcdir)/m4/fstypename.m4 $(top_srcdir)/m4/fsusage.m4 \ - $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/inttypes_h.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/ls-mntd-fs.m4 \ - $(top_srcdir)/m4/mountlist.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/np_coreutils.m4 $(top_srcdir)/m4/np_curl.m4 \ - $(top_srcdir)/m4/onceonly_2_57.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/regex.m4 \ - $(top_srcdir)/m4/restrict.m4 $(top_srcdir)/m4/stdbool.m4 \ - $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \ - $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/unistd-safer.m4 \ - $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/xalloc.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in +am__aclocal_m4_deps = $(top_srcdir)/m4/np_mysqlclient.m4 \ + $(top_srcdir)/gl/m4/absolute-header.m4 \ + $(top_srcdir)/gl/m4/alloca.m4 \ + $(top_srcdir)/gl/m4/arpa_inet_h.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/double-slash-root.m4 \ + $(top_srcdir)/gl/m4/eoverflow.m4 $(top_srcdir)/gl/m4/error.m4 \ + $(top_srcdir)/gl/m4/exitfail.m4 \ + $(top_srcdir)/gl/m4/extensions.m4 \ + $(top_srcdir)/gl/m4/fcntl-safer.m4 \ + $(top_srcdir)/gl/m4/fstypename.m4 \ + $(top_srcdir)/gl/m4/fsusage.m4 \ + $(top_srcdir)/gl/m4/getaddrinfo.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 \ + $(top_srcdir)/gl/m4/gnulib-common.m4 \ + $(top_srcdir)/gl/m4/gnulib-comp.m4 \ + $(top_srcdir)/gl/m4/iconv.m4 $(top_srcdir)/gl/m4/inet_ntop.m4 \ + $(top_srcdir)/gl/m4/inline.m4 $(top_srcdir)/gl/m4/intmax_t.m4 \ + $(top_srcdir)/gl/m4/inttypes_h.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/lock.m4 \ + $(top_srcdir)/gl/m4/longdouble.m4 \ + $(top_srcdir)/gl/m4/longlong.m4 \ + $(top_srcdir)/gl/m4/ls-mntd-fs.m4 \ + $(top_srcdir)/gl/m4/mbchar.m4 $(top_srcdir)/gl/m4/mbiter.m4 \ + $(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/memchr.m4 \ + $(top_srcdir)/gl/m4/minmax.m4 $(top_srcdir)/gl/m4/mountlist.m4 \ + $(top_srcdir)/gl/m4/netinet_in_h.m4 $(top_srcdir)/gl/m4/nls.m4 \ + $(top_srcdir)/gl/m4/onceonly_2_57.m4 $(top_srcdir)/gl/m4/po.m4 \ + $(top_srcdir)/gl/m4/progtest.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/size_max.m4 \ + $(top_srcdir)/gl/m4/snprintf.m4 $(top_srcdir)/gl/m4/socklen.m4 \ + $(top_srcdir)/gl/m4/sockpfaf.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \ + $(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stdint.m4 \ + $(top_srcdir)/gl/m4/stdint_h.m4 $(top_srcdir)/gl/m4/strcase.m4 \ + $(top_srcdir)/gl/m4/strdup.m4 $(top_srcdir)/gl/m4/strndup.m4 \ + $(top_srcdir)/gl/m4/strnlen.m4 \ + $(top_srcdir)/gl/m4/sys_socket_h.m4 \ + $(top_srcdir)/gl/m4/ulonglong.m4 \ + $(top_srcdir)/gl/m4/unistd-safer.m4 \ + $(top_srcdir)/gl/m4/unistd_h.m4 \ + $(top_srcdir)/gl/m4/vasnprintf.m4 \ + $(top_srcdir)/gl/m4/vasprintf.m4 \ + $(top_srcdir)/gl/m4/vsnprintf.m4 $(top_srcdir)/gl/m4/wchar.m4 \ + $(top_srcdir)/gl/m4/wchar_t.m4 $(top_srcdir)/gl/m4/wctype.m4 \ + $(top_srcdir)/gl/m4/wcwidth.m4 $(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) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = PROGRAMS = $(noinst_PROGRAMS) check_dhcp_SOURCES = check_dhcp.c check_dhcp_OBJECTS = check_dhcp.$(OBJEXT) am__DEPENDENCIES_1 = ../plugins/utils.o ../lib/libnagiosplug.a \ - ../lib/libcoreutils.a + ../gl/libgnu.a am__DEPENDENCIES_2 = am__DEPENDENCIES_3 = ../plugins/netutils.o $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_2) @@ -81,7 +115,7 @@ pst3_SOURCES = pst3.c pst3_OBJECTS = pst3.$(OBJEXT) pst3_DEPENDENCIES = DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -98,6 +132,10 @@ CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) VPATH = $(top_srcdir) $(top_srcdir)/lib $(top_srcdir)/plugins $(top_srcdir)/plugins/t INSTALL = @INSTALL@ +ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@ +ABSOLUTE_UNISTD_H = @ABSOLUTE_UNISTD_H@ +ABSOLUTE_WCHAR_H = @ABSOLUTE_WCHAR_H@ +ABSOLUTE_WCTYPE_H = @ABSOLUTE_WCTYPE_H@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ @@ -105,11 +143,17 @@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ +ARPA_INET_H = @ARPA_INET_H@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ +BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ +BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ +BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ +BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ +BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -128,6 +172,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +EOVERFLOW = @EOVERFLOW@ EXEEXT = @EXEEXT@ EXTRAS = @EXTRAS@ EXTRAS_ROOT = @EXTRAS_ROOT@ @@ -137,7 +182,22 @@ F77 = @F77@ FFLAGS = @FFLAGS@ GETLOADAVG_LIBS = @GETLOADAVG_LIBS@ GETOPT_H = @GETOPT_H@ +GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@ +GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@ GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ +HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ +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_STDINT_H = @HAVE_STDINT_H@ +HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ +HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ +HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ +HAVE_WINT_T = @HAVE_WINT_T@ HAVE__BOOL = @HAVE__BOOL@ HOSTNAME = @HOSTNAME@ INSTALL_DATA = @INSTALL_DATA@ @@ -152,6 +212,8 @@ LDAPINCLUDE = @LDAPINCLUDE@ LDAPLIBS = @LDAPLIBS@ LDFLAGS = @LDFLAGS@ LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ +LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ @@ -163,15 +225,15 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MATHLIBS = @MATHLIBS@ -MKINSTALLDIRS = @MKINSTALLDIRS@ +MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ MYSQLCFLAGS = @MYSQLCFLAGS@ -MYSQLCONFIG = @MYSQLCONFIG@ MYSQLINCLUDE = @MYSQLINCLUDE@ MYSQLLIBS = @MYSQLLIBS@ NEED_SETGID = @NEED_SETGID@ -NEED_VA_LIST = @NEED_VA_LIST@ +NETINET_IN_H = @NETINET_IN_H@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -209,6 +271,7 @@ PKG_ARCH = @PKG_ARCH@ PLUGIN_TEST = @PLUGIN_TEST@ POSUB = @POSUB@ POW_LIB = @POW_LIB@ +PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RADIUSLIBS = @RADIUSLIBS@ RANLIB = @RANLIB@ @@ -219,16 +282,26 @@ SCRIPT_TEST = @SCRIPT_TEST@ SET_MAKE = @SET_MAKE@ SH = @SH@ SHELL = @SHELL@ +SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ +SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SOCKETLIBS = @SOCKETLIBS@ SSLINCLUDE = @SSLINCLUDE@ SSLLIBS = @SSLLIBS@ STDBOOL_H = @STDBOOL_H@ +STDINT_H = @STDINT_H@ STRIP = @STRIP@ SUPPORT = @SUPPORT@ +SYS_SOCKET_H = @SYS_SOCKET_H@ +UNISTD_H = @UNISTD_H@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARRANTY = @WARRANTY@ +WCHAR_H = @WCHAR_H@ +WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WCTYPE_H = @WCTYPE_H@ +WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ @@ -253,6 +326,8 @@ build_vendor = @build_vendor@ check_tcp_ssl = @check_tcp_ssl@ datadir = @datadir@ exec_prefix = @exec_prefix@ +gl_LIBOBJS = @gl_LIBOBJS@ +gl_LTLIBOBJS = @gl_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -263,9 +338,11 @@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = $(datadir)/locale localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +np_mysql_config = @np_mysql_config@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ @@ -274,15 +351,14 @@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ with_trusted_path = @with_trusted_path@ -INCLUDES = -I.. -I$(top_srcdir)/lib -I$(top_srcdir)/intl -I$(top_srcdir)/plugins @SSLINCLUDE@ -localedir = $(datadir)/locale +INCLUDES = -I.. -I$(top_srcdir)/lib -I$(top_srcdir)/gl -I$(top_srcdir)/intl -I$(top_srcdir)/plugins @SSLINCLUDE@ EXTRA_DIST = pst3.c -BASEOBJS = ../plugins/utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a +BASEOBJS = ../plugins/utils.o ../lib/libnagiosplug.a ../gl/libgnu.a NETOBJS = ../plugins/netutils.o $(BASEOBJS) $(EXTRA_NETOBJS) NETLIBS = $(NETOBJS) $(SOCKETLIBS) TESTS_ENVIRONMENT = perl -I $(top_builddir) -I $(top_srcdir) TESTS = @PLUGIN_TEST@ -setuid_root_mode = 4550 +setuid_root_mode = ug=rx,u+s # /* Author Coreutils team - see ACKNOWLEDGEMENTS */ INSTALL_SUID = \ diff --git a/plugins-root/check_dhcp.c b/plugins-root/check_dhcp.c index 320d073..e1cf108 100644 --- a/plugins-root/check_dhcp.c +++ b/plugins-root/check_dhcp.c @@ -6,7 +6,7 @@ * Copyright (c) 2001-2004 Ethan Galstad (nagios@nagios.org) * Copyright (c) 2001-2006 Nagios Plugin Development Team * -* Last Modified: $Date: 2006/10/20 06:24:10 $ +* Last Modified: $Date: 2007/01/28 21:46:41 $ * * Description: * @@ -31,12 +31,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -* $Id: check_dhcp.c,v 1.6 2006/10/20 06:24:10 opensides Exp $ +* $Id: check_dhcp.c,v 1.8 2007/01/28 21:46:41 hweiss Exp $ * *****************************************************************************/ const char *progname = "check_dhcp"; -const char *revision = "$Revision: 1.6 $"; +const char *revision = "$Revision: 1.8 $"; const char *copyright = "2001-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -68,6 +68,7 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net"; #elif defined (__bsd__) #include +#include #include #include @@ -1090,7 +1091,7 @@ int call_getopt(int argc, char **argv){ break; case '?': /* help */ - usage2 (_("Unknown argument"), optarg); + usage5 (); break; default: diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c index 4a111d5..9259951 100644 --- a/plugins-root/check_icmp.c +++ b/plugins-root/check_icmp.c @@ -3,11 +3,11 @@ * Nagios check_icmp plugin * * License: GPL -* Copyright (c) 2005-2006 nagios-plugins team +* Copyright (c) 2005-2007 nagios-plugins team * * Original Author : Andreas Ericsson * -* Last Modified: $Date: 2006/10/24 21:54:06 $ +* Last Modified: $Date: 2007/03/27 06:53:57 $ * * Description: * @@ -38,15 +38,15 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -* $Id: check_icmp.c,v 1.8 2006/10/24 21:54:06 opensides Exp $ +* $Id: check_icmp.c,v 1.12 2007/03/27 06:53:57 dermoth Exp $ * *****************************************************************************/ /* progname may change */ /* char *progname = "check_icmp"; */ char *progname; -const char *revision = "$Revision: 1.8 $"; -const char *copyright = "2005-2006"; +const char *revision = "$Revision: 1.12 $"; +const char *copyright = "2005-2007"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; /** nagios plugins basic includes */ @@ -212,6 +212,7 @@ static struct timeval prog_start; static unsigned long long max_completion_time = 0; static unsigned char ttl = 0; /* outgoing ttl */ static unsigned int warn_down = 1, crit_down = 1; /* host down threshold values */ +static int min_hosts_alive = -1; float pkt_backoff_factor = 1.5; float target_backoff_factor = 1.5; @@ -394,7 +395,8 @@ main(int argc, char **argv) environ = NULL; /* use the pid to mark packets as ours */ - pid = getpid(); + /* Some systems have 32-bit pid_t so mask off only 16 bits */ + pid = getpid() & 0xffff; /* printf("pid = %u\n", pid); */ /* get calling name the old-fashioned way for portability instead @@ -437,7 +439,7 @@ main(int argc, char **argv) /* parse the arguments */ for(i = 1; i < argc; i++) { - while((arg = getopt(argc, argv, "vhVw:c:n:p:t:H:i:b:I:l:")) != EOF) { + while((arg = getopt(argc, argv, "vhVw:c:n:p:t:H:i:b:I:l:m:")) != EOF) { switch(arg) { case 'v': debug++; @@ -471,6 +473,9 @@ main(int argc, char **argv) case 'l': ttl = (unsigned char)strtoul(optarg, NULL, 0); break; + case 'm': + min_hosts_alive = (int)strtoul(optarg, NULL, 0); + break; case 'd': /* implement later, for cluster checks */ warn_down = (unsigned char)strtoul(optarg, &ptr, 0); if(ptr) { @@ -478,7 +483,7 @@ main(int argc, char **argv) } break; case 'V': /* version */ - //print_revision (progname, revision); + /*print_revision (progname, revision);*/ /* FIXME: Why? */ exit (STATE_OK); case 'h': /* help */ print_help (); @@ -587,6 +592,11 @@ main(int argc, char **argv) crash("packets is > 20 (%d)", packets); } + if(min_hosts_alive < -1) { + errno = 0; + crash("minimum alive hosts is negative (%i)", min_hosts_alive); + } + host = list; table = malloc(sizeof(struct rta_host **) * (argc - 1)); i = 0; @@ -879,6 +889,8 @@ finish(int sig) struct rta_host *host; char *status_string[] = {"OK", "WARNING", "CRITICAL", "UNKNOWN", "DEPENDENT"}; + int hosts_ok = 0; + int hosts_warn = 0; alarm(0); if(debug > 1) printf("finish(%d) called\n", sig); @@ -911,13 +923,25 @@ finish(int sig) } host->pl = pl; host->rta = rta; - if(!status && (pl >= warn.pl || rta >= warn.rta)) status = STATE_WARNING; - if(pl >= crit.pl || rta >= crit.rta) status = STATE_CRITICAL; + if(pl >= crit.pl || rta >= crit.rta) { + status = STATE_CRITICAL; + } + else if(!status && (pl >= warn.pl || rta >= warn.rta)) { + status = STATE_WARNING; + hosts_warn++; + } + else { + hosts_ok++; + } host = host->next; } /* this is inevitable */ if(!targets_alive) status = STATE_CRITICAL; + if(min_hosts_alive > -1) { + if(hosts_ok >= min_hosts_alive) status = STATE_OK; + else if((hosts_ok + hosts_warn) >= min_hosts_alive) status = STATE_WARNING; + } printf("%s - ", status_string[status]); host = list; @@ -964,10 +988,15 @@ finish(int sig) host = host->next; } + if(min_hosts_alive > -1) { + if(hosts_ok >= min_hosts_alive) status = STATE_OK; + else if((hosts_ok + hosts_warn) >= min_hosts_alive) status = STATE_WARNING; + } + /* finish with an empty line */ puts(""); - if(debug) printf("targets: %u, targets_alive: %u\n", - targets, targets_alive); + if(debug) printf("targets: %u, targets_alive: %u, hosts_ok: %u, hosts_warn: %u, min_hosts_alive: %i\n", + targets, targets_alive, hosts_ok, hosts_warn, min_hosts_alive); exit(status); } @@ -1183,7 +1212,7 @@ void print_help(void) { - //print_revision (progname, revision); + /*print_revision (progname, revision);*/ /* FIXME: Why? */ printf ("Copyright (c) 2005 Andreas Ericsson \n"); printf (COPYRIGHT, copyright, email); @@ -1201,7 +1230,7 @@ print_help(void) printf ("%0.3fms,%u%%)\n", (float)warn.rta / 1000 , warn.pl / 1000); printf (" %s\n", "-c"); printf (" %s", _("critical threshold (currently ")); - printf ("%0.3fms,%u%%)\n", (float)crit.rta), crit.pl; + printf ("%0.3fms,%u%%)\n", (float)crit.rta, crit.pl); printf (" %s\n", "-n"); printf (" %s", _("number of packets to send (currently ")); printf ("%u)\n",packets); @@ -1211,6 +1240,9 @@ print_help(void) printf (" %s\n", "-I"); printf (" %s", _("max target interval (currently ")); printf ("%0.3fms)\n", (float)target_interval / 1000); + printf (" %s\n", "-m"); + printf (" %s",_("number of alive hosts required for success")); + printf ("\n"); printf (" %s\n", "-l"); printf (" %s", _("TTL on outgoing packets (currently ")); printf ("%u)", ttl); @@ -1228,10 +1260,12 @@ print_help(void) printf ("%s\n", _("packet loss. The default values should work well for most users.")); printf ("%s\n", _("You can specify different RTA factors using the standardized abbreviations")); printf ("%s\n\n", _("us (microseconds), ms (milliseconds, default) or just plain s for seconds.")); - printf ("%s\n", _("Threshold format for -d is warn,crit. 12,14 means WARNING if >= 12 hops")); +/* -d not yet implemented */ +/* printf ("%s\n", _("Threshold format for -d is warn,crit. 12,14 means WARNING if >= 12 hops")); printf ("%s\n", _("are spent and CRITICAL if >= 14 hops are spent.")); - printf ("%s\n\n", _("NOTE: Some systems decrease TTL when forming ICMP_ECHOREPLY, others do not.")); + printf ("%s\n\n", _("NOTE: Some systems decrease TTL when forming ICMP_ECHOREPLY, others do not."));*/ printf ("%s\n\n", _("The -v switch can be specified several times for increased verbosity.")); + /* printf ("%s\n", _("Long options are currently unsupported.")); printf ("%s\n", _("Options marked with * require an argument")); */ diff --git a/plugins-scripts/Makefile.in b/plugins-scripts/Makefile.in index 9e04642..68e2823 100644 --- a/plugins-scripts/Makefile.in +++ b/plugins-scripts/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.4 from Makefile.am. +# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# 2003, 2004, 2005 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. @@ -38,28 +38,64 @@ subdir = plugins-scripts DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/subst.in $(srcdir)/utils.pm.in $(srcdir)/utils.sh.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/afs.m4 \ - $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/basename.m4 \ - $(top_srcdir)/m4/c-strtod.m4 $(top_srcdir)/m4/codeset.m4 \ - $(top_srcdir)/m4/dos.m4 $(top_srcdir)/m4/exitfail.m4 \ - $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fcntl-safer.m4 \ - $(top_srcdir)/m4/fstypename.m4 $(top_srcdir)/m4/fsusage.m4 \ - $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/inttypes_h.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/ls-mntd-fs.m4 \ - $(top_srcdir)/m4/mountlist.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/np_coreutils.m4 $(top_srcdir)/m4/np_curl.m4 \ - $(top_srcdir)/m4/onceonly_2_57.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/regex.m4 \ - $(top_srcdir)/m4/restrict.m4 $(top_srcdir)/m4/stdbool.m4 \ - $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \ - $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/unistd-safer.m4 \ - $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/xalloc.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in +am__aclocal_m4_deps = $(top_srcdir)/m4/np_mysqlclient.m4 \ + $(top_srcdir)/gl/m4/absolute-header.m4 \ + $(top_srcdir)/gl/m4/alloca.m4 \ + $(top_srcdir)/gl/m4/arpa_inet_h.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/double-slash-root.m4 \ + $(top_srcdir)/gl/m4/eoverflow.m4 $(top_srcdir)/gl/m4/error.m4 \ + $(top_srcdir)/gl/m4/exitfail.m4 \ + $(top_srcdir)/gl/m4/extensions.m4 \ + $(top_srcdir)/gl/m4/fcntl-safer.m4 \ + $(top_srcdir)/gl/m4/fstypename.m4 \ + $(top_srcdir)/gl/m4/fsusage.m4 \ + $(top_srcdir)/gl/m4/getaddrinfo.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 \ + $(top_srcdir)/gl/m4/gnulib-common.m4 \ + $(top_srcdir)/gl/m4/gnulib-comp.m4 \ + $(top_srcdir)/gl/m4/iconv.m4 $(top_srcdir)/gl/m4/inet_ntop.m4 \ + $(top_srcdir)/gl/m4/inline.m4 $(top_srcdir)/gl/m4/intmax_t.m4 \ + $(top_srcdir)/gl/m4/inttypes_h.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/lock.m4 \ + $(top_srcdir)/gl/m4/longdouble.m4 \ + $(top_srcdir)/gl/m4/longlong.m4 \ + $(top_srcdir)/gl/m4/ls-mntd-fs.m4 \ + $(top_srcdir)/gl/m4/mbchar.m4 $(top_srcdir)/gl/m4/mbiter.m4 \ + $(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/memchr.m4 \ + $(top_srcdir)/gl/m4/minmax.m4 $(top_srcdir)/gl/m4/mountlist.m4 \ + $(top_srcdir)/gl/m4/netinet_in_h.m4 $(top_srcdir)/gl/m4/nls.m4 \ + $(top_srcdir)/gl/m4/onceonly_2_57.m4 $(top_srcdir)/gl/m4/po.m4 \ + $(top_srcdir)/gl/m4/progtest.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/size_max.m4 \ + $(top_srcdir)/gl/m4/snprintf.m4 $(top_srcdir)/gl/m4/socklen.m4 \ + $(top_srcdir)/gl/m4/sockpfaf.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \ + $(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stdint.m4 \ + $(top_srcdir)/gl/m4/stdint_h.m4 $(top_srcdir)/gl/m4/strcase.m4 \ + $(top_srcdir)/gl/m4/strdup.m4 $(top_srcdir)/gl/m4/strndup.m4 \ + $(top_srcdir)/gl/m4/strnlen.m4 \ + $(top_srcdir)/gl/m4/sys_socket_h.m4 \ + $(top_srcdir)/gl/m4/ulonglong.m4 \ + $(top_srcdir)/gl/m4/unistd-safer.m4 \ + $(top_srcdir)/gl/m4/unistd_h.m4 \ + $(top_srcdir)/gl/m4/vasnprintf.m4 \ + $(top_srcdir)/gl/m4/vasprintf.m4 \ + $(top_srcdir)/gl/m4/vsnprintf.m4 $(top_srcdir)/gl/m4/wchar.m4 \ + $(top_srcdir)/gl/m4/wchar_t.m4 $(top_srcdir)/gl/m4/wctype.m4 \ + $(top_srcdir)/gl/m4/wcwidth.m4 $(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) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = subst utils.pm utils.sh am__installdirs = "$(DESTDIR)$(libexecdir)" @@ -70,6 +106,10 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) VPATH = $(top_srcdir) $(top_srcdir)/plugins-scripts $(top_srcdir)/plugins-scripts/t INSTALL = @INSTALL@ +ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@ +ABSOLUTE_UNISTD_H = @ABSOLUTE_UNISTD_H@ +ABSOLUTE_WCHAR_H = @ABSOLUTE_WCHAR_H@ +ABSOLUTE_WCTYPE_H = @ABSOLUTE_WCTYPE_H@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ @@ -77,11 +117,17 @@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ +ARPA_INET_H = @ARPA_INET_H@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ +BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ +BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ +BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ +BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ +BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -100,6 +146,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +EOVERFLOW = @EOVERFLOW@ EXEEXT = @EXEEXT@ EXTRAS = @EXTRAS@ EXTRAS_ROOT = @EXTRAS_ROOT@ @@ -109,7 +156,22 @@ F77 = @F77@ FFLAGS = @FFLAGS@ GETLOADAVG_LIBS = @GETLOADAVG_LIBS@ GETOPT_H = @GETOPT_H@ +GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@ +GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@ GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ +HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ +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_STDINT_H = @HAVE_STDINT_H@ +HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ +HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ +HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ +HAVE_WINT_T = @HAVE_WINT_T@ HAVE__BOOL = @HAVE__BOOL@ HOSTNAME = @HOSTNAME@ INSTALL_DATA = @INSTALL_DATA@ @@ -124,6 +186,8 @@ LDAPINCLUDE = @LDAPINCLUDE@ LDAPLIBS = @LDAPLIBS@ LDFLAGS = @LDFLAGS@ LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ +LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ @@ -135,15 +199,15 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MATHLIBS = @MATHLIBS@ -MKINSTALLDIRS = @MKINSTALLDIRS@ +MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ MYSQLCFLAGS = @MYSQLCFLAGS@ -MYSQLCONFIG = @MYSQLCONFIG@ MYSQLINCLUDE = @MYSQLINCLUDE@ MYSQLLIBS = @MYSQLLIBS@ NEED_SETGID = @NEED_SETGID@ -NEED_VA_LIST = @NEED_VA_LIST@ +NETINET_IN_H = @NETINET_IN_H@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -181,6 +245,7 @@ PKG_ARCH = @PKG_ARCH@ PLUGIN_TEST = @PLUGIN_TEST@ POSUB = @POSUB@ POW_LIB = @POW_LIB@ +PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RADIUSLIBS = @RADIUSLIBS@ RANLIB = @RANLIB@ @@ -191,16 +256,26 @@ SCRIPT_TEST = @SCRIPT_TEST@ SET_MAKE = @SET_MAKE@ SH = @SH@ SHELL = @SHELL@ +SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ +SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SOCKETLIBS = @SOCKETLIBS@ SSLINCLUDE = @SSLINCLUDE@ SSLLIBS = @SSLLIBS@ STDBOOL_H = @STDBOOL_H@ +STDINT_H = @STDINT_H@ STRIP = @STRIP@ SUPPORT = @SUPPORT@ +SYS_SOCKET_H = @SYS_SOCKET_H@ +UNISTD_H = @UNISTD_H@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARRANTY = @WARRANTY@ +WCHAR_H = @WCHAR_H@ +WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WCTYPE_H = @WCTYPE_H@ +WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ @@ -225,6 +300,8 @@ build_vendor = @build_vendor@ check_tcp_ssl = @check_tcp_ssl@ datadir = @datadir@ exec_prefix = @exec_prefix@ +gl_LIBOBJS = @gl_LIBOBJS@ +gl_LTLIBOBJS = @gl_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -235,9 +312,11 @@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +np_mysql_config = @np_mysql_config@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ diff --git a/plugins-scripts/check_ifoperstatus.pl b/plugins-scripts/check_ifoperstatus.pl index cda686f..09775f2 100644 --- a/plugins-scripts/check_ifoperstatus.pl +++ b/plugins-scripts/check_ifoperstatus.pl @@ -25,7 +25,7 @@ # Report bugs to: nagiosplug-help@lists.sourceforge.net # # 11.01.2000 Version 1.0 -# $Id: check_ifoperstatus.pl,v 1.6 2004/12/07 03:13:14 mattkent Exp $ +# $Id: check_ifoperstatus.pl,v 1.7 2007/03/16 12:11:46 gonzai Exp $ # # Patches from Guy Van Den Bergh to warn on ifadminstatus down interfaces # instead of critical. @@ -304,7 +304,7 @@ sub print_help() { printf "intensive. Use it sparingly or not at all. -n is used to match against\n"; printf "a much more descriptive ifName value in the IfXTable to verify that the\n"; printf "snmpkey has not changed to some other network interface after a reboot.\n\n"; - print_revision($PROGNAME, '$Revision: 1.6 $'); + print_revision($PROGNAME, '$Revision: 1.7 $'); } @@ -341,7 +341,7 @@ sub process_arguments() { } if ($opt_V) { - print_revision($PROGNAME,'$Revision: 1.6 $ '); + print_revision($PROGNAME,'$Revision: 1.7 $ '); exit $ERRORS{'OK'}; } @@ -384,15 +384,15 @@ sub process_arguments() { if (defined $seclevel && defined $secname) { # Must define a security level even though defualt is noAuthNoPriv - unless ($seclevel eq ('noAuthNoPriv' || 'authNoPriv' || 'authPriv' ) ) { + unless ( grep /^$seclevel$/, qw(noAuthNoPriv authNoPriv authPriv) ) { usage(); exit $ERRORS{"UNKNOWN"}; } # Authentication wanted - if ($seclevel eq ('authNoPriv' || 'authPriv') ) { + if ( $seclevel eq 'authNoPriv' || $seclevel eq 'authPriv' ) { - unless ($authproto eq ('MD5' || 'SHA1') ) { + unless ( $authproto eq 'MD5' || $authproto eq 'SHA1' ) { usage(); exit $ERRORS{"UNKNOWN"}; } diff --git a/plugins-scripts/check_log.sh b/plugins-scripts/check_log.sh index 71e887f..bca7afd 100755 --- a/plugins-scripts/check_log.sh +++ b/plugins-scripts/check_log.sh @@ -71,7 +71,7 @@ TOUCH="/bin/touch" PROGNAME=`/bin/basename $0` PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'` -REVISION=`echo '$Revision: 1.7 $' | sed -e 's/[^0-9.]//g'` +REVISION=`echo '$Revision: 1.8 $' | sed -e 's/[^0-9.]//g'` . $PROGPATH/utils.sh @@ -197,7 +197,7 @@ else $CHMOD 600 $tempdiff fi -$DIFF $logfile $oldlog > $tempdiff +$DIFF $logfile $oldlog | $GREP -v "^>" > $tempdiff # Count the number of matching log entries we have count=`$GREP -c "$query" $tempdiff` diff --git a/plugins-scripts/t/CVS/Entries b/plugins-scripts/t/CVS/Entries deleted file mode 100644 index 8a61020..0000000 --- a/plugins-scripts/t/CVS/Entries +++ /dev/null @@ -1,4 +0,0 @@ -/check_file_age.t/1.1/Thu Dec 15 15:17:49 2005//Tr1_4_5 -/check_rpc.t/1.2/Mon Jul 25 01:47:15 2005//Tr1_4_5 -/utils.t/1.2/Fri Oct 27 15:37:31 2006//Tr1_4_5 -D diff --git a/plugins-scripts/t/CVS/Repository b/plugins-scripts/t/CVS/Repository deleted file mode 100644 index 3887c98..0000000 --- a/plugins-scripts/t/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -nagiosplug/plugins-scripts/t diff --git a/plugins-scripts/t/CVS/Root b/plugins-scripts/t/CVS/Root deleted file mode 100644 index f4a2783..0000000 --- a/plugins-scripts/t/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:ext:tonvoon@nagiosplug.cvs.sourceforge.net:/cvsroot/nagiosplug diff --git a/plugins-scripts/t/CVS/Tag b/plugins-scripts/t/CVS/Tag deleted file mode 100644 index 65ed4ef..0000000 --- a/plugins-scripts/t/CVS/Tag +++ /dev/null @@ -1 +0,0 @@ -Nr1_4_5 diff --git a/plugins-scripts/t/utils.t b/plugins-scripts/t/utils.t index 2db862d..09f3d0f 100644 --- a/plugins-scripts/t/utils.t +++ b/plugins-scripts/t/utils.t @@ -2,7 +2,7 @@ # # utils.pm tests # -# $Id: utils.t,v 1.2 2006/10/27 15:37:31 tonvoon Exp $ +# $Id: utils.t,v 1.3 2006/12/12 12:59:06 tonvoon Exp $ # # Run with perl t/utils.t @@ -35,6 +35,8 @@ my $hostname_checks = { "host.888." => 1, "where.did.that.!.come.from." => 0, "no.underscores_.com" => 0, + "a.somecompany.com" => 1, + "host.a.com" => 1, }; plan tests => ((scalar keys %$hostname_checks) + 4); diff --git a/plugins-scripts/utils.pm.in b/plugins-scripts/utils.pm.in index 5aab448..e0aae46 100644 --- a/plugins-scripts/utils.pm.in +++ b/plugins-scripts/utils.pm.in @@ -1,5 +1,5 @@ # Utility drawer for Nagios plugins. -# $Id: utils.pm.in,v 1.11 2006/10/27 15:37:31 tonvoon Exp $ +# $Id: utils.pm.in,v 1.12 2006/12/12 08:56:01 tonvoon Exp $ # # This will be deprecated soon. Please use Nagios::Plugin from CPAN # for new plugins @@ -60,7 +60,7 @@ sub is_hostname { } else { return 0; } - } elsif ($host1 =~ m/^[a-zA-Z0-9][-a-zA-Z0-9]+(\.[a-zA-Z0-9][-a-zA-Z0-9]+)*\.?$/) { + } elsif ($host1 =~ m/^[a-zA-Z0-9][-a-zA-Z0-9]*(\.[a-zA-Z0-9][-a-zA-Z0-9]*)*\.?$/) { return 1; } else { return 0; diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 12801fa..7ee2910 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -2,12 +2,12 @@ VPATH = $(top_srcdir) $(top_srcdir)/lib $(top_srcdir)/plugins $(top_srcdir)/plugins/t -INCLUDES = -I.. -I$(top_srcdir)/lib -I$(top_srcdir)/intl @LDAPINCLUDE@ @PGINCLUDE@ @SSLINCLUDE@ +INCLUDES = -I.. -I$(top_srcdir)/lib -I$(top_srcdir)/gl -I$(top_srcdir)/intl @LDAPINCLUDE@ @PGINCLUDE@ @SSLINCLUDE@ datadir = @datadir@ localedir = $(datadir)/locale DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ -LIBS = @LIBINTL@ @LIBS@ @SSLLIBS@ +LIBS = @LIBINTL@ @LIBS@ MATHLIBS = @MATHLIBS@ # This is not portable. Run ". tools/devmode" to get development compile flags @@ -28,12 +28,11 @@ EXTRA_PROGRAMS = check_mysql check_radius check_pgsql check_snmp check_hpjd \ check_procs check_mysql_query check_apt EXTRA_DIST = t utils.c netutils.c sslutils.c popen.c utils.h netutils.h \ - popen.h common.h getaddrinfo.c getaddrinfo.h \ - gethostbyname.c gethostbyname.h runcmd.c runcmd.h + popen.h common.h runcmd.c runcmd.h PLUGINHDRS = common.h -BASEOBJS = utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a +BASEOBJS = utils.o ../lib/libnagiosplug.a ../gl/libgnu.a NETOBJS = netutils.o $(BASEOBJS) $(EXTRA_NETOBJS) SSLOBJS = sslutils.o NETLIBS = $(NETOBJS) $(SOCKETLIBS) @@ -55,7 +54,7 @@ check_dns_LDADD = $(NETLIBS) runcmd.o check_dummy_LDADD = $(BASEOBJS) check_fping_LDADD = $(NETLIBS) popen.o check_game_LDADD = $(BASEOBJS) runcmd.o -check_http_LDADD = $(SSLOBJS) $(NETLIBS) +check_http_LDADD = $(SSLOBJS) $(NETLIBS) $(SSLLIBS) check_hpjd_LDADD = $(NETLIBS) popen.o check_ldap_LDADD = $(NETLIBS) $(LDAPLIBS) check_load_LDADD = $(BASEOBJS) popen.o @@ -78,10 +77,10 @@ check_procs_LDADD = $(BASEOBJS) popen.o check_radius_LDADD = $(NETLIBS) $(RADIUSLIBS) check_real_LDADD = $(NETLIBS) check_snmp_LDADD = $(BASEOBJS) popen.o -check_smtp_LDADD = $(SSLOBJS) $(NETLIBS) +check_smtp_LDADD = $(SSLOBJS) $(NETLIBS) $(SSLLIBS) check_ssh_LDADD = $(NETLIBS) check_swap_LDADD = $(MATHLIBS) $(BASEOBJS) popen.o -check_tcp_LDADD = $(SSLOBJS) $(NETLIBS) +check_tcp_LDADD = $(SSLOBJS) $(NETLIBS) $(SSLLIBS) check_time_LDADD = $(NETLIBS) check_ups_LDADD = $(NETLIBS) check_users_LDADD = $(BASEOBJS) popen.o diff --git a/plugins/Makefile.in b/plugins/Makefile.in index 4e51523..b264008 100644 --- a/plugins/Makefile.in +++ b/plugins/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.4 from Makefile.am. +# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# 2003, 2004, 2005 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. @@ -14,8 +14,6 @@ @SET_MAKE@ -SOURCES = check_apt.c check_by_ssh.c check_dig.c check_disk.c check_dns.c check_dummy.c check_fping.c check_game.c check_hpjd.c check_http.c check_ide_smart.c check_ldap.c check_load.c check_mrtg.c check_mrtgtraf.c check_mysql.c check_mysql_query.c check_nagios.c check_nt.c check_ntp.c check_nwstat.c check_overcr.c check_pgsql.c check_ping.c check_procs.c check_radius.c check_real.c check_smtp.c check_snmp.c check_ssh.c check_swap.c check_tcp.c check_time.c check_ups.c check_users.c negate.c urlize.c - srcdir = @srcdir@ top_srcdir = @top_srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ @@ -54,28 +52,64 @@ EXTRA_PROGRAMS = check_mysql$(EXEEXT) check_radius$(EXEEXT) \ subdir = plugins DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/afs.m4 \ - $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/basename.m4 \ - $(top_srcdir)/m4/c-strtod.m4 $(top_srcdir)/m4/codeset.m4 \ - $(top_srcdir)/m4/dos.m4 $(top_srcdir)/m4/exitfail.m4 \ - $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fcntl-safer.m4 \ - $(top_srcdir)/m4/fstypename.m4 $(top_srcdir)/m4/fsusage.m4 \ - $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/inttypes_h.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/ls-mntd-fs.m4 \ - $(top_srcdir)/m4/mountlist.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/np_coreutils.m4 $(top_srcdir)/m4/np_curl.m4 \ - $(top_srcdir)/m4/onceonly_2_57.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/regex.m4 \ - $(top_srcdir)/m4/restrict.m4 $(top_srcdir)/m4/stdbool.m4 \ - $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \ - $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/unistd-safer.m4 \ - $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/xalloc.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in +am__aclocal_m4_deps = $(top_srcdir)/m4/np_mysqlclient.m4 \ + $(top_srcdir)/gl/m4/absolute-header.m4 \ + $(top_srcdir)/gl/m4/alloca.m4 \ + $(top_srcdir)/gl/m4/arpa_inet_h.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/double-slash-root.m4 \ + $(top_srcdir)/gl/m4/eoverflow.m4 $(top_srcdir)/gl/m4/error.m4 \ + $(top_srcdir)/gl/m4/exitfail.m4 \ + $(top_srcdir)/gl/m4/extensions.m4 \ + $(top_srcdir)/gl/m4/fcntl-safer.m4 \ + $(top_srcdir)/gl/m4/fstypename.m4 \ + $(top_srcdir)/gl/m4/fsusage.m4 \ + $(top_srcdir)/gl/m4/getaddrinfo.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 \ + $(top_srcdir)/gl/m4/gnulib-common.m4 \ + $(top_srcdir)/gl/m4/gnulib-comp.m4 \ + $(top_srcdir)/gl/m4/iconv.m4 $(top_srcdir)/gl/m4/inet_ntop.m4 \ + $(top_srcdir)/gl/m4/inline.m4 $(top_srcdir)/gl/m4/intmax_t.m4 \ + $(top_srcdir)/gl/m4/inttypes_h.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/lock.m4 \ + $(top_srcdir)/gl/m4/longdouble.m4 \ + $(top_srcdir)/gl/m4/longlong.m4 \ + $(top_srcdir)/gl/m4/ls-mntd-fs.m4 \ + $(top_srcdir)/gl/m4/mbchar.m4 $(top_srcdir)/gl/m4/mbiter.m4 \ + $(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/memchr.m4 \ + $(top_srcdir)/gl/m4/minmax.m4 $(top_srcdir)/gl/m4/mountlist.m4 \ + $(top_srcdir)/gl/m4/netinet_in_h.m4 $(top_srcdir)/gl/m4/nls.m4 \ + $(top_srcdir)/gl/m4/onceonly_2_57.m4 $(top_srcdir)/gl/m4/po.m4 \ + $(top_srcdir)/gl/m4/progtest.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/size_max.m4 \ + $(top_srcdir)/gl/m4/snprintf.m4 $(top_srcdir)/gl/m4/socklen.m4 \ + $(top_srcdir)/gl/m4/sockpfaf.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \ + $(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stdint.m4 \ + $(top_srcdir)/gl/m4/stdint_h.m4 $(top_srcdir)/gl/m4/strcase.m4 \ + $(top_srcdir)/gl/m4/strdup.m4 $(top_srcdir)/gl/m4/strndup.m4 \ + $(top_srcdir)/gl/m4/strnlen.m4 \ + $(top_srcdir)/gl/m4/sys_socket_h.m4 \ + $(top_srcdir)/gl/m4/ulonglong.m4 \ + $(top_srcdir)/gl/m4/unistd-safer.m4 \ + $(top_srcdir)/gl/m4/unistd_h.m4 \ + $(top_srcdir)/gl/m4/vasnprintf.m4 \ + $(top_srcdir)/gl/m4/vasprintf.m4 \ + $(top_srcdir)/gl/m4/vsnprintf.m4 $(top_srcdir)/gl/m4/wchar.m4 \ + $(top_srcdir)/gl/m4/wchar_t.m4 $(top_srcdir)/gl/m4/wctype.m4 \ + $(top_srcdir)/gl/m4/wcwidth.m4 $(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) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(libexecdir)" @@ -83,8 +117,7 @@ libexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(libexec_PROGRAMS) check_apt_SOURCES = check_apt.c check_apt_OBJECTS = check_apt.$(OBJEXT) -am__DEPENDENCIES_1 = utils.o ../lib/libnagiosplug.a \ - ../lib/libcoreutils.a +am__DEPENDENCIES_1 = utils.o ../lib/libnagiosplug.a ../gl/libgnu.a check_by_ssh_SOURCES = check_by_ssh.c check_by_ssh_OBJECTS = check_by_ssh.$(OBJEXT) am__DEPENDENCIES_2 = @@ -164,7 +197,7 @@ negate_OBJECTS = negate.$(OBJEXT) urlize_SOURCES = urlize.c urlize_OBJECTS = urlize.$(OBJEXT) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -197,6 +230,10 @@ CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) VPATH = $(top_srcdir) $(top_srcdir)/lib $(top_srcdir)/plugins $(top_srcdir)/plugins/t INSTALL = @INSTALL@ +ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@ +ABSOLUTE_UNISTD_H = @ABSOLUTE_UNISTD_H@ +ABSOLUTE_WCHAR_H = @ABSOLUTE_WCHAR_H@ +ABSOLUTE_WCTYPE_H = @ABSOLUTE_WCTYPE_H@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ @@ -204,11 +241,17 @@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ +ARPA_INET_H = @ARPA_INET_H@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ +BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ +BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ +BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ +BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ +BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -227,6 +270,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +EOVERFLOW = @EOVERFLOW@ EXEEXT = @EXEEXT@ EXTRAS = @EXTRAS@ EXTRAS_ROOT = @EXTRAS_ROOT@ @@ -236,7 +280,22 @@ F77 = @F77@ FFLAGS = @FFLAGS@ GETLOADAVG_LIBS = @GETLOADAVG_LIBS@ GETOPT_H = @GETOPT_H@ +GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@ +GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@ GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ +HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ +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_STDINT_H = @HAVE_STDINT_H@ +HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ +HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ +HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ +HAVE_WINT_T = @HAVE_WINT_T@ HAVE__BOOL = @HAVE__BOOL@ HOSTNAME = @HOSTNAME@ INSTALL_DATA = @INSTALL_DATA@ @@ -251,10 +310,12 @@ LDAPINCLUDE = @LDAPINCLUDE@ LDAPLIBS = @LDAPLIBS@ LDFLAGS = @LDFLAGS@ LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ +LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ -LIBS = @LIBINTL@ @LIBS@ @SSLLIBS@ +LIBS = @LIBINTL@ @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ @@ -262,15 +323,15 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MATHLIBS = @MATHLIBS@ -MKINSTALLDIRS = @MKINSTALLDIRS@ +MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ MYSQLCFLAGS = @MYSQLCFLAGS@ -MYSQLCONFIG = @MYSQLCONFIG@ MYSQLINCLUDE = @MYSQLINCLUDE@ MYSQLLIBS = @MYSQLLIBS@ NEED_SETGID = @NEED_SETGID@ -NEED_VA_LIST = @NEED_VA_LIST@ +NETINET_IN_H = @NETINET_IN_H@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -308,6 +369,7 @@ PKG_ARCH = @PKG_ARCH@ PLUGIN_TEST = @PLUGIN_TEST@ POSUB = @POSUB@ POW_LIB = @POW_LIB@ +PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ RADIUSLIBS = @RADIUSLIBS@ RANLIB = @RANLIB@ @@ -318,16 +380,26 @@ SCRIPT_TEST = @SCRIPT_TEST@ SET_MAKE = @SET_MAKE@ SH = @SH@ SHELL = @SHELL@ +SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ +SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SOCKETLIBS = @SOCKETLIBS@ SSLINCLUDE = @SSLINCLUDE@ SSLLIBS = @SSLLIBS@ STDBOOL_H = @STDBOOL_H@ +STDINT_H = @STDINT_H@ STRIP = @STRIP@ SUPPORT = @SUPPORT@ +SYS_SOCKET_H = @SYS_SOCKET_H@ +UNISTD_H = @UNISTD_H@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARRANTY = @WARRANTY@ +WCHAR_H = @WCHAR_H@ +WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WCTYPE_H = @WCTYPE_H@ +WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ @@ -352,6 +424,8 @@ build_vendor = @build_vendor@ check_tcp_ssl = @check_tcp_ssl@ datadir = @datadir@ exec_prefix = @exec_prefix@ +gl_LIBOBJS = @gl_LIBOBJS@ +gl_LTLIBOBJS = @gl_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -362,9 +436,11 @@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = $(datadir)/locale localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +np_mysql_config = @np_mysql_config@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ @@ -373,17 +449,15 @@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ with_trusted_path = @with_trusted_path@ -INCLUDES = -I.. -I$(top_srcdir)/lib -I$(top_srcdir)/intl @LDAPINCLUDE@ @PGINCLUDE@ @SSLINCLUDE@ -localedir = $(datadir)/locale +INCLUDES = -I.. -I$(top_srcdir)/lib -I$(top_srcdir)/gl -I$(top_srcdir)/intl @LDAPINCLUDE@ @PGINCLUDE@ @SSLINCLUDE@ check_tcp_programs = check_ftp check_imap check_nntp check_pop \ check_udp check_clamd @check_tcp_ssl@ EXTRA_DIST = t utils.c netutils.c sslutils.c popen.c utils.h netutils.h \ - popen.h common.h getaddrinfo.c getaddrinfo.h \ - gethostbyname.c gethostbyname.h runcmd.c runcmd.h + popen.h common.h runcmd.c runcmd.h PLUGINHDRS = common.h -BASEOBJS = utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a +BASEOBJS = utils.o ../lib/libnagiosplug.a ../gl/libgnu.a NETOBJS = netutils.o $(BASEOBJS) $(EXTRA_NETOBJS) SSLOBJS = sslutils.o NETLIBS = $(NETOBJS) $(SOCKETLIBS) @@ -399,7 +473,7 @@ check_dns_LDADD = $(NETLIBS) runcmd.o check_dummy_LDADD = $(BASEOBJS) check_fping_LDADD = $(NETLIBS) popen.o check_game_LDADD = $(BASEOBJS) runcmd.o -check_http_LDADD = $(SSLOBJS) $(NETLIBS) +check_http_LDADD = $(SSLOBJS) $(NETLIBS) $(SSLLIBS) check_hpjd_LDADD = $(NETLIBS) popen.o check_ldap_LDADD = $(NETLIBS) $(LDAPLIBS) check_load_LDADD = $(BASEOBJS) popen.o @@ -422,10 +496,10 @@ check_procs_LDADD = $(BASEOBJS) popen.o check_radius_LDADD = $(NETLIBS) $(RADIUSLIBS) check_real_LDADD = $(NETLIBS) check_snmp_LDADD = $(BASEOBJS) popen.o -check_smtp_LDADD = $(SSLOBJS) $(NETLIBS) +check_smtp_LDADD = $(SSLOBJS) $(NETLIBS) $(SSLLIBS) check_ssh_LDADD = $(NETLIBS) check_swap_LDADD = $(MATHLIBS) $(BASEOBJS) popen.o -check_tcp_LDADD = $(SSLOBJS) $(NETLIBS) +check_tcp_LDADD = $(SSLOBJS) $(NETLIBS) $(SSLLIBS) check_time_LDADD = $(NETLIBS) check_ups_LDADD = $(NETLIBS) check_users_LDADD = $(BASEOBJS) popen.o diff --git a/plugins/check_apt.c b/plugins/check_apt.c index a2add7f..22ab91d 100644 --- a/plugins/check_apt.c +++ b/plugins/check_apt.c @@ -7,7 +7,7 @@ * * Original author: sean finney * -* Last Modified: $Date: 2006/10/22 22:03:31 $ +* Last Modified: $Date: 2007/01/28 21:46:40 $ * * Description: * @@ -31,12 +31,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -* $Id: check_apt.c,v 1.9 2006/10/22 22:03:31 opensides Exp $ +* $Id: check_apt.c,v 1.10 2007/01/28 21:46:40 hweiss Exp $ * ******************************************************************************/ const char *progname = "check_apt"; -const char *revision = "$Revision: 1.9 $"; +const char *revision = "$Revision: 1.10 $"; const char *copyright = "2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -201,7 +201,7 @@ int process_arguments (int argc, char **argv) { break; default: /* print short usage statement if args not parsable */ - usage_va(_("Unknown argument - %s"), optarg); + usage5(); } } diff --git a/plugins/check_by_ssh.c b/plugins/check_by_ssh.c index 4c2ed03..ecb5e04 100644 --- a/plugins/check_by_ssh.c +++ b/plugins/check_by_ssh.c @@ -5,7 +5,7 @@ * License: GPL * Copyright (c) 1999-2006 nagios-plugins team * -* Last Modified: $Date: 2006/10/19 00:25:16 $ +* Last Modified: $Date: 2007/01/28 21:46:40 $ * * Description: * @@ -27,12 +27,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -* $Id: check_by_ssh.c,v 1.39 2006/10/19 00:25:16 opensides Exp $ +* $Id: check_by_ssh.c,v 1.41 2007/01/28 21:46:40 hweiss Exp $ * ******************************************************************************/ const char *progname = "check_by_ssh"; -const char *revision = "$Revision: 1.39 $"; +const char *revision = "$Revision: 1.41 $"; const char *copyright = "2000-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -166,6 +166,8 @@ process_arguments (int argc, char **argv) {"proto2", no_argument, 0, '2'}, {"use-ipv4", no_argument, 0, '4'}, {"use-ipv6", no_argument, 0, '6'}, + {"ssh-option", required_argument, 0, 'o'}, + {"quiet", no_argument, 0, 'q'}, {0, 0, 0, 0} }; @@ -177,7 +179,7 @@ process_arguments (int argc, char **argv) strcpy (argv[c], "-t"); while (1) { - c = getopt_long (argc, argv, "Vvh1246ft:H:O:p:i:u:l:C:S:n:s:", longopts, + c = getopt_long (argc, argv, "Vvh1246fqt:H:O:p:i:u:l:C:S:n:s:o:", longopts, &option); if (c == -1 || c == EOF) @@ -253,8 +255,14 @@ process_arguments (int argc, char **argv) else skip = atoi (optarg); break; + case 'o': /* Extra options for the ssh command */ + asprintf (&comm, "%s -%c '%s'", comm, c, optarg); + break; + case 'q': /* Tell the ssh command to be quiet */ + asprintf (&comm, "%s -%c", comm, c); + break; default: /* help */ - usage_va(_("Unknown argument - %s"), optarg); + usage5(); } } @@ -344,6 +352,10 @@ print_help (void) printf (" %s\n", _("list of nagios service names, separated by ':' [optional]")); printf (" %s\n","-n, --name=NAME"); printf (" %s\n", _("short name of host in nagios configuration [optional]")); + printf (" %s\n","-o, --ssh-option=OPTION"); + printf (" %s\n", _("Call ssh with '-o OPTION' (may be used multiple times) [optional]")); + printf (" %s\n","-q, --quiet"); + printf (" %s\n", _("Tell ssh to suppress warning and diagnostic messages [optional]")); printf (_(UT_WARN_CRIT)); printf (_(UT_TIMEOUT), DEFAULT_SOCKET_TIMEOUT); printf (" %s\n", _("The most common mode of use is to refer to a local identity file with")); @@ -371,6 +383,6 @@ void print_usage (void) { printf (_("Usage:")); - printf(" %s [-f46] [-t timeout] [-i identity] [-l user] -H -C ",progname); - printf(" [-n name] [-s servicelist] [-O outputfile] [-p port]\n"); + printf(" %s [-fq46] [-t timeout] [-i identity] [-l user] -H -C ",progname); + printf(" [-n name] [-s servicelist] [-O outputfile] [-p port] [-o ssh-option]\n"); } diff --git a/plugins/check_dig.c b/plugins/check_dig.c index 0fa9ef0..deee7d1 100644 --- a/plugins/check_dig.c +++ b/plugins/check_dig.c @@ -5,7 +5,7 @@ * License: GPL * Copyright (c) 1999-2006 nagios-plugins team * -* Last Modified: $Date: 2006/10/19 00:25:16 $ +* Last Modified: $Date: 2007/01/28 21:46:40 $ * * Description: * @@ -27,7 +27,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -* $Id: check_dig.c,v 1.45 2006/10/19 00:25:16 opensides Exp $ +* $Id: check_dig.c,v 1.46 2007/01/28 21:46:40 hweiss Exp $ * *****************************************************************************/ @@ -38,7 +38,7 @@ * because on some architectures those strings are in non-writable memory */ const char *progname = "check_dig"; -const char *revision = "$Revision: 1.45 $"; +const char *revision = "$Revision: 1.46 $"; const char *copyright = "2002-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -265,8 +265,8 @@ process_arguments (int argc, char **argv) case 'a': expected_address = optarg; break; - default: /* usage_va */ - usage_va(_("Unknown argument - %s"), optarg); + default: /* usage5 */ + usage5(); } } diff --git a/plugins/check_disk.c b/plugins/check_disk.c index a3c3c9d..219ea91 100644 --- a/plugins/check_disk.c +++ b/plugins/check_disk.c @@ -5,7 +5,7 @@ * License: GPL * Copyright (c) 1999-2006 nagios-plugins team * -* Last Modified: $Date: 2006/10/26 20:51:24 $ +* Last Modified: $Date: 2007/03/30 08:56:47 $ * * Description: * @@ -27,18 +27,21 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -* $Id: check_disk.c,v 1.79 2006/10/26 20:51:24 tonvoon Exp $ +* $Id: check_disk.c,v 1.90 2007/03/30 08:56:47 psychotrahe Exp $ * *****************************************************************************/ const char *progname = "check_disk"; const char *program_name = "check_disk"; /* Required for coreutils libs */ -const char *revision = "$Revision: 1.79 $"; +const char *revision = "$Revision: 1.90 $"; const char *copyright = "1999-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; #include "common.h" +#ifdef HAVE_SYS_STAT_H +# include +#endif #if HAVE_INTTYPES_H # include #endif @@ -53,6 +56,7 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net"; #if HAVE_LIMITS_H # include #endif +#include "regex.h" /* If nonzero, show inode information. */ @@ -118,6 +122,7 @@ static struct mount_entry *mount_list; int process_arguments (int, char **); void print_path (const char *mypath); +void set_all_thresholds (struct parameter_list *path); int validate_arguments (uintmax_t, uintmax_t, double, double, double, double, char *); void print_help (void); void print_usage (void); @@ -143,6 +148,10 @@ char *warn_usedspace_percent = NULL; char *crit_usedspace_percent = NULL; char *warn_usedinodes_percent = NULL; char *crit_usedinodes_percent = NULL; +char *warn_freeinodes_percent = NULL; +char *crit_freeinodes_percent = NULL; +bool path_selected = false; +char *group = NULL; int @@ -159,12 +168,12 @@ main (int argc, char **argv) double dfree_pct = -1, dused_pct = -1; double dused_units, dfree_units, dtotal_units; double dused_inodes_percent, dfree_inodes_percent; - double warning_high_tide = UINT_MAX; - double critical_high_tide = UINT_MAX; + double warning_high_tide; + double critical_high_tide; int temp_result; struct mount_entry *me; - struct fs_usage fsp; + struct fs_usage fsp, tmpfsp; struct parameter_list *temp_list, *path; struct name_list *seen = NULL; @@ -185,32 +194,38 @@ main (int argc, char **argv) /* If a list of paths has not been selected, find entire mount list and create list of paths */ - if (! path_select_list) { + if (path_selected == false) { for (me = mount_list; me; me = me->me_next) { - path = np_add_parameter(&path_select_list, me->me_mountdir); - path->best_match = me; - set_thresholds(&path->freespace_units, warn_freespace_units, crit_freespace_units); - set_thresholds(&path->freespace_percent, warn_freespace_percent, crit_freespace_percent); - set_thresholds(&path->usedspace_units, warn_usedspace_units, crit_usedspace_units); - set_thresholds(&path->usedspace_percent, warn_usedspace_percent, crit_usedspace_percent); - set_thresholds(&path->usedinodes_percent, warn_usedinodes_percent, crit_usedinodes_percent); - } - } else { - np_set_best_match(path_select_list, mount_list, exact_match); - - /* Error if no match found for specified paths */ - temp_list = path_select_list; - while (temp_list) { - if (! temp_list->best_match) { - die (STATE_CRITICAL, _("DISK %s: %s not found\n"), _("CRITICAL"), temp_list->name); + if (! (path = np_find_parameter(path_select_list, me->me_mountdir))) { + path = np_add_parameter(&path_select_list, me->me_mountdir); } - temp_list = temp_list->name_next; + path->best_match = me; + path->group = group; + set_all_thresholds(path); } } + np_set_best_match(path_select_list, mount_list, exact_match); + + /* Error if no match found for specified paths */ + temp_list = path_select_list; + while (temp_list) { + if (! temp_list->best_match) { + die (STATE_CRITICAL, _("DISK %s: %s not found\n"), _("CRITICAL"), temp_list->name); + } + temp_list = temp_list->name_next; + } + /* Process for every path in list */ for (path = path_select_list; path; path=path->name_next) { + if (verbose > 3 && path->freespace_percent->warning != NULL && path->freespace_percent->critical != NULL) + printf("Thresholds(pct) for %s warn: %f crit %f\n",path->name, path->freespace_percent->warning->end, + path->freespace_percent->critical->end); + + if (verbose > 3 && path->group != NULL) + printf("Group of %s: %s\n",path->name,path->group); + /* reset disk result */ disk_result = STATE_UNKNOWN; @@ -222,25 +237,62 @@ main (int argc, char **argv) if (np_seen_name(seen, me->me_mountdir)) { continue; } else { - np_add_name(&seen, me->me_mountdir); - } - /* Skip remote filesystems if we're not interested in them */ - if (me->me_remote && show_local_fs) { - continue; - /* Skip pseudo fs's if we haven't asked for all fs's */ - } else if (me->me_dummy && !show_all_fs) { - continue; - /* Skip excluded fstypes */ - } else if (fs_exclude_list && np_find_name (fs_exclude_list, me->me_type)) { - continue; - /* Skip excluded fs's */ - } else if (dp_exclude_list && - (np_find_name (dp_exclude_list, me->me_devname) || - np_find_name (dp_exclude_list, me->me_mountdir))) { - continue; + if (path->group != NULL) { + /* find all group members */ + fsp.fsu_blocksize = 0; + fsp.fsu_blocks = 0; + fsp.fsu_bfree = 0; + fsp.fsu_bavail = 0; + fsp.fsu_files = 0; + fsp.fsu_ffree = 0; + + + for (temp_list = path_select_list; temp_list; temp_list=temp_list->name_next) { + if (temp_list->group && ! (strcmp(temp_list->group, path->group))) { + + get_fs_usage (temp_list->best_match->me_mountdir, temp_list->best_match->me_devname, &tmpfsp); + + /* possibly differing blocksizes if disks are grouped. Calculating average */ + fsp.fsu_blocksize = (fsp.fsu_blocksize * fsp.fsu_blocks + tmpfsp.fsu_blocksize * tmpfsp.fsu_blocks) / \ + (fsp.fsu_blocks + tmpfsp.fsu_blocks); /* Size of a block. */ + fsp.fsu_blocks += tmpfsp.fsu_blocks; /* Total blocks. */ + fsp.fsu_bfree += tmpfsp.fsu_bfree; /* Free blocks available to superuser. */ + fsp.fsu_bavail += tmpfsp.fsu_bavail; /* Free blocks available to non-superuser. */ + fsp.fsu_files += tmpfsp.fsu_files; /* Total file nodes. */ + fsp.fsu_ffree += tmpfsp.fsu_ffree; /* Free file nodes. */ + + if (verbose > 3) + printf("Group %s: add %llu blocks (%s) \n", path->group, tmpfsp.fsu_bavail, temp_list->name); + // printf("Group %s: add %u blocks (%s)\n", temp_list->name); // path->group, tmpfsp.fsu_bavail, temp_list->name); + + np_add_name(&seen, temp_list->best_match->me_mountdir); + } + } + /* modify devname and mountdir for output */ + me->me_mountdir = me->me_devname = path->group; + } else + np_add_name(&seen, me->me_mountdir); } - get_fs_usage (me->me_mountdir, me->me_devname, &fsp); + if (path->group == NULL) { + /* Skip remote filesystems if we're not interested in them */ + if (me->me_remote && show_local_fs) { + continue; + /* Skip pseudo fs's if we haven't asked for all fs's */ + } else if (me->me_dummy && !show_all_fs) { + continue; + /* Skip excluded fstypes */ + } else if (fs_exclude_list && np_find_name (fs_exclude_list, me->me_type)) { + continue; + /* Skip excluded fs's */ + } else if (dp_exclude_list && + (np_find_name (dp_exclude_list, me->me_devname) || + np_find_name (dp_exclude_list, me->me_mountdir))) { + continue; + } + + get_fs_usage (me->me_mountdir, me->me_devname, &fsp); + } if (fsp.fsu_blocks && strcmp ("none", me->me_mountdir)) { total = fsp.fsu_blocks; @@ -258,8 +310,8 @@ main (int argc, char **argv) dfree_inodes_percent = 100 - dused_inodes_percent; if (verbose >= 3) { - printf ("For %s, used_pct=%g free_pct=%g used_units=%g free_units=%g total_units=%g used_inodes_pct=%g\n", - me->me_mountdir, dused_pct, dfree_pct, dused_units, dfree_units, dtotal_units, dused_inodes_percent); + printf ("For %s, used_pct=%g free_pct=%g used_units=%g free_units=%g total_units=%g used_inodes_pct=%g free_inodes_pct=%g\n", + me->me_mountdir, dused_pct, dfree_pct, dused_units, dfree_units, dtotal_units, dused_inodes_percent, dfree_inodes_percent); } /* Threshold comparisons */ @@ -284,12 +336,21 @@ main (int argc, char **argv) if (verbose >=3) printf("Usedinodes_percent result=%d\n", temp_result); disk_result = max_state( disk_result, temp_result ); + temp_result = get_status(dfree_inodes_percent, path->freeinodes_percent); + if (verbose >=3) printf("Freeinodes_percent result=%d\n", temp_result); + disk_result = max_state( disk_result, temp_result ); + result = max_state(result, disk_result); /* What a mess of units. The output shows free space, the perf data shows used space. Yikes! Hack here. Trying to get warn/crit levels from freespace_(units|percent) for perf data. Assumption that start=0. Roll on new syntax... */ + + /* *_high_tide must be reinitialized at each run */ + warning_high_tide = UINT_MAX; + critical_high_tide = UINT_MAX; + if (path->freespace_units->warning != NULL) { warning_high_tide = dtotal_units - path->freespace_units->warning->end; } @@ -306,8 +367,8 @@ main (int argc, char **argv) asprintf (&perf, "%s %s", perf, perfdata ((!strcmp(me->me_mountdir, "none") || display_mntp) ? me->me_devname : me->me_mountdir, dused_units, units, - TRUE, warning_high_tide, - TRUE, critical_high_tide, + (warning_high_tide != UINT_MAX ? TRUE : FALSE), warning_high_tide, + (critical_high_tide != UINT_MAX ? TRUE : FALSE), critical_high_tide, TRUE, 0, TRUE, dtotal_units)); @@ -377,11 +438,17 @@ double calculate_percent(uintmax_t value, uintmax_t total) { int process_arguments (int argc, char **argv) { - int c; - struct parameter_list *se; + int c, err; + struct parameter_list *se, *se2; struct parameter_list *temp_list; + struct parameter_list *temp_path_select_list = NULL; + struct mount_entry *me; int result = OK; struct stat *stat_buf; + regex_t re; + int cflags = REG_NOSUB | REG_EXTENDED; + char errbuf[MAX_INPUT_BUFFER]; + bool fnd = false; int option = 0; static struct option longopts[] = { @@ -399,6 +466,11 @@ process_arguments (int argc, char **argv) {"partition", required_argument, 0, 'p'}, {"exclude_device", required_argument, 0, 'x'}, {"exclude-type", required_argument, 0, 'X'}, + {"group", required_argument, 0, 'g'}, + {"eregi-path", required_argument, 0, 'R'}, + {"eregi-partition", required_argument, 0, 'R'}, + {"ereg-path", required_argument, 0, 'r'}, + {"ereg-partition", required_argument, 0, 'r'}, {"mountpoint", no_argument, 0, 'M'}, {"errors-only", no_argument, 0, 'e'}, {"exact-match", no_argument, 0, 'E'}, @@ -420,7 +492,7 @@ process_arguments (int argc, char **argv) strcpy (argv[c], "-t"); while (1) { - c = getopt_long (argc, argv, "+?VqhveCt:c:w:K:W:u:p:x:X:mklME", longopts, &option); + c = getopt_long (argc, argv, "+?VqhveCt:c:w:K:W:u:p:x:X:mklg:R:r:ME", longopts, &option); if (c == -1 || c == EOF) break; @@ -474,10 +546,18 @@ process_arguments (int argc, char **argv) break; case 'W': /* warning inode threshold */ - warn_usedinodes_percent = optarg; + if (*optarg == '@') { + warn_freeinodes_percent = optarg; + } else { + asprintf(&warn_freeinodes_percent, "@%s", optarg); + } break; case 'K': /* critical inode threshold */ - crit_usedinodes_percent = optarg; + if (*optarg == '@') { + crit_freeinodes_percent = optarg; + } else { + asprintf(&crit_freeinodes_percent, "@%s", optarg); + } break; case 'u': if (units) @@ -522,15 +602,23 @@ process_arguments (int argc, char **argv) if (! (warn_freespace_units || crit_freespace_units || warn_freespace_percent || crit_freespace_percent || warn_usedspace_units || crit_usedspace_units || warn_usedspace_percent || crit_usedspace_percent || warn_usedinodes_percent || - crit_usedinodes_percent)) { + crit_usedinodes_percent || warn_freeinodes_percent || crit_freeinodes_percent )) { die (STATE_UNKNOWN, "DISK %s: %s", _("UNKNOWN"), _("Must set a threshold value before using -p\n")); } - se = np_add_parameter(&path_select_list, optarg); - set_thresholds(&se->freespace_units, warn_freespace_units, crit_freespace_units); - set_thresholds(&se->freespace_percent, warn_freespace_percent, crit_freespace_percent); - set_thresholds(&se->usedspace_units, warn_usedspace_units, crit_usedspace_units); - set_thresholds(&se->usedspace_percent, warn_usedspace_percent, crit_usedspace_percent); - set_thresholds(&se->usedinodes_percent, warn_usedinodes_percent, crit_usedinodes_percent); + + /* get the real mountdir of the specified path. np_find_parameter won't find an entry if -p is not + * exactly the same string as the mountdir */ + se2 = np_add_parameter(&temp_path_select_list, optarg); + np_set_best_match(se2, mount_list, FALSE); + + + /* add parameter if not found. overwrite thresholds if path has already been added */ + if (! (se = np_find_parameter(path_select_list, optarg))) { + se = np_add_parameter(&path_select_list, optarg); + } + se->group = group; + set_all_thresholds(se); + path_selected = true; break; case 'x': /* exclude path or partition */ np_add_name(&dp_exclude_list, optarg); @@ -550,10 +638,65 @@ process_arguments (int argc, char **argv) case 'E': exact_match = TRUE; break; + case 'g': + if (path_selected) + die (STATE_UNKNOWN, "DISK %s: %s", _("UNKNOWN"), _("Must set group value before using -p\n")); + group = optarg; + break; + case 'R': + cflags |= REG_ICASE; + case 'r': + if (! (warn_freespace_units || crit_freespace_units || warn_freespace_percent || + crit_freespace_percent || warn_usedspace_units || crit_usedspace_units || + warn_usedspace_percent || crit_usedspace_percent || warn_usedinodes_percent || + crit_usedinodes_percent || warn_freeinodes_percent || crit_freeinodes_percent )) { + die (STATE_UNKNOWN, "DISK %s: %s", _("UNKNOWN"), _("Must set a threshold value before using -r/-R\n")); + } + + err = regcomp(&re, optarg, cflags); + if (err != 0) { + regerror (err, &re, errbuf, MAX_INPUT_BUFFER); + die (STATE_UNKNOWN, "DISK %s: %s - %s\n",_("UNKNOWN"), _("Could not compile regular expression"), errbuf); + } + + for (me = mount_list; me; me = me->me_next) { + if (np_regex_match_mount_entry(me, &re)) { + fnd = true; + if (verbose > 3) + printf("%s %s matching expression %s\n", me->me_devname, me->me_mountdir, optarg); + + /* add parameter if not found. overwrite thresholds if path has already been added */ + if (! (se = np_find_parameter(path_select_list, me->me_mountdir))) { + se = np_add_parameter(&path_select_list, me->me_mountdir); + } + se->group = group; + set_all_thresholds(se); + } + } + + if (!fnd) + die (STATE_UNKNOWN, "DISK %s: %s - %s\n",_("UNKNOWN"), + _("Regular expression did not match any path or disk"), optarg); + + fnd = false; + path_selected = true; + break; case 'M': /* display mountpoint */ display_mntp = TRUE; break; case 'C': + /* add all mount entries to path_select list if no partitions have been explicitly defined using -p */ + if (path_selected == false) { + struct mount_entry *me; + struct parameter_list *path; + for (me = mount_list; me; me = me->me_next) { + if (! (path = np_find_parameter(path_select_list, me->me_mountdir))) + path = np_add_parameter(&path_select_list, me->me_mountdir); + path->best_match = me; + path->group = group; + set_all_thresholds(path); + } + } warn_freespace_units = NULL; crit_freespace_units = NULL; warn_usedspace_units = NULL; @@ -564,6 +707,11 @@ process_arguments (int argc, char **argv) crit_usedspace_percent = NULL; warn_usedinodes_percent = NULL; crit_usedinodes_percent = NULL; + warn_freeinodes_percent = NULL; + crit_freeinodes_percent = NULL; + + path_selected = false; + group = NULL; break; case 'V': /* version */ print_revision (progname, revision); @@ -586,11 +734,7 @@ process_arguments (int argc, char **argv) if (argc > c && path == NULL) { se = np_add_parameter(&path_select_list, strdup(argv[c++])); - set_thresholds(&se->freespace_units, warn_freespace_units, crit_freespace_units); - set_thresholds(&se->freespace_percent, warn_freespace_percent, crit_freespace_percent); - set_thresholds(&se->usedspace_units, warn_usedspace_units, crit_usedspace_units); - set_thresholds(&se->usedspace_percent, warn_usedspace_percent, crit_usedspace_percent); - set_thresholds(&se->usedinodes_percent, warn_usedinodes_percent, crit_usedinodes_percent); + set_all_thresholds(se); } if (units == NULL) { @@ -638,6 +782,16 @@ print_path (const char *mypath) } +void +set_all_thresholds (struct parameter_list *path) +{ + set_thresholds(&path->freespace_units, warn_freespace_units, crit_freespace_units); + set_thresholds(&path->freespace_percent, warn_freespace_percent, crit_freespace_percent); + set_thresholds(&path->usedspace_units, warn_usedspace_units, crit_usedspace_units); + set_thresholds(&path->usedspace_percent, warn_usedspace_percent, crit_usedspace_percent); + set_thresholds(&path->usedinodes_percent, warn_usedinodes_percent, crit_usedinodes_percent); + set_thresholds(&path->freeinodes_percent, warn_freeinodes_percent, crit_freeinodes_percent); +} /* TODO: Remove? @@ -725,11 +879,17 @@ print_help (void) printf (" %s\n", _("Only check local filesystems")); printf (" %s\n", "-p, --path=PATH, --partition=PARTITION"); printf (" %s\n", _("Path or partition (may be repeated)")); + printf (" %s\n", "-r, --ereg-path=PATH, --ereg-partition=PARTITION"); + printf (" %s\n", _("Regular expression for path or partition (may be repeated)")); + printf (" %s\n", "-R, --eregi-path=PATH, --eregi-partition=PARTITION"); + printf (" %s\n", _("Case insensitive regular expression for path/partition (may be repeated)")); + printf (" %s\n", "-g, --group=NAME"); + printf (" %s\n", _("Group pathes. Thresholds apply to (free-)space of all partitions together")); printf (" %s\n", "-x, --exclude_device=PATH "); printf (" %s\n", _("Ignore device (only works if -p unspecified)")); - printf (" %s\n", _("-X, --exclude-type=TYPE ")); + printf (" %s\n", "-X, --exclude-type=TYPE "); printf (" %s\n", _("Ignore all filesystems of indicated type (may be repeated)")); - printf (" %s\n", "-m, --mountpoint"); + printf (" %s\n", "-M, --mountpoint"); printf (" %s\n", _("Display the mountpoint instead of the partition")); printf (" %s\n", "-E, --exact-match"); printf (" %s\n", _("For paths or partitions specified with -p, only check for exact paths")); diff --git a/plugins/check_dns.c b/plugins/check_dns.c index 176e79d..8bdf46c 100644 --- a/plugins/check_dns.c +++ b/plugins/check_dns.c @@ -5,7 +5,7 @@ * License: GPL * Copyright (c) 1999-2006 nagios-plugins team * -* Last Modified: $Date: 2006/10/19 00:25:16 $ +* Last Modified: $Date: 2007/01/28 21:46:40 $ * * Description: * @@ -31,12 +31,12 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * -* $Id: check_dns.c,v 1.54 2006/10/19 00:25:16 opensides Exp $ +* $Id: check_dns.c,v 1.55 2007/01/28 21:46:40 hweiss Exp $ * ******************************************************************************/ const char *progname = "check_dns"; -const char *revision = "$Revision: 1.54 $"; +const char *revision = "$Revision: 1.55 $"; const char *copyright = "2000-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -370,7 +370,7 @@ process_arguments (int argc, char **argv) critical = optarg; break; default: /* args not parsable */ - usage_va(_("Unknown argument - %s"), optarg); + usage5(); } } diff --git a/plugins/check_fping.c b/plugins/check_fping.c index b1092da..0dc3e8b 100644 --- a/plugins/check_fping.c +++ b/plugins/check_fping.c @@ -5,7 +5,7 @@ * License: GPL * Copyright (c) 1999-2006 nagios-plugins team * -* Last Modified: $Date: 2006/10/19 00:25:16 $ +* Last Modified: $Date: 2007/01/28 21:46:40 $ * * Description: * @@ -30,12 +30,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: check_fping.c,v 1.27 2006/10/19 00:25:16 opensides Exp $ + $Id: check_fping.c,v 1.28 2007/01/28 21:46:40 hweiss Exp $ ******************************************************************************/ const char *progname = "check_fping"; -const char *revision = "$Revision: 1.27 $"; +const char *revision = "$Revision: 1.28 $"; const char *copyright = "2000-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -258,7 +258,7 @@ process_arguments (int argc, char **argv) switch (c) { case '?': /* print short usage statement if args not parsable */ - usage2 (_("Unknown argument"), optarg); + usage5 (); case 'h': /* help */ print_help (); exit (STATE_OK); diff --git a/plugins/check_game.c b/plugins/check_game.c index 8a418a2..fe76de9 100644 --- a/plugins/check_game.c +++ b/plugins/check_game.c @@ -5,7 +5,7 @@ * License: GPL * Copyright (c) 1999-2006 nagios-plugins team * -* Last Modified: $Date: 2006/10/19 00:25:16 $ +* Last Modified: $Date: 2007/01/28 21:46:40 $ * * Description: * @@ -30,11 +30,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -* $Id: check_game.c,v 1.28 2006/10/19 00:25:16 opensides Exp $ +* $Id: check_game.c,v 1.29 2007/01/28 21:46:40 hweiss Exp $ *****************************************************************************/ const char *progname = "check_game"; -const char *revision = "$Revision: 1.28 $"; +const char *revision = "$Revision: 1.29 $"; const char *copyright = "2002-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -249,7 +249,7 @@ process_arguments (int argc, char **argv) return ERROR; break; default: /* args not parsable */ - usage_va(_("Unknown argument - %s"), optarg); + usage5(); } } diff --git a/plugins/check_hpjd.c b/plugins/check_hpjd.c index 3fd402a..f181cce 100644 --- a/plugins/check_hpjd.c +++ b/plugins/check_hpjd.c @@ -5,7 +5,7 @@ * License: GPL * Copyright (c) 1999-2006 nagios-plugins team * -* Last Modified: $Date: 2006/10/19 00:25:16 $ +* Last Modified: $Date: 2007/01/28 21:46:40 $ * * Description: * @@ -31,11 +31,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -* $Id: check_hpjd.c,v 1.34 2006/10/19 00:25:16 opensides Exp $ +* $Id: check_hpjd.c,v 1.35 2007/01/28 21:46:40 hweiss Exp $ *****************************************************************************/ const char *progname = "check_hpjd"; -const char *revision = "$Revision: 1.34 $"; +const char *revision = "$Revision: 1.35 $"; const char *copyright = "2000-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -351,7 +351,7 @@ process_arguments (int argc, char **argv) print_help (); exit (STATE_OK); case '?': /* help */ - usage2 (_("Unknown argument"), optarg); + usage5 (); } } diff --git a/plugins/check_http.c b/plugins/check_http.c index abf4db8..b983e49 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c @@ -5,7 +5,7 @@ * License: GPL * Copyright (c) 1999-2006 nagios-plugins team * -* Last Modified: $Date: 2006/10/26 20:51:24 $ +* Last Modified: $Date: 2007/03/06 22:45:57 $ * * Description: * @@ -33,13 +33,13 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: check_http.c,v 1.96 2006/10/26 20:51:24 tonvoon Exp $ + $Id: check_http.c,v 1.101 2007/03/06 22:45:57 tonvoon Exp $ ******************************************************************************/ /* splint -I. -I../../plugins -I../../lib/ -I/usr/kerberos/include/ ../../plugins/check_http.c */ const char *progname = "check_http"; -const char *revision = "$Revision: 1.96 $"; +const char *revision = "$Revision: 1.101 $"; const char *copyright = "1999-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -88,7 +88,6 @@ struct timeval tv; #define HTTP_URL "/" #define CRLF "\r\n" -char timestamp[17] = ""; int specify_port = FALSE; int server_port = HTTP_PORT; char server_port_text[6] = ""; @@ -147,13 +146,6 @@ main (int argc, char **argv) if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); - if (strstr (timestamp, ":")) { - if (strstr (server_url, "?")) - asprintf (&server_url, "%s&%s", server_url, timestamp); - else - asprintf (&server_url, "%s?%s", server_url, timestamp); - } - if (display_html == TRUE) printf ("", use_ssl ? "https" : "http", host_name, @@ -183,15 +175,16 @@ process_arguments (int argc, char **argv) int option = 0; static struct option longopts[] = { STD_LONG_OPTS, - {"file",required_argument,0,'F'}, {"link", no_argument, 0, 'L'}, {"nohtml", no_argument, 0, 'n'}, {"ssl", no_argument, 0, 'S'}, - {"verbose", no_argument, 0, 'v'}, {"post", required_argument, 0, 'P'}, {"IP-address", required_argument, 0, 'I'}, {"url", required_argument, 0, 'u'}, + {"port", required_argument, 0, 'p'}, + {"authorization", required_argument, 0, 'a'}, {"string", required_argument, 0, 's'}, + {"expect", required_argument, 0, 'e'}, {"regex", required_argument, 0, 'r'}, {"ereg", required_argument, 0, 'r'}, {"eregi", required_argument, 0, 'R'}, @@ -233,7 +226,7 @@ process_arguments (int argc, char **argv) switch (c) { case '?': /* usage */ - usage2 (_("Unknown argument"), optarg); + usage5 (); break; case 'h': /* help */ print_help (); @@ -861,7 +854,7 @@ check_http (void) /* return a CRITICAL status if we couldn't read any data */ if (pagesize == (size_t) 0) - die (STATE_CRITICAL, _("No data received %s\n"), timestamp); + die (STATE_CRITICAL, _("No data received from host\n")); /* close the connection */ #ifdef HAVE_SSL @@ -967,8 +960,8 @@ check_http (void) microsec = deltime (tv); elapsed_time = (double)microsec / 1.0e6; die (onredirect, - _(" - %s - %.3f second response time %s%s|%s %s\n"), - status_line, elapsed_time, timestamp, + _(" - %s - %.3f second response time %s|%s %s\n"), + status_line, elapsed_time, (display_html ? "" : ""), perfd_time (elapsed_time), perfd_size (pagesize)); } /* end if (http_status >= 300) */ @@ -983,8 +976,8 @@ check_http (void) microsec = deltime (tv); elapsed_time = (double)microsec / 1.0e6; asprintf (&msg, - _("HTTP WARNING: %s - %.3f second response time %s%s|%s %s\n"), - status_line, elapsed_time, timestamp, + _("HTTP WARNING: %s - %.3f second response time %s|%s %s\n"), + status_line, elapsed_time, (display_html ? "" : ""), perfd_time (elapsed_time), perfd_size (pagesize)); if (check_critical_time == TRUE && elapsed_time > critical_time) @@ -997,9 +990,9 @@ check_http (void) if (strlen (string_expect)) { if (strstr (page, string_expect)) { - printf (_("HTTP OK %s - %.3f second response time %s%s|%s %s\n"), + printf (_("HTTP OK %s - %.3f second response time %s|%s %s\n"), status_line, elapsed_time, - timestamp, (display_html ? "" : ""), + (display_html ? "" : ""), perfd_time (elapsed_time), perfd_size (pagesize)); exit (STATE_OK); } @@ -1014,9 +1007,9 @@ check_http (void) if (strlen (regexp)) { errcode = regexec (&preg, page, REGS, pmatch, 0); if ((errcode == 0 && invert_regex == 0) || (errcode == REG_NOMATCH && invert_regex == 1)) { - printf (_("HTTP OK %s - %.3f second response time %s%s|%s %s\n"), + printf (_("HTTP OK %s - %.3f second response time %s|%s %s\n"), status_line, elapsed_time, - timestamp, (display_html ? "" : ""), + (display_html ? "" : ""), perfd_time (elapsed_time), perfd_size (pagesize)); exit (STATE_OK); } @@ -1025,7 +1018,7 @@ check_http (void) msg = strdup(_("pattern not found")); else msg = strdup(_("pattern found")); - printf (_("%s - %s%s|%s %s\n"), + printf (("%s - %s%s|%s %s\n"), _("CRITICAL"), msg, (display_html ? "" : ""), @@ -1052,9 +1045,9 @@ check_http (void) exit (STATE_WARNING); } /* We only get here if all tests have been passed */ - asprintf (&msg, _("HTTP OK %s - %d bytes in %.3f seconds %s%s|%s %s\n"), + asprintf (&msg, _("HTTP OK %s - %d bytes in %.3f seconds %s|%s %s\n"), status_line, page_len, elapsed_time, - timestamp, (display_html ? "" : ""), + (display_html ? "" : ""), perfd_time (elapsed_time), perfd_size (page_len)); die (STATE_OK, "%s", msg); return STATE_UNKNOWN; @@ -1263,21 +1256,21 @@ print_help (void) #ifdef HAVE_SSL printf (" %s\n", "-S, --ssl"); - printf (" %s\n", _("Connect via SSL")); + printf (" %s\n", _("Connect via SSL. Port defaults to 443")); printf (" %s\n", "-C, --certificate=INTEGER"); - printf (" %s\n", _("Minimum number of days a certificate has to be valid.")); + printf (" %s\n", _("Minimum number of days a certificate has to be valid. Port defaults to 443")); printf (" %s\n", _("(when this option is used the url is not checked.)\n")); #endif printf (" %s\n", "-e, --expect=STRING"); printf (" %s\n", _("String to expect in first (status) line of server response (default: ")); - printf ("%s\n", HTTP_EXPECT); + printf ("%s)\n", HTTP_EXPECT); printf (" %s\n", _("If specified skips all other status line logic (ex: 3xx, 4xx, 5xx processing)")); printf (" %s\n", "-s, --string=STRING"); printf (" %s\n", _("String to expect in the content")); printf (" %s\n", "-u, --url=PATH"); printf (" %s\n", _("URL to GET or POST (default: /)")); - printf (" %s\n," "-P, --post=STRING"); + printf (" %s\n", "-P, --post=STRING"); printf (" %s\n", _("URL encoded http POST data")); printf (" %s\n", "-N, --no-body"); printf (" %s\n", _("Don't wait for document body: stop reading after headers.")); @@ -1303,7 +1296,7 @@ print_help (void) printf (" %s\n", _("String to be sent in http header as \"User Agent\"")); printf (" %s\n", "-k, --header=STRING"); printf (" %s\n", _(" Any other tags to be sent in http header. Use multiple times for additional headers")); - printf (" %s\n", "-L, --link=URL"); + printf (" %s\n", "-L, --link"); printf (" %s\n", _("Wrap output in HTML link (obsoleted by urlize)")); printf (" %s\n", "-f, --onredirect="); printf (" %s\n", _("How to handle redirected pages")); @@ -1329,13 +1322,13 @@ print_help (void) printf (" %s\n", _("serve content (optionally within a specified time) or whether the X509 ")); printf (" %s\n", _("certificate is still valid for the specified number of days.")); printf (_("Examples:")); - printf (" %s\n\n", "CHECK CONTENT: check_http -w 5 -c 10 --ssl www.verisign.com"); + printf (" %s\n\n", "CHECK CONTENT: check_http -w 5 -c 10 --ssl -H www.verisign.com"); printf (" %s\n", _("When the 'www.verisign.com' server returns its content within 5 seconds,")); printf (" %s\n", _("a STATE_OK will be returned. When the server returns its content but exceeds")); printf (" %s\n", _("the 5-second threshold, a STATE_WARNING will be returned. When an error occurs,")); printf (" %s\n\n", _("a STATE_CRITICAL will be returned.")); - printf (" %s\n\n", "CHECK CERTIFICATE: check_http www.verisign.com -C 14"); + printf (" %s\n\n", "CHECK CERTIFICATE: check_http -H www.verisign.com -C 14"); printf (" %s\n", _("When the certificate of 'www.verisign.com' is valid for more than 14 days,")); printf (" %s\n", _("a STATE_OK is returned. When the certificate is still valid, but for less than")); printf (" %s\n", _("14 days, a STATE_WARNING is returned. A STATE_CRITICAL will be returned when")); diff --git a/plugins/check_ide_smart.c b/plugins/check_ide_smart.c index 5d0a018..f612974 100644 --- a/plugins/check_ide_smart.c +++ b/plugins/check_ide_smart.c @@ -10,7 +10,7 @@ * Copyright (c) 2000 Robert Dale * Copyright (c) 2000-2006 nagios-plugins team * -* Last Modified: $Date: 2006/10/19 00:25:16 $ +* Last Modified: $Date: 2007/02/06 21:03:21 $ * * Description: * @@ -35,11 +35,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: check_ide_smart.c,v 1.12 2006/10/19 00:25:16 opensides Exp $ + * $Id: check_ide_smart.c,v 1.14 2007/02/06 21:03:21 opensides Exp $ */ const char *progname = "check_ide_smart"; -const char *revision = "$Revision: 1.12 $"; +const char *revision = "$Revision: 1.14 $"; const char *copyright = "2000-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -212,7 +212,7 @@ main (int argc, char *argv[]) print_revision (progname, revision); return STATE_OK; default: - usage2 (_("Unknown argument"), optarg); + usage5 (); } } @@ -522,7 +522,7 @@ print_help (void) printf (" %s\n", "-0, --auto-off"); printf (" %s\n", _("Turn off automatic offline tests")); printf (" %s\n", "-n, --nagios"); - printf (" %s\n", _("Output suitable for Nagios\n")); + printf (" %s\n\n", _("Output suitable for Nagios")); printf (_(UT_SUPPORT)); } diff --git a/plugins/check_ldap.c b/plugins/check_ldap.c index 850ffdb..2a00698 100644 --- a/plugins/check_ldap.c +++ b/plugins/check_ldap.c @@ -5,7 +5,7 @@ * License: GPL * Copyright (c) 2000-2006 nagios-plugins team * -* Last Modified: $Date: 2006/10/22 22:24:27 $ +* Last Modified: $Date: 2007/01/28 21:46:40 $ * * Description: * @@ -27,13 +27,13 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: check_ldap.c,v 1.33 2006/10/22 22:24:27 opensides Exp $ + $Id: check_ldap.c,v 1.35 2007/01/28 21:46:40 hweiss Exp $ ******************************************************************************/ /* progname may be check_ldaps */ char *progname = "check_ldap"; -const char *revision = "$Revision: 1.33 $"; +const char *revision = "$Revision: 1.35 $"; const char *copyright = "2000-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -325,7 +325,7 @@ process_arguments (int argc, char **argv) #endif break; default: - usage2 (_("Unknown argument"), optarg); + usage5 (); } } @@ -378,9 +378,9 @@ print_help (void) printf (" %s\n", _("ldap attribute to search (default: \"(objectclass=*)\"")); printf (" %s\n", "-b [--base]"); printf (" %s\n", _("ldap base (eg. ou=my unit, o=my org, c=at")); - printf (" %s\n," "-D [--bind]"); + printf (" %s\n", "-D [--bind]"); printf (" %s\n", _("ldap bind DN (if required)")); - printf (" %s\n," "-P [--pass]"); + printf (" %s\n", "-P [--pass]"); printf (" %s\n", _("ldap password (if required)")); #ifdef HAVE_LDAP_SET_OPTION @@ -410,9 +410,9 @@ print_usage (void) { printf (_("Usage:")); printf (" %s -H -b [-p ] [-a ] [-D ]",progname); - printf ("[-P ] [-w ] [-c ] [-t timeout]\n", + printf ("\n [-P ] [-w ] [-c ] [-t timeout]%s\n", #ifdef HAVE_LDAP_SET_OPTION - " [-2|-3] [-4|-6]" + "\n [-2|-3] [-4|-6]" #else "" #endif diff --git a/plugins/check_load.c b/plugins/check_load.c index 0b13d0e..2e002e1 100644 --- a/plugins/check_load.c +++ b/plugins/check_load.c @@ -5,7 +5,7 @@ * License: GPL * Copyright (c) 1999-2006 nagios-plugins team * -* Last Modified: $Date: 2006/10/19 00:25:16 $ +* Last Modified: $Date: 2007/01/28 21:46:40 $ * * Description: * @@ -30,12 +30,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: check_load.c,v 1.32 2006/10/19 00:25:16 opensides Exp $ + $Id: check_load.c,v 1.33 2007/01/28 21:46:40 hweiss Exp $ ******************************************************************************/ const char *progname = "check_load"; -const char *revision = "$Revision: 1.32 $"; +const char *revision = "$Revision: 1.33 $"; const char *copyright = "1999-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -236,7 +236,7 @@ process_arguments (int argc, char **argv) print_help (); exit (STATE_OK); case '?': /* help */ - usage2 (_("Unknown argument"), optarg); + usage5 (); } } diff --git a/plugins/check_mrtg.c b/plugins/check_mrtg.c index 62219b8..e734db5 100644 --- a/plugins/check_mrtg.c +++ b/plugins/check_mrtg.c @@ -5,7 +5,7 @@ * License: GPL * Copyright (c) 1999-2006 nagios-plugins team * -* Last Modified: $Date: 2006/10/20 07:39:35 $ +* Last Modified: $Date: 2007/02/06 21:03:21 $ * * Description: * @@ -31,12 +31,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: check_mrtg.c,v 1.28 2006/10/20 07:39:35 opensides Exp $ + $Id: check_mrtg.c,v 1.30 2007/02/06 21:03:21 opensides Exp $ ******************************************************************************/ const char *progname = "check_mrtg"; -const char *revision = "$Revision: 1.28 $"; +const char *revision = "$Revision: 1.30 $"; const char *copyright = "1999-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -243,7 +243,7 @@ process_arguments (int argc, char **argv) print_help (); exit (STATE_OK); case '?': /* help */ - usage2 (_("Unknown argument"), optarg); + usage5 (); } } @@ -367,7 +367,7 @@ print_help (void) printf (" %s\n", _(" commands with different values for the argument. Of course,")); printf (" %s\n", _("you can always hack the code to make this plugin work for you...")); printf (" %s\n", _("- MRTG stands for the Multi Router Traffic Grapher. It can be downloaded from")); - printf (" %s\n", _("http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html")); + printf (" %s\n", "http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html"); printf (_(UT_SUPPORT)); } diff --git a/plugins/check_mrtgtraf.c b/plugins/check_mrtgtraf.c index 36207d6..cc6773e 100644 --- a/plugins/check_mrtgtraf.c +++ b/plugins/check_mrtgtraf.c @@ -3,9 +3,9 @@ * Nagios check_mrtgtraf plugin * * License: GPL -* Copyright (c) 1999-2006 nagios-plugins team +* Copyright (c) 1999-2007 nagios-plugins team * -* Last Modified: $Date: 2006/10/19 00:25:16 $ +* Last Modified: $Date: 2007/03/02 01:38:04 $ * * Description: * @@ -31,7 +31,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: check_mrtgtraf.c,v 1.25 2006/10/19 00:25:16 opensides Exp $ + $Id: check_mrtgtraf.c,v 1.28 2007/03/02 01:38:04 egalstad Exp $ ******************************************************************************/ @@ -39,8 +39,8 @@ #include "utils.h" const char *progname = "check_mrtgtraf"; -const char *revision = "$Revision: 1.25 $"; -const char *copyright = "1999-2006"; +const char *revision = "$Revision: 1.28 $"; +const char *copyright = "1999-2007"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; int process_arguments (int, char **); @@ -60,7 +60,7 @@ unsigned long outgoing_critical_threshold = 0L; int main (int argc, char **argv) { - int result = STATE_UNKNOWN; + int result = STATE_OK; FILE *fp; int line; char input_buffer[MAX_INPUT_BUFFER]; @@ -277,7 +277,7 @@ process_arguments (int argc, char **argv) print_help (); exit (STATE_OK); case '?': /* help */ - usage2 (_("Unknown argument"), optarg); + usage5 (); } } @@ -360,7 +360,7 @@ print_help (void) printf ("%s\n", _("Notes:")); printf (" %s\n", _("- MRTG stands for Multi Router Traffic Grapher. It can be downloaded from")); - printf (" %s\n", _(" http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html")); + printf (" %s\n", " http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html"); printf (" %s\n", _("- While MRTG can monitor things other than traffic rates, this")); printf (" %s\n", _(" plugin probably won't work with much else without modification.")); printf (" %s\n", _("- The calculated i/o rates are a little off from what MRTG actually")); diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c index 70aa49c..79124d2 100644 --- a/plugins/check_mysql.c +++ b/plugins/check_mysql.c @@ -7,7 +7,7 @@ * Copyright (c) 1999-2006 nagios-plugins team * Copyright (c) 2000 Karl DeBisschop (kdebisschop@users.sourceforge.net) * -* Last Modified: $Date: 2006/10/19 00:25:16 $ +* Last Modified: $Date: 2007/03/29 17:58:28 $ * * Description: * @@ -32,12 +32,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -* $Id: check_mysql.c,v 1.33 2006/10/19 00:25:16 opensides Exp $ +* $Id: check_mysql.c,v 1.35 2007/03/29 17:58:28 hweiss Exp $ * ******************************************************************************/ const char *progname = "check_mysql"; -const char *revision = "$Revision: 1.33 $"; +const char *revision = "$Revision: 1.35 $"; const char *copyright = "1999-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -308,7 +308,7 @@ process_arguments (int argc, char **argv) verbose++; break; case '?': /* help */ - usage2 (_("Unknown argument"), optarg); + usage5 (); } } @@ -318,18 +318,18 @@ process_arguments (int argc, char **argv) while ( argc > c ) { - if (strlen(db_host) == 0) + if (db_host == NULL) if (is_host (argv[c])) { db_host = argv[c++]; } else { - usage2 (_("Invalid hostname/address"), optarg); + usage2 (_("Invalid hostname/address"), argv[c]); } - else if (strlen(db_user) == 0) + else if (db_user == NULL) db_user = argv[c++]; - else if (strlen(db_pass) == 0) + else if (db_pass == NULL) db_pass = argv[c++]; - else if (strlen(db) == 0) + else if (db == NULL) db = argv[c++]; else if (is_intnonneg (argv[c])) db_port = atoi (argv[c++]); diff --git a/plugins/check_mysql_query.c b/plugins/check_mysql_query.c index b7c3514..9d8ba7b 100644 --- a/plugins/check_mysql_query.c +++ b/plugins/check_mysql_query.c @@ -5,7 +5,7 @@ * License: GPL * Copyright (c) 2006 nagios-plugins team, after Didi Rieder (check_mysql) * -* Last Modified: $Date: 2006/10/19 00:25:16 $ +* Last Modified: $Date: 2007/01/28 21:46:40 $ * * Description: * @@ -30,12 +30,12 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * CHECK_MYSQL_QUERY.C * -* $Id: check_mysql_query.c,v 1.5 2006/10/19 00:25:16 opensides Exp $ +* $Id: check_mysql_query.c,v 1.6 2007/01/28 21:46:40 hweiss Exp $ * ******************************************************************************/ const char *progname = "check_mysql_query"; -const char *revision = "$Revision: 1.5 $"; +const char *revision = "$Revision: 1.6 $"; const char *copyright = "2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -240,7 +240,7 @@ process_arguments (int argc, char **argv) critical = optarg; break; case '?': /* help */ - usage2 (_("Unknown argument"), optarg); + usage5 (); } } diff --git a/plugins/check_nagios.c b/plugins/check_nagios.c index 4b1f70f..9f2abc9 100644 --- a/plugins/check_nagios.c +++ b/plugins/check_nagios.c @@ -5,7 +5,7 @@ * License: GPL * Copyright (c) 1999-2006 nagios-plugins team * -* Last Modified: $Date: 2006/10/19 00:25:16 $ +* Last Modified: $Date: 2007/01/28 21:46:40 $ * * Description: * @@ -33,12 +33,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: check_nagios.c,v 1.31 2006/10/19 00:25:16 opensides Exp $ + $Id: check_nagios.c,v 1.32 2007/01/28 21:46:40 hweiss Exp $ ******************************************************************************/ const char *progname = "check_nagios"; -const char *revision = "$Revision: 1.31 $"; +const char *revision = "$Revision: 1.32 $"; const char *copyright = "1999-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -258,7 +258,7 @@ process_arguments (int argc, char **argv) verbose++; break; default: /* print short usage_va statement if args not parsable */ - usage_va(_("Unknown argument - %s"), optarg); + usage5(); } } diff --git a/plugins/check_nt.c b/plugins/check_nt.c index 4b03f5f..ca2a43f 100644 --- a/plugins/check_nt.c +++ b/plugins/check_nt.c @@ -6,7 +6,7 @@ * Copyright (c) 2000-2002 Yves Rubin (rubiyz@yahoo.com) * Copyright (c) 2003-2006 nagios-plugins team * -* Last Modified: $Date: 2006/10/24 21:48:22 $ +* Last Modified: $Date: 2007/01/28 21:46:40 $ * * Description: * @@ -32,12 +32,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -* $Id: check_nt.c,v 1.45 2006/10/24 21:48:22 opensides Exp $ +* $Id: check_nt.c,v 1.46 2007/01/28 21:46:40 hweiss Exp $ * *****************************************************************************/ const char *progname = "check_nt"; -const char *revision = "$Revision: 1.45 $"; +const char *revision = "$Revision: 1.46 $"; const char *copyright = "2003-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -492,7 +492,7 @@ int process_arguments(int argc, char **argv){ switch (c) { case '?': /* print short usage statement if args not parsable */ - usage2 (_("Unknown argument"), optarg); + usage5 (); case 'h': /* help */ print_help(); exit(STATE_OK); diff --git a/plugins/check_ntp.c b/plugins/check_ntp.c index 9a23c95..f59c050 100644 --- a/plugins/check_ntp.c +++ b/plugins/check_ntp.c @@ -6,7 +6,7 @@ * Copyright (c) 2006 sean finney * Copyright (c) 2006 nagios-plugins team * -* Last Modified: $Date: 2006/10/19 00:25:16 $ +* Last Modified: $Date: 2007/04/10 07:17:18 $ * * Description: * @@ -32,12 +32,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: check_ntp.c,v 1.11 2006/10/19 00:25:16 opensides Exp $ + $Id: check_ntp.c,v 1.25 2007/04/10 07:17:18 dermoth Exp $ *****************************************************************************/ const char *progname = "check_ntp"; -const char *revision = "$Revision: 1.11 $"; +const char *revision = "$Revision: 1.25 $"; const char *copyright = "2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -47,7 +47,6 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net"; static char *server_address=NULL; static int verbose=0; -static int zero_offset_bad=0; static double owarn=60; static double ocrit=120; static short do_jitter=0; @@ -139,8 +138,8 @@ typedef struct { #define OP_SET(x,y) do{ x |= (y&OP_MASK); }while(0) #define OP_READSTAT 0x01 #define OP_READVAR 0x02 -/* In peer status bytes, bytes 6,7,8 determine clock selection status */ -#define PEER_SEL(x) (x&0x07) +/* In peer status bytes, bits 6,7,8 determine clock selection status */ +#define PEER_SEL(x) ((ntohs(x)>>8)&0x07) #define PEER_INCLUDED 0x04 #define PEER_SYNCSOURCE 0x06 @@ -191,7 +190,7 @@ typedef struct { do{ if(!t.tv_usec && !t.tv_sec) n=0x0UL; \ else { \ L32(n)=htonl(t.tv_sec + EPOCHDIFF); \ - R32(n)=htonl((4294.967296*t.tv_usec)+.5); \ + R32(n)=htonl((uint64_t)((4294.967296*t.tv_usec)+.5)); \ } \ } while(0) @@ -287,7 +286,7 @@ void setup_request(ntp_message *p){ VN_SET(p->flags, 4); MODE_SET(p->flags, MODE_CLIENT); p->poll=4; - p->precision=0xfa; + p->precision=(int8_t)0xfa; L16(p->rtdelay)=htons(1); L16(p->rtdisp)=htons(1); @@ -476,7 +475,10 @@ double offset_request(const char *host, int *status){ } /* cleanup */ - for(j=0; j [-O] [-w ] [-c ] [-j ] [-k ] [-v verbose]\n", progname); + printf("%s -H [-w ] [-c ] [-j ] [-k ] [-v verbose]\n", progname); } diff --git a/plugins/check_nwstat.c b/plugins/check_nwstat.c index 60c037f..416045d 100644 --- a/plugins/check_nwstat.c +++ b/plugins/check_nwstat.c @@ -5,7 +5,7 @@ * License: GPL * Copyright (c) 2000-2006 nagios-plugins team * -* Last Modified: $Date: 2006/10/19 00:25:16 $ +* Last Modified: $Date: 2007/01/28 21:46:40 $ * * Description: * @@ -31,12 +31,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: check_nwstat.c,v 1.34 2006/10/19 00:25:16 opensides Exp $ + $Id: check_nwstat.c,v 1.35 2007/01/28 21:46:40 hweiss Exp $ ******************************************************************************/ const char *progname = "check_nwstat"; -const char *revision = "$Revision: 1.34 $"; +const char *revision = "$Revision: 1.35 $"; const char *copyright = "2000-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -1355,7 +1355,7 @@ int process_arguments(int argc, char **argv) { switch (c) { case '?': /* print short usage statement if args not parsable */ - usage2 (_("Unknown argument"), optarg); + usage5 (); case 'h': /* help */ print_help(); exit(STATE_OK); diff --git a/plugins/check_overcr.c b/plugins/check_overcr.c index 2642d40..8a144f5 100644 --- a/plugins/check_overcr.c +++ b/plugins/check_overcr.c @@ -5,7 +5,7 @@ * License: GPL * Copyright (c) 2000-2006 nagios-plugins team * -* Last Modified: $Date: 2006/10/19 00:25:16 $ +* Last Modified: $Date: 2007/02/06 21:03:21 $ * * Description: * @@ -31,12 +31,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: check_overcr.c,v 1.21 2006/10/19 00:25:16 opensides Exp $ + $Id: check_overcr.c,v 1.23 2007/02/06 21:03:21 opensides Exp $ ******************************************************************************/ const char *progname = "check_overcr"; -const char *revision = "$Revision: 1.21 $"; +const char *revision = "$Revision: 1.23 $"; const char *copyright = "2000-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -341,7 +341,7 @@ process_arguments (int argc, char **argv) switch (c) { case '?': /* print short usage statement if args not parsable */ - usage2 (_("Unknown argument"), optarg); + usage5 (); case 'h': /* help */ print_help (); exit (STATE_OK); @@ -451,15 +451,15 @@ print_help (void) printf ("\n"); printf ("%s\n", _("Notes:")); - printf ("%s\n", _("For the available options, the critical threshold value should always be")); + printf ("%s\n", _("For the available options, the critical threshold value should always be")); printf ("%s\n\n", _("higher than the warning threshold value, EXCEPT with the uptime variable")); - printf ("%s\n", _("This plugin requres that Eric Molitors' Over-CR collector daemon be")); - printf ("%s\n", _("running on the remote server. Over-CR can be downloaded from")); - printf ("%s\n", _("http://www.molitor.org/overcr (This plugin was tested with version 0.99.53")); - printf ("%s\n", _("of the Over-CR collector)")); + printf ("%s\n", _("This plugin requres that Eric Molitors' Over-CR collector daemon be")); + printf ("%s\n", _("running on the remote server.")); + printf ("%s\n", " Over-CR can be downloaded from http://www.molitor.org/overcr"); + printf ("%s\n", _("This plugin was tested with version 0.99.53 of the Over-CR collector")); - printf (_(UT_SUPPORT)); + printf (_(UT_SUPPORT)); } diff --git a/plugins/check_pgsql.c b/plugins/check_pgsql.c index e9363ec..20342af 100644 --- a/plugins/check_pgsql.c +++ b/plugins/check_pgsql.c @@ -5,7 +5,7 @@ * License: GPL * Copyright (c) 1999-2006 nagios-plugins team * -* Last Modified: $Date: 2006/10/19 00:25:16 $ +* Last Modified: $Date: 2007/01/28 21:46:40 $ * * Description: * @@ -30,12 +30,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: check_pgsql.c,v 1.34 2006/10/19 00:25:16 opensides Exp $ + $Id: check_pgsql.c,v 1.35 2007/01/28 21:46:40 hweiss Exp $ *****************************************************************************/ const char *progname = "check_pgsql"; -const char *revision = "$Revision: 1.34 $"; +const char *revision = "$Revision: 1.35 $"; const char *copyright = "1999-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -225,7 +225,7 @@ process_arguments (int argc, char **argv) switch (c) { case '?': /* usage */ - usage2 (_("Unknown argument"), optarg); + usage5 (); case 'h': /* help */ print_help (); exit (STATE_OK); diff --git a/plugins/check_ping.c b/plugins/check_ping.c index ceb876c..ab1e672 100644 --- a/plugins/check_ping.c +++ b/plugins/check_ping.c @@ -5,7 +5,7 @@ * License: GPL * Copyright (c) 2000-2006 nagios-plugins team * -* Last Modified: $Date: 2006/10/19 00:25:16 $ +* Last Modified: $Date: 2007/03/12 10:51:05 $ * * Description: * @@ -30,12 +30,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: check_ping.c,v 1.52 2006/10/19 00:25:16 opensides Exp $ + $Id: check_ping.c,v 1.60 2007/03/12 10:51:05 tonvoon Exp $ ******************************************************************************/ const char *progname = "check_ping"; -const char *revision = "$Revision: 1.52 $"; +const char *revision = "$Revision: 1.60 $"; const char *copyright = "2000-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -103,13 +103,18 @@ main (int argc, char **argv) usage4 (_("Cannot catch SIGALRM")); } - /* handle timeouts gracefully */ + /* If ./configure finds ping has timeout values, set plugin alarm slightly + * higher so that we can use response from command line ping */ +#ifdef PING_PACKETS_FIRST && PING_HAS_TIMEOUT + alarm (timeout_interval + 1); +#else alarm (timeout_interval); +#endif for (i = 0 ; i < n_addresses ; i++) { #ifdef PING6_COMMAND - if (is_inet6_addr(addresses[i]) && address_family != AF_INET) + if (address_family != AF_INET && is_inet6_addr(addresses[i])) rawcmd = strdup(PING6_COMMAND); else rawcmd = strdup(PING_COMMAND); @@ -211,7 +216,7 @@ process_arguments (int argc, char **argv) switch (c) { case '?': /* usage */ - usage2 (_("Unknown argument"), optarg); + usage5 (); case 'h': /* help */ print_help (); exit (STATE_OK); @@ -503,10 +508,22 @@ run_ping (const char *cmd, const char *addr) int error_scan (char buf[MAX_INPUT_BUFFER], const char *addr) { - if (strstr (buf, "Network is unreachable")) - die (STATE_CRITICAL, _("CRITICAL - Network unreachable (%s)"), addr); + if (strstr (buf, "Network is unreachable") || + strstr (buf, "Destination Net Unreachable") + ) + die (STATE_CRITICAL, _("CRITICAL - Network Unreachable (%s)"), addr); else if (strstr (buf, "Destination Host Unreachable")) die (STATE_CRITICAL, _("CRITICAL - Host Unreachable (%s)"), addr); + else if (strstr (buf, "Destination Port Unreachable")) + die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Port Unreachable (%s)"), addr); + else if (strstr (buf, "Destination Protocol Unreachable")) + die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Protocol Unreachable (%s)"), addr); + else if (strstr (buf, "Destination Net Prohibited")) + die (STATE_CRITICAL, _("CRITICAL - Network Prohibited (%s)"), addr); + else if (strstr (buf, "Destination Host Prohibited")) + die (STATE_CRITICAL, _("CRITICAL - Host Prohibited (%s)"), addr); + else if (strstr (buf, "Packet filtered")) + die (STATE_CRITICAL, _("CRITICAL - Packet Filtered (%s)"), addr); else if (strstr (buf, "unknown host" )) die (STATE_CRITICAL, _("CRITICAL - Host not found (%s)"), addr); else if (strstr (buf, "Time to live exceeded")) @@ -551,14 +568,14 @@ print_help (void) printf (" %s\n", "-c, --critical=THRESHOLD"); printf (" %s\n", _("critical threshold pair")); printf (" %s\n", "-p, --packets=INTEGER"); - printf (" %s\n", _("number of ICMP ECHO packets to send")); - printf (_("(Default: %d)"), DEFAULT_MAX_PACKETS); + printf (" %s ", _("number of ICMP ECHO packets to send")); + printf (_("(Default: %d)\n"), DEFAULT_MAX_PACKETS); printf (" %s\n", "-L, --link"); printf (" %s\n", _("show HTML in the plugin output (obsoleted by urlize)")); printf (_(UT_TIMEOUT), DEFAULT_SOCKET_TIMEOUT); - printf ("%s\n", _("THRESHOLD is ,%% where is the round trip average travel")); + printf ("%s\n", _("THRESHOLD is ,% where is the round trip average travel")); printf ("%s\n", _("time (ms) which triggers a WARNING or CRITICAL state, and is the")); printf ("%s\n", _("percentage of packet loss to trigger an alarm state.")); @@ -579,5 +596,5 @@ print_usage (void) { printf (_("Usage:")); printf ("%s -H -w ,%% -c ,%%\n", progname); - printf (" [-p packets] [-t timeout] [-L] [-4|-6]\n"); + printf (" [-p packets] [-t timeout] [-4|-6]\n"); } diff --git a/plugins/check_procs.c b/plugins/check_procs.c index 9d47bac..7ac3b7f 100644 --- a/plugins/check_procs.c +++ b/plugins/check_procs.c @@ -5,7 +5,7 @@ * License: GPL * Copyright (c) 1999-2006 nagios-plugins team * -* Last Modified: $Date: 2006/10/22 22:03:31 $ +* Last Modified: $Date: 2007/03/06 17:29:15 $ * * Description: * @@ -31,12 +31,13 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -* $Id: check_procs.c,v 1.54 2006/10/22 22:03:31 opensides Exp $ +* $Id: check_procs.c,v 1.58 2007/03/06 17:29:15 tonvoon Exp $ * ******************************************************************************/ const char *progname = "check_procs"; -const char *revision = "$Revision: 1.54 $"; +const char *program_name = "check_procs"; /* Required for coreutils libs */ +const char *revision = "$Revision: 1.58 $"; const char *copyright = "2000-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -193,13 +194,13 @@ main (int argc, char **argv) strip (procargs); /* Some ps return full pathname for command. This removes path */ - procprog = base_name(procprog); + strcpy(procprog, base_name(procprog)); /* we need to convert the elapsed time to seconds */ procseconds = convert_to_seconds(procetime); if (verbose >= 3) - printf ("%d %d %d %d %d %d %.2f %s %s %s %s\n", + printf ("proc#=%d uid=%d vsz=%d rss=%d pid=%d ppid=%d pcpu=%.2f stat=%s etime=%s prog=%s args=%s\n", procs, procuid, procvsz, procrss, procpid, procppid, procpcpu, procstat, procetime, procprog, procargs); @@ -358,7 +359,7 @@ process_arguments (int argc, char **argv) switch (c) { case '?': /* help */ - usage2 (_("Unknown argument"), optarg); + usage5 (); case 'h': /* help */ print_help (); exit (STATE_OK); diff --git a/plugins/check_radius.c b/plugins/check_radius.c index 21d2f99..4d44786 100644 --- a/plugins/check_radius.c +++ b/plugins/check_radius.c @@ -5,7 +5,7 @@ * License: GPL * Copyright (c) 1999-2006 nagios-plugins team * -* Last Modified: $Date: 2006/10/19 23:53:28 $ +* Last Modified: $Date: 2007/01/28 21:46:40 $ * * Description: * @@ -30,12 +30,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -* $Id: check_radius.c,v 1.23 2006/10/19 23:53:28 opensides Exp $ +* $Id: check_radius.c,v 1.25 2007/01/28 21:46:40 hweiss Exp $ * *******************************************************************************/ const char *progname = "check_radius"; -const char *revision = "$Revision: 1.23 $"; +const char *revision = "$Revision: 1.25 $"; const char *copyright = "2000-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -139,6 +139,7 @@ main (int argc, char **argv) service = PW_AUTHENTICATE_ONLY; + memset (&data, 0, sizeof(data)); if (!(rc_avpair_add (&data.send_pairs, PW_SERVICE_TYPE, &service, 0) && rc_avpair_add (&data.send_pairs, PW_USER_NAME, username, 0) && rc_avpair_add (&data.send_pairs, PW_USER_PASSWORD, password, 0) && @@ -234,7 +235,7 @@ process_arguments (int argc, char **argv) switch (c) { case '?': /* print short usage statement if args not parsable */ - usage2 (_("Unknown argument"), optarg); + usage5 (); case 'h': /* help */ print_help (); exit (OK); diff --git a/plugins/check_real.c b/plugins/check_real.c index 8dec85a..e13ec92 100644 --- a/plugins/check_real.c +++ b/plugins/check_real.c @@ -5,7 +5,7 @@ * License: GPL * Copyright (c) 1999-2006 nagios-plugins team * -* Last Modified: $Date: 2006/10/19 23:53:28 $ +* Last Modified: $Date: 2007/01/28 21:46:40 $ * * Description: * @@ -31,12 +31,12 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * -* $Id: check_real.c,v 1.27 2006/10/19 23:53:28 opensides Exp $ +* $Id: check_real.c,v 1.29 2007/01/28 21:46:40 hweiss Exp $ * ******************************************************************************/ const char *progname = "check_real"; -const char *revision = "$Revision: 1.27 $"; +const char *revision = "$Revision: 1.29 $"; const char *copyright = "2000-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -302,7 +302,7 @@ process_arguments (int argc, char **argv) } while (1) { - c = getopt_long (argc, argv, "+hVI:H:e:u:p:w:c:t:", longopts, + c = getopt_long (argc, argv, "+hvVI:H:e:u:p:w:c:t:", longopts, &option); if (c == -1 || c == EOF) @@ -368,7 +368,7 @@ process_arguments (int argc, char **argv) print_help (); exit (STATE_OK); case '?': /* usage */ - usage2 (_("Unknown argument"), optarg); + usage5 (); } } diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c index 0294e8a..b521908 100644 --- a/plugins/check_smtp.c +++ b/plugins/check_smtp.c @@ -5,7 +5,7 @@ * License: GPL * Copyright (c) 1999-2006 nagios-plugins team * -* Last Modified: $Date: 2006/10/19 23:53:28 $ +* Last Modified: $Date: 2007/03/06 22:29:27 $ * * Description: * @@ -31,12 +31,12 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * -* $Id: check_smtp.c,v 1.54 2006/10/19 23:53:28 opensides Exp $ +* $Id: check_smtp.c,v 1.59 2007/03/06 22:29:27 tonvoon Exp $ * ******************************************************************************/ const char *progname = "check_smtp"; -const char *revision = "$Revision: 1.54 $"; +const char *revision = "$Revision: 1.59 $"; const char *copyright = "2000-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -169,9 +169,8 @@ main (int argc, char **argv) int result = STATE_UNKNOWN; char *cmd_str = NULL; char *helocmd = NULL; - char *error_msg = NULL; + char *error_msg = ""; struct timeval tv; - struct hostent *hp; setlocale (LC_ALL, ""); bindtextdomain (PACKAGE, LOCALEDIR); @@ -180,7 +179,7 @@ main (int argc, char **argv) if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); - /* initialize the HELO command with the localhostname */ + /* If localhostname not set on command line, use gethostname to set */ if(! localhostname){ localhostname = malloc (HOST_MAX_BYTES); if(!localhostname){ @@ -191,16 +190,14 @@ main (int argc, char **argv) printf(_("gethostname() failed!\n")); return STATE_CRITICAL; } - hp = gethostbyname(localhostname); - if(!hp) helocmd = localhostname; - else helocmd = hp->h_name; - } else { - helocmd = localhostname; } if(use_ehlo) - asprintf (&helocmd, "%s%s%s", SMTP_EHLO, helocmd, "\r\n"); + asprintf (&helocmd, "%s%s%s", SMTP_EHLO, localhostname, "\r\n"); else - asprintf (&helocmd, "%s%s%s", SMTP_HELO, helocmd, "\r\n"); + asprintf (&helocmd, "%s%s%s", SMTP_HELO, localhostname, "\r\n"); + + if (verbose) + printf("HELOCMD: %s", helocmd); /* initialize the MAIL command with optional FROM command */ asprintf (&cmd_str, "%sFROM: %s%s", mail_command, from_arg, "\r\n"); @@ -298,14 +295,14 @@ main (int argc, char **argv) * we resent EHLO via TLS. */ if (my_send(helocmd, strlen(helocmd)) <= 0) { - printf(_("SMTP UNKNOWN - Cannot send EHLO command via TLS.\n")); + printf("%s\n", _("SMTP UNKNOWN - Cannot send EHLO command via TLS.")); my_close(); return STATE_UNKNOWN; } if (verbose) printf(_("sent %s"), helocmd); if ((n = my_recv(buffer, MAX_INPUT_BUFFER - 1)) <= 0) { - printf(_("SMTP UNKNOWN - Cannot read EHLO response via TLS.\n")); + printf("%s\n", _("SMTP UNKNOWN - Cannot read EHLO response via TLS.")); my_close(); return STATE_UNKNOWN; } @@ -318,7 +315,7 @@ main (int argc, char **argv) if ( check_cert ) { result = np_net_ssl_check_cert(days_till_exp); if(result != STATE_OK){ - printf (_("CRITICAL - Cannot retrieve server certificate.\n")); + printf ("%s\n", _("CRITICAL - Cannot retrieve server certificate.")); } my_close(); return result; @@ -383,12 +380,12 @@ main (int argc, char **argv) do { if (authuser == NULL) { result = STATE_CRITICAL; - error_msg = _("no authuser specified, "); + asprintf(&error_msg, _("no authuser specified, ")); break; } if (authpass == NULL) { result = STATE_CRITICAL; - error_msg = _("no authpass specified, "); + asprintf(&error_msg, _("no authpass specified, ")); break; } @@ -398,7 +395,7 @@ main (int argc, char **argv) printf (_("sent %s\n"), "AUTH LOGIN"); if((ret = my_recv(buffer, MAXBUF - 1)) < 0){ - error_msg = _("recv() failed after AUTH LOGIN, \n"); + asprintf(&error_msg, _("recv() failed after AUTH LOGIN, ")); result = STATE_WARNING; break; } @@ -408,7 +405,7 @@ main (int argc, char **argv) if (strncmp (buffer, "334", 3) != 0) { result = STATE_CRITICAL; - error_msg = _("invalid response received after AUTH LOGIN, "); + asprintf(&error_msg, _("invalid response received after AUTH LOGIN, ")); break; } @@ -421,7 +418,7 @@ main (int argc, char **argv) if ((ret = my_recv(buffer, MAX_INPUT_BUFFER-1)) == -1) { result = STATE_CRITICAL; - error_msg = _("recv() failed after sending authuser, "); + asprintf(&error_msg, _("recv() failed after sending authuser, ")); break; } buffer[ret] = 0; @@ -430,7 +427,7 @@ main (int argc, char **argv) } if (strncmp (buffer, "334", 3) != 0) { result = STATE_CRITICAL; - error_msg = _("invalid response received after authuser, "); + asprintf(&error_msg, _("invalid response received after authuser, ")); break; } /* encode authpass with base64 */ @@ -442,7 +439,7 @@ main (int argc, char **argv) } if ((ret = my_recv(buffer, MAX_INPUT_BUFFER-1)) == -1) { result = STATE_CRITICAL; - error_msg = _("recv() failed after sending authpass, "); + asprintf(&error_msg, _("recv() failed after sending authpass, ")); break; } buffer[ret] = 0; @@ -451,14 +448,14 @@ main (int argc, char **argv) } if (strncmp (buffer, "235", 3) != 0) { result = STATE_CRITICAL; - error_msg = _("invalid response received after authpass, "); + asprintf(&error_msg, _("invalid response received after authpass, ")); break; } break; } while (0); } else { result = STATE_CRITICAL; - error_msg = _("only authtype LOGIN is supported, "); + asprintf(&error_msg, _("only authtype LOGIN is supported, ")); } } @@ -484,7 +481,7 @@ main (int argc, char **argv) printf (_("SMTP %s - %s%.3f sec. response time%s%s|%s\n"), state_text (result), - (error_msg == NULL ? "" : error_msg), + error_msg, elapsed_time, verbose?", ":"", verbose?buffer:"", fperfdata ("time", elapsed_time, "s", @@ -665,7 +662,7 @@ process_arguments (int argc, char **argv) print_help (); exit (STATE_OK); case '?': /* help */ - usage2 (_("Unknown argument"), optarg); + usage5 (); } } diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c index 31435ea..2791883 100644 --- a/plugins/check_snmp.c +++ b/plugins/check_snmp.c @@ -5,7 +5,7 @@ * License: GPL * Copyright (c) 1999-2006 nagios-plugins team * -* Last Modified: $Date: 2006/10/20 07:53:31 $ +* Last Modified: $Date: 2007/02/02 09:10:22 $ * * Description: * @@ -30,12 +30,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -* $Id: check_snmp.c,v 1.67 2006/10/20 07:53:31 tonvoon Exp $ +* $Id: check_snmp.c,v 1.69 2007/02/02 09:10:22 dermoth Exp $ * ******************************************************************************/ const char *progname = "check_snmp"; -const char *revision = "$Revision: 1.67 $"; +const char *revision = "$Revision: 1.69 $"; const char *copyright = "1999-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -444,7 +444,7 @@ process_arguments (int argc, char **argv) switch (c) { case '?': /* usage */ - usage2 (_("Unknown argument"), optarg); + usage5 (); case 'h': /* help */ print_help (); exit (STATE_OK); @@ -527,11 +527,11 @@ process_arguments (int argc, char **argv) retries = atoi(optarg); break; case 'o': /* object identifier */ - if ( strspn( optarg, "0123456789." ) != strlen( optarg ) ) { + if ( strspn( optarg, "0123456789.," ) != strlen( optarg ) ) { /* - * we have something other than digits and periods, so we - * have a mib variable, rather than just an SNMP OID, so - * we have to actually read the mib files + * we have something other than digits, periods and comas, + * so we have a mib variable, rather than just an SNMP OID, + * so we have to actually read the mib files */ needmibs = TRUE; } diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c index fa27c71..7442074 100644 --- a/plugins/check_ssh.c +++ b/plugins/check_ssh.c @@ -5,7 +5,7 @@ * License: GPL * Copyright (c) 1999-2006 nagios-plugins team * -* Last Modified: $Date: 2006/10/19 23:53:28 $ +* Last Modified: $Date: 2007/01/28 21:46:40 $ * * Description: * @@ -31,12 +31,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -* $Id: check_ssh.c,v 1.30 2006/10/19 23:53:28 opensides Exp $ +* $Id: check_ssh.c,v 1.32 2007/01/28 21:46:40 hweiss Exp $ * ******************************************************************************/ const char *progname = "check_ssh"; -const char *revision = "$Revision: 1.30 $"; +const char *revision = "$Revision: 1.32 $"; const char *copyright = "2000-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -102,7 +102,8 @@ process_arguments (int argc, char **argv) static struct option longopts[] = { {"help", no_argument, 0, 'h'}, {"version", no_argument, 0, 'V'}, - {"host", required_argument, 0, 'H'}, + {"host", required_argument, 0, 'H'}, /* backward compatibility */ + {"hostname", required_argument, 0, 'H'}, {"port", required_argument, 0, 'p'}, {"use-ipv4", no_argument, 0, '4'}, {"use-ipv6", no_argument, 0, '6'}, @@ -127,7 +128,7 @@ process_arguments (int argc, char **argv) switch (c) { case '?': /* help */ - usage2 (_("Unknown argument"), optarg); + usage5 (); case 'V': /* version */ print_revision (progname, revision); exit (STATE_OK); @@ -220,7 +221,7 @@ ssh_connect (char *haddr, int hport, char *remote_version) char *ssh_server = NULL; char rev_no[20]; - sscanf ("$Revision: 1.30 $", "$Revision: %[0123456789.]", rev_no); + sscanf ("$Revision: 1.32 $", "$Revision: %[0123456789.]", rev_no); result = my_tcp_connect (haddr, hport, &sd); diff --git a/plugins/check_swap.c b/plugins/check_swap.c index bed0c36..a3404aa 100644 --- a/plugins/check_swap.c +++ b/plugins/check_swap.c @@ -6,7 +6,7 @@ * Copyright (c) 2000 Karl DeBisschop (kdebisschop@users.sourceforge.net) * Copyright (c) 2000-2006 nagios-plugins team * -* Last Modified: $Date: 2006/10/19 23:53:28 $ +* Last Modified: $Date: 2007/02/07 14:06:11 $ * * Description: * @@ -28,12 +28,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -* $Id: check_swap.c,v 1.56 2006/10/19 23:53:28 opensides Exp $ +* $Id: check_swap.c,v 1.59 2007/02/07 14:06:11 hweiss Exp $ * *****************************************************************************/ const char *progname = "check_swap"; -const char *revision = "$Revision: 1.56 $"; +const char *revision = "$Revision: 1.59 $"; const char *copyright = "2000-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -41,6 +41,22 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net"; #include "popen.h" #include "utils.h" +#ifdef HAVE_DECL_SWAPCTL +# ifdef HAVE_SYS_PARAM_H +# include +# endif +# ifdef HAVE_SYS_SWAP_H +# include +# endif +# ifdef HAVE_SYS_STAT_H +# include +# endif +#endif + +#ifndef SWAP_CONVERSION +# define SWAP_CONVERSION 1 +#endif + int check_swap (int usp, float free_swap_mb); int process_arguments (int argc, char **argv); int validate_arguments (void); @@ -236,22 +252,33 @@ main (int argc, char **argv) # ifdef CHECK_SWAP_SWAPCTL_SVR4 /* get the number of active swap devices */ - nswaps=swapctl(SC_GETNSWP, NULL); + if((nswaps=swapctl(SC_GETNSWP, NULL))== -1) + die(STATE_UNKNOWN, _("Error getting swap devices\n") ); + + if(nswaps == 0) + die(STATE_OK, _("SWAP OK: No swap devices defined\n")); + + if(verbose >= 3) + printf("Found %d swap device(s)\n", nswaps); /* initialize swap table + entries */ tbl=(swaptbl_t*)malloc(sizeof(swaptbl_t)+(sizeof(swapent_t)*nswaps)); + + if(tbl==NULL) + die(STATE_UNKNOWN, _("malloc() failed!\n")); + memset(tbl, 0, sizeof(swaptbl_t)+(sizeof(swapent_t)*nswaps)); tbl->swt_n=nswaps; for(i=0;iswt_ent[i]; - ent->ste_path=(char*)malloc(sizeof(char)*MAXPATHLEN); + if((tbl->swt_ent[i].ste_path=(char*)malloc(sizeof(char)*MAXPATHLEN)) == NULL) + die(STATE_UNKNOWN, _("malloc() failed!\n")); } /* and now, tally 'em up */ swapctl_res=swapctl(SC_LIST, tbl); if(swapctl_res < 0){ perror(_("swapctl failed: ")); - result = STATE_WARNING; + die(STATE_UNKNOWN, _("Error in swapctl call\n")); } for(i=0;i 6 && !memcmp(progname, "check_", 6)) { - SERVICE = progname + 6; + SERVICE = strdup(progname + 6); for(i = 0; i < len - 6; i++) SERVICE[i] = toupper(SERVICE[i]); } @@ -166,9 +166,9 @@ main (int argc, char **argv) } else if (!strncmp(SERVICE, "JABBER", 6)) { SEND = "\n"; - EXPECT = " * Copyright (c) 2002-2006 nagios-plugins team * -* Last Modified: $Date: 2006/10/19 23:53:28 $ +* Last Modified: $Date: 2007/01/28 21:46:41 $ * * Description: * @@ -33,12 +33,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -* $Id: check_ups.c,v 1.30 2006/10/19 23:53:28 opensides Exp $ +* $Id: check_ups.c,v 1.31 2007/01/28 21:46:41 hweiss Exp $ * ******************************************************************************/ const char *progname = "check_ups"; -const char *revision = "$Revision: 1.30 $"; +const char *revision = "$Revision: 1.31 $"; const char *copyright = "2002-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -494,7 +494,7 @@ process_arguments (int argc, char **argv) switch (c) { case '?': /* help */ - usage2 (_("Unknown argument"), optarg); + usage5 (); case 'H': /* hostname */ if (is_host (optarg)) { server_address = optarg; diff --git a/plugins/check_users.c b/plugins/check_users.c index 191ce2a..a5be5a5 100644 --- a/plugins/check_users.c +++ b/plugins/check_users.c @@ -5,7 +5,7 @@ * License: GPL * Copyright (c) 2000-2006 nagios-plugins team * -* Last Modified: $Date: 2006/10/19 23:53:28 $ +* Last Modified: $Date: 2007/01/28 21:46:41 $ * * Description: * @@ -30,12 +30,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -* $Id: check_users.c,v 1.21 2006/10/19 23:53:28 opensides Exp $ +* $Id: check_users.c,v 1.22 2007/01/28 21:46:41 hweiss Exp $ * *****************************************************************************/ const char *progname = "check_users"; -const char *revision = "$Revision: 1.21 $"; +const char *revision = "$Revision: 1.22 $"; const char *copyright = "2000-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -156,7 +156,7 @@ process_arguments (int argc, char **argv) switch (c) { case '?': /* print short usage statement if args not parsable */ - usage2 (_("Unknown argument"), optarg); + usage5 (); case 'h': /* help */ print_help (); exit (STATE_OK); diff --git a/plugins/common.h b/plugins/common.h index c6f9252..0380ac1 100644 --- a/plugins/common.h +++ b/plugins/common.h @@ -28,7 +28,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: common.h,v 1.24 2006/07/29 01:43:34 tonvoon Exp $ + * $Id: common.h,v 1.28 2007/03/22 17:54:16 hweiss Exp $ * *****************************************************************************/ @@ -36,6 +36,12 @@ #define _COMMON_H_ #include "config.h" +/* This needs to be removed for Solaris servers, where 64 bit files, but 32 bit architecture + This needs to be done early on because subsequent system includes use _FILE_OFFSET_BITS + Cannot remove from config.h because is included by regex.c from lib/ */ +#if __sun__ && !defined(_LP64) && _FILE_OFFSET_BITS == 64 +#undef _FILE_OFFSET_BITS +#endif #ifdef HAVE_FEATURES_H #include @@ -97,44 +103,17 @@ #include #endif +/* GNU Libraries */ #include -#include - -#ifdef HAVE_LWRES_NETDB_H -#include -#else -# if !HAVE_GETADDRINFO -# include "getaddrinfo.h" -# else -# include -# endif -#endif +#include "dirname.h" +#include "vasprintf.h" +#include "snprintf.h" +#include "vsnprintf.h" #ifdef HAVE_LOCALE_H #include #endif -/* Fixes "Cannot use swapctl in the large files compilation environment" error on Solaris */ -#ifdef _FILE_OFFSET_BITS -#undef _FILE_OFFSET_BITS -#endif - -#ifdef HAVE_DECL_SWAPCTL -# ifdef HAVE_SYS_SWAP_H -# include -# endif -# ifdef HAVE_SYS_STAT_H -# include -# endif -# ifdef HAVE_SYS_PARAM_H -# include -# endif -#endif - -#ifndef SWAP_CONVERSION -# define SWAP_CONVERSION 1 -#endif - #ifdef HAVE_SYS_POLL_H # include "sys/poll.h" #endif @@ -153,22 +132,6 @@ # define strtoul(a,b,c) (unsigned long)atol((a)) #endif -#ifndef HAVE_ASPRINTF -int asprintf(char **strp, const char *fmt, ...); -#endif - -#ifndef HAVE_VASPRINTF -/* int vasprintf(char **strp, const char *fmt, va_list ap); */ -#endif - -#ifndef HAVE_SNPRINTF -int snprintf(char *str, size_t size, const char *format, ...); -#endif - -#ifndef HAVE_VSNPRINTF -int vsnprintf(char *str, size_t size, const char *format, va_list ap); -#endif - /* SSL implementations */ #ifdef HAVE_GNUTLS_OPENSSL_H # include @@ -226,7 +189,7 @@ enum { enum { DEFAULT_SOCKET_TIMEOUT = 10, /* timeout after 10 seconds */ - MAX_INPUT_BUFFER = 1024, /* max size of most buffers we use */ + MAX_INPUT_BUFFER = 8192, /* max size of most buffers we use */ MAX_HOST_ADDRESS_LENGTH = 256 /* max size of a host address */ }; diff --git a/plugins/getaddrinfo.c b/plugins/getaddrinfo.c deleted file mode 100644 index f142641..0000000 --- a/plugins/getaddrinfo.c +++ /dev/null @@ -1,305 +0,0 @@ -/* - * This file is part of libESMTP, a library for submission of RFC 2822 - * formatted electronic mail messages using the SMTP protocol described - * in RFC 2821. - * Modified by Jeremy T. Bouse for use in Nagios plugins - * - * Copyright (C) 2001,2002 Brian Stafford - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* An emulation of the RFC 2553 / Posix getaddrinfo resolver interface. - * - * $Id: getaddrinfo.c,v 1.2 2004/12/01 23:54:51 opensides Exp $ - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -/* Need to turn off Posix features in glibc to build this */ -#undef _POSIX_C_SOURCE -#undef _XOPEN_SOURCE - -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include "gethostbyname.h" -#include "getaddrinfo.h" - -static struct addrinfo * -dup_addrinfo (struct addrinfo *info, void *addr, size_t addrlen) -{ - struct addrinfo *ret; - - ret = malloc (sizeof (struct addrinfo)); - if (ret == NULL) - return NULL; - memcpy (ret, info, sizeof (struct addrinfo)); - ret->ai_addr = malloc (addrlen); - if (ret->ai_addr == NULL) - { - free (ret); - return NULL; - } - memcpy (ret->ai_addr, addr, addrlen); - ret->ai_addrlen = addrlen; - return ret; -} - -int -getaddrinfo (const char *nodename, const char *servname, - const struct addrinfo *hints, struct addrinfo **res) -{ - struct hostent *hp; - struct servent *servent; - const char *socktype; - int port; - struct addrinfo hint, result; - struct addrinfo *ai, *sai, *eai; - struct ghbnctx ghbnctx; - char **addrs; - int code; - - memset (&result, 0, sizeof result); - - /* default for hints */ - if (hints == NULL) - { - memset (&hint, 0, sizeof hint); - hint.ai_family = PF_UNSPEC; - hints = &hint; - } - - result.ai_socktype = hints->ai_socktype; - - /* Note: maintain port in host byte order to make debugging easier */ - if (servname != NULL) { - if (isdigit (*servname)) - port = strtol (servname, NULL, 10); - else if ((servent = getservbyname (servname, socktype)) != NULL) - port = ntohs (servent->s_port); - else - return EAI_NONAME; - } - - /* if nodename == NULL refer to the local host for a client or any - for a server */ - if (nodename == NULL) - { - struct sockaddr_in sin; - - /* check protocol family is PF_UNSPEC or PF_INET - could try harder - for IPv6 but that's more code than I'm prepared to write */ - if (hints->ai_family == PF_UNSPEC || hints->ai_family == PF_INET) - result.ai_family = AF_INET; - else - return EAI_FAMILY; - - sin.sin_family = result.ai_family; - sin.sin_port = htons (port); - if (hints->ai_flags & AI_PASSIVE) - sin.sin_addr.s_addr = htonl (INADDR_ANY); - else - sin.sin_addr.s_addr = htonl (INADDR_LOOPBACK); - /* Duplicate result and addr and return */ - *res = dup_addrinfo (&result, &sin, sizeof sin); - return (*res == NULL) ? EAI_MEMORY : 0; - } - - /* If AI_NUMERIC is specified, use inet_addr to translate numbers and - dots notation. */ - if (hints->ai_flags & AI_NUMERICHOST) - { - struct sockaddr_in sin; - - /* check protocol family is PF_UNSPEC or PF_INET */ - if (hints->ai_family == PF_UNSPEC || hints->ai_family == PF_INET) - result.ai_family = AF_INET; - else - return EAI_FAMILY; - - sin.sin_family = result.ai_family; - sin.sin_port = htons (port); - sin.sin_addr.s_addr = inet_addr (nodename); - /* Duplicate result and addr and return */ - *res = dup_addrinfo (&result, &sin, sizeof sin); - return (*res == NULL) ? EAI_MEMORY : 0; - } - - errno = 0; - hp = gethostbyname_ctx (nodename, &ghbnctx); - if (hp == NULL) - { - if (errno != 0) - { - free_ghbnctx (&ghbnctx); - return EAI_SYSTEM; - } - code = h_error_ctx (&ghbnctx); - switch (code) - { - case HOST_NOT_FOUND: code = EAI_NODATA; break; - case NO_DATA: code = EAI_NODATA; break; -#if defined(NO_ADDRESS) && NO_ADDRESS != NO_DATA - case NO_ADDRESS: code = EAI_NODATA; break; -#endif - case NO_RECOVERY: code = EAI_FAIL; break; - case TRY_AGAIN: code = EAI_AGAIN; break; - default: code = EAI_FAIL; break; - } - free_ghbnctx (&ghbnctx); - return code; - } - - /* Check that the address family is acceptable. - */ - switch (hp->h_addrtype) - { - case AF_INET: - if (!(hints->ai_family == PF_UNSPEC || hints->ai_family == PF_INET)) - goto eai_family; - break; -#ifdef USE_IPV6 - case AF_INET6: - if (!(hints->ai_family == PF_UNSPEC || hints->ai_family == PF_INET6)) - goto eai_family; - break; -#endif - default: - eai_family: - free_ghbnctx (&ghbnctx); - return EAI_FAMILY; - } - - /* For each element pointed to by hp, create an element in the - result linked list. */ - sai = eai = NULL; - for (addrs = hp->h_addr_list; *addrs != NULL; addrs++) - { - struct sockaddr sa; - size_t addrlen; - - sa.sa_family = hp->h_addrtype; - switch (hp->h_addrtype) - { - case AF_INET: - ((struct sockaddr_in *) &sa)->sin_port = htons (port); - memcpy (&((struct sockaddr_in *) &sa)->sin_addr, - *addrs, hp->h_length); - addrlen = sizeof (struct sockaddr_in); - break; -#ifdef USE_IPV6 - case AF_INET6: -# if SIN6_LEN - ((struct sockaddr_in6 *) &sa)->sin6_len = hp->h_length; -# endif - ((struct sockaddr_in6 *) &sa)->sin6_port = htons (port); - memcpy (&((struct sockaddr_in6 *) &sa)->sin6_addr, - *addrs, hp->h_length); - addrlen = sizeof (struct sockaddr_in6); - break; -#endif - default: - continue; - } - - result.ai_family = hp->h_addrtype; - ai = dup_addrinfo (&result, &sa, addrlen); - if (ai == NULL) - { - free_ghbnctx (&ghbnctx); - freeaddrinfo (sai); - return EAI_MEMORY; - } - if (sai == NULL) - sai = ai; - else - eai->ai_next = ai; - eai = ai; - } - - if (sai == NULL) - { - free_ghbnctx (&ghbnctx); - return EAI_NODATA; - } - - if (hints->ai_flags & AI_CANONNAME) - { - sai->ai_canonname = malloc (strlen (hp->h_name) + 1); - if (sai->ai_canonname == NULL) - { - free_ghbnctx (&ghbnctx); - freeaddrinfo (sai); - return EAI_MEMORY; - } - strcpy (sai->ai_canonname, hp->h_name); - } - - free_ghbnctx (&ghbnctx); - *res = sai; - return 0; -} - -void -freeaddrinfo (struct addrinfo *ai) -{ - struct addrinfo *next; - - while (ai != NULL) - { - next = ai->ai_next; - if (ai->ai_canonname != NULL) - free (ai->ai_canonname); - if (ai->ai_addr != NULL) - free (ai->ai_addr); - free (ai); - ai = next; - } -} - -const char * -gai_strerror (int ecode) -{ - static const char *eai_descr[] = - { - "no error", - "address family for nodename not supported", /* EAI_ADDRFAMILY */ - "temporary failure in name resolution", /* EAI_AGAIN */ - "invalid value for ai_flags", /* EAI_BADFLAGS */ - "non-recoverable failure in name resolution", /* EAI_FAIL */ - "ai_family not supported", /* EAI_FAMILY */ - "memory allocation failure", /* EAI_MEMORY */ - "no address associated with nodename", /* EAI_NODATA */ - "nodename nor servname provided, or not known", /* EAI_NONAME */ - "servname not supported for ai_socktype", /* EAI_SERVICE */ - "ai_socktype not supported", /* EAI_SOCKTYPE */ - "system error returned in errno", /* EAI_SYSTEM */ - }; - - if (ecode < 0 || ecode > (int) (sizeof eai_descr/ sizeof eai_descr[0])) - return "unknown error"; - return eai_descr[ecode]; -} diff --git a/plugins/getaddrinfo.h b/plugins/getaddrinfo.h deleted file mode 100644 index 57ca84c..0000000 --- a/plugins/getaddrinfo.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef _getaddrinfo_h -#define _getaddrinfo_h -/* - * This file is part of libESMTP, a library for submission of RFC 2822 - * formatted electronic mail messages using the SMTP protocol described - * in RFC 2821. - * Modified by Jeremy T. Bouse for use in Nagios plugins - * - * Copyright (C) 2001,2002 Brian Stafford - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* Structure and prototypes aken from RFC 2553 - * - * $Id: getaddrinfo.h,v 1.2 2004/12/01 23:54:51 opensides Exp $ - */ - -struct addrinfo - { - int ai_flags; /* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST */ - int ai_family; /* PF_xxx */ - int ai_socktype; /* SOCK_xxx */ - int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */ - size_t ai_addrlen; /* length of ai_addr */ - char *ai_canonname; /* canonical name for nodename */ - struct sockaddr *ai_addr; /* binary address */ - struct addrinfo *ai_next; /* next structure in linked list */ - }; - -/* Supposed to be defined in */ -#define AI_PASSIVE 1 /* Socket address is intended for `bind'. */ -#define AI_CANONNAME 2 /* Request for canonical name. */ -#define AI_NUMERICHOST 4 /* Don't use name resolution. */ - -/* Supposed to be defined in */ -#define EAI_ADDRFAMILY 1 /* address family for nodename not supported */ -#define EAI_AGAIN 2 /* temporary failure in name resolution */ -#define EAI_BADFLAGS 3 /* invalid value for ai_flags */ -#define EAI_FAIL 4 /* non-recoverable failure in name resolution */ -#define EAI_FAMILY 5 /* ai_family not supported */ -#define EAI_MEMORY 6 /* memory allocation failure */ -#define EAI_NODATA 7 /* no address associated with nodename */ -#define EAI_NONAME 8 /* nodename nor servname provided, or not known */ -#define EAI_SERVICE 9 /* servname not supported for ai_socktype */ -#define EAI_SOCKTYPE 10 /* ai_socktype not supported */ -#define EAI_SYSTEM 11 /* system error returned in errno */ - -/* RFC 2553 / Posix resolver */ -int getaddrinfo (const char *nodename, const char *servname, - const struct addrinfo *hints, struct addrinfo **res); - -/* Free addrinfo structure and associated storage */ -void freeaddrinfo (struct addrinfo *ai); - -/* Convert error return from getaddrinfo() to string */ -const char *gai_strerror (int code); - -#endif diff --git a/plugins/gethostbyname.c b/plugins/gethostbyname.c deleted file mode 100644 index da3ec3e..0000000 --- a/plugins/gethostbyname.c +++ /dev/null @@ -1,241 +0,0 @@ -/****************************************************************************** -* -* Nagios gethostbyname_r()'s prototype. -* -* License: GPL -* Copyright (C) 2001,2002 Brian Stafford -* -* Last Modified: $Date: 2006/06/18 19:36:48 $ -* -* Description: -* -* This file is a ghastly hack because nobody can agree on -* gethostbyname_r()'s prototype. -* -* 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. -* -* $Id: gethostbyname.c,v 1.3 2006/06/18 19:36:48 opensides Exp $ -* -*****************************************************************************/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#define _SVID_SOURCE 1 /* Need this to get gethostbyname_r() */ - -#include - -#include -#include -#include -#include - -#include "gethostbyname.h" - -#if HAVE_GETIPNODEBYNAME - -void -free_ghbnctx (struct ghbnctx *ctx) -{ - assert (ctx != NULL); - - if (ctx->hostent != NULL) - freehostent (ctx->hostent); -} - -struct hostent * -gethostbyname_ctx (const char *host, struct ghbnctx *ctx) -{ - assert (ctx != NULL); - - memset (ctx, 0, sizeof (struct ghbnctx)); - ctx->hostent = getipnodebyname (host, AF_UNSPEC, AI_ADDRCONFIG, &ctx->h_err); - return ctx->hostent; -} - -int -h_error_ctx (struct ghbnctx *ctx) -{ - assert (ctx != NULL); - - return ctx->h_err; -} - -#elif HAVE_GETHOSTBYNAME_R == 6 - -void -free_ghbnctx (struct ghbnctx *ctx) -{ - assert (ctx != NULL); - - if (ctx->hostbuf != NULL) - free (ctx->hostbuf); -} - -struct hostent * -gethostbyname_ctx (const char *host, struct ghbnctx *ctx) -{ - struct hostent *hp; - char *tmp; - int err; - - assert (ctx != NULL); - - memset (ctx, 0, sizeof (struct ghbnctx)); - ctx->hostbuf_len = 2048; - if ((ctx->hostbuf = malloc (ctx->hostbuf_len)) == NULL) - { - errno = ENOMEM; - return NULL; - } - while ((err = gethostbyname_r (host, - &ctx->hostent, ctx->hostbuf, ctx->hostbuf_len, - &hp, &ctx->h_err)) == ERANGE) - { - ctx->hostbuf_len += 1024; - if ((tmp = realloc (ctx->hostbuf, ctx->hostbuf_len)) == NULL) - { - errno = ENOMEM; - return NULL; - } - ctx->hostbuf = tmp; - } - if (err != 0) - { - errno = err; - return NULL; - } - return hp; -} - -int -h_error_ctx (struct ghbnctx *ctx) -{ - assert (ctx != NULL); - - return ctx->h_err; -} - -#elif HAVE_GETHOSTBYNAME_R == 5 - -void -free_ghbnctx (struct ghbnctx *ctx) -{ - assert (ctx != NULL); - - if (ctx->hostbuf != NULL) - free (ctx->hostbuf); -} - -struct hostent * -gethostbyname_ctx (const char *host, struct ghbnctx *ctx) -{ - struct hostent *hp; - char *tmp; - - assert (ctx != NULL); - - memset (ctx, 0, sizeof (struct ghbnctx)); - ctx->hostbuf_len = 2048; - if ((ctx->hostbuf = malloc (ctx->hostbuf_len)) == NULL) - { - errno = ENOMEM; - return NULL; - } - while ((hp = gethostbyname_r (host, &ctx->hostent, - ctx->hostbuf, ctx->hostbuf_len, - &ctx->h_err)) == NULL && errno == ERANGE) - { - ctx->hostbuf_len += 1024; - if ((tmp = realloc (ctx->hostbuf, ctx->hostbuf_len)) == NULL) - { - errno = ENOMEM; - return NULL; - } - ctx->hostbuf = tmp; - } - return hp; -} - -int -h_error_ctx (struct ghbnctx *ctx) -{ - assert (ctx != NULL); - - return ctx->h_err; -} - -#elif HAVE_GETHOSTBYNAME_R == 3 - -void -free_ghbnctx (struct ghbnctx *ctx) -{ - assert (ctx != NULL); - - /* FIXME: does this need to do anything? */ -} - -struct hostent * -gethostbyname_ctx (const char *host, struct ghbnctx *ctx) -{ - assert (ctx != NULL); - - if (!gethostbyname_r (host, &ctx->hostent, &ctx->hostent_data)) - { - ctx->h_err = h_errno; /* FIXME: is this correct? */ - return NULL; - } - return &ctx->hostent; -} - -int -h_error_ctx (struct ghbnctx *ctx) -{ - assert (ctx != NULL); - - return ctx->h_err; -} - -#else - -void -free_ghbnctx (struct ghbnctx *ctx __attribute__ ((unused))) -{ - assert (ctx != NULL); -} - -struct hostent * -gethostbyname_ctx (const char *host, struct ghbnctx *ctx) -{ - struct hostent *hp; - - hp = gethostbyname (host); - if (hp == NULL) - ctx->h_err = h_errno; - return hp; -} - -int -h_error_ctx (struct ghbnctx *ctx) -{ - assert (ctx != NULL); - - return ctx->h_err; -} - -#endif diff --git a/plugins/gethostbyname.h b/plugins/gethostbyname.h deleted file mode 100644 index c4a3adb..0000000 --- a/plugins/gethostbyname.h +++ /dev/null @@ -1,115 +0,0 @@ -/****************************************************************************** -* -* Nagios gethostbyname_r()'s prototype. -* -* License: GPL -* Copyright (C) 2001,2002 Brian Stafford -* -* Last Modified: $Date: 2006/06/18 19:36:48 $ -* -* Description: -* -* This file is a ghastly hack because nobody can agree on -* gethostbyname_r()'s prototype. -* -* 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. -* -* $Id: gethostbyname.h,v 1.3 2006/06/18 19:36:48 opensides Exp $ -*****************************************************************************/ - -/************************************************************************* - Usage: - - #include - #include "gethostbyname.h" - - f () - { - struct ghbnctx ctx; - - errno = 0; - hp = gethostbyname_ctx (host, &ctx); - if (hp == NULL) - { - if (errno != 0) - handle_value_of_errno (errno); - else - handle_value_of_h_errno (h_error_ctx (&ctx)); - } - else - { - ... - } - free_ghbnctx (&ctx); - } - *************************************************************************/ - -#ifndef _gethostbyname_h -#define _gethostbyname_h - -#if HAVE_GETIPNODEBYNAME - -struct ghbnctx - { - int h_err; - struct hostent *hostent; - }; - -#elif HAVE_GETHOSTBYNAME_R == 6 - -struct ghbnctx - { - int h_err; - struct hostent hostent; - char *hostbuf; - size_t hostbuf_len; - }; - -#elif HAVE_GETHOSTBYNAME_R == 5 - -struct ghbnctx - { - int h_err; - struct hostent hostent; - char *hostbuf; - int hostbuf_len; - }; - -#elif HAVE_GETHOSTBYNAME_R == 3 - -struct ghbnctx - { - int h_err; - struct hostent_data hostent_data; - struct hostent hostent; - }; - -#else - -struct ghbnctx - { - int h_err; - }; - -#endif - -struct hostent *gethostbyname_ctx (const char *host, struct ghbnctx *ctx); -int h_error_ctx (struct ghbnctx *ctx); -void free_ghbnctx (struct ghbnctx *ctx); - -#endif - diff --git a/plugins/negate.c b/plugins/negate.c index 98a3e6d..1eb7eec 100644 --- a/plugins/negate.c +++ b/plugins/negate.c @@ -5,7 +5,7 @@ * License: GPL * Copyright (c) 2002-2006 nagios-plugins team * -* Last Modified: $Date: 2006/10/19 23:53:28 $ +* Last Modified: $Date: 2007/01/28 21:46:41 $ * * Description: * @@ -29,7 +29,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -* $Id: negate.c,v 1.26 2006/10/19 23:53:28 opensides Exp $ +* $Id: negate.c,v 1.27 2007/01/28 21:46:41 hweiss Exp $ @@-
@@ -69,7 +69,7 @@ ******************************************************************************/ const char *progname = "negate"; -const char *revision = "$Revision: 1.26 $"; +const char *revision = "$Revision: 1.27 $"; const char *copyright = "2002-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -189,7 +189,7 @@ process_arguments (int argc, char **argv) switch (c) { case '?': /* help */ - usage2 (_("Unknown argument"), optarg); + usage5 (); break; case 'h': /* help */ print_help (); diff --git a/plugins/netutils.c b/plugins/netutils.c index 2eed00c..965605b 100644 --- a/plugins/netutils.c +++ b/plugins/netutils.c @@ -5,7 +5,7 @@ * License: GPL * Copyright (c) 1999 Ethan Galstad (nagios@nagios.org) * -* Last Modified: $Date: 2006/06/18 19:36:48 $ +* Last Modified: $Date: 2007/01/20 06:07:48 $ * * Description: * @@ -27,7 +27,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -* $Id: netutils.c,v 1.31 2006/06/18 19:36:48 opensides Exp $ +* $Id: netutils.c,v 1.33 2007/01/20 06:07:48 dermoth Exp $ * ****************************************************************************/ @@ -225,7 +225,7 @@ np_net_connect (const char *host_name, int port, int *sd, int proto) su.sun_family = AF_UNIX; strncpy(su.sun_path, host_name, UNIX_PATH_MAX); *sd = socket(PF_UNIX, SOCK_STREAM, 0); - if(sd < 0){ + if(*sd < 0){ die(STATE_UNKNOWN, _("Socket creation failed")); } result = connect(*sd, (struct sockaddr *)&su, sizeof(su)); @@ -324,14 +324,12 @@ int is_addr (const char *address) { #ifdef USE_IPV6 - if (is_inet_addr (address) && address_family != AF_INET6) + if (address_family == AF_INET && is_inet_addr (address)) + return TRUE; + else if (address_family == AF_INET6 && is_inet6_addr (address)) + return TRUE; #else if (is_inet_addr (address)) -#endif - return (TRUE); - -#ifdef USE_IPV6 - if (is_inet6_addr (address) && address_family != AF_INET) return (TRUE); #endif diff --git a/plugins/netutils.h b/plugins/netutils.h index 09c1d1c..1c05017 100644 --- a/plugins/netutils.h +++ b/plugins/netutils.h @@ -5,7 +5,7 @@ * License: GPL * Copyright (c) 1999 Ethan Galstad (nagios@nagios.org) * -* Last Modified: $Date: 2005/10/31 20:03:19 $ +* Last Modified: $Date: 2007/01/24 22:47:25 $ * * Description: * @@ -28,18 +28,18 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -* $Id: netutils.h,v 1.16 2005/10/31 20:03:19 seanius Exp $ +* $Id: netutils.h,v 1.18 2007/01/24 22:47:25 tonvoon Exp $ * ******************************************************************************/ #ifndef _NETUTILS_H_ #define _NETUTILS_H_ -#include "config.h" #include "common.h" #include "utils.h" #include #include +#include "getaddrinfo.h" #ifdef HAVE_SYS_UN_H # include diff --git a/plugins/t/CVS/Entries b/plugins/t/CVS/Entries deleted file mode 100644 index 8473c85..0000000 --- a/plugins/t/CVS/Entries +++ /dev/null @@ -1,26 +0,0 @@ -/.cvsignore/1.1/Fri Dec 2 22:25:22 2005//Tr1_4_5 -/check_disk.t/1.14/Wed Oct 18 12:12:11 2006//Tr1_4_5 -/check_dns.t/1.7/Wed Mar 29 08:13:29 2006//Tr1_4_5 -/check_fping.t/1.2/Mon Jul 25 01:47:14 2005//Tr1_4_5 -/check_ftp.t/1.3/Mon Jul 25 01:47:14 2005//Tr1_4_5 -/check_hpjd.t/1.3/Fri Mar 24 16:13:40 2006//Tr1_4_5 -/check_http.t/1.12/Thu Oct 19 18:59:58 2006//Tr1_4_5 -/check_imap.t/1.4/Wed Nov 9 16:40:12 2005//Tr1_4_5 -/check_load.t/1.6/Mon Oct 2 12:09:18 2006//Tr1_4_5 -/check_mysql.t/1.8/Fri Mar 17 14:07:34 2006//Tr1_4_5 -/check_mysql_query.t/1.2/Wed Feb 1 13:23:38 2006//Tr1_4_5 -/check_nagios.nagios1.status.log/1.1/Fri Dec 2 22:28:06 2005//Tr1_4_5 -/check_nagios.nagios2.status.dat/1.1/Fri Dec 2 22:28:06 2005//Tr1_4_5 -/check_nagios.t/1.2/Wed Apr 19 09:33:44 2006//Tr1_4_5 -/check_ntp.t/1.2/Mon Aug 14 08:42:23 2006//Tr1_4_5 -/check_ping.t/1.3/Thu Sep 15 08:39:23 2005//Tr1_4_5 -/check_pop.t/1.3/Wed Mar 22 15:45:49 2006//Tr1_4_5 -/check_procs.t/1.5/Thu Nov 3 15:13:13 2005//Tr1_4_5 -/check_smtp.t/1.4/Thu Oct 19 11:56:34 2006//Tr1_4_5 -/check_snmp.t/1.2/Mon Jul 25 01:47:15 2005//Tr1_4_5 -/check_swap.t/1.3/Wed Nov 9 16:40:12 2005//Tr1_4_5 -/check_tcp.t/1.3/Mon Jul 25 01:47:15 2005//Tr1_4_5 -/check_time.t/1.3/Thu Nov 3 15:04:16 2005//Tr1_4_5 -/check_udp.t/1.6/Fri Jul 28 22:44:11 2006//Tr1_4_5 -/check_users.t/1.2/Mon Jul 25 01:47:15 2005//Tr1_4_5 -D diff --git a/plugins/t/CVS/Repository b/plugins/t/CVS/Repository deleted file mode 100644 index eb7b852..0000000 --- a/plugins/t/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -nagiosplug/plugins/t diff --git a/plugins/t/CVS/Root b/plugins/t/CVS/Root deleted file mode 100644 index f4a2783..0000000 --- a/plugins/t/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:ext:tonvoon@nagiosplug.cvs.sourceforge.net:/cvsroot/nagiosplug diff --git a/plugins/t/CVS/Tag b/plugins/t/CVS/Tag deleted file mode 100644 index 65ed4ef..0000000 --- a/plugins/t/CVS/Tag +++ /dev/null @@ -1 +0,0 @@ -Nr1_4_5 diff --git a/plugins/t/check_disk.t b/plugins/t/check_disk.t index e991617..d45d2ea 100644 --- a/plugins/t/check_disk.t +++ b/plugins/t/check_disk.t @@ -2,7 +2,7 @@ # # Disk Space Tests via check_disk # -# $Id: check_disk.t,v 1.14 2006/10/18 12:12:11 tonvoon Exp $ +# $Id: check_disk.t,v 1.20 2007/03/30 09:00:06 psychotrahe Exp $ # # TODO: Add in tests for perf data. Need to beef up Nagios::Plugin::Performance to cater for max, min, etc @@ -24,18 +24,24 @@ my $mountpoint2_valid = getTestParameter( "NP_MOUNTPOINT2_VALID", "Path to anoth if ($mountpoint_valid eq "" or $mountpoint2_valid eq "") { plan skip_all => "Need 2 mountpoints to test"; } else { - plan tests => 42; + plan tests => 68; } $result = NPTest->testCmd( "./check_disk -w 1% -c 1% -p $mountpoint_valid -w 1% -c 1% -p $mountpoint2_valid" ); -cmp_ok( $result->return_code, "==", 0, "Checking two mountpoints (must have at least 1% free)"); +cmp_ok( $result->return_code, "==", 0, "Checking two mountpoints (must have at least 1% free in space and inodes)"); my $c = 0; $_ = $result->output; $c++ while /\(/g; # counts number of "(" - should be two cmp_ok( $c, '==', 2, "Got two mountpoints in output"); + +# Get perf data +# Should use Nagios::Plugin +my @perf_data = sort(split(/ /, $result->perf_output)); + + # Calculate avg_free free on mountpoint1 and mountpoint2 # because if you check in the middle, you should get different errors $_ = $result->output; @@ -54,12 +60,67 @@ if ($free_on_mp1 > $free_on_mp2) { } +# Do same for inodes +$_ = $result->output; +my ($free_inode_on_mp1, $free_inode_on_mp2) = (m/inode=(\d+)%.*inode=(\d+)%/); +die "Cannot parse free inodes: $_" unless ($free_inode_on_mp1 && $free_inode_on_mp2); +my $avg_inode_free = ceil(($free_inode_on_mp1 + $free_inode_on_mp2)/2); +my ($more_inode_free, $less_inode_free); +if ($free_inode_on_mp1 > $free_inode_on_mp2) { + $more_inode_free = $mountpoint_valid; + $less_inode_free = $mountpoint2_valid; +} elsif ($free_inode_on_mp1 < $free_inode_on_mp2) { + $more_inode_free = $mountpoint2_valid; + $less_inode_free = $mountpoint_valid; +} else { + die "Two mountpoints with same inodes free - cannot do rest of test"; +} + +# Verify performance data +# First check absolute thresholds... +$result = NPTest->testCmd( + "./check_disk -w 20 -c 10 -p $mountpoint_valid" + ); +$_ = $result->perf_output; +my ($warn_absth_data, $crit_absth_data, $total_absth_data) = (m/=.[^;]*;(\d+);(\d+);\d+;(\d+)/); +is ($warn_absth_data, $total_absth_data - 20, "Wrong warning in perf data using absolute thresholds"); +is ($crit_absth_data, $total_absth_data - 10, "Wrong critical in perf data using absolute thresholds"); + +# Then check percent thresholds. +$result = NPTest->testCmd( + "./check_disk -w 20% -c 10% -p $mountpoint_valid" + ); +$_ = $result->perf_output; +my ($warn_percth_data, $crit_percth_data, $total_percth_data) = (m/=.[^;]*;(\d+);(\d+);\d+;(\d+)/); +is ($warn_percth_data, int((1-20/100)*$total_percth_data), "Wrong warning in perf data using percent thresholds"); +is ($crit_percth_data, int((1-10/100)*$total_percth_data), "Wrong critical in perf data using percent thresholds"); + + +# Check when order of mount points are reversed, that perf data remains same +$result = NPTest->testCmd( + "./check_disk -w 1% -c 1% -p $mountpoint2_valid -w 1% -c 1% -p $mountpoint_valid" + ); +@_ = sort(split(/ /, $result->perf_output)); +is_deeply( \@perf_data, \@_, "perf data for both filesystems same when reversed"); + + +# Basic filesystem checks for sizes $result = NPTest->testCmd( "./check_disk -w 1 -c 1 -p $more_free" ); cmp_ok( $result->return_code, '==', 0, "At least 1 MB available on $more_free"); like ( $result->output, $successOutput, "OK output" ); like ( $result->only_output, qr/free space/, "Have free space text"); like ( $result->only_output, qr/$more_free/, "Have disk name in text"); +$result = NPTest->testCmd( "./check_disk -w 1 -c 1 -p $more_free -p $less_free" ); +cmp_ok( $result->return_code, '==', 0, "At least 1 MB available on $more_free and $less_free"); +$_ = $result->output; +print $result->output."\n"; +my ($free_mb_on_mp1, $free_mb_on_mp2) = (m/(\d+) MB .* (\d+) MB /g); +my $free_mb_on_all = $free_mb_on_mp1 + $free_mb_on_mp2; +print "$free_mb_on_all = $free_mb_on_mp1 + $free_mb_on_mp2\n"; + + + $result = NPTest->testCmd( "./check_disk -e -w 1 -c 1 -p $more_free" ); is( $result->only_output, "DISK OK", "No print out of disks with -e for OKs"); @@ -76,8 +137,6 @@ cmp_ok( $result->return_code, "==", 2, "Get critical on less_free mountpoint $le like( $result->output, $failureOutput, "Right output" ); - - $result = NPTest->testCmd( "./check_disk -w $avg_free% -c 0% -p $less_free" ); @@ -98,12 +157,11 @@ $result = NPTest->testCmd( "./check_disk -e -w $avg_free% -c 0% -p $less_free -w $avg_free% -c $avg_free% -p $more_free" ); isnt( $result->output, $all_disks, "-e gives different output"); -like( $result->output, qr/$less_free/, "Found problem $less_free"); -unlike( $result->only_output, qr/$more_free/, "Has ignored $more_free as not a problem"); -like( $result->perf_output, qr/$more_free/, "But $more_free is still in perf data"); - - +# Need spaces around filesystem name in case less_free and more_free are nested +like( $result->output, qr/ $less_free /, "Found problem $less_free"); +unlike( $result->only_output, qr/ $more_free /, "Has ignored $more_free as not a problem"); +like( $result->perf_output, qr/ $more_free=/, "But $more_free is still in perf data"); $result = NPTest->testCmd( "./check_disk -w $avg_free% -c 0% -p $more_free" @@ -126,6 +184,50 @@ cmp_ok( $result->return_code, '==', 2, "And reversing arguments should not make +# Basic inode checks for sizes + +$result = NPTest->testCmd( "./check_disk --icritical 1% --iwarning 1% -p $more_inode_free" ); +is( $result->return_code, 0, "At least 1% free on inodes for both mountpoints"); + +$result = NPTest->testCmd( "./check_disk -K 100% -W 100% -p $less_inode_free" ); +is( $result->return_code, 2, "Critical requesting 100% free inodes for both mountpoints"); + +$result = NPTest->testCmd( "./check_disk --iwarning 1% --icritical 1% -p $more_inode_free -K 100% -W 100% -p $less_inode_free" ); +is( $result->return_code, 2, "Get critical on less_inode_free mountpoint $less_inode_free"); + +$result = NPTest->testCmd( "./check_disk -W $avg_inode_free% -K 0% -p $less_inode_free" ); +is( $result->return_code, 1, "Get warning on less_inode_free, when checking average"); + +$result = NPTest->testCmd( "./check_disk -W $avg_inode_free% -K $avg_inode_free% -p $more_inode_free "); +is( $result->return_code, 0, "Get ok on more_inode_free when checking average"); + +$result = NPTest->testCmd( "./check_disk -W $avg_inode_free% -K 0% -p $less_inode_free -W $avg_inode_free% -K $avg_inode_free% -p $more_inode_free" ); +is ($result->return_code, 1, "Combine above two tests, get warning"); +$all_disks = $result->output; + +$result = NPTest->testCmd( "./check_disk -e -W $avg_inode_free% -K 0% -p $less_inode_free -W $avg_inode_free% -K $avg_inode_free% -p $more_inode_free" ); +isnt( $result->output, $all_disks, "-e gives different output"); +like( $result->output, qr/$less_inode_free/, "Found problem $less_inode_free"); +unlike( $result->only_output, qr/$more_inode_free\s/, "Has ignored $more_inode_free as not a problem"); +like( $result->perf_output, qr/$more_inode_free/, "But $more_inode_free is still in perf data"); + +$result = NPTest->testCmd( "./check_disk -W $avg_inode_free% -K 0% -p $more_inode_free" ); +is( $result->return_code, 0, "Get ok on more_inode_free mountpoint, checking average"); + +$result = NPTest->testCmd( "./check_disk -W $avg_inode_free% -K $avg_inode_free% -p $less_inode_free" ); +is( $result->return_code, 2, "Get critical on less_inode_free, checking average"); + +$result = NPTest->testCmd( "./check_disk -W $avg_inode_free% -K 0% -p $more_inode_free -W $avg_inode_free% -K $avg_inode_free% -p $less_inode_free" ); +is( $result->return_code, 2, "Combining above two tests, get critical"); + +$result = NPTest->testCmd( "./check_disk -W $avg_inode_free% -K $avg_inode_free% -p $less_inode_free -W $avg_inode_free% -K 0% -p $more_inode_free" ); +cmp_ok( $result->return_code, '==', 2, "And reversing arguments should not make a difference"); + + + + + + TODO: { local $TODO = "Invalid percent figures"; $result = NPTest->testCmd( @@ -192,3 +294,28 @@ unlike( $result->perf_output, '/\/bob/', "perf data does not have /bob in it"); $result = NPTest->testCmd( "./check_disk -w 0% -c 0% -p / -p /" ); unlike( $result->output, '/ \/ .* \/ /', "Should not show same filesystem twice"); + +# are partitions added if -C is given without path selection -p ? +$result = NPTest->testCmd( "./check_disk -w 0% -c 0% -C -w 0% -c 0% -p $mountpoint_valid" ); +like( $result->output, '/;.*;\|/', "-C selects partitions if -p is not given"); + +# grouping: exit crit if the sum of free megs on mp1+mp2 is less than warn/crit +$result = NPTest->testCmd( "./check_disk -w ". ($free_mb_on_all + 1) ." -c ". ($free_mb_on_all + 1) ."-g group -p $mountpoint_valid -p $mountpoint2_valid" ); +cmp_ok( $result->return_code, '==', 2, "grouping: exit crit if the sum of free megs on mp1+mp2 is less than warn/crit"); + +# grouping: exit warning if the sum of free megs on mp1+mp2 is between -w and -c +$result = NPTest->testCmd( "./check_disk -w ". ($free_mb_on_all + 1) ." -c ". ($free_mb_on_all - 1) ." -g group -p $mountpoint_valid -p $mountpoint2_valid" ); +cmp_ok( $result->return_code, '==', 1, "grouping: exit warning if the sum of free megs on mp1+mp2 is between -w and -c "); + +# grouping: exit ok if the sum of free megs on mp1+mp2 is more than warn/crit +$result = NPTest->testCmd( "./check_disk -w ". ($free_mb_on_all - 1) ." -c ". ($free_mb_on_all - 1) ." -g group -p $mountpoint_valid -p $mountpoint2_valid" ); +cmp_ok( $result->return_code, '==', 0, "grouping: exit ok if the sum of free megs on mp1+mp2 is more than warn/crit"); + +# grouping: exit unknown if group name is given after -p +$result = NPTest->testCmd( "./check_disk -w ". ($free_mb_on_all - 1) ." -c ". ($free_mb_on_all - 1) ." -p $mountpoint_valid -g group -p $mountpoint2_valid" ); +cmp_ok( $result->return_code, '==', 3, "Invalid options: -p must come after groupname"); + +# regex: exit unknown if given regex is not compileable +$result = NPTest->testCmd( "./check_disk -w 1 -c 1 -r '('" ); +cmp_ok( $result->return_code, '==', 3, "Exit UNKNOWN if regex is not compileable"); + diff --git a/plugins/t/check_http.t b/plugins/t/check_http.t index 10fd760..9f52aab 100644 --- a/plugins/t/check_http.t +++ b/plugins/t/check_http.t @@ -2,14 +2,14 @@ # # HyperText Transfer Protocol (HTTP) Test via check_http # -# $Id: check_http.t,v 1.12 2006/10/19 18:59:58 tonvoon Exp $ +# $Id: check_http.t,v 1.14 2007/04/01 14:21:09 psychotrahe Exp $ # use strict; use Test::More; use NPTest; -plan tests => 22; +plan tests => 26; my $successOutput = '/OK.*HTTP.*second/'; @@ -27,6 +27,18 @@ my $hostname_invalid = getTestParameter( "NP_HOSTNAME_INVALID", "An invalid (not known to DNS) hostname", "nosuchhost"); +my $internet_access = getTestParameter( "NP_INTERNET_ACCESS", + "Is this system directly connected to the internet?", + "yes"); + +my $host_tcp_http2; +if ($internet_access eq "no") { + $host_tcp_http2 = getTestParameter( "NP_HOST_TCP_HTTP2", + "A host providing an index page containing the string 'nagios'", + "altinity.com" ); +} + + $res = NPTest->testCmd( "./check_http $host_tcp_http -wt 300 -ct 600" ); @@ -58,44 +70,62 @@ cmp_ok( $res->return_code, '==', 2, "Webserver $hostname_invalid not valid" ); # Is also possible to get a socket timeout if DNS is not responding fast enough like( $res->output, "/Unable to open TCP socket|Socket timeout after/", "Output OK"); -$res = NPTest->testCmd( - "./check_http --ssl www.verisign.com" - ); -cmp_ok( $res->return_code, '==', 0, "Can read https for www.verisign.com" ); +SKIP: { + skip "No internet access and no host serving nagios in index file", + 7 if $internet_access eq "no" && ! $host_tcp_http2; -$res = NPTest->testCmd( "./check_http -C 1 --ssl www.verisign.com" ); -cmp_ok( $res->return_code, '==', 0, "Checking certificate for www.verisign.com"); -like ( $res->output, '/Certificate will expire on/', "Output OK" ); -my $saved_cert_output = $res->output; + $host_tcp_http2 = "altinity.com" if (! $host_tcp_http2); -$res = NPTest->testCmd( "./check_http -C 1 www.verisign.com" ); -cmp_ok( $res->output, 'eq', $saved_cert_output, "--ssl option automatically added"); + $res = NPTest->testCmd( "./check_http -H $host_tcp_http2 -r 'nagios'" ); + cmp_ok( $res->return_code, "==", 0, "Got a reference to 'nagios'"); -$res = NPTest->testCmd( "./check_http www.verisign.com -C 1" ); -cmp_ok( $res->output, 'eq', $saved_cert_output, "Old syntax for cert checking still works"); + $res = NPTest->testCmd( "./check_http -H $host_tcp_http2 -r 'nAGiOs'" ); + cmp_ok( $res->return_code, "==", 2, "Not got 'nAGiOs'"); + like ( $res->output, "/pattern not found/", "Error message says 'pattern not found'"); -$res = NPTest->testCmd( - "./check_http --ssl www.e-paycobalt.com" - ); -cmp_ok( $res->return_code, "==", 0, "Can read https for www.e-paycobalt.com (uses AES certificate)" ); + $res = NPTest->testCmd( "./check_http -H $host_tcp_http2 -R 'nAGiOs'" ); + cmp_ok( $res->return_code, "==", 0, "But case insensitive doesn't mind 'nAGiOs'"); -$res = NPTest->testCmd( "./check_http -H altinity.com -r 'nagios'" ); -cmp_ok( $res->return_code, "==", 0, "Got a reference to 'nagios'"); + $res = NPTest->testCmd( "./check_http -H $host_tcp_http2 -r 'nagios' --invert-regex" ); + cmp_ok( $res->return_code, "==", 2, "Invert results work when found"); + like ( $res->output, "/pattern found/", "Error message says 'pattern found'"); -$res = NPTest->testCmd( "./check_http -H altinity.com -r 'nAGiOs'" ); -cmp_ok( $res->return_code, "==", 2, "Not got 'nAGiOs'"); -like ( $res->output, "/pattern not found/", "Error message says 'pattern not found'"); + $res = NPTest->testCmd( "./check_http -H $host_tcp_http2 -r 'nAGiOs' --invert-regex" ); + cmp_ok( $res->return_code, "==", 0, "And also when not found"); +} +SKIP: { + skip "No internet access", 11 if $internet_access eq "no"; -$res = NPTest->testCmd( "./check_http -H altinity.com -R 'nAGiOs'" ); -cmp_ok( $res->return_code, "==", 0, "But case insensitive doesn't mind 'nAGiOs'"); + $res = NPTest->testCmd( + "./check_http --ssl www.verisign.com" + ); + cmp_ok( $res->return_code, '==', 0, "Can read https for www.verisign.com" ); -$res = NPTest->testCmd( "./check_http -H altinity.com -r 'nagios' --invert-regex" ); -cmp_ok( $res->return_code, "==", 2, "Invert results work when found"); -like ( $res->output, "/pattern found/", "Error message says 'pattern found'"); + $res = NPTest->testCmd( "./check_http -C 1 --ssl www.verisign.com" ); + cmp_ok( $res->return_code, '==', 0, "Checking certificate for www.verisign.com"); + like ( $res->output, '/Certificate will expire on/', "Output OK" ); + my $saved_cert_output = $res->output; -$res = NPTest->testCmd( "./check_http -H altinity.com -r 'nAGiOs' --invert-regex" ); -cmp_ok( $res->return_code, "==", 0, "And also when not found"); + $res = NPTest->testCmd( "./check_http www.verisign.com -C 1" ); + is( $res->return_code, 0, "Old syntax for cert checking okay" ); + is( $res->output, $saved_cert_output, "Same output as new syntax" ); -$res = NPTest->testCmd( "./check_http -H www.worldfirefoxday.com -f follow" ); -is( $res->return_code, 0, "Redirection based on location is okay"); + $res = NPTest->testCmd( "./check_http -H www.verisign.com -C 1" ); + is( $res->return_code, 0, "Updated syntax for cert checking okay" ); + is( $res->output, $saved_cert_output, "Same output as new syntax" ); + $res = NPTest->testCmd( "./check_http -C 1 www.verisign.com" ); + cmp_ok( $res->output, 'eq', $saved_cert_output, "--ssl option automatically added"); + + $res = NPTest->testCmd( "./check_http www.verisign.com -C 1" ); + cmp_ok( $res->output, 'eq', $saved_cert_output, "Old syntax for cert checking still works"); + + $res = NPTest->testCmd( + "./check_http --ssl www.e-paycobalt.com" + ); + cmp_ok( $res->return_code, "==", 0, "Can read https for www.e-paycobalt.com (uses AES certificate)" ); + + + $res = NPTest->testCmd( "./check_http -H www.mozilla.com -u /firefox -f follow" ); + is( $res->return_code, 0, "Redirection based on location is okay"); +} diff --git a/plugins/t/check_jabber.t b/plugins/t/check_jabber.t new file mode 100644 index 0000000..a8890e0 --- /dev/null +++ b/plugins/t/check_jabber.t @@ -0,0 +1,65 @@ +#! /usr/bin/perl -w -I .. +# +# Jabber Server Tests via check_jabber +# +# $Id: check_jabber.t,v 1.3 2007/02/01 06:53:12 dermoth Exp $ +# + +use strict; +use Test::More; +use NPTest; + +plan tests => 10; + +my $host_tcp_jabber = getTestParameter( + "NP_HOST_TCP_JABBER", + "A host providing the Jabber Service", + "jabber.org" + ); + +my $host_nonresponsive = getTestParameter( + "NP_HOST_NONRESPONSIVE", + "The hostname of system not responsive to network requests", + "10.0.0.1", + ); + +my $hostname_invalid = getTestParameter( + "NP_HOSTNAME_INVALID", + "An invalid (not known to DNS) hostname", + "nosuchhost", + ); + + +my $jabberOK = '/JABBER OK\s-\s\d+\.\d+\ssecond response time on port 5222/'; + +my $jabberUnresponsive = '/CRITICAL\s-\sSocket timeout after\s\d+\sseconds/'; + +my $jabberInvalid = '/JABBER CRITICAL - Invalid hostname, address or socket:\s.+/'; + +my $r; + +SKIP: { + skip "No jabber server defined", 6 unless $host_tcp_jabber; + + $r = NPTest->testCmd( "./check_jabber $host_tcp_jabber" ); + is( $r->return_code, 0, "Connected okay"); + like( $r->output, $jabberOK, "Output as expected" ); + + $r = NPTest->testCmd( "./check_jabber -H $host_tcp_jabber -w 9 -c 9 -t 10" ); + is( $r->return_code, 0, "Connected okay, within limits" ); + like( $r->output, $jabberOK, "Output as expected" ); + + $r = NPTest->testCmd( "./check_jabber $host_tcp_jabber -wt 9 -ct 9 -to 10" ); + is( $r->return_code, 0, "Old syntax okay" ); + like( $r->output, $jabberOK, "Output as expected" ); + +} + +$r = NPTest->testCmd( "./check_jabber $host_nonresponsive" ); +is( $r->return_code, 2, "Unresponsive host gives critical" ); +like( $r->output, $jabberUnresponsive ); + +$r = NPTest->testCmd( "./check_jabber $hostname_invalid" ); +is( $r->return_code, 2, "Invalid hostname gives critical" ); +like( $r->output, $jabberInvalid ); + diff --git a/plugins/t/check_ping.t b/plugins/t/check_ping.t index 488bb79..d1edcad 100644 --- a/plugins/t/check_ping.t +++ b/plugins/t/check_ping.t @@ -2,36 +2,109 @@ # # Ping Response Tests via check_ping # -# $Id: check_ping.t,v 1.3 2005/09/15 08:39:23 tonvoon Exp $ +# $Id: check_ping.t,v 1.5 2007/03/12 10:51:06 tonvoon Exp $ # use strict; -use Test; +use Test::More; use NPTest; -use vars qw($tests); - -BEGIN {$tests = 8; plan tests => $tests} +plan tests => 20; my $successOutput = '/PING (ok|OK) - Packet loss = +[0-9]{1,2}\%, +RTA = [\.0-9]+ ms/'; my $failureOutput = '/Packet loss = +[0-9]{1,2}\%, +RTA = [\.0-9]+ ms/'; -my $host_responsive = getTestParameter( "host_responsive", "NP_HOST_RESPONSIVE", "localhost", - "The hostname of system responsive to network requests" ); +my $host_responsive = getTestParameter( "NP_HOST_RESPONSIVE", + "The hostname of system responsive to network requests", + "localhost" ); -my $host_nonresponsive = getTestParameter( "host_nonresponsive", "NP_HOST_NONRESPONSIVE", "10.0.0.1", - "The hostname of system not responsive to network requests" ); +my $host_nonresponsive = getTestParameter( "NP_HOST_NONRESPONSIVE", + "The hostname of system not responsive to network requests", + "10.0.0.1" ); -my $hostname_invalid = getTestParameter( "hostname_invalid", "NP_HOSTNAME_INVALID", "nosuchhost", - "An invalid (not known to DNS) hostname" ); +my $hostname_invalid = getTestParameter( "NP_HOSTNAME_INVALID", + "An invalid (not known to DNS) hostname", + "nosuchhost" ); -my $t; +my $res; -$t += checkCmd( "./check_ping $host_responsive 100 100 1000 1000 -p 1", 0, $successOutput ); -$t += checkCmd( "./check_ping $host_responsive 0 0 0 0 -p 1", 2, $failureOutput ); -$t += checkCmd( "./check_ping $host_nonresponsive 0 0 0 0 -p 1 -to 1", 2 ); -$t += checkCmd( "./check_ping $hostname_invalid 0 0 0 0 -p 1 -to 1", 3 ); -$t += checkCmd( "./check_ping -w 100,10% -c 200,20%" , 3 , "/You must specify a server address or host name.*/"); +$res = NPTest->testCmd( + "./check_ping -H $host_responsive -w 10,100% -c 10,100% -p 1" + ); +is( $res->return_code, 0, "Syntax ok" ); +like( $res->output, $successOutput, "Output OK" ); + +$res = NPTest->testCmd( + "./check_ping -H $host_responsive -w 0,0% -c 10,100% -p 1" + ); +is( $res->return_code, 1, "Syntax ok, with forced warning" ); +like( $res->output, $failureOutput, "Output OK" ); + +$res = NPTest->testCmd( + "./check_ping -H $host_responsive -w 0,0% -c 0,0% -p 1" + ); +is( $res->return_code, 2, "Syntax ok, with forced critical" ); +like( $res->output, $failureOutput, "Output OK" ); + +$res = NPTest->testCmd( + "./check_ping $host_responsive 100 100 1000 1000 -p 1" + ); +is( $res->return_code, 0, "Old syntax ok" ); +like( $res->output, $successOutput, "Output OK" ); + +$res = NPTest->testCmd( + "./check_ping $host_responsive 0 0 0 0 -p 1" + ); +is( $res->return_code, 2, "Old syntax, with forced critical" ); +like( $res->output, $failureOutput, "Output OK" ); + + +# check_ping results will depend on whether the ping command discovered by +# ./configure has a timeout option. If it does, then the timeout will +# be set, so check_ping will always get a response. If it doesn't +# then check_ping will timeout. We do 2 tests for check_ping's timeout +# - 1 second +# - 15 seconds +# The latter should be higher than normal ping timeouts, so should always give a packet loss result +open(F, "../config.h") or die "Cannot open ../config.h"; +@_ = grep /define PING_HAS_TIMEOUT 1|define PING_PACKETS_FIRST 1/, ; +my $has_timeout; +$has_timeout = 1 if (scalar @_ == 2); # Need both defined +close F; +$res = NPTest->testCmd( + "./check_ping -H $host_nonresponsive -w 10,100% -c 10,100% -p 1 -t 1" + ); +is( $res->return_code, 2, "Timeout 1 second - host nonresponsive" ); +if ($has_timeout) { + like( $res->output, '/100%/', "Error contains '100%' string (for 100% packet loss)" ); +} else { + like( $res->output, '/timed out/', "Error contains 'timed out' string" ); +} + +$res = NPTest->testCmd( + "./check_ping -H $host_nonresponsive -w 10,100% -c 10,100% -p 1 -t 15" + ); +is( $res->return_code, 2, "Timeout 15 seconds - host nonresponsive" ); +like( $res->output, '/100%/', "Error contains '100%' string (for 100% packet loss)" ); + + + + +$res = NPTest->testCmd( + "./check_ping $host_nonresponsive -p 1 -t 1 100 100 1000 10000" + ); +is( $res->return_code, 2, "Old syntax: Timeout - host nonresponsive" ); +like( $res->output, '/100%/', "Error contains '100%' string (for 100% packet loss)" ); + +$res = NPTest->testCmd( + "./check_ping $hostname_invalid 0 0 0 0 -p 1 -t 1" + ); +is( $res->return_code, 3, "Invalid hostname" ); +like( $res->output, '/invalid hostname/i', "Error contains 'invalid hostname' string"); + +$res = NPTest->testCmd( + "./check_ping -w 100,10% -c 200,20%" + ); +is( $res->return_code, 3, "No hostname" ); +like( $res->output, '/You must specify a server address or host name/', "Output with appropriate error message"); -exit(0) if defined($Test::Harness::VERSION); -exit($tests - $t); diff --git a/plugins/t/check_snmp.t b/plugins/t/check_snmp.t index 347dbf0..0a2688e 100644 --- a/plugins/t/check_snmp.t +++ b/plugins/t/check_snmp.t @@ -2,7 +2,7 @@ # # Simple Network Management Protocol (SNMP) Test via check_snmp # -# $Id: check_snmp.t,v 1.2 2005/07/25 01:47:15 illumino Exp $ +# $Id: check_snmp.t,v 1.3 2006/12/23 18:59:36 dermoth Exp $ # use strict; @@ -35,13 +35,13 @@ if ( -x "./check_snmp" ) { 0 => 'continue', 3 => 'skip' }, '/^SNMP OK - \d+/', %exceptions ); $t += checkCmd( "./check_snmp -H $host_snmp -C $snmp_community -o host.hrSWRun.hrSWRunTable.hrSWRunEntry.hrSWRunIndex.1 -w 1:1 -c 1:1", - { 0 => 'continue', 3 => 'skip' }, '/^SNMP OK - 1\s*$/', %exceptions ); + { 0 => 'continue', 3 => 'skip' }, '/^SNMP OK - 1\s.*$/', %exceptions ); $t += checkCmd( "./check_snmp -H $host_snmp -C $snmp_community -o host.hrSWRun.hrSWRunTable.hrSWRunEntry.hrSWRunIndex.1 -w 0 -c 1:", - { 1 => 'continue', 3 => 'skip' }, '/^SNMP WARNING - \*1\*\s*$/', %exceptions ); + { 1 => 'continue', 3 => 'skip' }, '/^SNMP WARNING - \*1\*\s.*$/', %exceptions ); $t += checkCmd( "./check_snmp -H $host_snmp -C $snmp_community -o host.hrSWRun.hrSWRunTable.hrSWRunEntry.hrSWRunIndex.1 -w :0 -c 0", - { 2 => 'continue', 3 => 'skip' }, '/^SNMP CRITICAL - \*1\*\s*$/', %exceptions ); + { 2 => 'continue', 3 => 'skip' }, '/^SNMP CRITICAL - \*1\*\s.*$/', %exceptions ); $t += checkCmd( "./check_snmp -H $host_nonresponsive -C $snmp_community -o system.sysUpTime.0 -w 1: -c 1:", 3, '/SNMP problem - /' ); diff --git a/plugins/t/check_tcp.t b/plugins/t/check_tcp.t index cdfe579..f7ec79e 100644 --- a/plugins/t/check_tcp.t +++ b/plugins/t/check_tcp.t @@ -2,7 +2,7 @@ # # TCP Connection Based Tests via check_tcp # -# $Id: check_tcp.t,v 1.3 2005/07/25 01:47:15 illumino Exp $ +# $Id: check_tcp.t,v 1.5 2007/02/14 10:11:07 tonvoon Exp $ # use strict; @@ -10,7 +10,7 @@ use Test; use NPTest; use vars qw($tests); -BEGIN {$tests = 5; plan tests => $tests} +BEGIN {$tests = 7; plan tests => $tests} my $host_tcp_http = getTestParameter( "host_tcp_http", "NP_HOST_TCP_HTTP", "localhost", "A host providing the HTTP Service (a web server)" ); @@ -23,6 +23,8 @@ my $hostname_invalid = getTestParameter( "hostname_invalid", "NP_HOSTNAME_IN my $successOutput = '/^TCP OK\s-\s+[0-9]?\.?[0-9]+ second response time on port [0-9]+/'; +my $failedExpect = '/^TCP WARNING\s-\sUnexpected response from host/socket on port [0-9]+/'; + my $t; $t += checkCmd( "./check_tcp $host_tcp_http -p 80 -wt 300 -ct 600", 0, $successOutput ); @@ -30,5 +32,9 @@ $t += checkCmd( "./check_tcp $host_tcp_http -p 81 -wt 0 -ct 0 -to 1", 2 $t += checkCmd( "./check_tcp $host_nonresponsive -p 80 -wt 0 -ct 0 -to 1", 2 ); $t += checkCmd( "./check_tcp $hostname_invalid -p 80 -wt 0 -ct 0 -to 1", 2 ); +# Need the \r\n to make it more standards compliant with web servers. Need the various quotes +# so that perl doesn't interpret the \r\n and is passed onto command line correctly +$t += checkCmd( "./check_tcp $host_tcp_http -p 80 -E -s ".'"GET /\r\n\r\n"'." -e 'ThisShouldntMatch' -j", 1, $failedExpect ); + exit(0) if defined($Test::Harness::VERSION); exit($tests - $t); diff --git a/plugins/urlize.c b/plugins/urlize.c index d5bc051..b80f854 100644 --- a/plugins/urlize.c +++ b/plugins/urlize.c @@ -5,7 +5,7 @@ * License: GPL * Copyright (c) 2000-2006 nagios-plugins team * -* Last Modified: $Date: 2006/10/19 23:53:28 $ +* Last Modified: $Date: 2007/01/28 21:46:41 $ * * Description: * @@ -32,12 +32,12 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - $Id: urlize.c,v 1.21 2006/10/19 23:53:28 opensides Exp $ + $Id: urlize.c,v 1.22 2007/01/28 21:46:41 hweiss Exp $ ******************************************************************************/ const char *progname = "urlize"; -const char *revision = "$Revision: 1.21 $"; +const char *revision = "$Revision: 1.22 $"; const char *copyright = "2000-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -100,7 +100,7 @@ main (int argc, char **argv) break; case '?': default: - usage2 (_("Unknown argument"), optarg); + usage5 (); } } diff --git a/plugins/utils.c b/plugins/utils.c index bb29f9b..0ee1fe4 100644 --- a/plugins/utils.c +++ b/plugins/utils.c @@ -8,8 +8,8 @@ * Copyright (c) 2006 Nagios Plugin Development Team * License: GPL * - * $Revision: 1.50 $ - * $Date: 2006/07/13 12:50:21 $ + * $Revision: 1.51 $ + * $Date: 2007/01/28 21:46:41 $ ****************************************************************************/ #define LOCAL_TIMEOUT_ALARM_HANDLER @@ -94,6 +94,13 @@ usage4 (const char *msg) exit (STATE_UNKNOWN); } +void +usage5 (void) +{ + print_usage(); + exit (STATE_UNKNOWN); +} + char * clean_revstring (const char *revstring) { diff --git a/plugins/utils.h b/plugins/utils.h index 29930b1..ad4a103 100644 --- a/plugins/utils.h +++ b/plugins/utils.h @@ -18,7 +18,7 @@ suite of plugins. */ /* Standardize version information, termination */ -/* $Id: utils.h,v 1.32 2006/09/02 20:41:18 seanius Exp $ */ +/* $Id: utils.h,v 1.33 2007/01/28 21:46:41 hweiss Exp $ */ void support (void); char *clean_revstring (const char *); @@ -80,8 +80,9 @@ int max_state (int a, int b); void usage (const char *) __attribute__((noreturn)); void usage2(const char *, const char *) __attribute__((noreturn)); void usage3(const char *, int) __attribute__((noreturn)); -void usage4(const char *); -void usage_va(const char *fmt, ...); +void usage4(const char *) __attribute__((noreturn)); +void usage5(void) __attribute__((noreturn)); +void usage_va(const char *fmt, ...) __attribute__((noreturn)); const char *state_text (int); diff --git a/po/Makefile.in.in b/po/Makefile.in.in index 12b73cf..e7d1ab2 100644 --- a/po/Makefile.in.in +++ b/po/Makefile.in.in @@ -1,5 +1,7 @@ +# -*- buffer-read-only: t -*- vi: set ro: +# DO NOT EDIT! GENERATED AUTOMATICALLY! # Makefile for PO directory in any package using GNU gettext. -# Copyright (C) 1995-1997, 2000-2005 by Ulrich Drepper +# Copyright (C) 1995-1997, 2000-2006 by Ulrich Drepper # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU General Public @@ -25,17 +27,26 @@ prefix = @prefix@ exec_prefix = @exec_prefix@ datarootdir = @datarootdir@ datadir = @datadir@ -localedir = $(datadir)/locale +localedir = @localedir@ gettextsrcdir = $(datadir)/gettext/po INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ -MKINSTALLDIRS = @MKINSTALLDIRS@ -mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) +mkinstalldirs = $(SHELL) @install_sh@ -d +mkdir_p = @mkdir_p@ -GMSGFMT = @GMSGFMT@ -MSGFMT = @MSGFMT@ -XGETTEXT = @XGETTEXT@ +GMSGFMT_ = @GMSGFMT@ +GMSGFMT_no = @GMSGFMT@ +GMSGFMT_yes = @GMSGFMT_015@ +GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT)) +MSGFMT_ = @MSGFMT@ +MSGFMT_no = @MSGFMT@ +MSGFMT_yes = @MSGFMT_015@ +MSGFMT = $(MSGFMT_$(USE_MSGCTXT)) +XGETTEXT_ = @XGETTEXT@ +XGETTEXT_no = @XGETTEXT@ +XGETTEXT_yes = @XGETTEXT_015@ +XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) MSGMERGE = msgmerge MSGMERGE_UPDATE = @MSGMERGE@ --update MSGINIT = msginit @@ -159,7 +170,7 @@ install: install-exec install-data install-exec: install-data: install-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ - $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ + $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ for file in $(DISTFILES.common) Makevars.template; do \ $(INSTALL_DATA) $(srcdir)/$$file \ $(DESTDIR)$(gettextsrcdir)/$$file; \ @@ -172,13 +183,13 @@ install-data: install-data-@USE_NLS@ fi install-data-no: all install-data-yes: all - $(mkinstalldirs) $(DESTDIR)$(datadir) + $(mkdir_p) $(DESTDIR)$(datadir) @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ - $(mkinstalldirs) $(DESTDIR)$$dir; \ + $(mkdir_p) $(DESTDIR)$$dir; \ if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ @@ -218,19 +229,19 @@ installdirs: installdirs-exec installdirs-data installdirs-exec: installdirs-data: installdirs-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ - $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ + $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ else \ : ; \ fi installdirs-data-no: installdirs-data-yes: - $(mkinstalldirs) $(DESTDIR)$(datadir) + $(mkdir_p) $(DESTDIR)$(datadir) @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ - $(mkinstalldirs) $(DESTDIR)$$dir; \ + $(mkdir_p) $(DESTDIR)$$dir; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ @@ -375,7 +386,7 @@ update-gmo: Makefile $(GMOFILES) Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ cd $(top_builddir) \ - && $(SHELL) ./config.status $(subdir)/$@.in + && $(SHELL) ./config.status $(subdir)/$@.in po-directories force: diff --git a/po/Makevars b/po/Makevars index c5720e6..afd9a6e 100644 --- a/po/Makevars +++ b/po/Makevars @@ -23,3 +23,7 @@ COPYRIGHT_HOLDER = Nagios Plugin Development Group # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = + +# Email address were to send bug report for the .po translation files +PACKAGE_BUGREPORT = nagiosplug-devel@lists.sourceforge.net + diff --git a/po/POTFILES.in b/po/POTFILES.in index 5a90074..d08c694 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -14,6 +14,7 @@ plugins/check_mrtgtraf.c plugins/check_mysql.c plugins/check_nagios.c plugins/check_nt.c +plugins/check_ntp.c plugins/check_nwstat.c plugins/check_overcr.c plugins/check_pgsql.c @@ -30,8 +31,6 @@ plugins/check_time.c plugins/check_ups.c plugins/check_users.c plugins/check_ide_smart.c -plugins/getaddrinfo.c -plugins/gethostbyname.c plugins/negate.c plugins/netutils.c plugins/popen.c diff --git a/po/de.gmo b/po/de.gmo index 0823767..0e82ed8 100644 Binary files a/po/de.gmo and b/po/de.gmo differ diff --git a/po/de.po b/po/de.po index d86c1a2..d898c5f 100644 --- a/po/de.po +++ b/po/de.po @@ -8,98 +8,90 @@ msgid "" msgstr "" "Project-Id-Version: nagiosplug\n" -"POT-Creation-Date: 2006-04-15 00:41+0200\n" +"Report-Msgid-Bugs-To: nagiosplug-devel@lists.sourceforge.net\n" +"POT-Creation-Date: 2007-04-10 03:05-0400\n" "PO-Revision-Date: 2004-12-23 17:46+0100\n" "Last-Translator: <>\n" "Language-Team: English \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -"Report-Msgid-Bugs-To: \n" "Plural-Forms: nplurals=2; plural=(n > 1);X-Generator: KBabel 1.3.1\n" -#: plugins-root/check_dhcp.c:251 plugins/check_by_ssh.c:69 -#: plugins/check_dig.c:76 plugins/check_disk.c:177 plugins/check_dns.c:78 -#: plugins/check_dummy.c:43 plugins/check_fping.c:73 plugins/check_game.c:68 -#: plugins/check_hpjd.c:89 plugins/check_http.c:130 plugins/check_ldap.c:92 -#: plugins/check_load.c:106 plugins/check_mrtgtraf.c:66 -#: plugins/check_mysql.c:65 plugins/check_nagios.c:75 plugins/check_nt.c:120 -#: plugins/check_nwstat.c:125 plugins/check_overcr.c:89 -#: plugins/check_pgsql.c:140 plugins/check_ping.c:83 plugins/check_procs.c:128 -#: plugins/check_radius.c:117 plugins/check_real.c:68 plugins/check_smtp.c:166 -#: plugins/check_snmp.c:168 plugins/check_ssh.c:61 plugins/check_swap.c:90 -#: plugins/check_tcp.c:195 plugins/check_time.c:66 plugins/check_udp.c:55 -#: plugins/check_ups.c:115 plugins/check_users.c:54 plugins/negate.c:87 +#: plugins/check_by_ssh.c:82 plugins/check_dig.c:89 plugins/check_disk.c:192 +#: plugins/check_dns.c:93 plugins/check_dummy.c:59 plugins/check_fping.c:89 +#: plugins/check_game.c:84 plugins/check_hpjd.c:106 plugins/check_http.c:147 +#: plugins/check_ldap.c:105 plugins/check_load.c:122 +#: plugins/check_mrtgtraf.c:83 plugins/check_mysql.c:88 +#: plugins/check_nagios.c:94 plugins/check_nt.c:126 plugins/check_ntp.c:758 +#: plugins/check_nwstat.c:177 plugins/check_overcr.c:106 +#: plugins/check_pgsql.c:156 plugins/check_ping.c:99 plugins/check_procs.c:143 +#: plugins/check_radius.c:133 plugins/check_real.c:85 plugins/check_smtp.c:180 +#: plugins/check_snmp.c:182 plugins/check_ssh.c:78 plugins/check_swap.c:113 +#: plugins/check_tcp.c:208 plugins/check_time.c:82 plugins/check_ups.c:125 +#: plugins/check_users.c:70 plugins/negate.c:102 plugins-root/check_dhcp.c:256 msgid "Could not parse arguments" msgstr "Argumente konnten nicht ausgewertet werden" -#: plugins/check_by_ssh.c:73 plugins/check_dig.c:73 plugins/check_dns.c:74 -#: plugins/check_nagios.c:79 plugins/check_pgsql.c:144 plugins/check_ping.c:87 -#: plugins/check_procs.c:135 plugins/negate.c:91 +#: plugins/check_by_ssh.c:86 plugins/check_dig.c:86 plugins/check_dns.c:89 +#: plugins/check_nagios.c:98 plugins/check_pgsql.c:160 +#: plugins/check_ping.c:103 plugins/check_procs.c:150 plugins/negate.c:106 msgid "Cannot catch SIGALRM" msgstr "Konnte SIGALRM nicht erhalten" -#: plugins/check_by_ssh.c:84 +#: plugins/check_by_ssh.c:97 #, c-format msgid "Remote command execution failed: %s\n" msgstr "" -#: plugins/check_by_ssh.c:85 +#: plugins/check_by_ssh.c:98 #, fuzzy msgid "Unknown error" msgstr "Papierfehler" -#: plugins/check_by_ssh.c:103 +#: plugins/check_by_ssh.c:116 #, c-format msgid "SSH WARNING: could not open %s\n" msgstr "SSH WARNING: Konnte %s nicht öffnen\n" -#: plugins/check_by_ssh.c:185 plugins/check_disk.c:366 -#: plugins/check_http.c:225 plugins/check_ldap.c:268 plugins/check_pgsql.c:221 -#: plugins/check_procs.c:359 plugins/check_radius.c:198 -#: plugins/check_radius.c:268 plugins/check_real.c:344 -#: plugins/check_smtp.c:595 plugins/check_snmp.c:479 plugins/check_ssh.c:125 -#: plugins/check_tcp.c:483 plugins/check_time.c:290 plugins/check_udp.c:180 -#: plugins/check_ups.c:545 plugins/negate.c:188 +#: plugins/check_by_ssh.c:200 plugins/check_disk.c:507 +#: plugins/check_http.c:241 plugins/check_ldap.c:281 plugins/check_pgsql.c:237 +#: plugins/check_procs.c:371 plugins/check_radius.c:215 +#: plugins/check_radius.c:285 plugins/check_real.c:361 +#: plugins/check_smtp.c:629 plugins/check_snmp.c:494 plugins/check_ssh.c:143 +#: plugins/check_tcp.c:500 plugins/check_time.c:306 plugins/check_ups.c:555 +#: plugins/negate.c:203 msgid "Timeout interval must be a positive integer" msgstr "Timeout interval muss ein positiver Integer sein" -#: plugins/check_by_ssh.c:195 plugins/check_pgsql.c:245 -#: plugins/check_radius.c:207 plugins/check_radius.c:241 -#: plugins/check_real.c:315 plugins/check_smtp.c:527 plugins/check_tcp.c:489 -#: plugins/check_time.c:284 plugins/check_udp.c:186 plugins/check_ups.c:507 +#: plugins/check_by_ssh.c:210 plugins/check_pgsql.c:261 +#: plugins/check_radius.c:224 plugins/check_radius.c:258 +#: plugins/check_real.c:332 plugins/check_smtp.c:561 plugins/check_tcp.c:506 +#: plugins/check_time.c:300 plugins/check_ups.c:517 msgid "Port must be a positive integer" msgstr "Port muss ein positiver Integer sein" -#: plugins/check_by_ssh.c:239 +#: plugins/check_by_ssh.c:254 msgid "skip lines must be an integer" msgstr "skip lines muss ein Integer sein" -#: plugins/check_by_ssh.c:244 plugins/check_dig.c:255 plugins/check_dns.c:358 -#: plugins/check_game.c:236 plugins/check_nagios.c:242 -#, fuzzy, c-format -msgid "Unknown argument - %s" -msgstr "" -"%s: Unbekanntes Argument: %s\n" -"\n" - -#: plugins/check_by_ssh.c:251 +#: plugins/check_by_ssh.c:272 #, c-format msgid "%s: You must provide a host name\n" msgstr "%s: Hostname muss angegeben werden\n" -#: plugins/check_by_ssh.c:269 +#: plugins/check_by_ssh.c:290 msgid "No remotecmd" msgstr "Kein remotecm" -#: plugins/check_by_ssh.c:285 +#: plugins/check_by_ssh.c:306 #, c-format msgid "" "%s: In passive mode, you must provide a service name for each command.\n" msgstr "" "%s: Im passive mode muss ein Servicename für jeden Befehl angegeben werden.\n" -#: plugins/check_by_ssh.c:288 +#: plugins/check_by_ssh.c:309 #, c-format msgid "" "%s: In passive mode, you must provide the host short name from the nagios " @@ -108,153 +100,188 @@ msgstr "" "%s: Im passive mode muss der \"host short name\" aus der Nagios " "Konfiguration angegeben werden\n" -#: plugins/check_by_ssh.c:302 -#, c-format -msgid "" -"This plugin uses SSH to execute commands on a remote host\n" -"\n" +#: plugins/check_by_ssh.c:323 +#, fuzzy, c-format +msgid "This plugin uses SSH to execute commands on a remote host" msgstr "" "Dieses Plugin nutzt SSH um Befehle auf dem entfernten Rechner auszuführen\n" "\n" -#: plugins/check_by_ssh.c:312 -#, c-format -msgid "" -" -1, --proto1\n" -" tell ssh to use Protocol 1\n" -" -2, --proto2\n" -" tell ssh to use Protocol 2\n" -" -S, --skiplines=n\n" -" Ignore first n lines on STDERR (to suppress a logon banner)\n" -" -f\n" -" tells ssh to fork rather than create a tty\n" +#: plugins/check_by_ssh.c:336 +msgid "tell ssh to use Protocol 1" msgstr "" -" -1, --proto1\n" -" ssh anweisen Protokoll 1 zu verwenden\n" -" -2, --proto2\n" -" ssh anweisen Protokoll 2 zu verwenden\n" -" -S, --skiplines=n\n" -" Ignoriere die ersten n Zeilen auf STDERR (um Logon Banner zu " -"unterdrücken)\n" -" -f\n" -" ssh anweisen fork zu nutzen statt ein tty zu erzeugen\n" -#: plugins/check_by_ssh.c:322 -#, c-format -msgid "" -" -C, --command='COMMAND STRING'\n" -" command to execute on the remote machine\n" -" -l, --logname=USERNAME\n" -" SSH user name on remote host [optional]\n" -" -i, --identity=KEYFILE\n" -" identity of an authorized key [optional]\n" -" -O, --output=FILE\n" -" external command file for nagios [optional]\n" -" -s, --services=LIST\n" -" list of nagios service names, separated by ':' [optional]\n" -" -n, --name=NAME\n" -" short name of host in nagios configuration [optional]\n" +#: plugins/check_by_ssh.c:338 +msgid "tell ssh to use Protocol 2" msgstr "" -" -C, --command='COMMAND STRING'\n" -" Befehl der auf der entfernten Maschine ausgeführt werden soll\n" -" -l, --logname=USERNAME\n" -" SSH user name auf dem entfernten Host [optional]\n" -" -i, --identity=KEYFILE\n" -" zu verwendende Schlüsseldatei [optional]\n" -" -O, --output=FILE\n" -" externe Befehlsdatei für nagios [optional]\n" -" -s, --services=LIST\n" -" Liste von nagios Servicenamen, getrennt durch ':' [optional]\n" -" -n, --name=NAME\n" -" Shortname des Hosts in der nagios Konfiguration [optional]\n" #: plugins/check_by_ssh.c:340 -#, c-format -msgid "" -"\n" -"The most common mode of use is to refer to a local identity file with\n" -"the '-i' option. In this mode, the identity pair should have a null\n" -"passphrase and the public key should be listed in the authorized_keys\n" -"file of the remote host. Usually the key will be restricted to running\n" -"only one command on the remote server. If the remote SSH server tracks\n" -"invocation arguments, the one remote program may be an agent that can\n" -"execute additional commands as proxy\n" +msgid "Ignore first n lines on STDERR (to suppress a logon banner)" msgstr "" -#: plugins/check_by_ssh.c:349 -#, c-format -msgid "" -"\n" -"To use passive mode, provide multiple '-C' options, and provide\n" -"all of -O, -s, and -n options (servicelist order must match '-C'\n" -"options)\n" +#: plugins/check_by_ssh.c:342 +msgid "tells ssh to fork rather than create a tty" msgstr "" -#: plugins/check_dig.c:88 plugins/check_dig.c:90 +#: plugins/check_by_ssh.c:344 +msgid "command to execute on the remote machine" +msgstr "" + +#: plugins/check_by_ssh.c:346 +msgid "SSH user name on remote host [optional]" +msgstr "" + +#: plugins/check_by_ssh.c:348 +msgid "identity of an authorized key [optional]" +msgstr "" + +#: plugins/check_by_ssh.c:350 +msgid "external command file for nagios [optional]" +msgstr "" + +#: plugins/check_by_ssh.c:352 +msgid "list of nagios service names, separated by ':' [optional]" +msgstr "" + +#: plugins/check_by_ssh.c:354 +msgid "short name of host in nagios configuration [optional]" +msgstr "" + +#: plugins/check_by_ssh.c:356 +msgid "Call ssh with '-o OPTION' (may be used multiple times) [optional]" +msgstr "" + +#: plugins/check_by_ssh.c:358 +msgid "Tell ssh to suppress warning and diagnostic messages [optional]" +msgstr "" + +#: plugins/check_by_ssh.c:361 +msgid "The most common mode of use is to refer to a local identity file with" +msgstr "" + +#: plugins/check_by_ssh.c:362 +msgid "the '-i' option. In this mode, the identity pair should have a null" +msgstr "" + +#: plugins/check_by_ssh.c:363 +msgid "passphrase and the public key should be listed in the authorized_keys" +msgstr "" + +#: plugins/check_by_ssh.c:364 +msgid "file of the remote host. Usually the key will be restricted to running" +msgstr "" + +#: plugins/check_by_ssh.c:365 +msgid "only one command on the remote server. If the remote SSH server tracks" +msgstr "" + +#: plugins/check_by_ssh.c:366 +msgid "invocation arguments, the one remote program may be an agent that can" +msgstr "" + +#: plugins/check_by_ssh.c:367 +msgid "execute additional commands as proxy" +msgstr "" + +#: plugins/check_by_ssh.c:368 +msgid "To use passive mode, provide multiple '-C' options, and provide" +msgstr "" + +#: plugins/check_by_ssh.c:369 +msgid "" +"all of -O, -s, and -n options (servicelist order must match '-C'options)" +msgstr "" + +#: plugins/check_by_ssh.c:371 plugins/check_disk.c:901 +#: plugins/check_http.c:1324 plugins/check_nagios.c:303 +#: plugins/check_procs.c:735 plugins/negate.c:269 plugins/urlize.c:187 +#, c-format +msgid "Examples:" +msgstr "" + +#: plugins/check_by_ssh.c:385 plugins/check_dig.c:336 plugins/check_disk.c:912 +#: plugins/check_dns.c:447 plugins/check_dummy.c:127 plugins/check_fping.c:407 +#: plugins/check_game.c:334 plugins/check_hpjd.c:415 plugins/check_http.c:1347 +#: plugins/check_ldap.c:411 plugins/check_load.c:311 plugins/check_mrtg.c:383 +#: plugins/check_mysql.c:407 plugins/check_nagios.c:313 plugins/check_nt.c:707 +#: plugins/check_ntp.c:859 plugins/check_nwstat.c:1688 +#: plugins/check_overcr.c:469 plugins/check_pgsql.c:458 +#: plugins/check_ping.c:597 plugins/check_procs.c:753 +#: plugins/check_radius.c:349 plugins/check_real.c:454 +#: plugins/check_smtp.c:780 plugins/check_snmp.c:1007 plugins/check_ssh.c:306 +#: plugins/check_swap.c:560 plugins/check_tcp.c:656 plugins/check_time.c:373 +#: plugins/check_ups.c:653 plugins/check_users.c:230 +#: plugins/check_ide_smart.c:544 plugins/negate.c:290 plugins/urlize.c:204 +#: plugins-root/check_dhcp.c:1283 plugins-root/check_icmp.c:1282 +#, c-format +msgid "Usage:" +msgstr "" + +#: plugins/check_dig.c:101 plugins/check_dig.c:103 #, c-format msgid "Looking for: '%s'\n" msgstr "" -#: plugins/check_dig.c:97 +#: plugins/check_dig.c:110 msgid "dig returned an error status" msgstr "dig hat einen Fehler zurückgegeben" -#: plugins/check_dig.c:122 +#: plugins/check_dig.c:135 msgid "Server not found in ANSWER SECTION" msgstr "Server nicht gefunden in ANSWER SECTION" -#: plugins/check_dig.c:132 +#: plugins/check_dig.c:145 msgid "No ANSWER SECTION found" msgstr "Keine ANSWER SECTION gefunden" -#: plugins/check_dig.c:157 +#: plugins/check_dig.c:170 #, fuzzy msgid "Probably a non-existent host/domain" msgstr "nicht existierender Host/Domain" -#: plugins/check_dig.c:215 +#: plugins/check_dig.c:229 #, fuzzy, c-format msgid "Port must be a positive integer - %s" msgstr "Port muss ein positiver Integer sein" -#: plugins/check_dig.c:226 +#: plugins/check_dig.c:240 #, fuzzy, c-format msgid "Warning interval must be a positive integer - %s" msgstr "Warning interval muss ein positiver Integer sein" -#: plugins/check_dig.c:234 +#: plugins/check_dig.c:248 #, fuzzy, c-format msgid "Critical interval must be a positive integer - %s" msgstr "Critical interval muss ein positiver Integer sein" -#: plugins/check_dig.c:242 +#: plugins/check_dig.c:256 #, fuzzy, c-format msgid "Timeout interval must be a positive integer - %s" msgstr "Timeout interval muss ein positiver Integer sein" -#: plugins/check_dig.c:295 +#: plugins/check_dig.c:309 #, fuzzy, c-format msgid "This plugin test the DNS service on the specified host using dig" msgstr "" "Testet den DNS Dienst auf dem angegebenen Host mit dig\n" "\n" -#: plugins/check_dig.c:309 -#, fuzzy, c-format +#: plugins/check_dig.c:320 +#, fuzzy msgid "machine name to lookup" msgstr "" " -l, --lookup=STRING\n" " zu prüfender Hostname\n" -#: plugins/check_dig.c:317 -#, fuzzy, c-format +#: plugins/check_dig.c:322 +#, fuzzy msgid "record type to lookup (default: A)" msgstr "" " -T, --record_type=STRING\n" " abzufragender Datensatztyp (Default: A)\n" -#: plugins/check_dig.c:325 -#, fuzzy, c-format +#: plugins/check_dig.c:324 +#, fuzzy msgid "" "an address expected to be in the answer section.if not set, uses whatever " "was in -l" @@ -263,125 +290,76 @@ msgstr "" " Adresse die in der ANSWER SECTION erwartet wird.\n" " wenn nicht gesetzt, ubernommen aus -l\n" -#: plugins/check_dig.c:343 plugins/check_disk.c:752 plugins/check_dns.c:431 -#: plugins/check_dummy.c:113 plugins/check_fping.c:430 -#: plugins/check_game.c:325 plugins/check_http.c:1340 -#, c-format -msgid "Usage:" -msgstr "" - -#: plugins/check_disk.c:268 -#, c-format -msgid "" -"%s\n" -"%.0f of %.0f %s (%.0f%% inode=%.0f%%) free on %s (type %s mounted on %s) " -"warn:%lu crit:%lu warn%%:%.0f%% crit%%:%.0f%%" -msgstr "" - -#: plugins/check_disk.c:285 -#, c-format -msgid "%s [%s not found]" +#: plugins/check_disk.c:213 +#, fuzzy, c-format +msgid "DISK %s: %s not found\n" msgstr "%s [%s nicht gefunden]" -#: plugins/check_disk.c:383 plugins/check_swap.c:404 -msgid "Warning threshold must be integer or percentage!" -msgstr "Warning threshold muss ein Integer oder ein Prozentwert sein" +#: plugins/check_disk.c:213 plugins/check_disk.c:751 plugins/check_dns.c:208 +#: plugins/check_dummy.c:81 plugins/check_http.c:959 plugins/check_http.c:1022 +#: plugins/check_mysql.c:214 plugins/check_nagios.c:107 +#: plugins/check_nagios.c:171 plugins/check_nagios.c:175 +#: plugins/check_procs.c:302 +#, c-format +msgid "CRITICAL" +msgstr "CRITICAL" -#: plugins/check_disk.c:400 plugins/check_swap.c:422 -msgid "Critical threshold must be integer or percentage!" -msgstr "Critical threshold muss ein Integer oder ein Prozentwert sein!" - -#: plugins/check_disk.c:409 -#, fuzzy -msgid "Warning inode threshold must be percentage!\n" -msgstr "Warning threshold muss ein Integer oder ein Prozentwert sein!\n" - -#: plugins/check_disk.c:416 -#, fuzzy -msgid "Critical inode threshold must be percentage!\n" -msgstr "Critical threshold muss ein Integer oder ein Prozentwert sein!\n" - -#: plugins/check_disk.c:437 +#: plugins/check_disk.c:581 #, c-format msgid "unit type %s not known\n" msgstr "unbekannter unit type: %s\n" -#: plugins/check_disk.c:440 +#: plugins/check_disk.c:584 #, c-format msgid "failed allocating storage for '%s'\n" msgstr "konnte keinen Speicher für '%s' reservieren\n" -#: plugins-root/check_dhcp.c:1072 plugins/check_disk.c:530 -#: plugins/check_fping.c:245 plugins/check_hpjd.c:337 plugins/check_http.c:213 -#: plugins/check_ide_smart.c:214 plugins/check_ldap.c:315 -#: plugins/check_load.c:223 plugins/check_mrtg.c:229 -#: plugins/check_mrtgtraf.c:263 plugins/check_mysql.c:288 -#: plugins/check_nt.c:489 plugins/check_nwstat.c:870 -#: plugins/check_overcr.c:327 plugins/check_pgsql.c:212 -#: plugins/check_ping.c:198 plugins/check_procs.c:350 -#: plugins/check_radius.c:221 plugins/check_real.c:354 -#: plugins/check_smtp.c:631 plugins/check_snmp.c:432 plugins/check_ssh.c:113 -#: plugins/check_swap.c:437 plugins/check_tcp.c:433 plugins/check_time.c:219 -#: plugins/check_udp.c:149 plugins/check_ups.c:487 plugins/check_users.c:143 -#: plugins/negate.c:177 plugins/urlize.c:79 +#: plugins/check_disk.c:606 plugins/check_disk.c:643 plugins/check_disk.c:653 +#: plugins/check_disk.c:659 plugins/check_disk.c:678 plugins/check_dummy.c:84 +#: plugins/check_http.c:953 +#, c-format +msgid "UNKNOWN" +msgstr "UNKNOWN" + +#: plugins/check_disk.c:606 +msgid "Must set a threshold value before using -p\n" +msgstr "" + +#: plugins/check_disk.c:643 +msgid "Must set group value before using -p\n" +msgstr "" + +#: plugins/check_disk.c:653 +msgid "Must set a threshold value before using -r/-R\n" +msgstr "" + +#: plugins/check_disk.c:659 +msgid "Could not compile regular expression" +msgstr "" + +#: plugins/check_disk.c:679 +msgid "Regular expression did not match any path or disk" +msgstr "" + +#: plugins/check_disk.c:723 #, fuzzy msgid "Unknown argument" msgstr "" "%s: Unbekanntes Argument: %s\n" "\n" -#: plugins/check_disk.c:561 plugins/check_dns.c:193 plugins/check_dummy.c:65 -#: plugins/check_http.c:948 plugins/check_mysql.c:191 -#: plugins/check_nagios.c:88 plugins/check_nagios.c:152 -#: plugins/check_nagios.c:156 plugins/check_procs.c:290 -#, c-format -msgid "CRITICAL" -msgstr "CRITICAL" - -#: plugins/check_disk.c:562 +#: plugins/check_disk.c:752 #, fuzzy, c-format msgid "%s does not exist\n" msgstr "%s [%s nicht gefunden]" -#: plugins/check_disk.c:589 +#: plugins/check_disk.c:781 #, c-format msgid " for %s\n" msgstr "" -#: plugins/check_disk.c:600 -#, c-format -msgid "INPUT ERROR: No thresholds specified" -msgstr "FEHLER: Kein Schwellwert angegeben" - -#: plugins/check_disk.c:606 -#, c-format -msgid "" -"INPUT ERROR: C_DFP (%f) should be less than W_DFP (%.1f) and both should be " -"between zero and 100 percent, inclusive" -msgstr "" -"INPUT ERROR: C_DFP (%f) sollte kleiner sein als W_DFP (%.1f) und beide " -"sollten zwischen 0 und 100 Prozent liegen" - -#: plugins/check_disk.c:614 -#, fuzzy, c-format -msgid "" -"INPUT ERROR: C_IDFP (%f) should be less than W_IDFP (%.1f) and both should " -"be between zero and 100 percent, inclusive" -msgstr "" -"INPUT ERROR: C_DFP (%f) sollte kleiner sein als W_DFP (%.1f) und beide " -"sollten zwischen 0 und 100 Prozent liegen" - -#: plugins/check_disk.c:621 -#, c-format -msgid "" -"INPUT ERROR: C_DF (%lu) should be less than W_DF (%lu) and both should be " -"greater than zero" -msgstr "" -"INPUT ERROR: C_DF (%lu) sollte kleiner sein als W_DF (%lu) und beide sollten " -"größer als 0 sein" - -#: plugins/check_disk.c:697 -#, fuzzy, c-format +#: plugins/check_disk.c:849 +#, fuzzy msgid "" "This plugin checks the amount of used disk space on a mounted file system" msgstr "" @@ -390,8 +368,8 @@ msgstr "" "unterschritten wird.\n" "\n" -#: plugins/check_disk.c:698 -#, fuzzy, c-format +#: plugins/check_disk.c:850 +#, fuzzy msgid "" "and generates an alert if free space is less than one of the threshold values" msgstr "" @@ -400,2357 +378,2929 @@ msgstr "" "unterschritten wird.\n" "\n" -#: plugins/check_disk.c:707 +#: plugins/check_disk.c:859 msgid "Exit with WARNING status if less than INTEGER units of disk are free" msgstr "" -#: plugins/check_disk.c:709 +#: plugins/check_disk.c:861 msgid "Exit with WARNING status if less than PERCENT of disk space is free" msgstr "" -#: plugins/check_disk.c:711 +#: plugins/check_disk.c:863 msgid "Exit with WARNING status if less than PERCENT of inode space is free" msgstr "" -#: plugins/check_disk.c:713 +#: plugins/check_disk.c:865 msgid "Exit with CRITICAL status if less than PERCENT of inode space is free" msgstr "" -#: plugins/check_disk.c:715 +#: plugins/check_disk.c:867 msgid "Exit with CRITICAL status if less than INTEGER units of disk are free" msgstr "" -#: plugins/check_disk.c:717 +#: plugins/check_disk.c:869 msgid "Exit with CRITCAL status if less than PERCENT of disk space is free" msgstr "" -#: plugins/check_disk.c:719 +#: plugins/check_disk.c:871 msgid "Clear thresholds" msgstr "" -#: plugins/check_disk.c:721 +#: plugins/check_disk.c:873 msgid "Choose bytes, kB, MB, GB, TB (default: MB)" msgstr "" -#: plugins/check_disk.c:723 +#: plugins/check_disk.c:875 msgid "Same as '--units kB'" msgstr "" -#: plugins/check_disk.c:725 +#: plugins/check_disk.c:877 msgid "Same as '--units MB'" msgstr "" -#: plugins/check_disk.c:727 +#: plugins/check_disk.c:879 msgid "Only check local filesystems" msgstr "" -#: plugins/check_disk.c:729 +#: plugins/check_disk.c:881 msgid "Path or partition (may be repeated)" msgstr "" -#: plugins/check_disk.c:731 +#: plugins/check_disk.c:883 +msgid "Regular expression for path or partition (may be repeated)" +msgstr "" + +#: plugins/check_disk.c:885 +msgid "" +"Case insensitive regular expression for path/partition (may be repeated)" +msgstr "" + +#: plugins/check_disk.c:887 +msgid "" +"Group pathes. Thresholds apply to (free-)space of all partitions together" +msgstr "" + +#: plugins/check_disk.c:889 msgid "Ignore device (only works if -p unspecified)" msgstr "" -#: plugins/check_disk.c:732 -msgid "-X, --exclude-type=TYPE " -msgstr "" - -#: plugins/check_disk.c:733 +#: plugins/check_disk.c:891 msgid "Ignore all filesystems of indicated type (may be repeated)" msgstr "" -#: plugins/check_disk.c:735 +#: plugins/check_disk.c:893 msgid "Display the mountpoint instead of the partition" msgstr "" -#: plugins/check_disk.c:737 +#: plugins/check_disk.c:895 +msgid "For paths or partitions specified with -p, only check for exact paths" +msgstr "" + +#: plugins/check_disk.c:897 msgid "Display only devices/mountpoints with errors" msgstr "" -#: plugins/check_disk.c:741 -msgid "Examples:" -msgstr "" - -#: plugins/check_disk.c:743 +#: plugins/check_disk.c:903 msgid "Checks /tmp and /var at 10% and 5%, and / at 100MB and 50MB" msgstr "" -#: plugins/check_dns.c:92 +#: plugins/check_dns.c:107 #, fuzzy msgid "nslookup returned an error status" msgstr "nslookup hat einen Fehler zurückgegeben" -#: plugins/check_dns.c:105 +#: plugins/check_dns.c:120 msgid "Warning plugin error" msgstr "Warnung Plugin Fehler" -#: plugins/check_dns.c:125 +#: plugins/check_dns.c:140 #, c-format msgid "DNS CRITICAL - '%s' returned empty host name string\n" msgstr "DNS CRITICAL - '%s' hat einen leeren Hostnamen zurückgegeben\n" -#: plugins/check_dns.c:135 +#: plugins/check_dns.c:150 msgid "Non-authoritative answer:" msgstr "" -#: plugins/check_dns.c:163 +#: plugins/check_dns.c:178 #, fuzzy, c-format msgid "DNS CRITICAL - '%s' msg parsing exited with no address\n" msgstr "DNS CRITICAL - '%s' Ausgabeverarbeitung hat keine Adresse ergeben\n" -#: plugins/check_dns.c:169 +#: plugins/check_dns.c:184 #, fuzzy, c-format msgid "expected '%s' but got '%s'" msgstr "Erwartet: %s aber: %s erhalten" -#: plugins/check_dns.c:175 +#: plugins/check_dns.c:190 #, c-format msgid "server %s is not authoritative for %s" msgstr "Server %s ist nicht autoritativ für %s" -#: plugins/check_dns.c:189 plugins/check_dummy.c:59 plugins/check_http.c:944 -#: plugins/check_nagios.c:166 plugins/check_procs.c:283 +#: plugins/check_dns.c:204 plugins/check_dummy.c:75 plugins/check_http.c:955 +#: plugins/check_nagios.c:185 plugins/check_procs.c:295 #, c-format msgid "OK" msgstr "OK" -#: plugins/check_dns.c:191 plugins/check_dummy.c:62 plugins/check_http.c:946 -#: plugins/check_mysql.c:188 plugins/check_nagios.c:166 -#: plugins/check_procs.c:285 +#: plugins/check_dns.c:206 plugins/check_dummy.c:78 plugins/check_http.c:957 +#: plugins/check_mysql.c:211 plugins/check_nagios.c:185 +#: plugins/check_procs.c:297 #, c-format msgid "WARNING" msgstr "WARNING" -#: plugins/check_dns.c:195 +#: plugins/check_dns.c:210 #, fuzzy, c-format msgid "%.3f second response time" msgid_plural "%.3f seconds response time" msgstr[0] "%.3f Sekunden Antwortzeit " msgstr[1] "%.3f Sekunden Antwortzeit " -#: plugins/check_dns.c:196 +#: plugins/check_dns.c:211 #, fuzzy, c-format msgid ". %s returns %s" msgstr "%s hat %s zurückgegeben" -#: plugins/check_dns.c:200 +#: plugins/check_dns.c:215 #, c-format msgid "DNS WARNING - %s\n" msgstr "DNS WARNING - %s\n" -#: plugins/check_dns.c:201 plugins/check_dns.c:204 plugins/check_dns.c:207 +#: plugins/check_dns.c:216 plugins/check_dns.c:219 plugins/check_dns.c:222 msgid " Probably a non-existent host/domain" msgstr "nicht existierender Host/Domain" -#: plugins/check_dns.c:203 +#: plugins/check_dns.c:218 #, c-format msgid "DNS CRITICAL - %s\n" msgstr "DNS CRITICAL - %s\n" -#: plugins/check_dns.c:206 +#: plugins/check_dns.c:221 #, c-format msgid "DNS UNKNOW - %s\n" msgstr "DNS UNKNOW - %s\n" -#: plugins/check_dns.c:219 +#: plugins/check_dns.c:234 msgid "Note: nslookup is deprecated and may be removed from future releases." msgstr "" -#: plugins/check_dns.c:220 +#: plugins/check_dns.c:235 msgid "Consider using the `dig' or `host' programs instead. Run nslookup with" msgstr "" -#: plugins/check_dns.c:221 +#: plugins/check_dns.c:236 msgid "the `-sil[ent]' option to prevent this message from appearing." msgstr "" -#: plugins/check_dns.c:226 +#: plugins/check_dns.c:241 #, c-format msgid "No response from DNS %s\n" msgstr "Keine Antwort von DNS %s\n" -#: plugins/check_dns.c:230 +#: plugins/check_dns.c:245 #, c-format msgid "DNS %s has no records\n" msgstr "Nameserver %s hat keine Datensätze\n" -#: plugins/check_dns.c:238 +#: plugins/check_dns.c:253 #, c-format msgid "Connection to DNS %s was refused\n" msgstr "Verbindung zum Nameserver %s wurde verweigert\n" -#: plugins/check_dns.c:242 +#: plugins/check_dns.c:257 #, c-format msgid "Query was refused by DNS server at %s\n" msgstr "" -#: plugins/check_dns.c:246 +#: plugins/check_dns.c:261 #, c-format msgid "No information returned by DNS server at %s\n" msgstr "" -#: plugins/check_dns.c:252 +#: plugins/check_dns.c:267 #, c-format msgid "Domain %s was not found by the server\n" msgstr "Domäne %s wurde vom Server nicht gefunden\n" -#: plugins/check_dns.c:256 +#: plugins/check_dns.c:271 msgid "Network is unreachable\n" msgstr "Netzwerk nicht erreichbar\n" -#: plugins/check_dns.c:260 +#: plugins/check_dns.c:275 #, c-format msgid "DNS failure for %s\n" msgstr "DNS Fehler für %s\n" -#: plugins/check_dns.c:324 plugins/check_dns.c:332 plugins/check_dns.c:339 -#: plugins/check_dns.c:344 plugins/check_dns.c:365 plugins/check_dns.c:373 -#: plugins/check_game.c:197 plugins/check_game.c:205 +#: plugins/check_dns.c:339 plugins/check_dns.c:347 plugins/check_dns.c:354 +#: plugins/check_dns.c:359 plugins/check_dns.c:380 plugins/check_dns.c:388 +#: plugins/check_game.c:213 plugins/check_game.c:221 msgid "Input buffer overflow\n" msgstr "Eingabe-Pufferüberlauf\n" -#: plugins/check_dns.c:401 -#, c-format +#: plugins/check_dns.c:416 msgid "" "This plugin uses the nslookup program to obtain the IP address for the given " "host/domain query." msgstr "" -#: plugins/check_dns.c:403 -#, c-format +#: plugins/check_dns.c:417 msgid "An optional DNS server to use may be specified." msgstr "" -#: plugins/check_dns.c:405 -#, c-format +#: plugins/check_dns.c:418 msgid "" "If no DNS server is specified, the default server(s) specified in /etc/" "resolv.conf will be used." msgstr "" -#: plugins/check_dns.c:411 +#: plugins/check_dns.c:427 msgid "The name or address you want to query" msgstr "" -#: plugins/check_dns.c:413 +#: plugins/check_dns.c:429 msgid "Optional DNS server you want to use for the lookup" msgstr "" -#: plugins/check_dns.c:415 +#: plugins/check_dns.c:431 msgid "" "Optional IP-ADDRESS you expect the DNS server to return. HOST must end with ." msgstr "" -#: plugins/check_dns.c:417 +#: plugins/check_dns.c:433 msgid "Optionally expect the DNS server to be authoritative for the lookup" msgstr "" -#: plugins/check_dns.c:419 +#: plugins/check_dns.c:435 msgid "Return warning if elapsed time exceeds value. Default off" msgstr "" -#: plugins/check_dns.c:421 +#: plugins/check_dns.c:437 msgid "Return critical if elapsed time exceeds value. Default off" msgstr "" -#: plugins/check_dummy.c:53 +#: plugins/check_dummy.c:69 msgid "Arguments to check_dummy must be an integer" msgstr "Argument für check_dummy muss ein Integer sein" -#: plugins/check_dummy.c:68 plugins/check_http.c:942 -#, c-format -msgid "UNKNOWN" -msgstr "UNKNOWN" - -#: plugins/check_dummy.c:71 +#: plugins/check_dummy.c:87 #, c-format msgid "Status %d is not a supported error state\n" msgstr "Status %d ist kein bekannter Fehlerstatus\n" -#: plugins/check_dummy.c:93 -#, c-format +#: plugins/check_dummy.c:109 msgid "" "This plugin will simply return the state corresponding to the numeric value" msgstr "" -#: plugins/check_dummy.c:97 -#, c-format +#: plugins/check_dummy.c:111 msgid "of the argument with optional text" msgstr "" -#: plugins/check_fping.c:87 plugins/check_hpjd.c:114 plugins/check_ping.c:411 -#: plugins/check_procs.c:144 plugins/check_snmp.c:189 plugins/check_swap.c:155 -#: plugins/check_users.c:59 plugins/negate.c:97 plugins/urlize.c:93 +#: plugins/check_fping.c:103 plugins/check_hpjd.c:131 plugins/check_ping.c:432 +#: plugins/check_procs.c:159 plugins/check_snmp.c:203 plugins/check_swap.c:178 +#: plugins/check_users.c:75 plugins/negate.c:112 plugins/urlize.c:117 #, c-format msgid "Could not open pipe: %s\n" msgstr "Pipe: %s konnte nicht geöffnet werden\n" -#: plugins/check_fping.c:93 plugins/check_hpjd.c:120 plugins/check_load.c:137 -#: plugins/check_procs.c:150 plugins/check_snmp.c:195 plugins/check_swap.c:161 -#: plugins/check_users.c:65 plugins/negate.c:102 plugins/urlize.c:99 +#: plugins/check_fping.c:109 plugins/check_hpjd.c:137 plugins/check_load.c:153 +#: plugins/check_procs.c:165 plugins/check_snmp.c:209 plugins/check_swap.c:184 +#: plugins/check_users.c:81 plugins/negate.c:117 plugins/urlize.c:123 #, c-format msgid "Could not open stderr for %s\n" msgstr "Konnte stderr nicht öffnen für: %s\n" -#: plugins/check_fping.c:133 +#: plugins/check_fping.c:149 #, c-format msgid "FPING UNKNOW - %s not found\n" msgstr "FPING UNKNOW - %s nicht gefunden\n" -#: plugins/check_fping.c:137 +#: plugins/check_fping.c:153 #, c-format msgid "FPING CRITICAL - %s is unreachable\n" msgstr "FPING CRITICAL - %s ist nicht erreichbar\n" -#: plugins/check_fping.c:142 +#: plugins/check_fping.c:158 #, c-format msgid "FPING CRITICAL - %s is down\n" msgstr "FPING CRITICAL - %s ist down\n" -#: plugins/check_fping.c:169 +#: plugins/check_fping.c:185 #, c-format msgid "FPING %s - %s (loss=%.0f%%, rta=%f ms)|%s %s\n" msgstr "FPING %s - %s (verloren=%.0f%%, rta=%f ms)|%s %s\n" -#: plugins/check_fping.c:190 +#: plugins/check_fping.c:206 #, c-format msgid "FPING %s - %s (loss=%.0f%% )|%s\n" msgstr "FPING %s - %s (verloren=%.0f%% )|%s\n" -#: plugins/check_fping.c:257 plugins/check_hpjd.c:324 plugins/check_hpjd.c:347 -#: plugins/check_mysql.c:254 plugins/check_mysql.c:303 -#: plugins/check_pgsql.c:239 plugins/check_ping.c:269 plugins/check_ping.c:392 -#: plugins/check_radius.c:233 plugins/check_real.c:302 -#: plugins/check_real.c:364 plugins/check_smtp.c:520 plugins/check_smtp.c:641 -#: plugins/check_ssh.c:144 plugins/check_time.c:228 plugins/check_time.c:303 -#: plugins/check_udp.c:161 plugins/check_udp.c:202 plugins/check_ups.c:493 -#: plugins/check_ups.c:562 +#: plugins/check_fping.c:273 plugins/check_hpjd.c:341 plugins/check_hpjd.c:364 +#: plugins/check_mysql.c:277 plugins/check_mysql.c:326 plugins/check_ntp.c:696 +#: plugins/check_pgsql.c:255 plugins/check_ping.c:290 plugins/check_ping.c:413 +#: plugins/check_radius.c:250 plugins/check_real.c:319 +#: plugins/check_real.c:381 plugins/check_smtp.c:554 plugins/check_smtp.c:675 +#: plugins/check_ssh.c:162 plugins/check_time.c:244 plugins/check_time.c:319 +#: plugins/check_ups.c:503 plugins/check_ups.c:572 msgid "Invalid hostname/address" msgstr "Ungültige(r) Hostname/Adresse" -#: plugins/check_fping.c:291 +#: plugins/check_fping.c:307 msgid "Packet size must be a positive integer" msgstr "Paketgröße muss ein positiver Integer sein" -#: plugins/check_fping.c:297 +#: plugins/check_fping.c:313 msgid "Packet count must be a positive integer" msgstr "Paketanzahl muss ein positiver Integer sein" -#: plugins/check_fping.c:303 plugins/check_time.c:307 plugins/check_udp.c:207 +#: plugins/check_fping.c:319 plugins/check_ntp.c:728 plugins/check_time.c:323 msgid "Hostname was not supplied" msgstr "" -#: plugins/check_fping.c:323 +#: plugins/check_fping.c:339 #, c-format msgid "%s: Only one threshold may be packet loss (%s)\n" msgstr "%s: Nur ein Wert darf für paket loss angegeben werden (%s)\n" -#: plugins/check_fping.c:327 +#: plugins/check_fping.c:343 #, c-format msgid "%s: Only one threshold must be packet loss (%s)\n" msgstr "%s: Nur ein Wert darf für paket loss angegeben werden (%s)\n" -#: plugins/check_fping.c:359 -#, c-format +#: plugins/check_fping.c:375 msgid "" "This plugin will use the fping command to ping the specified host for a fast " "check" msgstr "" -#: plugins/check_fping.c:363 -#, c-format +#: plugins/check_fping.c:377 msgid "Note that it is necessary to set the suid flag on fping." msgstr "" -#: plugins/check_fping.c:373 -#, c-format +#: plugins/check_fping.c:386 msgid "" "name or IP Address of host to ping (IP Address bypasses name lookup, " "reducing system load)" msgstr "" -#: plugins/check_fping.c:381 -#, fuzzy, c-format +#: plugins/check_fping.c:388 plugins/check_ping.c:567 +#, fuzzy msgid "warning threshold pair" msgstr "Warning threshold Integer sein" -#: plugins/check_fping.c:389 -#, fuzzy, c-format +#: plugins/check_fping.c:390 plugins/check_ping.c:569 +#, fuzzy msgid "critical threshold pair" msgstr "Critical threshold muss ein Integer sein" -#: plugins/check_fping.c:395 +#: plugins/check_fping.c:392 #, c-format msgid "size of ICMP packet (default: %d)" msgstr "" -#: plugins/check_fping.c:403 +#: plugins/check_fping.c:394 #, c-format msgid "number of ICMP packets to send (default: %d)" msgstr "" -#: plugins/check_fping.c:411 +#: plugins/check_fping.c:397 #, c-format msgid "" "THRESHOLD is ,%% where is the round trip average travel time " "(ms)" msgstr "" -#: plugins/check_fping.c:415 -#, c-format +#: plugins/check_fping.c:398 msgid "" "which triggers a WARNING or CRITICAL state, and is the percentage of" msgstr "" -#: plugins/check_fping.c:419 -#, c-format +#: plugins/check_fping.c:399 msgid "packet loss to trigger an alarm state." msgstr "" -#: plugins/check_game.c:97 +#: plugins/check_game.c:113 #, c-format msgid "CRITICAL - Host type parameter incorrect!\n" msgstr "CRITICAL - Host type parameter unkorrekt!\n" -#: plugins/check_game.c:112 +#: plugins/check_game.c:128 #, fuzzy, c-format msgid "CRITICAL - Host not found\n" msgstr "CRITICAL - Text nicht gefunden%s|%s %s\n" -#: plugins/check_game.c:116 +#: plugins/check_game.c:132 #, fuzzy, c-format msgid "CRITICAL - Game server down or unavailable\n" msgstr "CRITICAL - Serverdatum \"%100s\" konnte nicht verarbeitet werden" -#: plugins/check_game.c:120 +#: plugins/check_game.c:136 #, fuzzy, c-format msgid "CRITICAL - Game server timeout\n" msgstr "CRITICAL - Konnte kein Serverzertifikat erhalten\n" -#: plugins/check_game.c:283 +#: plugins/check_game.c:299 #, c-format msgid "This plugin tests game server connections with the specified host." msgstr "Dieses plugin testet Gameserververbindungen zum angegebenen Host." -#: plugins/check_game.c:291 -#, c-format -msgid "" -" = Game type that is recognised by qstat (without the leading " -"dash)\n" -" = The IP address of the device you wish to query\n" -" [port] = Optional port of which to connect\n" -" [game_field] = Field number in raw qstat output that contains game name\n" -" [map_field] = Field number in raw qstat output that contains map name\n" -" [ping_field] = Field number in raw qstat output that contains ping time\n" +#: plugins/check_game.c:308 +msgid "Optional port of which to connect" msgstr "" -#: plugins/check_game.c:301 +#: plugins/check_game.c:310 +msgid "Field number in raw qstat output that contains game name" +msgstr "" + +#: plugins/check_game.c:312 +msgid "Field number in raw qstat output that contains map name" +msgstr "" + +#: plugins/check_game.c:314 +msgid "Field number in raw qstat output that contains ping time" +msgstr "" + +#: plugins/check_game.c:318 plugins/check_http.c:1312 plugins/check_mrtg.c:364 +#: plugins/check_mrtgtraf.c:361 plugins/check_nt.c:693 +#: plugins/check_nwstat.c:1673 plugins/check_overcr.c:452 +#: plugins/check_swap.c:549 plugins/check_ups.c:629 plugins/negate.c:276 #, c-format msgid "Notes:" msgstr "" -#: plugins/check_game.c:305 -#, c-format +#: plugins/check_game.c:320 msgid "" "This plugin uses the 'qstat' command, the popular game server status query " "tool ." msgstr "" -#: plugins/check_game.c:309 -#, c-format +#: plugins/check_game.c:322 msgid "" "If you don't have the package installed, you will need to download it from" msgstr "" -#: plugins/check_game.c:313 -#, c-format +#: plugins/check_game.c:324 msgid "" "http://www.activesw.com/people/steve/qstat.html before you can use this " "plugin." msgstr "" -#: plugins/check_hpjd.c:225 +#: plugins/check_hpjd.c:242 msgid "Paper Jam" msgstr "Papierstau" -#: plugins/check_hpjd.c:229 +#: plugins/check_hpjd.c:246 msgid "Out of Paper" msgstr "Kein Papier" -#: plugins/check_hpjd.c:234 +#: plugins/check_hpjd.c:251 msgid "Printer Offline" msgstr "Drucker ausgeschaltet" -#: plugins/check_hpjd.c:239 +#: plugins/check_hpjd.c:256 msgid "Peripheral Error" msgstr "Peripheriefehler" -#: plugins/check_hpjd.c:243 +#: plugins/check_hpjd.c:260 msgid "Intervention Required" msgstr "Eingriff benötigt" -#: plugins/check_hpjd.c:247 +#: plugins/check_hpjd.c:264 msgid "Toner Low" msgstr "Wenig Toner" -#: plugins/check_hpjd.c:251 +#: plugins/check_hpjd.c:268 msgid "Insufficient Memory" msgstr "Nicht genügend Speicher" -#: plugins/check_hpjd.c:255 +#: plugins/check_hpjd.c:272 msgid "A Door is Open" msgstr "Eine Abdeckung ist offen" -#: plugins/check_hpjd.c:259 +#: plugins/check_hpjd.c:276 msgid "Output Tray is Full" msgstr "Ausgabeschacht ist voll" -#: plugins/check_hpjd.c:263 +#: plugins/check_hpjd.c:280 msgid "Data too Slow for Engine" msgstr "" -#: plugins/check_hpjd.c:267 +#: plugins/check_hpjd.c:284 msgid "Unknown Paper Error" msgstr "Papierfehler" -#: plugins/check_hpjd.c:272 +#: plugins/check_hpjd.c:289 #, c-format msgid "Printer ok - (%s)\n" msgstr "Printer ok - (%s)\n" -#: plugins/check_hpjd.c:377 -#, c-format -msgid "" -"This plugin tests the STATUS of an HP printer with a JetDirect card.\n" -"Net-snmp must be installed on the computer running the plugin.\n" -"\n" +#: plugins/check_hpjd.c:394 +#, fuzzy +msgid "This plugin tests the STATUS of an HP printer with a JetDirect card." msgstr "" "Dieses Plugin testet den STATUS eines HP Druckers mit einer JetDirect " "Karte.\n" "Net-snmp muss auf dem ausführenden Computer installiert sein.\n" "\n" -#: plugins/check_hpjd.c:385 -#, c-format -msgid "" -" -C, --community=STRING\n" -" The SNMP community name (default=%s)\n" +#: plugins/check_hpjd.c:395 +#, fuzzy +msgid "Net-snmp must be installed on the computer running the plugin." +msgstr "" +"Dieses Plugin testet den STATUS eines HP Druckers mit einer JetDirect " +"Karte.\n" +"Net-snmp muss auf dem ausführenden Computer installiert sein.\n" +"\n" + +#: plugins/check_hpjd.c:404 +msgid "The SNMP community name " msgstr "" -#: plugins/check_http.c:231 +#: plugins/check_hpjd.c:405 +#, c-format +msgid "(default=%s)" +msgstr "" + +#: plugins/check_http.c:247 msgid "Critical threshold must be integer" msgstr "Critical threshold muss ein Integer sein" -#: plugins/check_http.c:239 +#: plugins/check_http.c:255 msgid "Warning threshold must be integer" msgstr "Warning threshold Integer sein" -#: plugins/check_http.c:265 plugins/check_tcp.c:552 +#: plugins/check_http.c:281 plugins/check_tcp.c:570 msgid "Invalid certificate expiration period" msgstr "Ungültiger Zertifikatsablauftermin" -#: plugins/check_http.c:274 plugins/check_tcp.c:564 +#: plugins/check_http.c:290 plugins/check_tcp.c:582 #, fuzzy msgid "Invalid option - SSL is not available" msgstr "Ungültige Option - SSL ist nicht verfügbar\n" -#: plugins/check_http.c:292 +#: plugins/check_http.c:308 #, c-format msgid "option f:%d \n" msgstr "Option f:%d \n" -#: plugins/check_http.c:309 +#: plugins/check_http.c:325 msgid "Invalid port number" msgstr "Ungültige Portnummer" -#: plugins/check_http.c:340 plugins/check_snmp.c:308 -#, c-format -msgid "Call for regex which was not a compiled option" -msgstr "" - -#: plugins/check_http.c:354 +#: plugins/check_http.c:363 #, c-format msgid "Could Not Compile Regular Expression: %s" msgstr "" -#: plugins/check_http.c:366 plugins/check_smtp.c:621 plugins/check_ssh.c:136 -#: plugins/check_tcp.c:450 +#: plugins/check_http.c:377 plugins/check_ntp.c:709 plugins/check_smtp.c:655 +#: plugins/check_ssh.c:154 plugins/check_tcp.c:473 msgid "IPv6 support not available" msgstr "IPv6 Unterstützung nicht vorhanden" -#: plugins/check_http.c:428 plugins/check_ping.c:396 +#: plugins/check_http.c:439 plugins/check_ping.c:417 msgid "You must specify a server address or host name" msgstr "Hostname oder Serveradresse muss angegeben werden" -#: plugins/check_http.c:654 +#: plugins/check_http.c:665 msgid "Server date unknown\n" msgstr "Serverdatum unbekannt\n" -#: plugins/check_http.c:656 +#: plugins/check_http.c:667 msgid "Document modification date unknown\n" msgstr "Datum der letzten Änderung unbekannt\n" -#: plugins/check_http.c:662 +#: plugins/check_http.c:673 #, c-format msgid "CRITICAL - Server date \"%100s\" unparsable" msgstr "CRITICAL - Serverdatum \"%100s\" konnte nicht verarbeitet werden" -#: plugins/check_http.c:664 +#: plugins/check_http.c:675 #, c-format msgid "CRITICAL - Document date \"%100s\" unparsable" msgstr "CRITICAL - Dokumentendatum \"%100s\" konnte nicht verarbeitet werden" -#: plugins/check_http.c:666 +#: plugins/check_http.c:677 #, c-format msgid "CRITICAL - Document is %d seconds in the future\n" msgstr "CRITICAL - Dokumentendatum ist %d Sekunden in der Zukunft\n" -#: plugins/check_http.c:671 +#: plugins/check_http.c:682 #, c-format msgid "CRITICAL - Last modified %.1f days ago\n" msgstr "CRITICAL - Letzte Änderung vor %.1f Tagen\n" -#: plugins/check_http.c:675 +#: plugins/check_http.c:686 #, c-format msgid "CRITICAL - Last modified %d:%02d:%02d ago\n" msgstr "CRITICAL - Letzte Änderung vor %d:%02d:%02d \n" -#: plugins/check_http.c:756 +#: plugins/check_http.c:767 msgid "Unable to open TCP socket\n" msgstr "Konnte TCP socket nicht öffnen\n" -#: plugins/check_http.c:836 +#: plugins/check_http.c:847 msgid "Error on receive\n" msgstr "Fehler beim Empfangen\n" -#: plugins/check_http.c:846 +#: plugins/check_http.c:857 plugins/check_real.c:189 plugins/check_tcp.c:291 #, c-format -msgid "No data received %s\n" -msgstr "Keine Daten empfangen %s\n" +msgid "No data received from host\n" +msgstr "" -#: plugins/check_http.c:896 +#: plugins/check_http.c:907 msgid "Invalid HTTP response received from host\n" msgstr "Ungültige HTTP Antwort von Host empfangen\n" -#: plugins/check_http.c:899 +#: plugins/check_http.c:910 #, c-format msgid "Invalid HTTP response received from host on port %d\n" msgstr "Ungültige HTTP Antwort von Host erhalten auf Port %d\n" -#: plugins/check_http.c:907 +#: plugins/check_http.c:918 #, c-format msgid "HTTP OK: Status line output matched \"%s\"\n" msgstr "HTTP OK: Statusausgabe passt auf \"%s\"\n" -#: plugins/check_http.c:919 +#: plugins/check_http.c:930 #, c-format msgid "HTTP CRITICAL: Invalid Status Line (%s)\n" msgstr "HTTP CRITICAL: Ungültige Statusmeldung (%s)\n" -#: plugins/check_http.c:926 +#: plugins/check_http.c:937 #, c-format msgid "HTTP CRITICAL: Invalid Status (%s)\n" msgstr "HTTP CRITICAL: Ungültiger Status (%s)\n" -#: plugins/check_http.c:930 +#: plugins/check_http.c:941 #, c-format msgid "HTTP CRITICAL: %s\n" msgstr "HTTP CRITICAL: %s\n" -#: plugins/check_http.c:934 +#: plugins/check_http.c:945 #, c-format msgid "HTTP WARNING: %s\n" msgstr "HTTP WARNING: %s\n" -#: plugins/check_http.c:952 -#, c-format -msgid " - %s - %.3f second response time %s%s|%s %s\n" +#: plugins/check_http.c:963 +#, fuzzy, c-format +msgid " - %s - %.3f second response time %s|%s %s\n" msgstr " - %s - %.3f Sekunden Antwortzeit %s%s|%s %s\n" -#: plugins/check_http.c:968 -#, c-format -msgid "HTTP WARNING: %s - %.3f second response time %s%s|%s %s\n" +#: plugins/check_http.c:979 +#, fuzzy, c-format +msgid "HTTP WARNING: %s - %.3f second response time %s|%s %s\n" msgstr "HTTP WARNING: %s - %.3f Sekunden Antwortzeit %s%s|%s %s\n" -#: plugins/check_http.c:982 plugins/check_http.c:999 -#, c-format -msgid "HTTP OK %s - %.3f second response time %s%s|%s %s\n" +#: plugins/check_http.c:993 plugins/check_http.c:1010 +#, fuzzy, c-format +msgid "HTTP OK %s - %.3f second response time %s|%s %s\n" msgstr "HTTP OK %s - %.3f Sekunde Antwortzeit %s%s|%s %s\n" -#: plugins/check_http.c:989 +#: plugins/check_http.c:1000 #, c-format msgid "CRITICAL - string not found%s|%s %s\n" msgstr "CRITICAL - Text nicht gefunden%s|%s %s\n" -#: plugins/check_http.c:1007 -#, c-format -msgid "CRITICAL - pattern not found%s|%s %s\n" +#: plugins/check_http.c:1018 +#, fuzzy +msgid "pattern not found" msgstr "CRITICAL - Muster nicht gefunden%s|%s %s\n" -#: plugins/check_http.c:1014 +#: plugins/check_http.c:1020 +msgid "pattern found" +msgstr "" + +#: plugins/check_http.c:1030 #, c-format msgid "CRITICAL - Execute Error: %s\n" msgstr "CRITICAL - Fehler: %s\n" -#: plugins/check_http.c:1025 +#: plugins/check_http.c:1039 #, fuzzy, c-format msgid "HTTP WARNING: page size %d too large%s|%s\n" msgstr "HTTP WARNING: Seitengröße %d zu klein%s|%s\n" -#: plugins/check_http.c:1029 +#: plugins/check_http.c:1043 #, c-format msgid "HTTP WARNING: page size %d too small%s|%s\n" msgstr "HTTP WARNING: Seitengröße %d zu klein%s|%s\n" -#: plugins/check_http.c:1034 -#, c-format -msgid "HTTP OK %s - %d bytes in %.3f seconds %s%s|%s %s\n" -msgstr "" +#: plugins/check_http.c:1048 +#, fuzzy, c-format +msgid "HTTP OK %s - %d bytes in %.3f seconds %s|%s %s\n" +msgstr "HTTP OK %s - %.3f Sekunde Antwortzeit %s%s|%s %s\n" -#: plugins/check_http.c:1069 +#: plugins/check_http.c:1083 msgid "Could not allocate addr\n" msgstr "Konnte addr nicht zuweisen\n" -#: plugins/check_http.c:1073 +#: plugins/check_http.c:1087 msgid "Could not allocate url\n" msgstr "Konnte·url·nicht·zuweisen\n" -#: plugins/check_http.c:1083 +#: plugins/check_http.c:1096 #, c-format msgid "UNKNOWN - Could not find redirect location - %s%s\n" msgstr "" -#: plugins/check_http.c:1093 +#: plugins/check_http.c:1106 msgid "could not allocate url\n" msgstr "" -#: plugins/check_http.c:1136 +#: plugins/check_http.c:1149 #, c-format msgid "UNKNOWN - Could not parse redirect location - %s%s\n" msgstr "" -#: plugins/check_http.c:1146 +#: plugins/check_http.c:1159 #, c-format msgid "WARNING - maximum redirection depth %d exceeded - %s://%s:%d%s%s\n" msgstr "" -#: plugins/check_http.c:1154 +#: plugins/check_http.c:1167 #, c-format msgid "WARNING - redirection creates an infinite loop - %s://%s:%d%s%s\n" msgstr "WARNING - Umleitung verursacht eine Schleife - %s://%s:%d%s%s\n" -#: plugins/check_http.c:1218 -#, c-format -msgid "" -"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." +#: plugins/check_http.c:1231 +#, fuzzy +msgid "This plugin tests the HTTP service on the specified host. It can test" +msgstr "" +"Testet den DNS Dienst auf dem angegebenen Host mit dig\n" +"\n" + +#: plugins/check_http.c:1232 +msgid "normal (http) and secure (https) servers, follow redirects, search for" msgstr "" -#: plugins/check_http.c:1228 +#: plugins/check_http.c:1233 +msgid "strings and regular expressions, check connection times, and report on" +msgstr "" + +#: plugins/check_http.c:1234 +#, fuzzy +msgid "certificate expiration times." +msgstr "Clientzertifikat benötigt\n" + +#: plugins/check_http.c:1240 #, c-format msgid "NOTE: One or both of -H and -I must be specified" msgstr "" -#: plugins/check_http.c:1234 -#, c-format -msgid "" -" -H, --hostname=ADDRESS\n" -" Host name argument for servers using host headers (virtual host)\n" -" Append a port to include it in the header (eg: example.com:5000)\n" -" -I, --IP-address=ADDRESS\n" -" IP address or name (use numeric address if possible to bypass DNS " -"lookup).\n" -" -p, --port=INTEGER\n" -" Port number (default: %d)\n" +#: plugins/check_http.c:1247 +msgid "Host name argument for servers using host headers (virtual host)" msgstr "" -#: plugins/check_http.c:1246 -#, c-format -msgid "" -" -S, --ssl\n" -" Connect via SSL\n" -" -C, --certificate=INTEGER\n" -" Minimum number of days a certificate has to be valid.\n" -" (when this option is used the url is not checked.)\n" +#: plugins/check_http.c:1248 +msgid "Append a port to include it in the header (eg: example.com:5000)" msgstr "" -#: plugins/check_http.c:1254 -#, c-format +#: plugins/check_http.c:1250 msgid "" -" -e, --expect=STRING\n" -" String to expect in first (status) line of server response (default: %s)\n" -" If specified skips all other status line logic (ex: 3xx, 4xx, 5xx " -"processing)\n" -" -s, --string=STRING\n" -" String to expect in the content\n" -" -u, --url=PATH\n" -" URL to GET or POST (default: /)\n" -" -P, --post=STRING\n" -" URL encoded http POST data\n" -" -N, --no-body\n" -" Don't wait for document body: stop reading after headers.\n" -" (Note that this still does an HTTP GET or POST, not a HEAD.)\n" -" -M, --max-age=SECONDS\n" -" Warn if document is more than SECONDS old. the number can also be of \n" -" the form \"10m\" for minutes, \"10h\" for hours, or \"10d\" for days.\n" -" -T, --content-type=STRING\n" -" specify Content-Type header media type when POSTing\n" +"IP address or name (use numeric address if possible to bypass DNS lookup)." +msgstr "" + +#: plugins/check_http.c:1252 +msgid "Port number (default: " +msgstr "" + +#: plugins/check_http.c:1259 +msgid "Connect via SSL. Port defaults to 443" +msgstr "" + +#: plugins/check_http.c:1261 +msgid "" +"Minimum number of days a certificate has to be valid. Port defaults to 443" +msgstr "" + +#: plugins/check_http.c:1262 +msgid "(when this option is used the url is not checked.)\n" +msgstr "" + +#: plugins/check_http.c:1266 +msgid "String to expect in first (status) line of server response (default: " +msgstr "" + +#: plugins/check_http.c:1268 +msgid "" +"If specified skips all other status line logic (ex: 3xx, 4xx, 5xx processing)" +msgstr "" + +#: plugins/check_http.c:1270 +msgid "String to expect in the content" +msgstr "" + +#: plugins/check_http.c:1272 +msgid "URL to GET or POST (default: /)" msgstr "" #: plugins/check_http.c:1274 -#, c-format -msgid "" -" -l, --linespan\n" -" Allow regex to span newlines (must precede -r or -R)\n" -" -r, --regex, --ereg=STRING\n" -" Search page for regex STRING\n" -" -R, --eregi=STRING\n" -" Search page for case-insensitive regex STRING\n" +msgid "URL encoded http POST data" msgstr "" -#: plugins/check_http.c:1283 -#, c-format -msgid "" -" -a, --authorization=AUTH_PAIR\n" -" Username:password on sites with basic authentication\n" -" -A, --useragent=STRING\n" -" String to be sent in http header as \"User Agent\"\n" -" -k, --header=STRING\n" -" Any other tags to be sent in http header. Use multiple times for " -"additional headers\n" -" -L, --link=URL\n" -" Wrap output in HTML link (obsoleted by urlize)\n" -" -f, --onredirect=\n" -" How to handle redirected pages\n" -" -m, --pagesize=INTEGER<:INTEGER>\n" -" Minimum page size required (bytes) : Maximum page size required (bytes)\n" +#: plugins/check_http.c:1276 +msgid "Don't wait for document body: stop reading after headers." msgstr "" -#: plugins/check_http.c:1303 -#, c-format -msgid "" -"This plugin will attempt to open an HTTP connection with the host. " -"Successful\n" -"connects return STATE_OK, refusals and timeouts return STATE_CRITICAL, " -"other\n" -"errors return STATE_UNKNOWN. Successful connects, but incorrect reponse\n" -"messages from the host result in STATE_WARNING return values. If you are\n" -"checking a virtual server that uses 'host headers' you must supply the FQDN\n" -"(fully qualified domain name) as the [host_name] argument.\n" +#: plugins/check_http.c:1277 +msgid "(Note that this still does an HTTP GET or POST, not a HEAD.)" msgstr "" -#: plugins/check_http.c:1312 -#, c-format +#: plugins/check_http.c:1279 +msgid "Warn if document is more than SECONDS old. the number can also be of" +msgstr "" + +#: plugins/check_http.c:1280 +msgid "the form \"10m\" for minutes, \"10h\" for hours, or \"10d\" for days." +msgstr "" + +#: plugins/check_http.c:1282 +msgid "specify Content-Type header media type when POSTing\n" +msgstr "" + +#: plugins/check_http.c:1285 +msgid "Allow regex to span newlines (must precede -r or -R)" +msgstr "" + +#: plugins/check_http.c:1287 +msgid "Search page for regex STRING" +msgstr "" + +#: plugins/check_http.c:1289 +msgid "Search page for case-insensitive regex STRING" +msgstr "" + +#: plugins/check_http.c:1291 +msgid "Return CRITICAL if found, OK if not\n" +msgstr "" + +#: plugins/check_http.c:1294 +msgid "Username:password on sites with basic authentication" +msgstr "" + +#: plugins/check_http.c:1296 +msgid "String to be sent in http header as \"User Agent\"" +msgstr "" + +#: plugins/check_http.c:1298 msgid "" -"\n" -"This plugin can also check whether an SSL enabled web server is able to\n" -"serve content (optionally within a specified time) or whether the X509 \n" -"certificate is still valid for the specified number of days.\n" +" Any other tags to be sent in http header. Use multiple times for additional " +"headers" +msgstr "" + +#: plugins/check_http.c:1300 +msgid "Wrap output in HTML link (obsoleted by urlize)" +msgstr "" + +#: plugins/check_http.c:1302 +msgid "How to handle redirected pages" +msgstr "" + +#: plugins/check_http.c:1304 +msgid "Minimum page size required (bytes) : Maximum page size required (bytes)" +msgstr "" + +#: plugins/check_http.c:1313 +#, fuzzy +msgid "This plugin will attempt to open an HTTP connection with the host." +msgstr "Dieses plugin testet Gameserververbindungen zum angegebenen Host." + +#: plugins/check_http.c:1314 +msgid "" +"Successful connects return STATE_OK, refusals and timeouts return " +"STATE_CRITICAL" +msgstr "" + +#: plugins/check_http.c:1315 +msgid "" +"other errors return STATE_UNKNOWN. Successful connects, but incorrect " +"reponse" msgstr "" #: plugins/check_http.c:1316 -#, c-format msgid "" -"\n" -"CHECK CONTENT: check_http -w 5 -c 10 --ssl www.verisign.com\n" -"\n" -"When the 'www.verisign.com' server returns its content within 5 seconds, a\n" -"STATE_OK will be returned. When the server returns its content but exceeds\n" -"the 5-second threshold, a STATE_WARNING will be returned. When an error " -"occurs,\n" -"a STATE_CRITICAL will be returned.\n" -"\n" +"messages from the host result in STATE_WARNING return values. If you are" +msgstr "" + +#: plugins/check_http.c:1317 +msgid "" +"checking a virtual server that uses 'host headers' you must supply the FQDN" +msgstr "" + +#: plugins/check_http.c:1318 +msgid "(fully qualified domain name) as the [host_name] argument." +msgstr "" + +#: plugins/check_http.c:1321 +msgid "This plugin can also check whether an SSL enabled web server is able to" +msgstr "" + +#: plugins/check_http.c:1322 +msgid "serve content (optionally within a specified time) or whether the X509 " msgstr "" #: plugins/check_http.c:1323 -#, c-format -msgid "" -"CHECK CERTIFICATE: check_http www.verisign.com -C 14\n" -"\n" -"When the certificate of 'www.verisign.com' is valid for more than 14 days, " -"a\n" -"STATE_OK is returned. When the certificate is still valid, but for less " -"than\n" -"14 days, a STATE_WARNING is returned. A STATE_CRITICAL will be returned " -"when\n" -"the certificate is expired.\n" +msgid "certificate is still valid for the specified number of days." msgstr "" -#: plugins/check_ldap.c:112 +#: plugins/check_http.c:1326 +msgid "" +"When the 'www.verisign.com' server returns its content within 5 seconds," +msgstr "" + +#: plugins/check_http.c:1327 +msgid "" +"a STATE_OK will be returned. When the server returns its content but exceeds" +msgstr "" + +#: plugins/check_http.c:1328 +msgid "" +"the 5-second threshold, a STATE_WARNING will be returned. When an error " +"occurs," +msgstr "" + +#: plugins/check_http.c:1329 +msgid "a STATE_CRITICAL will be returned." +msgstr "" + +#: plugins/check_http.c:1332 +msgid "" +"When the certificate of 'www.verisign.com' is valid for more than 14 days," +msgstr "" + +#: plugins/check_http.c:1333 +msgid "" +"a STATE_OK is returned. When the certificate is still valid, but for less " +"than" +msgstr "" + +#: plugins/check_http.c:1334 +msgid "" +"14 days, a STATE_WARNING is returned. A STATE_CRITICAL will be returned when" +msgstr "" + +#: plugins/check_http.c:1335 +#, fuzzy +msgid "the certificate is expired." +msgstr "Clientzertifikat benötigt\n" + +#: plugins/check_ldap.c:125 #, c-format msgid "Could not connect to the server at port %i\n" msgstr "" -#: plugins/check_ldap.c:121 +#: plugins/check_ldap.c:134 #, c-format msgid "Could not set protocol version %d\n" msgstr "" -#: plugins/check_ldap.c:137 +#: plugins/check_ldap.c:150 #, fuzzy, c-format msgid "Could not init TLS at port %i!\n" msgstr "Konnte stderr nicht öffnen für: %s\n" -#: plugins/check_ldap.c:141 +#: plugins/check_ldap.c:154 #, c-format msgid "TLS not supported by the libraries!\n" msgstr "" -#: plugins/check_ldap.c:160 +#: plugins/check_ldap.c:173 #, fuzzy, c-format msgid "Could not init startTLS at port %i!\n" msgstr "Konnte stderr nicht öffnen für: %s\n" -#: plugins/check_ldap.c:164 +#: plugins/check_ldap.c:177 #, c-format msgid "startTLS not supported by the library, needs LDAPv3!\n" msgstr "" -#: plugins/check_ldap.c:174 +#: plugins/check_ldap.c:187 #, c-format msgid "Could not bind to the ldap-server\n" msgstr "" -#: plugins/check_ldap.c:182 +#: plugins/check_ldap.c:195 #, c-format msgid "Could not search/find objectclasses in %s\n" msgstr "" -#: plugins/check_ldap.c:205 +#: plugins/check_ldap.c:218 #, c-format msgid "LDAP %s - %.3f seconds response time|%s\n" msgstr "" -#: plugins/check_ldap.c:311 plugins/check_ping.c:220 +#: plugins/check_ldap.c:324 plugins/check_ping.c:241 msgid "IPv6 support not available\n" msgstr "" -#: plugins/check_ldap.c:334 +#: plugins/check_ldap.c:347 msgid "Please specify the host name\n" msgstr "" -#: plugins/check_ldap.c:337 +#: plugins/check_ldap.c:350 msgid "Please specify the LDAP base\n" msgstr "" -#: plugins/check_ldap.c:362 -#, c-format -msgid "" -" -a [--attr]\n" -" ldap attribute to search (default: \"(objectclass=*)\"\n" -" -b [--base]\n" -" ldap base (eg. ou=my unit, o=my org, c=at)\n" -" -D [--bind]\n" -" ldap bind DN (if required)\n" -" -P [--pass]\n" -" ldap password (if required)\n" +#: plugins/check_ldap.c:378 +msgid "ldap attribute to search (default: \"(objectclass=*)\"" msgstr "" -#: plugins/check_ldap.c:373 -#, c-format -msgid "" -" -2 [--ver2]\n" -" use ldap protocol version 2\n" -" -3 [--ver3]\n" -" use ldap protocol version 3\n" -" (default protocol version: %d)\n" +#: plugins/check_ldap.c:380 +msgid "ldap base (eg. ou=my unit, o=my org, c=at" msgstr "" -#: plugins/check_load.c:75 +#: plugins/check_ldap.c:382 +msgid "ldap bind DN (if required)" +msgstr "" + +#: plugins/check_ldap.c:384 +msgid "ldap password (if required)" +msgstr "" + +#: plugins/check_ldap.c:388 +msgid "use ldap protocol version 2" +msgstr "" + +#: plugins/check_ldap.c:390 +msgid "use ldap protocol version 3" +msgstr "" + +#: plugins/check_load.c:91 msgid "Warning threshold must be float or float triplet!\n" msgstr "" -#: plugins/check_load.c:116 plugins/check_load.c:132 +#: plugins/check_load.c:132 plugins/check_load.c:148 #, c-format msgid "Error opening %s\n" msgstr "" -#: plugins/check_load.c:144 +#: plugins/check_load.c:160 #, c-format msgid "Error code %d returned in %s\n" msgstr "" -#: plugins/check_load.c:152 +#: plugins/check_load.c:168 #, c-format msgid "Error in getloadavg()\n" msgstr "" -#: plugins/check_load.c:155 plugins/check_load.c:157 +#: plugins/check_load.c:171 plugins/check_load.c:173 #, c-format msgid "Error processing %s\n" msgstr "" -#: plugins/check_load.c:166 +#: plugins/check_load.c:182 #, c-format msgid "load average: %.2f, %.2f, %.2f" msgstr "" -#: plugins/check_load.c:255 +#: plugins/check_load.c:271 #, fuzzy, c-format msgid "Critical threshold for %d-minute load average is not specified\n" msgstr "Critical threshold muss ein positiver Integer sein\n" -#: plugins/check_load.c:257 +#: plugins/check_load.c:273 #, fuzzy, c-format msgid "Warning threshold for %d-minute load average is not specified\n" msgstr "Warning threshold muss ein positiver Integer sein\n" -#: plugins/check_load.c:259 +#: plugins/check_load.c:275 #, c-format msgid "" "Parameter inconsistency: %d-minute \"warning load\" is greater than " "\"critical load\"\n" msgstr "" -#: plugins/check_load.c:275 +#: plugins/check_load.c:291 #, c-format -msgid "" -"This plugin tests the current system load average.\n" -"\n" +msgid "This plugin tests the current system load average." msgstr "" -#: plugins/check_load.c:281 -#, c-format -msgid "" -" -w, --warning=WLOAD1,WLOAD5,WLOAD15\n" -" Exit with WARNING status if load average exceeds WLOADn\n" -" -c, --critical=CLOAD1,CLOAD5,CLOAD15\n" -" Exit with CRITICAL status if load average exceed CLOADn\n" -"\n" -"the load average format is the same used by \"uptime\" and \"w\"\n" -"\n" +#: plugins/check_load.c:300 +msgid "Exit with WARNING status if load average exceeds WLOADn" msgstr "" -#: plugins/check_mrtg.c:62 +#: plugins/check_load.c:302 +msgid "Exit with CRITICAL status if load average exceed CLOADn" +msgstr "" + +#: plugins/check_load.c:303 +msgid "the load average format is the same used by \"uptime\" and \"w\"" +msgstr "" + +#: plugins/check_mrtg.c:79 msgid "Could not parse arguments\n" msgstr "" -#: plugins/check_mrtg.c:67 +#: plugins/check_mrtg.c:84 #, c-format msgid "Unable to open MRTG log file\n" msgstr "" -#: plugins/check_mrtg.c:114 +#: plugins/check_mrtg.c:131 #, c-format msgid "Unable to process MRTG log file\n" msgstr "" -#: plugins/check_mrtg.c:122 plugins/check_mrtgtraf.c:119 +#: plugins/check_mrtg.c:139 plugins/check_mrtgtraf.c:136 #, c-format msgid "MRTG data has expired (%d minutes old)\n" msgstr "" -#: plugins/check_mrtg.c:139 plugins/check_mrtgtraf.c:178 -#: plugins/check_mrtgtraf.c:179 +#: plugins/check_mrtg.c:156 plugins/check_mrtgtraf.c:195 +#: plugins/check_mrtgtraf.c:196 msgid "Avg" msgstr "" -#: plugins/check_mrtg.c:139 plugins/check_mrtgtraf.c:178 -#: plugins/check_mrtgtraf.c:179 +#: plugins/check_mrtg.c:156 plugins/check_mrtgtraf.c:195 +#: plugins/check_mrtgtraf.c:196 msgid "Max" msgstr "" -#: plugins/check_mrtg.c:208 +#: plugins/check_mrtg.c:225 msgid "Invalid variable number" msgstr "" -#: plugins/check_mrtg.c:243 +#: plugins/check_mrtg.c:260 #, c-format msgid "" "%s is not a valid expiration time\n" "Use '%s -h' for additional help\n" msgstr "" -#: plugins/check_mrtg.c:260 +#: plugins/check_mrtg.c:277 msgid "Invalid variable number\n" msgstr "" -#: plugins/check_mrtg.c:287 +#: plugins/check_mrtg.c:304 msgid "You must supply the variable number" msgstr "" -#: plugins/check_mrtg.c:308 -#, c-format +#: plugins/check_mrtg.c:325 msgid "" -"This plugin will check either the average or maximum value of one of the\n" -"two variables recorded in an MRTG log file.\n" -"\n" +"This plugin will check either the average or maximum value of one of the" msgstr "" -#: plugins/check_mrtg.c:316 -#, c-format -msgid "" -" -F, --logfile=FILE\n" -" The MRTG log file containing the data you want to monitor\n" -" -e, --expires=MINUTES\n" -" Minutes before MRTG data is considered to be too old\n" -" -a, --aggregation=AVG|MAX\n" -" Should we check average or maximum values?\n" -" -v, --variable=INTEGER\n" -" Which variable set should we inspect? (1 or 2)\n" -" -w, --warning=INTEGER\n" -" Threshold value for data to result in WARNING status\n" -" -c, --critical=INTEGER\n" -" Threshold value for data to result in CRITICAL status\n" -msgstr "" +#: plugins/check_mrtg.c:326 +#, fuzzy +msgid "two variables recorded in an MRTG log file." +msgstr "Konnte MRTG Logfile nicht öffnen" -#: plugins/check_mrtg.c:330 -#, c-format -msgid "" -" -l, --label=STRING\n" -" Type label for data (Examples: Conns, \"Processor Load\", In, Out)\n" -" -u, --units=STRING\n" -" Option units label for data (Example: Packets/Sec, Errors/Sec, \n" -" \"Bytes Per Second\", \"%% Utilization\")\n" +#: plugins/check_mrtg.c:335 +msgid "The MRTG log file containing the data you want to monitor" msgstr "" #: plugins/check_mrtg.c:337 -#, c-format -msgid "" -"If the value exceeds the threshold, a WARNING status is returned. If\n" -"the value exceeds the threshold, a CRITICAL status is returned. If\n" -"the data in the log file is older than old, a WARNING\n" -"status is returned and a warning message is printed.\n" -"\n" +msgid "Minutes before MRTG data is considered to be too old" +msgstr "" + +#: plugins/check_mrtg.c:339 +msgid "Should we check average or maximum values?" +msgstr "" + +#: plugins/check_mrtg.c:341 +msgid "Which variable set should we inspect? (1 or 2)" msgstr "" #: plugins/check_mrtg.c:343 -#, c-format -msgid "" -"This plugin is useful for monitoring MRTG data that does not correspond to\n" -"bandwidth usage. (Use the check_mrtgtraf plugin for monitoring bandwidth).\n" -"It can be used to monitor any kind of data that MRTG is monitoring - " -"errors,\n" -"packets/sec, etc. I use MRTG in conjuction with the Novell NLM that allows\n" -"me to track processor utilization, user connections, drive space, etc and\n" -"this plugin works well for monitoring that kind of data as well.\n" -"\n" +msgid "Threshold value for data to result in WARNING status" +msgstr "" + +#: plugins/check_mrtg.c:345 +msgid "Threshold value for data to result in CRITICAL status" +msgstr "" + +#: plugins/check_mrtg.c:347 +msgid "Type label for data (Examples: Conns, \"Processor Load\", In, Out)" +msgstr "" + +#: plugins/check_mrtg.c:349 +msgid "Option units label for data (Example: Packets/Sec, Errors/Sec," msgstr "" #: plugins/check_mrtg.c:350 #, c-format -msgid "" -"Notes:\n" -"- This plugin only monitors one of the two variables stored in the MRTG log\n" -" file. If you want to monitor both values you will have to define two\n" -" commands with different values for the argument. Of course,\n" -" you can always hack the code to make this plugin work for you...\n" -"- MRTG stands for the Multi Router Traffic Grapher. It can be downloaded " -"from\n" -" http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html\n" +msgid "\"Bytes Per Second\", \"%% Utilization\")" msgstr "" -#: plugins/check_mrtgtraf.c:71 +#: plugins/check_mrtg.c:352 +msgid "" +"If the value exceeds the threshold, a WARNING status is returned. If" +msgstr "" + +#: plugins/check_mrtg.c:353 +msgid "" +"the value exceeds the threshold, a CRITICAL status is returned. If" +msgstr "" + +#: plugins/check_mrtg.c:354 +msgid "the data in the log file is older than old, a WARNING" +msgstr "" + +#: plugins/check_mrtg.c:355 +msgid "status is returned and a warning message is printed." +msgstr "" + +#: plugins/check_mrtg.c:357 +msgid "" +"This plugin is useful for monitoring MRTG data that does not correspond to" +msgstr "" + +#: plugins/check_mrtg.c:358 +msgid "" +"bandwidth usage. (Use the check_mrtgtraf plugin for monitoring bandwidth)." +msgstr "" + +#: plugins/check_mrtg.c:359 +msgid "" +"It can be used to monitor any kind of data that MRTG is monitoring - errors," +msgstr "" + +#: plugins/check_mrtg.c:360 +msgid "" +"packets/sec, etc. I use MRTG in conjuction with the Novell NLM that allows" +msgstr "" + +#: plugins/check_mrtg.c:361 +msgid "" +"me to track processor utilization, user connections, drive space, etc and" +msgstr "" + +#: plugins/check_mrtg.c:362 +msgid "this plugin works well for monitoring that kind of data as well." +msgstr "" + +#: plugins/check_mrtg.c:365 +msgid "" +"- This plugin only monitors one of the two variables stored in the MRTG log" +msgstr "" + +#: plugins/check_mrtg.c:366 +msgid " file. If you want to monitor both values you will have to define two" +msgstr "" + +#: plugins/check_mrtg.c:367 +msgid "" +" commands with different values for the argument. Of course," +msgstr "" + +#: plugins/check_mrtg.c:368 +msgid "you can always hack the code to make this plugin work for you..." +msgstr "" + +#: plugins/check_mrtg.c:369 +msgid "" +"- MRTG stands for the Multi Router Traffic Grapher. It can be downloaded " +"from" +msgstr "" + +#: plugins/check_mrtgtraf.c:88 msgid "Unable to open MRTG log file" msgstr "Konnte MRTG Logfile nicht öffnen" -#: plugins/check_mrtgtraf.c:113 +#: plugins/check_mrtgtraf.c:130 msgid "Unable to process MRTG log file" msgstr "" -#: plugins/check_mrtgtraf.c:177 +#: plugins/check_mrtgtraf.c:194 #, c-format msgid "%s. In = %0.1f %s, %s. Out = %0.1f %s|%s %s\n" msgstr "" -#: plugins/check_mrtgtraf.c:190 +#: plugins/check_mrtgtraf.c:207 #, c-format msgid "Traffic %s - %s\n" msgstr "" -#: plugins/check_mrtgtraf.c:320 -#, c-format +#: plugins/check_mrtgtraf.c:337 msgid "" -"\n" -"This plugin will check the incoming/outgoing transfer rates of a router,\n" -"switch, etc recorded in an MRTG log. If the newest log entry is older\n" -"than , a WARNING status is returned. If either the\n" -"incoming or outgoing rates exceed the or thresholds (in\n" -"Bytes/sec), a CRITICAL status results. If either of the rates exceed\n" -"the or thresholds (in Bytes/sec), a WARNING status results.\n" -"\n" +"This plugin will check the incoming/outgoing transfer rates of a router," msgstr "" -#: plugins/check_mrtgtraf.c:332 -#, c-format -msgid "" -" -F, --filename=STRING\n" -" File to read log from\n" -" -e, --expires=INTEGER\n" -" Minutes after which log expires\n" -" -a, --aggregation=(AVG|MAX)\n" -" Test average or maximum\n" -" -w, --warning\n" -" Warning threshold pair \",\"\n" -" -c, --critical\n" -" Critical threshold pair \",\"\n" +#: plugins/check_mrtgtraf.c:338 +msgid "switch, etc recorded in an MRTG log. If the newest log entry is older" msgstr "" -#: plugins/check_mrtgtraf.c:344 -#, c-format -msgid "" -"Notes:\n" -"- MRTG stands for Multi Router Traffic Grapher. It can be downloaded from\n" -" http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html\n" -"- While MRTG can monitor things other than traffic rates, this\n" -" plugin probably won't work with much else without modification.\n" -"- The calculated i/o rates are a little off from what MRTG actually\n" -" reports. I'm not sure why this is right now, but will look into it\n" -" for future enhancements of this plugin.\n" +#: plugins/check_mrtgtraf.c:339 +msgid "than , a WARNING status is returned. If either the" msgstr "" -#: plugins/check_mysql.c:106 +#: plugins/check_mrtgtraf.c:340 +msgid "incoming or outgoing rates exceed the or thresholds (in" +msgstr "" + +#: plugins/check_mrtgtraf.c:341 +msgid "Bytes/sec), a CRITICAL status results. If either of the rates exceed" +msgstr "" + +#: plugins/check_mrtgtraf.c:342 +msgid "the or thresholds (in Bytes/sec), a WARNING status results." +msgstr "" + +#: plugins/check_mrtgtraf.c:351 +msgid "File to read log from" +msgstr "" + +#: plugins/check_mrtgtraf.c:353 +msgid "Minutes after which log expires" +msgstr "" + +#: plugins/check_mrtgtraf.c:355 +msgid "Test average or maximum" +msgstr "" + +#: plugins/check_mrtgtraf.c:357 +#, fuzzy +msgid "Warning threshold pair ," +msgstr "Warning threshold Integer sein" + +#: plugins/check_mrtgtraf.c:359 +#, fuzzy +msgid "Critical threshold pair ," +msgstr "Critical threshold muss ein Integer sein" + +#: plugins/check_mrtgtraf.c:362 +msgid "" +"- MRTG stands for Multi Router Traffic Grapher. It can be downloaded from" +msgstr "" + +#: plugins/check_mrtgtraf.c:364 +msgid "- While MRTG can monitor things other than traffic rates, this" +msgstr "" + +#: plugins/check_mrtgtraf.c:365 +msgid " plugin probably won't work with much else without modification." +msgstr "" + +#: plugins/check_mrtgtraf.c:366 +msgid "- The calculated i/o rates are a little off from what MRTG actually" +msgstr "" + +#: plugins/check_mrtgtraf.c:367 +msgid " reports. I'm not sure why this is right now, but will look into it" +msgstr "" + +#: plugins/check_mrtgtraf.c:368 +msgid " for future enhancements of this plugin." +msgstr "" + +#: plugins/check_mrtgtraf.c:378 +#, c-format +msgid "Usage" +msgstr "" + +#: plugins/check_mysql.c:129 #, c-format msgid "slave query error: %s\n" msgstr "" -#: plugins/check_mysql.c:113 +#: plugins/check_mysql.c:136 #, c-format msgid "slave store_result error: %s\n" msgstr "" -#: plugins/check_mysql.c:119 +#: plugins/check_mysql.c:142 msgid "No slaves defined" msgstr "" -#: plugins/check_mysql.c:127 +#: plugins/check_mysql.c:150 #, c-format msgid "slave fetch row error: %s\n" msgstr "" -#: plugins/check_mysql.c:132 +#: plugins/check_mysql.c:155 #, c-format msgid "Slave running: %s" msgstr "" -#: plugins/check_mysql.c:350 -#, c-format -msgid "This program tests connections to a mysql server\n" +#: plugins/check_mysql.c:373 +msgid "This program tests connections to a mysql server" msgstr "" -#: plugins/check_mysql.c:358 -#, c-format +#: plugins/check_mysql.c:384 +msgid "Check database with indicated name" +msgstr "" + +#: plugins/check_mysql.c:386 +msgid "Connect using the indicated username" +msgstr "" + +#: plugins/check_mysql.c:388 +msgid "Use the indicated password to authenticate the connection" +msgstr "" + +#: plugins/check_mysql.c:389 +msgid "==> IMPORTANT: THIS FORM OF AUTHENTICATION IS NOT SECURE!!! <==" +msgstr "" + +#: plugins/check_mysql.c:390 +msgid "Your clear-text password will be visible as a process table entry" +msgstr "" + +#: plugins/check_mysql.c:392 +msgid "Check if the slave thread is running properly." +msgstr "" + +#: plugins/check_mysql.c:394 msgid "" -" -d, --database=STRING\n" -" Check database with indicated name\n" -" -u, --username=STRING\n" -" Connect using the indicated username\n" -" -p, --password=STRING\n" -" Use the indicated password to authenticate the connection\n" -" ==> IMPORTANT: THIS FORM OF AUTHENTICATION IS NOT SECURE!!! <==\n" -" Your clear-text password will be visible as a process table entry\n" -" -S, --check-slave\n" -" Check if the slave thread is running properly.\n" -" -w, --warning\n" -" Exit with WARNING status if slave server is more then INTEGER seconds " -"behind master\n" -" -c, --critical\n" -" Exit with CRITICAL status if slave server is more then INTEGER seconds " -"behind master\n" +"Exit with WARNING status if slave server is more then INTEGER seconds behind " +"master" msgstr "" -#: plugins/check_mysql.c:374 -#, c-format +#: plugins/check_mysql.c:396 msgid "" -"\n" -"There are no required arguments. By default, the local database with\n" -"a server listening on MySQL standard port %d will be checked\n" +"Exit with CRITICAL status if slave server is more then INTEGER seconds " +"behind master" msgstr "" -#: plugins/check_nagios.c:88 +#: plugins/check_mysql.c:397 +msgid "There are no required arguments. By default, the local database with" +msgstr "" + +#: plugins/check_mysql.c:398 +#, c-format +msgid "a server listening on MySQL standard port %d will be checked\n" +msgstr "" + +#: plugins/check_nagios.c:107 msgid "Cannot open status log for reading!" msgstr "" -#: plugins/check_nagios.c:138 +#: plugins/check_nagios.c:157 #, c-format msgid "Found process: %s %s\n" msgstr "" -#: plugins/check_nagios.c:152 +#: plugins/check_nagios.c:171 msgid "Could not locate a running Nagios process!" msgstr "" -#: plugins/check_nagios.c:156 +#: plugins/check_nagios.c:175 msgid "Cannot parse Nagios log file for valid time" msgstr "" -#: plugins/check_nagios.c:167 plugins/check_procs.c:295 +#: plugins/check_nagios.c:186 plugins/check_procs.c:307 #, c-format msgid "%d process" msgid_plural "%d processes" msgstr[0] "" msgstr[1] "" -#: plugins/check_nagios.c:170 +#: plugins/check_nagios.c:189 #, c-format msgid "status log updated %d second ago" msgid_plural "status log updated %d seconds ago" msgstr[0] "" msgstr[1] "" -#: plugins/check_nagios.c:207 plugins/check_nagios.c:236 +#: plugins/check_nagios.c:226 plugins/check_nagios.c:255 #, fuzzy msgid "Expiration time must be an integer (seconds)\n" msgstr "skip lines muss ein Integer sein" -#: plugins/check_nagios.c:248 +#: plugins/check_nagios.c:267 #, fuzzy msgid "You must provide the status_log\n" msgstr "%s: Hostname muss angegeben werden\n" -#: plugins/check_nagios.c:251 +#: plugins/check_nagios.c:270 #, fuzzy msgid "You must provide a process string\n" msgstr "%s: Hostname muss angegeben werden\n" -#: plugins/check_nagios.c:265 -#, c-format +#: plugins/check_nagios.c:284 +#, fuzzy msgid "" -"This plugin checks the status of the Nagios process on the local\n" -"machine. The plugin will check to make sure the Nagios status log is no " -"older\n" -"than the number of minutes specified by the expires option. It also\n" -"checks the process table for a process matching the command argument.\n" +"This plugin checks the status of the Nagios process on the local machine" +msgstr "" +"Dieses Plugin prüft den freien Speicher auf einem gemounteten Filesystem\n" +"und erzeugt einen Alarm wenn einer der angegebenen Schwellwerte " +"unterschritten wird.\n" "\n" -msgstr "" -#: plugins/check_nagios.c:275 -#, c-format +#: plugins/check_nagios.c:285 msgid "" -" -F, --filename=FILE\n" -" Name of the log file to check\n" -" -e, --expires=INTEGER\n" -" Minutes aging after which logfile is considered stale\n" -" -C, --command=STRING\n" -" Substring to search for in process arguments\n" +"The plugin will check to make sure the Nagios status log is no older than" msgstr "" -#: plugins/check_nagios.c:283 -#, c-format +#: plugins/check_nagios.c:286 +msgid "the number of minutes specified by the expires option." +msgstr "" + +#: plugins/check_nagios.c:287 msgid "" -"Example:\n" -" ./check_nagios -e 5 -F /usr/local/nagios/var/status.log -C /usr/local/" -"nagios/bin/nagios\n" +"It also checks the process table for a process matching the command argument." msgstr "" -#: plugins/check_nt.c:135 +#: plugins/check_nagios.c:296 +msgid "Name of the log file to check" +msgstr "" + +#: plugins/check_nagios.c:298 +msgid "Minutes aging after which logfile is considered stale" +msgstr "" + +#: plugins/check_nagios.c:300 +msgid "Substring to search for in process arguments" +msgstr "" + +#: plugins/check_nt.c:141 #, c-format msgid "Wrong client version - running: %s, required: %s" msgstr "" -#: plugins/check_nt.c:146 plugins/check_nt.c:206 +#: plugins/check_nt.c:152 plugins/check_nt.c:212 msgid "missing -l parameters" msgstr "" -#: plugins/check_nt.c:148 +#: plugins/check_nt.c:154 msgid "wrong -l parameter." msgstr "" -#: plugins/check_nt.c:152 +#: plugins/check_nt.c:158 msgid "CPU Load" msgstr "" -#: plugins/check_nt.c:175 +#: plugins/check_nt.c:181 #, c-format msgid " %lu%% (%lu min average)" msgstr "" -#: plugins/check_nt.c:177 +#: plugins/check_nt.c:183 #, c-format msgid " '%lu min avg Load'=%lu%%;%lu;%lu;0;100" msgstr "" -#: plugins/check_nt.c:187 +#: plugins/check_nt.c:193 msgid "not enough values for -l parameters" msgstr "" -#: plugins/check_nt.c:199 +#: plugins/check_nt.c:205 #, c-format msgid "System Uptime - %u day(s) %u hour(s) %u minute(s)" msgstr "" -#: plugins/check_nt.c:208 +#: plugins/check_nt.c:214 msgid "wrong -l argument" msgstr "" -#: plugins/check_nt.c:219 +#: plugins/check_nt.c:225 #, c-format msgid "%s:\\ - total: %.2f Gb - used: %.2f Gb (%.0f%%) - free %.2f Gb (%.0f%%)" msgstr "" -#: plugins/check_nt.c:222 +#: plugins/check_nt.c:228 #, c-format msgid "'%s:\\ Used Space'=%.2fGb;%.2f;%.2f;0.00;%.2f" msgstr "" -#: plugins/check_nt.c:236 +#: plugins/check_nt.c:242 msgid "Free disk space : Invalid drive " msgstr "" -#: plugins/check_nt.c:246 +#: plugins/check_nt.c:252 msgid "No service/process specified" msgstr "" -#: plugins/check_nt.c:270 +#: plugins/check_nt.c:276 #, c-format msgid "" "Memory usage: total:%.2f Mb - used: %.2f Mb (%.0f%%) - free: %.2f Mb (%.0f%%)" msgstr "" -#: plugins/check_nt.c:273 +#: plugins/check_nt.c:279 #, c-format msgid "'Memory usage'=%.2fMb;%.2f;%.2f;0.00;%.2f" msgstr "" -#: plugins/check_nt.c:309 plugins/check_nt.c:395 +#: plugins/check_nt.c:315 plugins/check_nt.c:401 msgid "No counter specified" msgstr "" -#: plugins/check_nt.c:342 +#: plugins/check_nt.c:348 msgid "Minimum value contains non-numbers" msgstr "" -#: plugins/check_nt.c:346 +#: plugins/check_nt.c:352 msgid "Maximum value contains non-numbers" msgstr "" -#: plugins/check_nt.c:353 +#: plugins/check_nt.c:359 msgid "No unit counter specified" msgstr "" -#: plugins/check_nt.c:425 +#: plugins/check_nt.c:431 msgid "Please specify a variable to check" msgstr "" -#: plugins/check_nt.c:507 +#: plugins/check_nt.c:513 #, fuzzy msgid "Server port must be an integer\n" msgstr "skip lines muss ein Integer sein" -#: plugins/check_nt.c:560 +#: plugins/check_nt.c:566 msgid "None" msgstr "" -#: plugins/check_nt.c:573 +#: plugins/check_nt.c:579 msgid "could not fetch information from server\n" msgstr "" -#: plugins/check_nt.c:617 -#, c-format -msgid "" -"This plugin collects data from the NSClient service running on a\n" -"Windows NT/2000/XP/2003 server.\n" -"\n" +#: plugins/check_nt.c:623 +msgid "This plugin collects data from the NSClient service running on a" msgstr "" -#: plugins/check_nt.c:622 -#, c-format -msgid "" -"\n" -"Options:\n" -"-H, --hostname=HOST\n" -" Name of the host to check\n" -"-p, --port=INTEGER\n" -" Optional port number (default: %d)\n" -"-s \n" -" Password needed for the request\n" -"-w, --warning=INTEGER\n" -" Threshold which will result in a warning status\n" -"-c, --critical=INTEGER\n" -" Threshold which will result in a critical status\n" -"-t, --timeout=INTEGER\n" -" Seconds before connection attempt times out (default: %d)\n" -"-h, --help\n" -" Print this help screen\n" -"-V, --version\n" -" Print version information\n" +#: plugins/check_nt.c:624 +msgid "Windows NT/2000/XP/2003 server." msgstr "" -#: plugins/check_nt.c:640 -#, c-format -msgid "" -"-v, --variable=STRING\n" -" Variable to check. Valid variables are:\n" +#: plugins/check_nt.c:632 +msgid "Options:" msgstr "" -#: plugins/check_nt.c:643 -#, c-format -msgid "" -" CLIENTVERSION = Get the NSClient version\n" -" If -l is specified, will return warning if versions differ.\n" +#: plugins/check_nt.c:634 +msgid "Name of the host to check" msgstr "" -#: plugins/check_nt.c:646 -#, c-format -msgid "" -" CPULOAD = Average CPU load on last x minutes.\n" -" Request a -l parameter with the following syntax:\n" -" -l ,,.\n" -" should be less than 24*60.\n" -" Thresholds are percentage and up to 10 requests can be done in one " -"shot.\n" -" ie: -l 60,90,95,120,90,95\n" +#: plugins/check_nt.c:636 +#, fuzzy +msgid "Optional port number (default: " +msgstr "Ungültige Portnummer" + +#: plugins/check_nt.c:639 +msgid "Password needed for the request" +msgstr "" + +#: plugins/check_nt.c:641 plugins/check_nwstat.c:1664 +#: plugins/check_overcr.c:435 +msgid "Threshold which will result in a warning status" +msgstr "" + +#: plugins/check_nt.c:643 plugins/check_nwstat.c:1666 +#: plugins/check_overcr.c:437 +msgid "Threshold which will result in a critical status" +msgstr "" + +#: plugins/check_nt.c:645 +msgid "Seconds before connection attempt times out (default: " +msgstr "" + +#: plugins/check_nt.c:648 +msgid "Print this help screen" +msgstr "" + +#: plugins/check_nt.c:650 +msgid "Print version information" +msgstr "" + +#: plugins/check_nt.c:652 +msgid "Variable to check" msgstr "" #: plugins/check_nt.c:653 -#, c-format -msgid "" -" UPTIME = Get the uptime of the machine.\n" -" No specific parameters. No warning or critical threshold\n" +msgid "Valid variables are:" +msgstr "" + +#: plugins/check_nt.c:655 +msgid "Get the NSClient version" msgstr "" #: plugins/check_nt.c:656 -#, c-format -msgid "" -" USEDDISKSPACE = Size and percentage of disk use.\n" -" Request a -l parameter containing the drive letter only.\n" -" Warning and critical thresholds can be specified with -w and -c.\n" +msgid "If -l is specified, will return warning if versions differ." +msgstr "" + +#: plugins/check_nt.c:658 +msgid "Average CPU load on last x minutes." +msgstr "" + +#: plugins/check_nt.c:659 +msgid "Request a -l parameter with the following syntax:" msgstr "" #: plugins/check_nt.c:660 -#, c-format -msgid "" -" MEMUSE = Memory use.\n" -" Warning and critical thresholds can be specified with -w and -c.\n" +msgid "-l ,,." msgstr "" -#: plugins/check_nt.c:663 -#, c-format +#: plugins/check_nt.c:661 +msgid " should be less than 24*60." +msgstr "" + +#: plugins/check_nt.c:662 msgid "" -" SERVICESTATE = Check the state of one or several services.\n" -" Request a -l parameters with the following syntax:\n" -" -l ,,,...\n" -" You can specify -d SHOWALL in case you want to see working services\n" -"\t\t in the returned string.\n" +"Thresholds are percentage and up to 10 requests can be done in one shot." +msgstr "" + +#: plugins/check_nt.c:665 +msgid "Get the uptime of the machine." +msgstr "" + +#: plugins/check_nt.c:666 +msgid "No specific parameters. No warning or critical threshold" +msgstr "" + +#: plugins/check_nt.c:668 +msgid "Size and percentage of disk use." msgstr "" #: plugins/check_nt.c:669 -#, c-format -msgid "" -" PROCSTATE = Check if one or several process are running.\n" -" Same syntax as SERVICESTATE.\n" +msgid "Request a -l parameter containing the drive letter only." +msgstr "" + +#: plugins/check_nt.c:670 plugins/check_nt.c:673 +msgid "Warning and critical thresholds can be specified with -w and -c." msgstr "" #: plugins/check_nt.c:672 -#, c-format -msgid "" -" COUNTER = Check any performance counter of Windows NT/2000.\n" -" Request a -l parameters with the following syntax:\n" -"\t\t -l \"\\\\\\\\counter\",\"\n" -" The parameter is optional and \n" -" is given to a printf output command which requires a float parameter.\n" -" If does not include \"%%\", it is used as a label.\n" -" Some examples:\n" -" \"Paging file usage is %%.2f %%%%\"\n" -" \"%%.f %%%% paging file used.\"\n" +msgid "Memory use." +msgstr "" + +#: plugins/check_nt.c:675 +msgid "Check the state of one or several services." +msgstr "" + +#: plugins/check_nt.c:676 plugins/check_nt.c:685 +msgid "Request a -l parameters with the following syntax:" +msgstr "" + +#: plugins/check_nt.c:677 +msgid "-l ,,,..." +msgstr "" + +#: plugins/check_nt.c:678 +msgid "You can specify -d SHOWALL in case you want to see working services" +msgstr "" + +#: plugins/check_nt.c:679 +msgid "in the returned string." +msgstr "" + +#: plugins/check_nt.c:681 +msgid "Check if one or several process are running." msgstr "" #: plugins/check_nt.c:682 -#, c-format -msgid "" -"Notes:\n" -" - The NSClient service should be running on the server to get any " -"information\n" -" (http://nsclient.ready2run.nl).\n" -" - Critical thresholds should be lower than warning thresholds\n" +msgid "Same syntax as SERVICESTATE." msgstr "" -#: plugins/check_nwstat.c:146 +#: plugins/check_nt.c:684 +msgid "Check any performance counter of Windows NT/2000." +msgstr "" + +#: plugins/check_nt.c:686 +msgid "-l \"\\\\\\\\counter\",\"" +msgstr "" + +#: plugins/check_nt.c:687 +msgid "The parameter is optional and is given to a printf " +msgstr "" + +#: plugins/check_nt.c:688 +msgid "output command which requires a float parameter." +msgstr "" + +#: plugins/check_nt.c:689 +#, c-format +msgid "If does not include \"%%\", it is used as a label." +msgstr "" + +#: plugins/check_nt.c:690 +msgid "Some examples:" +msgstr "" + +#: plugins/check_nt.c:694 +msgid "" +"- The NSClient service should be running on the server to get any information" +msgstr "" + +#: plugins/check_nt.c:696 +msgid "- Critical thresholds should be lower than warning thresholds" +msgstr "" + +#: plugins/check_nt.c:697 +msgid "- Default port 1248 is sometimes in use by other services. The error" +msgstr "" + +#: plugins/check_nt.c:698 +msgid "" +"output when this happens contains \"Cannot map xxxxx to protocol number\"." +msgstr "" + +#: plugins/check_nt.c:699 +msgid "One fix for this is to change the port to something else on check_nt " +msgstr "" + +#: plugins/check_nt.c:700 +msgid "and on the client service it's connecting to." +msgstr "" + +#: plugins/check_ntp.c:720 +msgid "Critical offset should be larger than warning offset" +msgstr "" + +#: plugins/check_ntp.c:724 +msgid "Critical jitter should be larger than warning jitter" +msgstr "" + +#: plugins/check_ntp.c:810 +msgid "Offset unknown" +msgstr "" + +#: plugins/check_ntp.c:813 +msgid "Unable to fully sample sync server" +msgstr "" + +#: plugins/check_ntp.c:836 +#, fuzzy +msgid "This plugin checks the selected ntp server" +msgstr "" +"Testet den DNS Dienst auf dem angegebenen Host mit dig\n" +"\n" + +#: plugins/check_ntp.c:844 +msgid "Offset to result in warning status (seconds)" +msgstr "" + +#: plugins/check_ntp.c:846 +msgid "Offset to result in critical status (seconds)" +msgstr "" + +#: plugins/check_ntp.c:848 +msgid "Warning value for jitter" +msgstr "" + +#: plugins/check_ntp.c:850 +msgid "Critical value for jitter" +msgstr "" + +#: plugins/check_nwstat.c:198 #, c-format msgid "NetWare %s: " msgstr "" -#: plugins/check_nwstat.c:184 +#: plugins/check_nwstat.c:236 #, c-format msgid "Up %s," msgstr "" -#: plugins/check_nwstat.c:192 +#: plugins/check_nwstat.c:244 #, c-format -msgid "Load %s - %s %s-min load average = %lu%%" +msgid "Load %s - %s %s-min load average = %lu%%|load%s=%lu;%lu;%lu;0;100" msgstr "" -#: plugins/check_nwstat.c:216 +#: plugins/check_nwstat.c:272 #, c-format -msgid "Conns %s - %lu current connections" +msgid "Conns %s - %lu current connections|Conns=%lu;%lu;%lu;;" msgstr "" -#: plugins/check_nwstat.c:238 +#: plugins/check_nwstat.c:297 #, c-format msgid "%s: Long term cache hits = %lu%%" msgstr "" -#: plugins/check_nwstat.c:260 +#: plugins/check_nwstat.c:319 #, c-format -msgid "%s: Total cache buffers = %lu" +msgid "%s: Total cache buffers = %lu|Cachebuffers=%lu;%lu;%lu;;" msgstr "" -#: plugins/check_nwstat.c:282 +#: plugins/check_nwstat.c:344 #, c-format -msgid "%s: Dirty cache buffers = %lu" +msgid "%s: Dirty cache buffers = %lu|Dirty-Cache-Buffers=%lu;%lu;%lu;;" msgstr "" -#: plugins/check_nwstat.c:304 +#: plugins/check_nwstat.c:369 #, c-format msgid "%s: LRU sitting time = %lu minutes" msgstr "" -#: plugins/check_nwstat.c:321 plugins/check_nwstat.c:349 -#: plugins/check_nwstat.c:494 plugins/check_nwstat.c:518 -#: plugins/check_nwstat.c:556 plugins/check_nwstat.c:580 +#: plugins/check_nwstat.c:386 plugins/check_nwstat.c:414 +#: plugins/check_nwstat.c:441 plugins/check_nwstat.c:474 +#: plugins/check_nwstat.c:654 plugins/check_nwstat.c:680 +#: plugins/check_nwstat.c:711 plugins/check_nwstat.c:757 +#: plugins/check_nwstat.c:781 #, c-format msgid "CRITICAL - Volume '%s' does not exist!" msgstr "" -#: plugins/check_nwstat.c:330 +#: plugins/check_nwstat.c:395 #, c-format -msgid "%s%lu KB free on volume %s" +msgid "%s%lu KB free on volume %s|KBFree%s=%lu;%lu;%lu;;" msgstr "" -#: plugins/check_nwstat.c:331 plugins/check_nwstat.c:502 -#: plugins/check_nwstat.c:564 +#: plugins/check_nwstat.c:396 plugins/check_nwstat.c:424 +#: plugins/check_nwstat.c:451 plugins/check_nwstat.c:663 +#: plugins/check_nwstat.c:689 plugins/check_nwstat.c:765 msgid "Only " msgstr "" -#: plugins/check_nwstat.c:373 +#: plugins/check_nwstat.c:423 #, c-format -msgid "%lu MB (%lu%%) free on volume %s - total %lu MB" +msgid "%s%lu MB free on volume %s|MBFree%s=%lu;%lu;%lu;;" msgstr "" -#: plugins/check_nwstat.c:398 +#: plugins/check_nwstat.c:450 +#, c-format +msgid "%s%lu MB used on volume %s|MBUsed%s=%lu;%lu;%lu;;" +msgstr "" + +#: plugins/check_nwstat.c:498 +#, c-format +msgid "" +"%lu MB (%lu%%) free on volume %s - total %lu MB|FreeMB%s=%lu;%lu;%lu;0;100" +msgstr "" + +#: plugins/check_nwstat.c:532 #, c-format msgid "Directory Services Database is %s (DS version %s)" msgstr "" -#: plugins/check_nwstat.c:415 +#: plugins/check_nwstat.c:549 #, c-format msgid "Logins are %s" msgstr "" -#: plugins/check_nwstat.c:415 +#: plugins/check_nwstat.c:549 msgid "enabled" msgstr "" -#: plugins/check_nwstat.c:415 +#: plugins/check_nwstat.c:549 msgid "disabled" msgstr "" -#: plugins/check_nwstat.c:454 +#: plugins/check_nwstat.c:564 +#, fuzzy +msgid "CRITICAL - NRM Status is bad!" +msgstr "CRITICAL - Serverdatum \"%100s\" konnte nicht verarbeitet werden" + +#: plugins/check_nwstat.c:569 +msgid "Warning - NRM Status is suspect!" +msgstr "" + +#: plugins/check_nwstat.c:572 +msgid "OK - NRM Status is good!" +msgstr "" + +#: plugins/check_nwstat.c:614 #, c-format msgid "%lu of %lu (%lu%%) packet receive buffers used" msgstr "" -#: plugins/check_nwstat.c:478 +#: plugins/check_nwstat.c:638 #, c-format msgid "%lu entries in SAP table" msgstr "" -#: plugins/check_nwstat.c:480 +#: plugins/check_nwstat.c:640 #, c-format msgid "%lu entries in SAP table for SAP type %d" msgstr "" -#: plugins/check_nwstat.c:502 +#: plugins/check_nwstat.c:662 #, c-format -msgid "%s%lu KB purgeable on volume %s" +msgid "%s%lu KB purgeable on volume %s|Purge%s=%lu;%lu;%lu;;" msgstr "" -#: plugins/check_nwstat.c:541 +#: plugins/check_nwstat.c:688 #, c-format -msgid "%lu MB (%lu%%) purgeable on volume %s" +msgid "%s%lu MB purgeable on volume %s|Purge%s=%lu;%lu;%lu;;" msgstr "" -#: plugins/check_nwstat.c:564 +#: plugins/check_nwstat.c:734 +#, c-format +msgid "%lu MB (%lu%%) purgeable on volume %s|Purgeable%s=%lu;%lu;%lu;0;100" +msgstr "" + +#: plugins/check_nwstat.c:765 #, c-format msgid "%s%lu KB not yet purgeable on volume %s" msgstr "" -#: plugins/check_nwstat.c:603 +#: plugins/check_nwstat.c:804 #, c-format msgid "%lu MB (%lu%%) not yet purgeable on volume %s" msgstr "" -#: plugins/check_nwstat.c:624 +#: plugins/check_nwstat.c:825 #, c-format -msgid "%lu open files" +msgid "%lu open files|Openfiles=%lu;%lu;%lu;0,0" msgstr "" -#: plugins/check_nwstat.c:644 +#: plugins/check_nwstat.c:850 #, c-format -msgid "%lu abended threads" +msgid "%lu abended threads|Abends=%lu;%lu;%lu;;" msgstr "" -#: plugins/check_nwstat.c:675 +#: plugins/check_nwstat.c:885 #, c-format -msgid "%lu current service processes (%lu max)" +msgid "%lu current service processes (%lu max)|Processes=%lu;%lu;%lu;0;%lu" msgstr "" -#: plugins/check_nwstat.c:694 +#: plugins/check_nwstat.c:908 msgid "CRITICAL - Time not in sync with network!" msgstr "" -#: plugins/check_nwstat.c:697 +#: plugins/check_nwstat.c:911 msgid "OK - Time in sync with network!" msgstr "" -#: plugins/check_nwstat.c:716 +#: plugins/check_nwstat.c:934 #, c-format msgid "LRU sitting time = %lu seconds" msgstr "" -#: plugins/check_nwstat.c:735 +#: plugins/check_nwstat.c:953 #, c-format -msgid "Dirty cache buffers = %lu%% of the total" +msgid "Dirty cache buffers = %lu%% of the total|DCB=%lu;%lu;%lu;0;100" msgstr "" -#: plugins/check_nwstat.c:753 +#: plugins/check_nwstat.c:975 #, c-format -msgid "Total cache buffers = %lu%% of the original" +msgid "Total cache buffers = %lu%% of the original|TCB=%lu;%lu;%lu;0;100" msgstr "" -#: plugins/check_nwstat.c:767 +#: plugins/check_nwstat.c:993 #, c-format msgid "NDS Version %s" msgstr "" -#: plugins/check_nwstat.c:783 +#: plugins/check_nwstat.c:1009 #, c-format msgid "Up %s" msgstr "" -#: plugins/check_nwstat.c:797 +#: plugins/check_nwstat.c:1023 #, c-format msgid "Module %s version %s is loaded" msgstr "" -#: plugins/check_nwstat.c:800 +#: plugins/check_nwstat.c:1026 #, c-format msgid "Module %s is not loaded" msgstr "" -#: plugins/check_nwstat.c:805 plugins/check_overcr.c:272 +#: plugins/check_nwstat.c:1037 plugins/check_nwstat.c:1063 +#: plugins/check_nwstat.c:1089 plugins/check_nwstat.c:1115 +#: plugins/check_nwstat.c:1141 plugins/check_nwstat.c:1167 +#: plugins/check_nwstat.c:1193 plugins/check_nwstat.c:1219 +#: plugins/check_nwstat.c:1245 plugins/check_nwstat.c:1271 +#, fuzzy, c-format +msgid "CRITICAL - Value '%s' does not exist!" +msgstr "%s [%s nicht gefunden]" + +#: plugins/check_nwstat.c:1046 plugins/check_nwstat.c:1072 +#: plugins/check_nwstat.c:1098 plugins/check_nwstat.c:1124 +#: plugins/check_nwstat.c:1150 plugins/check_nwstat.c:1176 +#: plugins/check_nwstat.c:1202 plugins/check_nwstat.c:1228 +#: plugins/check_nwstat.c:1254 plugins/check_nwstat.c:1280 +#, c-format +msgid "%s is %lu|%s=%lu;%lu;%lu;;" +msgstr "" + +#: plugins/check_nwstat.c:1293 plugins/check_overcr.c:289 msgid "Nothing to check!\n" msgstr "" -#: plugins/check_nwstat.c:887 plugins/check_overcr.c:342 +#: plugins/check_nwstat.c:1375 plugins/check_overcr.c:359 #, fuzzy msgid "Server port an integer\n" msgstr "skip lines muss ein Integer sein" -#: plugins/check_nwstat.c:1016 -#, c-format -msgid "" -"This plugin attempts to contact the MRTGEXT NLM running on a\n" -"Novell server to gather the requested system information.\n" -"\n" +#: plugins/check_nwstat.c:1605 +msgid "This plugin attempts to contact the MRTGEXT NLM running on a" msgstr "" -#: plugins/check_nwstat.c:1026 -#, c-format -msgid "" -" -v, --variable=STRING\n" -" Variable to check. Valid variables include:\n" -" LOAD1 = 1 minute average CPU load\n" -" LOAD5 = 5 minute average CPU load\n" -" LOAD15 = 15 minute average CPU load\n" -" CSPROCS = number of current service processes (NW 5.x only)\n" -" ABENDS = number of abended threads (NW 5.x only)\n" -" UPTIME = server uptime\n" +#: plugins/check_nwstat.c:1606 +msgid "Novell server to gather the requested system information." msgstr "" -#: plugins/check_nwstat.c:1036 -#, c-format -msgid "" -" LTCH = percent long term cache hits\n" -" CBUFF = current number of cache buffers\n" -" CDBUFF = current number of dirty cache buffers\n" -" DCB = dirty cache buffers as a percentage of the total\n" -" TCB = dirty cache buffers as a percentage of the original\n" +#: plugins/check_nwstat.c:1617 plugins/check_overcr.c:439 +msgid "Variable to check. Valid variables include:" msgstr "" -#: plugins/check_nwstat.c:1043 -#, c-format -msgid "" -" OFILES = number of open files\n" -" VPF = percent free space on volume \n" -" VKF = KB of free space on volume \n" -" VPP = percent purgeable space on volume \n" -" VKP = KB of purgeable space on volume \n" -" VPNP = percent not yet purgeable space on volume \n" -" VKNP = KB of not yet purgeable space on volume \n" +#: plugins/check_nwstat.c:1618 +msgid "LOAD1 = 1 minute average CPU load" msgstr "" -#: plugins/check_nwstat.c:1052 -#, c-format -msgid "" -" LRUM = LRU sitting time in minutes\n" -" LRUS = LRU sitting time in seconds\n" -" DSDB = check to see if DS Database is open\n" -" DSVER = NDS version\n" -" UPRB = used packet receive buffers\n" -" PUPRB = percent (of max) used packet receive buffers\n" -" SAPENTRIES = number of entries in the SAP table\n" -" SAPENTRIES = number of entries in the SAP table for SAP type \n" +#: plugins/check_nwstat.c:1619 +msgid "LOAD5 = 5 minute average CPU load" msgstr "" -#: plugins/check_nwstat.c:1062 -#, c-format -msgid "" -" TSYNC = timesync status \n" -" LOGINS = check to see if logins are enabled\n" -" CONNS = number of currently licensed connections\n" -" NLM: = check if NLM is loaded and report version\n" -" (e.g. \"NLM:TSANDS.NLM\")\n" +#: plugins/check_nwstat.c:1620 +msgid "LOAD15 = 15 minute average CPU load" msgstr "" -#: plugins/check_nwstat.c:1069 -#, c-format -msgid "" -" -w, --warning=INTEGER\n" -" Threshold which will result in a warning status\n" -" -c, --critical=INTEGER\n" -" Threshold which will result in a critical status\n" -" -o, --osversion\n" -" Include server version string in results\n" +#: plugins/check_nwstat.c:1621 +msgid "CSPROCS = number of current service processes (NW 5.x only)" msgstr "" -#: plugins/check_nwstat.c:1079 -#, c-format -msgid "" -"\n" -"Notes:\n" -"- This plugin requres that the MRTGEXT.NLM file from James Drews' MRTG\n" -" extension for NetWare be loaded on the Novell servers you wish to check.\n" -" (available from http://www.engr.wisc.edu/~drews/mrtg/)\n" -"- Values for critical thresholds should be lower than warning thresholds\n" -" when the following variables are checked: VPF, VKF, LTCH, CBUFF, DCB, \n" -" TCB, LRUS and LRUM.\n" +#: plugins/check_nwstat.c:1622 +msgid "ABENDS = number of abended threads (NW 5.x only)" msgstr "" -#: plugins/check_overcr.c:110 +#: plugins/check_nwstat.c:1623 +msgid "UPTIME = server uptime" +msgstr "" + +#: plugins/check_nwstat.c:1624 +msgid "LTCH = percent long term cache hits" +msgstr "" + +#: plugins/check_nwstat.c:1625 +msgid "CBUFF = current number of cache buffers" +msgstr "" + +#: plugins/check_nwstat.c:1626 +msgid "CDBUFF = current number of dirty cache buffers" +msgstr "" + +#: plugins/check_nwstat.c:1627 +msgid "DCB = dirty cache buffers as a percentage of the total" +msgstr "" + +#: plugins/check_nwstat.c:1628 +msgid "TCB = dirty cache buffers as a percentage of the original" +msgstr "" + +#: plugins/check_nwstat.c:1629 +msgid "OFILES = number of open files" +msgstr "" + +#: plugins/check_nwstat.c:1630 +msgid " VMF = MB of free space on Volume " +msgstr "" + +#: plugins/check_nwstat.c:1631 +msgid " VMU = MB used space on Volume " +msgstr "" + +#: plugins/check_nwstat.c:1632 +msgid " VMP = MB of purgeable space on Volume " +msgstr "" + +#: plugins/check_nwstat.c:1633 +msgid " VPF = percent free space on volume " +msgstr "" + +#: plugins/check_nwstat.c:1634 +msgid " VKF = KB of free space on volume " +msgstr "" + +#: plugins/check_nwstat.c:1635 +msgid " VPP = percent purgeable space on volume " +msgstr "" + +#: plugins/check_nwstat.c:1636 +msgid " VKP = KB of purgeable space on volume " +msgstr "" + +#: plugins/check_nwstat.c:1637 +msgid " VPNP = percent not yet purgeable space on volume " +msgstr "" + +#: plugins/check_nwstat.c:1638 +msgid " VKNP = KB of not yet purgeable space on volume " +msgstr "" + +#: plugins/check_nwstat.c:1639 +msgid " LRUM = LRU sitting time in minutes" +msgstr "" + +#: plugins/check_nwstat.c:1640 +msgid " LRUS = LRU sitting time in seconds" +msgstr "" + +#: plugins/check_nwstat.c:1641 +msgid " DSDB = check to see if DS Database is open" +msgstr "" + +#: plugins/check_nwstat.c:1642 +msgid " DSVER = NDS version" +msgstr "" + +#: plugins/check_nwstat.c:1643 +msgid " UPRB = used packet receive buffers" +msgstr "" + +#: plugins/check_nwstat.c:1644 +msgid " PUPRB = percent (of max) used packet receive buffers" +msgstr "" + +#: plugins/check_nwstat.c:1645 +msgid " SAPENTRIES = number of entries in the SAP table" +msgstr "" + +#: plugins/check_nwstat.c:1646 +msgid " SAPENTRIES = number of entries in the SAP table for SAP type " +msgstr "" + +#: plugins/check_nwstat.c:1647 +msgid " TSYNC = timesync status" +msgstr "" + +#: plugins/check_nwstat.c:1648 +msgid " LOGINS = check to see if logins are enabled" +msgstr "" + +#: plugins/check_nwstat.c:1649 +msgid " CONNS = number of currently licensed connections" +msgstr "" + +#: plugins/check_nwstat.c:1650 +msgid " NRMH\t= NRM Summary Status" +msgstr "" + +#: plugins/check_nwstat.c:1651 +msgid " NRMP = Returns the current value for a NRM health item" +msgstr "" + +#: plugins/check_nwstat.c:1652 +msgid " NRMM = Returns the current memory stats from NRM" +msgstr "" + +#: plugins/check_nwstat.c:1653 +msgid " NRMS = Returns the current Swapfile stats from NRM" +msgstr "" + +#: plugins/check_nwstat.c:1654 +msgid " NSS1 = Statistics from _Admin:Manage_NSS\\GeneralStats.xml" +msgstr "" + +#: plugins/check_nwstat.c:1655 +msgid " NSS3 = Statistics from _Admin:Manage_NSS\\NameCache.xml" +msgstr "" + +#: plugins/check_nwstat.c:1656 +msgid " NSS4 = Statistics from _Admin:Manage_NSS\\FileStats.xml" +msgstr "" + +#: plugins/check_nwstat.c:1657 +msgid " NSS5 = Statistics from _Admin:Manage_NSS\\ObjectCache.xml" +msgstr "" + +#: plugins/check_nwstat.c:1658 +msgid " NSS6 = Statistics from _Admin:Manage_NSS\\Thread.xml" +msgstr "" + +#: plugins/check_nwstat.c:1659 +msgid "" +" NSS7 = Statistics from _Admin:Manage_NSS\\AuthorizationCache.xml" +msgstr "" + +#: plugins/check_nwstat.c:1660 +msgid " NLM: = check if NLM is loaded and report version" +msgstr "" + +#: plugins/check_nwstat.c:1661 +msgid " (e.g. NLM:TSANDS.NLM)" +msgstr "" + +#: plugins/check_nwstat.c:1668 +msgid "Include server version string in results" +msgstr "" + +#: plugins/check_nwstat.c:1674 +msgid "- This plugin requres that the MRTGEXT.NLM file from James Drews' MRTG" +msgstr "" + +#: plugins/check_nwstat.c:1675 +msgid "" +" extension for NetWare be loaded on the Novell servers you wish to check." +msgstr "" + +#: plugins/check_nwstat.c:1676 +msgid " (available from http://www.engr.wisc.edu/~drews/mrtg/)" +msgstr "" + +#: plugins/check_nwstat.c:1677 +msgid "" +"- Values for critical thresholds should be lower than warning thresholds" +msgstr "" + +#: plugins/check_nwstat.c:1678 +msgid "" +" when the following variables are checked: VPF, VKF, LTCH, CBUFF, DCB, " +msgstr "" + +#: plugins/check_nwstat.c:1679 +msgid " TCB, LRUS and LRUM.\n" +msgstr "" + +#: plugins/check_overcr.c:127 msgid "Unknown error fetching load data\n" msgstr "" -#: plugins/check_overcr.c:114 +#: plugins/check_overcr.c:131 msgid "Invalid response from server - no load information\n" msgstr "" -#: plugins/check_overcr.c:120 +#: plugins/check_overcr.c:137 msgid "Invalid response from server after load 1\n" msgstr "" -#: plugins/check_overcr.c:126 +#: plugins/check_overcr.c:143 msgid "Invalid response from server after load 5\n" msgstr "" -#: plugins/check_overcr.c:151 +#: plugins/check_overcr.c:168 #, c-format msgid "Load %s - %s-min load average = %0.2f" msgstr "" -#: plugins/check_overcr.c:161 +#: plugins/check_overcr.c:178 msgid "Unknown error fetching disk data\n" msgstr "" -#: plugins/check_overcr.c:171 plugins/check_overcr.c:223 -#: plugins/check_overcr.c:227 +#: plugins/check_overcr.c:188 plugins/check_overcr.c:240 +#: plugins/check_overcr.c:244 msgid "Invalid response from server\n" msgstr "" -#: plugins/check_overcr.c:198 +#: plugins/check_overcr.c:215 msgid "Unknown error fetching network status\n" msgstr "" -#: plugins/check_overcr.c:208 +#: plugins/check_overcr.c:225 #, c-format msgid "Net %s - %d connection%s on port %d" msgstr "" -#: plugins/check_overcr.c:219 +#: plugins/check_overcr.c:236 msgid "Unknown error fetching process status\n" msgstr "" -#: plugins/check_overcr.c:237 +#: plugins/check_overcr.c:254 #, c-format msgid "Process %s - %d instance%s of %s running" msgstr "" -#: plugins/check_overcr.c:264 +#: plugins/check_overcr.c:281 #, c-format msgid "Uptime %s - Up %d days %d hours %d minutes" msgstr "" -#: plugins/check_overcr.c:406 -#, c-format +#: plugins/check_overcr.c:423 msgid "" -"This plugin attempts to contact the Over-CR collector daemon running on the\n" -"remote UNIX server in order to gather the requested system information.\n" -"\n" +"This plugin attempts to contact the Over-CR collector daemon running on the" msgstr "" -#: plugins/check_overcr.c:416 -#, c-format -msgid "" -"-v, --variable=STRING\n" -" Variable to check. Valid variables include:\n" -" LOAD1 = 1 minute average CPU load\n" -" LOAD5 = 5 minute average CPU load\n" -" LOAD15 = 15 minute average CPU load\n" -" DPU = percent used disk space on filesystem \n" -" PROC = number of running processes with name \n" -" NET = number of active connections on TCP port \n" -" UPTIME = system uptime in seconds\n" -msgstr "" - -#: plugins/check_overcr.c:427 -#, c-format -msgid "" -" -w, --warning=INTEGER\n" -" Threshold which will result in a warning status\n" -" -c, --critical=INTEGER\n" -" Threshold which will result in a critical status\n" -msgstr "" - -#: plugins/check_overcr.c:435 -#, c-format -msgid "" -"Notes:\n" -" - For the available options, the critical threshold value should always be\n" -" higher than the warning threshold value, EXCEPT with the uptime variable\n" -"\n" +#: plugins/check_overcr.c:424 +msgid "remote UNIX server in order to gather the requested system information." msgstr "" #: plugins/check_overcr.c:440 -#, c-format -msgid "" -" - This plugin requres that Eric Molitors' Over-CR collector daemon be\n" -" running on the remote server. Over-CR can be downloaded from\n" -" http://www.molitor.org/overcr (This plugin was tested with version\n" -" 0.99.53 of the Over-CR collector)\n" -"\n" +msgid "LOAD1 = 1 minute average CPU load" msgstr "" -#: plugins/check_pgsql.c:157 +#: plugins/check_overcr.c:441 +msgid "LOAD5 = 5 minute average CPU load" +msgstr "" + +#: plugins/check_overcr.c:442 +msgid "LOAD15 = 15 minute average CPU load" +msgstr "" + +#: plugins/check_overcr.c:443 +msgid "DPU = percent used disk space on filesystem " +msgstr "" + +#: plugins/check_overcr.c:444 +msgid "PROC = number of running processes with name " +msgstr "" + +#: plugins/check_overcr.c:445 +msgid "NET = number of active connections on TCP port " +msgstr "" + +#: plugins/check_overcr.c:446 +msgid "UPTIME = system uptime in seconds" +msgstr "" + +#: plugins/check_overcr.c:454 +msgid "" +"For the available options, the critical threshold value should always be" +msgstr "" + +#: plugins/check_overcr.c:455 +msgid "" +"higher than the warning threshold value, EXCEPT with the uptime variable" +msgstr "" + +#: plugins/check_overcr.c:457 +msgid "This plugin requres that Eric Molitors' Over-CR collector daemon be" +msgstr "" + +#: plugins/check_overcr.c:458 +msgid "running on the remote server." +msgstr "" + +#: plugins/check_overcr.c:460 +msgid "This plugin was tested with version 0.99.53 of the Over-CR collector" +msgstr "" + +#: plugins/check_pgsql.c:173 #, c-format msgid "CRITICAL - no connection to '%s' (%s).\n" msgstr "" -#: plugins/check_pgsql.c:172 +#: plugins/check_pgsql.c:188 #, c-format msgid " %s - database %s (%d sec.)|%s\n" msgstr "" -#: plugins/check_pgsql.c:227 plugins/check_tcp.c:458 plugins/check_time.c:265 -#: plugins/check_time.c:277 plugins/check_udp.c:166 plugins/check_users.c:152 +#: plugins/check_pgsql.c:243 plugins/check_time.c:281 plugins/check_time.c:293 +#: plugins/check_users.c:168 msgid "Critical threshold must be a positive integer" msgstr "Critical threshold muss ein positiver Integer sein" -#: plugins/check_pgsql.c:233 plugins/check_tcp.c:468 plugins/check_time.c:246 -#: plugins/check_time.c:270 plugins/check_udp.c:173 plugins/check_users.c:158 -#: plugins/check_users.c:168 plugins/check_users.c:175 +#: plugins/check_pgsql.c:249 plugins/check_time.c:262 plugins/check_time.c:286 +#: plugins/check_users.c:174 plugins/check_users.c:184 +#: plugins/check_users.c:191 msgid "Warning threshold must be a positive integer" msgstr "Warning threshold muss ein positiver Integer sein" -#: plugins/check_pgsql.c:251 +#: plugins/check_pgsql.c:267 msgid "Database name is not valid" msgstr "" -#: plugins/check_pgsql.c:257 +#: plugins/check_pgsql.c:273 msgid "User name is not valid" msgstr "" -#: plugins/check_pgsql.c:394 +#: plugins/check_pgsql.c:410 #, c-format -msgid "" -"Test whether a PostgreSQL Database is accepting connections.\n" -"\n" +msgid "Test whether a PostgreSQL Database is accepting connections." msgstr "" -#: plugins/check_pgsql.c:404 -#, c-format -msgid "" -" -d, --database=STRING\n" -" Database to check (default: %s)\n" -" -l, --logname = STRING\n" -" Login name of user\n" -" -p, --password = STRING\n" -" Password (BIG SECURITY ISSUE)\n" +#: plugins/check_pgsql.c:423 +msgid "Database to check " msgstr "" -#: plugins/check_pgsql.c:418 +#: plugins/check_pgsql.c:424 #, c-format -msgid "" -"\n" -"All parameters are optional.\n" -"\n" -"This plugin tests a PostgreSQL DBMS to determine whether it is active and\n" -"accepting queries. In its current operation, it simply connects to the\n" -"specified database, and then disconnects. If no database is specified, it\n" -"connects to the template1 database, which is present in every functioning \n" -"PostgreSQL DBMS.\n" +msgid "(default: %s)" msgstr "" -#: plugins/check_pgsql.c:425 -#, c-format -msgid "" -"\n" -"The plugin will connect to a local postmaster if no host is specified. To\n" -"connect to a remote host, be sure that the remote postmaster accepts TCP/IP\n" -"connections (start the postmaster with the -i option).\n" +#: plugins/check_pgsql.c:426 +msgid "Login name of user" msgstr "" -#: plugins/check_pgsql.c:429 -#, c-format -msgid "" -"\n" -"Typically, the nagios user (unless the --logname option is used) should be\n" -"able to connect to the database without a password. The plugin can also " -"send\n" -"a password, but no effort is made to obsure or encrypt the password.\n" +#: plugins/check_pgsql.c:428 +msgid "Password (BIG SECURITY ISSUE)" msgstr "" -#: plugins/check_ping.c:124 +#: plugins/check_pgsql.c:437 +msgid "All parameters are optional." +msgstr "" + +#: plugins/check_pgsql.c:438 +msgid "" +"This plugin tests a PostgreSQL DBMS to determine whether it is active and" +msgstr "" + +#: plugins/check_pgsql.c:439 +msgid "accepting queries. In its current operation, it simply connects to the" +msgstr "" + +#: plugins/check_pgsql.c:440 +msgid "" +"specified database, and then disconnects. If no database is specified, it" +msgstr "" + +#: plugins/check_pgsql.c:441 +msgid "" +"connects to the template1 database, which is present in every functioning" +msgstr "" + +#: plugins/check_pgsql.c:442 +msgid "PostgreSQL DBMS." +msgstr "" + +#: plugins/check_pgsql.c:443 +msgid "" +"The plugin will connect to a local postmaster if no host is specified. To" +msgstr "" + +#: plugins/check_pgsql.c:444 +msgid "" +"connect to a remote host, be sure that the remote postmaster accepts TCP/IP" +msgstr "" + +#: plugins/check_pgsql.c:445 +msgid "connections (start the postmaster with the -i option)." +msgstr "" + +#: plugins/check_pgsql.c:446 +msgid "" +"Typically, the nagios user (unless the --logname option is used) should be" +msgstr "" + +#: plugins/check_pgsql.c:447 +msgid "" +"able to connect to the database without a password. The plugin can also send" +msgstr "" + +#: plugins/check_pgsql.c:448 +msgid "a password, but no effort is made to obsure or encrypt the password." +msgstr "" + +#: plugins/check_ping.c:145 msgid "CRITICAL - Could not interpret output from ping command\n" msgstr "" -#: plugins/check_ping.c:140 +#: plugins/check_ping.c:161 #, c-format msgid "PING %s - %sPacket loss = %d%%" msgstr "" -#: plugins/check_ping.c:143 +#: plugins/check_ping.c:164 #, c-format msgid "PING %s - %sPacket loss = %d%%, RTA = %2.2f ms" msgstr "" -#: plugins/check_ping.c:231 +#: plugins/check_ping.c:252 msgid "Could not realloc() addresses\n" msgstr "" -#: plugins/check_ping.c:246 plugins/check_ping.c:326 +#: plugins/check_ping.c:267 plugins/check_ping.c:347 #, c-format msgid " (%s) must be a non-negative number\n" msgstr "" -#: plugins/check_ping.c:280 +#: plugins/check_ping.c:301 #, c-format msgid " (%s) must be an integer percentage\n" msgstr "" -#: plugins/check_ping.c:291 +#: plugins/check_ping.c:312 #, c-format msgid " (%s) must be an integer percentage\n" msgstr "" -#: plugins/check_ping.c:302 +#: plugins/check_ping.c:323 #, c-format msgid " (%s) must be a non-negative number\n" msgstr "" -#: plugins/check_ping.c:313 +#: plugins/check_ping.c:334 #, c-format msgid " (%s) must be a non-negative number\n" msgstr "" -#: plugins/check_ping.c:346 +#: plugins/check_ping.c:367 #, c-format msgid "" "%s: Warning threshold must be integer or percentage!\n" "\n" msgstr "" -#: plugins/check_ping.c:359 +#: plugins/check_ping.c:380 #, c-format msgid " was not set\n" msgstr "" -#: plugins/check_ping.c:363 +#: plugins/check_ping.c:384 #, c-format msgid " was not set\n" msgstr "" -#: plugins/check_ping.c:367 +#: plugins/check_ping.c:388 #, c-format msgid " was not set\n" msgstr "" -#: plugins/check_ping.c:371 +#: plugins/check_ping.c:392 #, c-format msgid " was not set\n" msgstr "" -#: plugins/check_ping.c:375 +#: plugins/check_ping.c:396 #, c-format msgid " (%f) cannot be larger than (%f)\n" msgstr "" -#: plugins/check_ping.c:379 +#: plugins/check_ping.c:400 #, c-format msgid " (%d) cannot be larger than (%d)\n" msgstr "" -#: plugins/check_ping.c:415 +#: plugins/check_ping.c:436 #, c-format msgid "Cannot open stderr for %s\n" msgstr "" -#: plugins/check_ping.c:464 plugins/check_ping.c:466 +#: plugins/check_ping.c:485 plugins/check_ping.c:487 msgid "System call sent warnings to stderr " msgstr "" -#: plugins/check_ping.c:491 -#, c-format -msgid "CRITICAL - Network unreachable (%s)" +#: plugins/check_ping.c:514 +#, fuzzy, c-format +msgid "CRITICAL - Network Unreachable (%s)" msgstr "CRITICAL - Netzwerk nicht erreichbar (%s)" -#: plugins/check_ping.c:493 +#: plugins/check_ping.c:516 #, c-format msgid "CRITICAL - Host Unreachable (%s)" msgstr "" -#: plugins/check_ping.c:495 +#: plugins/check_ping.c:518 +#, fuzzy, c-format +msgid "CRITICAL - Bogus ICMP: Port Unreachable (%s)" +msgstr "CRITICAL - Netzwerk nicht erreichbar (%s)" + +#: plugins/check_ping.c:520 +#, fuzzy, c-format +msgid "CRITICAL - Bogus ICMP: Protocol Unreachable (%s)" +msgstr "CRITICAL - Netzwerk nicht erreichbar (%s)" + +#: plugins/check_ping.c:522 +#, fuzzy, c-format +msgid "CRITICAL - Network Prohibited (%s)" +msgstr "CRITICAL - Netzwerk nicht erreichbar (%s)" + +#: plugins/check_ping.c:524 +#, fuzzy, c-format +msgid "CRITICAL - Host Prohibited (%s)" +msgstr "CRITICAL - Netzwerk nicht erreichbar (%s)" + +#: plugins/check_ping.c:526 +#, fuzzy, c-format +msgid "CRITICAL - Packet Filtered (%s)" +msgstr "CRITICAL - Netzwerk nicht erreichbar (%s)" + +#: plugins/check_ping.c:528 #, c-format msgid "CRITICAL - Host not found (%s)" msgstr "" -#: plugins/check_ping.c:497 +#: plugins/check_ping.c:530 #, c-format msgid "CRITICAL - Time to live exceeded (%s)" msgstr "" -#: plugins/check_ping.c:504 +#: plugins/check_ping.c:537 msgid "Unable to realloc warn_text" msgstr "" -#: plugins/check_ping.c:521 +#: plugins/check_ping.c:554 #, c-format -msgid "" -"Use ping to check connection statistics for a remote host.\n" -"\n" +msgid "Use ping to check connection statistics for a remote host." msgstr "" -#: plugins/check_ping.c:529 -#, c-format -msgid "" -"-H, --hostname=HOST\n" -" host to ping\n" -"-w, --warning=THRESHOLD\n" -" warning threshold pair\n" -"-c, --critical=THRESHOLD\n" -" critical threshold pair\n" -"-p, --packets=INTEGER\n" -" number of ICMP ECHO packets to send (Default: %d)\n" -"-L, --link\n" -" show HTML in the plugin output (obsoleted by urlize)\n" +#: plugins/check_ping.c:565 +msgid "host to ping" msgstr "" -#: plugins/check_ping.c:544 -#, c-format -msgid "" -"THRESHOLD is ,%% where is the round trip average travel\n" -"time (ms) which triggers a WARNING or CRITICAL state, and is the\n" -"percentage of packet loss to trigger an alarm state.\n" -"\n" +#: plugins/check_ping.c:571 +msgid "number of ICMP ECHO packets to send" msgstr "" -#: plugins/check_ping.c:549 +#: plugins/check_ping.c:572 #, c-format +msgid "(Default: %d)\n" +msgstr "" + +#: plugins/check_ping.c:574 +msgid "show HTML in the plugin output (obsoleted by urlize)" +msgstr "" + +#: plugins/check_ping.c:578 +msgid "THRESHOLD is ,% where is the round trip average travel" +msgstr "" + +#: plugins/check_ping.c:579 +msgid "time (ms) which triggers a WARNING or CRITICAL state, and is the" +msgstr "" + +#: plugins/check_ping.c:580 +msgid "percentage of packet loss to trigger an alarm state." +msgstr "" + +#: plugins/check_ping.c:584 +#, fuzzy +msgid "" +"This plugin uses the ping command to probe the specified host for packet loss" +msgstr "Dieses plugin testet Gameserververbindungen zum angegebenen Host." + +#: plugins/check_ping.c:585 msgid "" -"This plugin uses the ping command to probe the specified host for packet " -"loss\n" "(percentage) and round trip average (milliseconds). It can produce HTML " -"output\n" -"linking to a traceroute CGI contributed by Ian Cass. The CGI can be found " -"in\n" -"the contrib area of the downloads section at http://www.nagios.org\n" -"\n" +"output" msgstr "" -#: plugins/check_procs.c:140 +#: plugins/check_ping.c:586 +msgid "" +"linking to a traceroute CGI contributed by Ian Cass. The CGI can be found in" +msgstr "" + +#: plugins/check_ping.c:587 +msgid "the contrib area of the downloads section at http://www.nagios.org/" +msgstr "" + +#: plugins/check_procs.c:155 #, c-format msgid "CMD: %s\n" msgstr "" -#: plugins/check_procs.c:249 +#: plugins/check_procs.c:261 #, c-format msgid "Not parseable: %s" msgstr "" -#: plugins/check_procs.c:258 +#: plugins/check_procs.c:270 #, c-format msgid "System call sent warnings to stderr\n" msgstr "" -#: plugins/check_procs.c:265 +#: plugins/check_procs.c:277 #, c-format msgid "System call returned nonzero status\n" msgstr "" -#: plugins/check_procs.c:270 plugins/check_users.c:101 +#: plugins/check_procs.c:282 #, c-format msgid "Unable to read output\n" msgstr "" -#: plugins/check_procs.c:287 +#: plugins/check_procs.c:299 #, c-format msgid "%d warn out of " msgstr "" -#: plugins/check_procs.c:292 +#: plugins/check_procs.c:304 #, c-format msgid "%d crit, %d warn out of " msgstr "" -#: plugins/check_procs.c:298 +#: plugins/check_procs.c:310 #, c-format msgid " with %s" msgstr "" -#: plugins/check_procs.c:373 +#: plugins/check_procs.c:385 #, fuzzy msgid "Critical Process Count must be an integer!" msgstr "Critical threshold muss ein Integer sein" -#: plugins/check_procs.c:385 +#: plugins/check_procs.c:397 #, fuzzy msgid "Warning Process Count must be an integer!" msgstr "Warning threshold Integer sein" -#: plugins/check_procs.c:393 +#: plugins/check_procs.c:405 #, fuzzy msgid "Parent Process ID must be an integer!" msgstr "Argument für check_dummy muss ein Integer sein" -#: plugins/check_procs.c:399 plugins/check_procs.c:501 +#: plugins/check_procs.c:411 plugins/check_procs.c:513 #, c-format msgid "%s%sSTATE = %s" msgstr "" -#: plugins/check_procs.c:408 +#: plugins/check_procs.c:420 #, fuzzy, c-format msgid "UID %s was not found" msgstr "%s [%s nicht gefunden]" -#: plugins/check_procs.c:414 +#: plugins/check_procs.c:426 #, fuzzy, c-format msgid "User name %s was not found" msgstr "%s [%s nicht gefunden]" -#: plugins/check_procs.c:429 +#: plugins/check_procs.c:441 #, c-format msgid "%s%scommand name '%s'" msgstr "" -#: plugins/check_procs.c:448 +#: plugins/check_procs.c:460 #, fuzzy msgid "RSS must be an integer!" msgstr "skip lines muss ein Integer sein" -#: plugins/check_procs.c:455 +#: plugins/check_procs.c:467 #, fuzzy msgid "VSZ must be an integer!" msgstr "skip lines muss ein Integer sein" -#: plugins/check_procs.c:463 +#: plugins/check_procs.c:475 msgid "PCPU must be a float!" msgstr "" -#: plugins/check_procs.c:487 +#: plugins/check_procs.c:499 msgid "Metric must be one of PROCS, VSZ, RSS, CPU, ELAPSED!" msgstr "" -#: plugins/check_procs.c:520 +#: plugins/check_procs.c:532 #, c-format msgid "wmax (%d) cannot be greater than cmax (%d)\n" msgstr "" -#: plugins/check_procs.c:524 +#: plugins/check_procs.c:536 #, c-format msgid "wmin (%d) cannot be less than cmin (%d)\n" msgstr "" -#: plugins/check_procs.c:661 -#, c-format +#: plugins/check_procs.c:673 msgid "" "Checks all processes and generates WARNING or CRITICAL states if the " -"specified\n" -"metric is outside the required threshold ranges. The metric defaults to " -"number\n" -"of processes. Search filters can be applied to limit the processes to " -"check.\n" -"\n" +"specified" msgstr "" -#: plugins/check_procs.c:668 -#, c-format +#: plugins/check_procs.c:674 msgid "" -"\n" -"Required Arguments:\n" -" -w, --warning=RANGE\n" -" Generate warning state if metric is outside this range\n" -" -c, --critical=RANGE\n" -" Generate critical state if metric is outside this range\n" +"metric is outside the required threshold ranges. The metric defaults to " +"number" msgstr "" #: plugins/check_procs.c:675 -#, c-format msgid "" -"\n" -"Optional Arguments:\n" -" -m, --metric=TYPE\n" -" Check thresholds against metric. Valid types:\n" -" PROCS - number of processes (default)\n" -" VSZ - virtual memory size\n" -" RSS - resident set memory size\n" -" CPU - percentage cpu\n" +"of processes. Search filters can be applied to limit the processes to check." +msgstr "" + +#: plugins/check_procs.c:681 +msgid "Required Arguments:" +msgstr "" + +#: plugins/check_procs.c:683 +msgid "Generate warning state if metric is outside this range" msgstr "" #: plugins/check_procs.c:685 -#, c-format -msgid " ELAPSED - time elapsed in seconds\n" +msgid "Generate critical state if metric is outside this range" +msgstr "" + +#: plugins/check_procs.c:687 +msgid "Optional Arguments:" +msgstr "" + +#: plugins/check_procs.c:689 +msgid "Check thresholds against metric. Valid types:" msgstr "" #: plugins/check_procs.c:690 -#, c-format -msgid "" -" -v, --verbose\n" -" Extra information. Up to 3 verbosity levels\n" +msgid "PROCS - number of processes (default)" msgstr "" -#: plugins/check_procs.c:694 -#, c-format -msgid "" -"\n" -"Optional Filters:\n" -" -s, --state=STATUSFLAGS\n" -" Only scan for processes that have, in the output of `ps`, one or\n" -" more of the status flags you specify (for example R, Z, S, RS,\n" -" RSZDT, plus others based on the output of your 'ps' command).\n" -" -p, --ppid=PPID\n" -" Only scan for children of the parent process ID indicated.\n" -" -z, --vsz=VSZ\n" -" Only scan for processes with vsz higher than indicated.\n" -" -r, --rss=RSS\n" -" Only scan for processes with rss higher than indicated.\n" +#: plugins/check_procs.c:691 +msgid "VSZ - virtual memory size" +msgstr "" + +#: plugins/check_procs.c:692 +msgid "RSS - resident set memory size" +msgstr "" + +#: plugins/check_procs.c:693 +msgid "CPU - percentage cpu" +msgstr "" + +#: plugins/check_procs.c:696 +msgid "ELAPSED - time elapsed in seconds" +msgstr "" + +#: plugins/check_procs.c:701 +msgid "Extra information. Up to 3 verbosity levels" +msgstr "" + +#: plugins/check_procs.c:705 +msgid "Only scan for processes that have, in the output of `ps`, one or" +msgstr "" + +#: plugins/check_procs.c:706 +msgid "more of the status flags you specify (for example R, Z, S, RS," msgstr "" #: plugins/check_procs.c:707 -#, c-format -msgid "" -" -P, --pcpu=PCPU\n" -" Only scan for processes with pcpu higher than indicated.\n" -" -u, --user=USER\n" -" Only scan for processes with user name or ID indicated.\n" -" -a, --argument-array=STRING\n" -" Only scan for processes with args that contain STRING.\n" -" -C, --command=COMMAND\n" -" Only scan for exact matches of COMMAND (without path).\n" +msgid "RSZDT, plus others based on the output of your 'ps' command)." +msgstr "" + +#: plugins/check_procs.c:709 +msgid "Only scan for children of the parent process ID indicated." +msgstr "" + +#: plugins/check_procs.c:711 +msgid "Only scan for processes with vsz higher than indicated." +msgstr "" + +#: plugins/check_procs.c:713 +msgid "Only scan for processes with rss higher than indicated." +msgstr "" + +#: plugins/check_procs.c:715 +msgid "Only scan for processes with pcpu higher than indicated." msgstr "" #: plugins/check_procs.c:717 +msgid "Only scan for processes with user name or ID indicated." +msgstr "" + +#: plugins/check_procs.c:719 +msgid "Only scan for processes with args that contain STRING." +msgstr "" + +#: plugins/check_procs.c:721 +msgid "Only scan for exact matches of COMMAND (without path)." +msgstr "" + +#: plugins/check_procs.c:723 #, c-format msgid "" "\n" @@ -2760,7 +3310,7 @@ msgid "" "\n" msgstr "" -#: plugins/check_procs.c:722 +#: plugins/check_procs.c:728 #, c-format msgid "" "This plugin checks the number of currently running processes and\n" @@ -2771,1112 +3321,1266 @@ msgid "" "\n" msgstr "" -#: plugins/check_procs.c:729 -#, c-format -msgid "" -"Examples:\n" -" check_procs -w 2:2 -c 2:1024 -C portsentry\n" -" Warning if not two processes with command name portsentry. Critical\n" -" if < 2 or > 1024 processes\n" -"\n" -" check_procs -w 10 -a '/usr/local/bin/perl' -u root\n" -" Warning alert if > 10 processes with command arguments containing \n" -" '/usr/local/bin/perl' and owned by root\n" -"\n" -" check_procs -w 50000 -c 100000 --metric=VSZ\n" -" Alert if vsz of any processes over 50K or 100K\n" -" check_procs -w 10 -c 20 --metric=CPU\n" -" Alert if cpu of any processes over 10%% or 20%%\n" -"\n" +#: plugins/check_procs.c:737 +msgid "Warning if not two processes with command name portsentry." msgstr "" -#: plugins/check_radius.c:122 +#: plugins/check_procs.c:738 +msgid "Critical if < 2 or > 1024 processes" +msgstr "" + +#: plugins/check_procs.c:740 +msgid "Warning alert if > 10 processes with command arguments containing" +msgstr "" + +#: plugins/check_procs.c:741 +msgid "'/usr/local/bin/perl' and owned by root" +msgstr "" + +#: plugins/check_procs.c:743 +msgid "Alert if vsz of any processes over 50K or 100K" +msgstr "" + +#: plugins/check_procs.c:745 +#, c-format +msgid "Alert if cpu of any processes over 10%% or 20%%" +msgstr "" + +#: plugins/check_radius.c:138 msgid "Config file error" msgstr "" -#: plugins/check_radius.c:130 +#: plugins/check_radius.c:147 msgid "Out of Memory?" msgstr "" -#: plugins/check_radius.c:151 +#: plugins/check_radius.c:168 msgid "Timeout" msgstr "" -#: plugins/check_radius.c:153 +#: plugins/check_radius.c:170 msgid "Auth Error" msgstr "" -#: plugins/check_radius.c:155 +#: plugins/check_radius.c:172 msgid "Auth Failed" msgstr "" -#: plugins/check_radius.c:159 +#: plugins/check_radius.c:176 msgid "Auth OK" msgstr "" -#: plugins/check_radius.c:202 plugins/check_radius.c:262 +#: plugins/check_radius.c:219 plugins/check_radius.c:279 msgid "Number of retries must be a positive integer" msgstr "" -#: plugins/check_radius.c:288 -#, c-format -msgid "" -"Tests to see if a radius server is accepting connections.\n" -"\n" +#: plugins/check_radius.c:305 +msgid "Tests to see if a radius server is accepting connections." msgstr "" -#: plugins/check_radius.c:296 -#, c-format -msgid "" -" -u, --username=STRING\n" -" The user to authenticate\n" -" -p, --password=STRING\n" -" Password for autentication (SECURITY RISK)\n" -" -n, --nas-id=STRING\n" -" NAS identifier\n" -" -F, --filename=STRING\n" -" Configuration file\n" -" -e, --expect=STRING\n" -" Response string to expect from the server\n" -" -r, --retries=INTEGER\n" -" Number of times to retry a failed connection\n" +#: plugins/check_radius.c:316 +msgid "The user to authenticate" msgstr "" -#: plugins/check_radius.c:312 -#, c-format -msgid "" -"\n" -"This plugin tests a radius server to see if it is accepting connections.\n" -"\n" -"The server to test must be specified in the invocation, as well as a user\n" -"name and password. A configuration file may also be present. The format of\n" -"the configuration file is described in the radiusclient library sources.\n" -"\n" +#: plugins/check_radius.c:318 +msgid "Password for autentication (SECURITY RISK)" msgstr "" -#: plugins/check_radius.c:319 -#, c-format -msgid "" -"The password option presents a substantial security issue because the\n" -"password can be determined by careful watching of the command line in\n" -"a process listing. This risk is exacerbated because nagios will\n" -"run the plugin at regular prdictable intervals. Please be sure that\n" -"the password used does not allow access to sensitive system resources,\n" -"otherwise compormise could occur.\n" +#: plugins/check_radius.c:320 +msgid "NAS identifier" msgstr "" -#: plugins/check_real.c:79 +#: plugins/check_radius.c:322 +msgid "Configuration file" +msgstr "" + +#: plugins/check_radius.c:324 +msgid "Response string to expect from the server" +msgstr "" + +#: plugins/check_radius.c:326 +msgid "Number of times to retry a failed connection" +msgstr "" + +#: plugins/check_radius.c:330 +#, fuzzy +msgid "" +"This plugin tests a radius server to see if it is accepting connections." +msgstr "Dieses plugin testet Gameserververbindungen zum angegebenen Host." + +#: plugins/check_radius.c:331 +msgid "" +"The server to test must be specified in the invocation, as well as a user" +msgstr "" + +#: plugins/check_radius.c:332 +msgid "" +"name and password. A configuration file may also be present. The format of" +msgstr "" + +#: plugins/check_radius.c:333 +msgid "" +"the configuration file is described in the radiusclient library sources." +msgstr "" + +#: plugins/check_radius.c:334 +msgid "The password option presents a substantial security issue because the" +msgstr "" + +#: plugins/check_radius.c:335 +msgid "password can be determined by careful watching of the command line in" +msgstr "" + +#: plugins/check_radius.c:336 +msgid "a process listing. This risk is exacerbated because nagios will" +msgstr "" + +#: plugins/check_radius.c:337 +msgid "run the plugin at regular prdictable intervals. Please be sure that" +msgstr "" + +#: plugins/check_radius.c:338 +msgid "the password used does not allow access to sensitive system resources," +msgstr "" + +#: plugins/check_radius.c:339 +msgid "otherwise compormise could occur." +msgstr "" + +#: plugins/check_real.c:96 #, c-format msgid "Unable to connect to %s on port %d\n" msgstr "" -#: plugins/check_real.c:101 +#: plugins/check_real.c:118 #, c-format msgid "No data received from %s\n" msgstr "" -#: plugins/check_real.c:106 plugins/check_real.c:179 -#, c-format -msgid "Invalid REAL response received from host\n" -msgstr "" +#: plugins/check_real.c:123 plugins/check_real.c:196 +#, fuzzy +msgid "Invalid REAL response received from host" +msgstr "Ungültige HTTP Antwort von Host empfangen\n" -#: plugins/check_real.c:108 plugins/check_real.c:181 +#: plugins/check_real.c:125 plugins/check_real.c:198 #, c-format msgid "Invalid REAL response received from host on port %d\n" msgstr "" -#: plugins/check_real.c:172 plugins/check_tcp.c:278 -#, c-format -msgid "No data received from host\n" -msgstr "" - -#: plugins/check_real.c:235 +#: plugins/check_real.c:252 #, c-format msgid "REAL %s - %d second response time\n" msgstr "" -#: plugins/check_real.c:324 plugins/check_smtp.c:584 plugins/check_ups.c:525 +#: plugins/check_real.c:341 plugins/check_smtp.c:618 plugins/check_ups.c:535 msgid "Warning time must be a positive integer" msgstr "Warnung time muss ein positiver Integer sein" -#: plugins/check_real.c:333 plugins/check_smtp.c:575 plugins/check_ups.c:516 +#: plugins/check_real.c:350 plugins/check_smtp.c:609 plugins/check_ups.c:526 msgid "Critical time must be a positive integer" msgstr "Critical time muss ein positiver Integer sein" -#: plugins/check_real.c:369 +#: plugins/check_real.c:386 #, fuzzy msgid "You must provide a server to check" msgstr "%s: Hostname muss angegeben werden\n" -#: plugins/check_real.c:401 -#, c-format -msgid "" -"This plugin tests the REAL service on the specified host.\n" +#: plugins/check_real.c:418 +#, fuzzy +msgid "This plugin tests the REAL service on the specified host." +msgstr "" +"Testet den DNS Dienst auf dem angegebenen Host mit dig\n" "\n" + +#: plugins/check_real.c:429 +msgid "Connect to this url" msgstr "" -#: plugins/check_real.c:409 +#: plugins/check_real.c:431 #, c-format -msgid "" -" -u, --url=STRING\n" -" Connect to this url\n" -" -e, --expect=STRING\n" -" String to expect in first line of server response (default: %s)\n" +msgid "String to expect in first line of server response (default: %s)\n" msgstr "" -#: plugins/check_real.c:422 -#, c-format -msgid "" -"This plugin will attempt to open an RTSP connection with the host.\n" -"Successul connects return STATE_OK, refusals and timeouts return\n" -"STATE_CRITICAL, other errors return STATE_UNKNOWN. Successful connects,\n" -"but incorrect reponse messages from the host result in STATE_WARNING return\n" -"values." +#: plugins/check_real.c:440 +#, fuzzy +msgid "This plugin will attempt to open an RTSP connection with the host." +msgstr "Dieses plugin testet Gameserververbindungen zum angegebenen Host." + +#: plugins/check_real.c:441 plugins/check_smtp.c:767 +msgid "Successul connects return STATE_OK, refusals and timeouts return" msgstr "" -#: plugins/check_smtp.c:172 +#: plugins/check_real.c:442 +msgid "" +"STATE_CRITICAL, other errors return STATE_UNKNOWN. Successful connects," +msgstr "" + +#: plugins/check_real.c:443 +msgid "" +"but incorrect reponse messages from the host result in STATE_WARNING return" +msgstr "" + +#: plugins/check_real.c:444 +msgid "values." +msgstr "" + +#: plugins/check_smtp.c:186 plugins/check_swap.c:268 plugins/check_swap.c:274 #, c-format msgid "malloc() failed!\n" msgstr "" -#: plugins/check_smtp.c:176 +#: plugins/check_smtp.c:190 #, c-format msgid "gethostname() failed!\n" msgstr "" -#: plugins/check_smtp.c:213 plugins/check_smtp.c:237 +#: plugins/check_smtp.c:225 plugins/check_smtp.c:249 #, c-format msgid "recv() failed\n" msgstr "" -#: plugins/check_smtp.c:224 +#: plugins/check_smtp.c:236 #, c-format msgid "Invalid SMTP response received from host\n" msgstr "" -#: plugins/check_smtp.c:226 +#: plugins/check_smtp.c:238 #, c-format msgid "Invalid SMTP response received from host on port %d\n" msgstr "" -#: plugins/check_smtp.c:248 +#: plugins/check_smtp.c:260 #, c-format msgid "WARNING - TLS not supported by server\n" msgstr "" -#: plugins/check_smtp.c:260 +#: plugins/check_smtp.c:272 #, c-format msgid "Server does not support STARTTLS\n" msgstr "" -#: plugins/check_smtp.c:266 +#: plugins/check_smtp.c:278 #, c-format msgid "CRITICAL - Cannot create SSL context.\n" msgstr "" -#: plugins/check_smtp.c:277 plugins/check_tcp.c:226 +#: plugins/check_smtp.c:298 +msgid "SMTP UNKNOWN - Cannot send EHLO command via TLS." +msgstr "" + +#: plugins/check_smtp.c:303 #, c-format -msgid "CRITICAL - Cannot retrieve server certificate.\n" +msgid "sent %s" +msgstr "" + +#: plugins/check_smtp.c:305 +msgid "SMTP UNKNOWN - Cannot read EHLO response via TLS." +msgstr "" + +#: plugins/check_smtp.c:318 +#, fuzzy +msgid "CRITICAL - Cannot retrieve server certificate." msgstr "CRITICAL - Konnte kein Serverzertifikat erhalten\n" -#: plugins/check_smtp.c:316 plugins/check_snmp.c:556 +#: plugins/check_smtp.c:356 plugins/check_snmp.c:568 #, c-format msgid "Could Not Compile Regular Expression" msgstr "" -#: plugins/check_smtp.c:325 plugins/check_smtp.c:335 +#: plugins/check_smtp.c:365 #, c-format msgid "SMTP %s - Invalid response '%s' to command '%s'\n" msgstr "" -#: plugins/check_smtp.c:329 plugins/check_snmp.c:301 +#: plugins/check_smtp.c:369 plugins/check_snmp.c:318 #, c-format msgid "Execute Error: %s\n" msgstr "" -#: plugins/check_smtp.c:349 +#: plugins/check_smtp.c:383 msgid "no authuser specified, " msgstr "" -#: plugins/check_smtp.c:354 +#: plugins/check_smtp.c:388 msgid "no authpass specified, " msgstr "" -#: plugins/check_smtp.c:361 plugins/check_smtp.c:383 plugins/check_smtp.c:404 +#: plugins/check_smtp.c:395 plugins/check_smtp.c:417 plugins/check_smtp.c:438 #, c-format msgid "sent %s\n" msgstr "" -#: plugins/check_smtp.c:364 -msgid "recv() failed after AUTH LOGIN, \n" -msgstr "" +#: plugins/check_smtp.c:398 +#, fuzzy +msgid "recv() failed after AUTH LOGIN, " +msgstr "Ungültige HTTP Antwort von Host empfangen\n" -#: plugins/check_smtp.c:370 plugins/check_smtp.c:392 plugins/check_smtp.c:413 +#: plugins/check_smtp.c:404 plugins/check_smtp.c:426 plugins/check_smtp.c:447 #, fuzzy, c-format msgid "received %s\n" msgstr "Keine Daten empfangen %s\n" -#: plugins/check_smtp.c:374 +#: plugins/check_smtp.c:408 #, fuzzy msgid "invalid response received after AUTH LOGIN, " msgstr "Ungültige HTTP Antwort von Host empfangen\n" -#: plugins/check_smtp.c:387 +#: plugins/check_smtp.c:421 msgid "recv() failed after sending authuser, " msgstr "" -#: plugins/check_smtp.c:396 +#: plugins/check_smtp.c:430 #, fuzzy msgid "invalid response received after authuser, " msgstr "Ungültige HTTP Antwort von Host empfangen\n" -#: plugins/check_smtp.c:408 +#: plugins/check_smtp.c:442 msgid "recv() failed after sending authpass, " msgstr "" -#: plugins/check_smtp.c:417 +#: plugins/check_smtp.c:451 #, fuzzy msgid "invalid response received after authpass, " msgstr "Ungültige HTTP Antwort von Host empfangen\n" -#: plugins/check_smtp.c:424 +#: plugins/check_smtp.c:458 msgid "only authtype LOGIN is supported, " msgstr "" -#: plugins/check_smtp.c:448 +#: plugins/check_smtp.c:482 #, fuzzy, c-format msgid "SMTP %s - %s%.3f sec. response time%s%s|%s\n" msgstr " - %s - %.3f Sekunden Antwortzeit %s%s|%s %s\n" -#: plugins/check_smtp.c:554 plugins/check_smtp.c:564 +#: plugins/check_smtp.c:588 plugins/check_smtp.c:598 #, c-format msgid "Could not realloc() units [%d]\n" msgstr "" -#: plugins/check_smtp.c:611 +#: plugins/check_smtp.c:645 msgid "SSL support not available - install OpenSSL and recompile" msgstr "" -#: plugins/check_smtp.c:681 +#: plugins/check_smtp.c:724 +#, fuzzy +msgid "This plugin will attempt to open an SMTP connection with the host." +msgstr "Dieses plugin testet Gameserververbindungen zum angegebenen Host." + +#: plugins/check_smtp.c:737 #, c-format -msgid "" -"This plugin will attempt to open an SMTP connection with the host.\n" -"\n" +msgid " String to expect in first line of server response (default: '%s')\n" msgstr "" -#: plugins/check_smtp.c:691 -#, c-format -msgid "" -" -e, --expect=STRING\n" -" String to expect in first line of server response (default: '%s')\n" -" -n, nocommand\n" -" Suppress SMTP command\n" -" -C, --command=STRING\n" -" SMTP command (may be used repeatedly)\n" -" -R, --command=STRING\n" -" Expected response to command (may be used repeatedly)\n" -" -f, --from=STRING\n" -" FROM-address to include in MAIL command, required by Exchange 2000\n" +#: plugins/check_smtp.c:739 +msgid "Suppress SMTP command" msgstr "" -#: plugins/check_smtp.c:704 -#, c-format -msgid "" -" -D, --certificate=INTEGER\n" -" Minimum number of days a certificate has to be valid.\n" -" -S, --starttls\n" -" Use STARTTLS for the connection.\n" +#: plugins/check_smtp.c:741 +msgid "SMTP command (may be used repeatedly)" msgstr "" -#: plugins/check_smtp.c:726 -#, c-format -msgid "" -"\n" -"Successul connects return STATE_OK, refusals and timeouts return\n" -"STATE_CRITICAL, other errors return STATE_UNKNOWN. Successful\n" -"connects, but incorrect reponse messages from the host result in\n" -"STATE_WARNING return values.\n" +#: plugins/check_smtp.c:743 +msgid "Expected response to command (may be used repeatedly)" msgstr "" -#: plugins/check_snmp.c:278 +#: plugins/check_smtp.c:745 +msgid "FROM-address to include in MAIL command, required by Exchange 2000" +msgstr "" + +#: plugins/check_smtp.c:748 plugins/check_tcp.c:638 +msgid "Minimum number of days a certificate has to be valid." +msgstr "" + +#: plugins/check_smtp.c:750 +msgid "Use STARTTLS for the connection." +msgstr "" + +#: plugins/check_smtp.c:754 +msgid "SMTP AUTH type to check (default none, only LOGIN supported)" +msgstr "" + +#: plugins/check_smtp.c:756 +msgid "SMTP AUTH username" +msgstr "" + +#: plugins/check_smtp.c:758 +msgid "SMTP AUTH password" +msgstr "" + +#: plugins/check_smtp.c:768 +msgid "STATE_CRITICAL, other errors return STATE_UNKNOWN. Successful" +msgstr "" + +#: plugins/check_smtp.c:769 +msgid "connects, but incorrect reponse messages from the host result in" +msgstr "" + +#: plugins/check_smtp.c:770 +msgid "STATE_WARNING return values." +msgstr "" + +#: plugins/check_snmp.c:296 msgid "No valid data returned" msgstr "" -#: plugins/check_snmp.c:349 plugins/negate.c:113 +#: plugins/check_snmp.c:364 plugins/negate.c:128 #, c-format msgid "" "%s problem - No data received from host\n" "CMD: %s\n" msgstr "" -#: plugins/check_snmp.c:487 +#: plugins/check_snmp.c:502 #, c-format msgid "Invalid critical threshold: %s\n" msgstr "" -#: plugins/check_snmp.c:498 +#: plugins/check_snmp.c:513 #, c-format msgid "Invalid warning threshold: %s\n" msgstr "" -#: plugins/check_snmp.c:510 +#: plugins/check_snmp.c:525 #, fuzzy msgid "Retries interval must be a positive integer" msgstr "Time interval muss ein positiver Integer sein" -#: plugins/check_snmp.c:562 -#, c-format -msgid "call for regex which was not a compiled option" -msgstr "" - -#: plugins/check_snmp.c:581 +#: plugins/check_snmp.c:589 #, fuzzy, c-format msgid "Could not reallocate labels[%d]" msgstr "Konnte addr nicht zuweisen\n" -#: plugins/check_snmp.c:593 +#: plugins/check_snmp.c:601 #, fuzzy msgid "Could not reallocate labels\n" msgstr "Konnte·url·nicht·zuweisen\n" -#: plugins/check_snmp.c:610 +#: plugins/check_snmp.c:618 #, fuzzy, c-format msgid "Could not reallocate units [%d]\n" msgstr "Konnte·url·nicht·zuweisen\n" -#: plugins/check_snmp.c:622 +#: plugins/check_snmp.c:630 msgid "Could not realloc() units\n" msgstr "" -#: plugins/check_snmp.c:707 -#, c-format -msgid "Missing secname (%s) or authpassword (%s) ! \n" -msgstr "" - #: plugins/check_snmp.c:715 #, c-format +msgid "Missing secname (%s) or authpassword (%s) ! \n" +msgstr "" + +#: plugins/check_snmp.c:723 +#, c-format msgid "Missing secname (%s), authpassword (%s), or privpasswd (%s)! \n" msgstr "" -#: plugins/check_snmp.c:724 +#: plugins/check_snmp.c:732 msgid "Invalid SNMP version" msgstr "" -#: plugins/check_snmp.c:852 +#: plugins/check_snmp.c:860 msgid "Unbalanced quotes\n" msgstr "" -#: plugins/check_snmp.c:901 -#, c-format -msgid "" -"Check status of remote machines and obtain sustem information via SNMP\n" -"\n" +#: plugins/check_snmp.c:909 +msgid "Check status of remote machines and obtain sustem information via SNMP" msgstr "" -#: plugins/check_snmp.c:911 -#, c-format -msgid "" -" -n, --next\n" -" Use SNMP GETNEXT instead of SNMP GET\n" -" -P, --protocol=[1|2c|3]\n" -" SNMP protocol version\n" -" -L, --seclevel=[noAuthNoPriv|authNoPriv|authPriv]\n" -" SNMPv3 securityLevel\n" -" -a, --authproto=[MD5|SHA]\n" -" SNMPv3 auth proto\n" +#: plugins/check_snmp.c:921 +msgid "Use SNMP GETNEXT instead of SNMP GET" msgstr "" -#: plugins/check_snmp.c:922 +#: plugins/check_snmp.c:923 +msgid "SNMP protocol version" +msgstr "" + +#: plugins/check_snmp.c:925 +msgid "SNMPv3 securityLevel" +msgstr "" + +#: plugins/check_snmp.c:927 +msgid "SNMPv3 auth proto" +msgstr "" + +#: plugins/check_snmp.c:931 +msgid "Optional community string for SNMP communication" +msgstr "" + +#: plugins/check_snmp.c:932 #, c-format -msgid "" -" -C, --community=STRING\n" -" Optional community string for SNMP communication\n" -" (default is \"%s\")\n" -" -U, --secname=USERNAME\n" -" SNMPv3 username\n" -" -A, --authpassword=PASSWORD\n" -" SNMPv3 authentication password\n" -" -X, --privpasswd=PASSWORD\n" -" SNMPv3 crypt passwd (DES)\n" +msgid "(default is \"%s\")" msgstr "" #: plugins/check_snmp.c:934 -#, c-format -msgid "" -" -o, --oid=OID(s)\n" -" Object identifier(s) or SNMP variables whose value you wish to query\n" -" -m, --miblist=STRING\n" -" List of MIBS to be loaded (default = none if using numeric oids or " -"'ALL'\n" -"\t\tfor symbolic oids.)\n" -" -d, --delimiter=STRING\n" -" Delimiter to use when parsing returned data. Default is \"%s\"\n" -" Any data on the right hand side of the delimiter is considered\n" -" to be the data that should be used in the evaluation.\n" +msgid "SNMPv3 username" msgstr "" -#: plugins/check_snmp.c:946 -#, c-format +#: plugins/check_snmp.c:936 +msgid "SNMPv3 authentication password" +msgstr "" + +#: plugins/check_snmp.c:938 +msgid "SNMPv3 crypt passwd (DES)" +msgstr "" + +#: plugins/check_snmp.c:942 +msgid "Object identifier(s) or SNMP variables whose value you wish to query" +msgstr "" + +#: plugins/check_snmp.c:944 msgid "" -" -w, --warning=INTEGER_RANGE(s)\n" -" Range(s) which will not result in a WARNING status\n" -" -c, --critical=INTEGER_RANGE(s)\n" -" Range(s) which will not result in a CRITICAL status\n" +"List of MIBS to be loaded (default = none if using numeric oids or 'ALL'" +msgstr "" + +#: plugins/check_snmp.c:945 +msgid "for symbolic oids.)" +msgstr "" + +#: plugins/check_snmp.c:947 +#, c-format +msgid " Delimiter to use when parsing returned data. Default is \"%s\"" +msgstr "" + +#: plugins/check_snmp.c:948 +msgid "Any data on the right hand side of the delimiter is considered" +msgstr "" + +#: plugins/check_snmp.c:949 +msgid "to be the data that should be used in the evaluation." msgstr "" #: plugins/check_snmp.c:953 -#, c-format -msgid "" -" -s, --string=STRING\n" -" Return OK state (for that OID) if STRING is an exact match\n" -" -r, --ereg=REGEX\n" -" Return OK state (for that OID) if extended regular expression REGEX " -"matches\n" -" -R, --eregi=REGEX\n" -" Return OK state (for that OID) if case-insensitive extended REGEX " -"matches\n" -" -l, --label=STRING\n" -" Prefix label for output from plugin (default -s 'SNMP')\n" +msgid "Range(s) which will not result in a WARNING status" msgstr "" -#: plugins/check_snmp.c:964 -#, c-format -msgid "" -" -u, --units=STRING\n" -" Units label(s) for output data (e.g., 'sec.').\n" -" -D, --output-delimiter=STRING\n" -" Separates output on multiple OID requests\n" +#: plugins/check_snmp.c:955 +msgid "Range(s) which will not result in a CRITICAL status" msgstr "" -#: plugins/check_snmp.c:974 -#, c-format +#: plugins/check_snmp.c:959 +msgid "Return OK state (for that OID) if STRING is an exact match" +msgstr "" + +#: plugins/check_snmp.c:961 msgid "" -"\n" -"- This plugin uses the 'snmpget' command included with the NET-SNMP " -"package.\n" -" If you don't have the package installed, you will need to download it " -"from\n" -" http://net-snmp.sourceforge.net before you can use this plugin.\n" +"Return OK state (for that OID) if extended regular expression REGEX matches" +msgstr "" + +#: plugins/check_snmp.c:963 +msgid "" +"Return OK state (for that OID) if case-insensitive extended REGEX matches" +msgstr "" + +#: plugins/check_snmp.c:965 +msgid "Prefix label for output from plugin (default -s 'SNMP')" +msgstr "" + +#: plugins/check_snmp.c:969 +msgid "Units label(s) for output data (e.g., 'sec.')." +msgstr "" + +#: plugins/check_snmp.c:971 +msgid "Separates output on multiple OID requests" +msgstr "" + +#: plugins/check_snmp.c:977 +msgid "" +"This plugin uses the 'snmpget' command included with the NET-SNMP package." +msgstr "" + +#: plugins/check_snmp.c:978 +msgid "" +"if you don't have the package installed, you will need to download it from" msgstr "" #: plugins/check_snmp.c:979 -#, c-format -msgid "" -"- Multiple OIDs may be indicated by a comma- or space-delimited list (lists " -"with\n" -" internal spaces must be quoted) [max 8 OIDs]\n" +msgid "http://net-snmp.sourceforge.net before you can use this plugin." msgstr "" -#: plugins/check_snmp.c:983 -#, c-format +#: plugins/check_snmp.c:981 msgid "" -"- Ranges are inclusive and are indicated with colons. When specified as\n" -" 'min:max' a STATE_OK will be returned if the result is within the " -"indicated\n" -" range or is equal to the upper or lower bound. A non-OK state will be\n" -" returned if the result is outside the specified range.\n" +"- Multiple OIDs may be indicated by a comma- or space-delimited list (lists " +"with" +msgstr "" + +#: plugins/check_snmp.c:982 +msgid " internal spaces must be quoted) [max 8 OIDs]" +msgstr "" + +#: plugins/check_snmp.c:984 +msgid "- Ranges are inclusive and are indicated with colons. When specified as" +msgstr "" + +#: plugins/check_snmp.c:985 +msgid "" +" 'min:max' a STATE_OK will be returned if the result is within the indicated" +msgstr "" + +#: plugins/check_snmp.c:986 +msgid " range or is equal to the upper or lower bound. A non-OK state will be" +msgstr "" + +#: plugins/check_snmp.c:987 +msgid " returned if the result is outside the specified range." msgstr "" #: plugins/check_snmp.c:989 -#, c-format msgid "" -"- If specified in the order 'max:min' a non-OK state will be returned if " -"the\n" -" result is within the (inclusive) range.\n" +"- If specified in the order 'max:min' a non-OK state will be returned if the" +msgstr "" + +#: plugins/check_snmp.c:990 +msgid " result is within the (inclusive) range." +msgstr "" + +#: plugins/check_snmp.c:992 +msgid "" +"- Upper or lower bounds may be omitted to skip checking the respective limit." msgstr "" #: plugins/check_snmp.c:993 -#, c-format -msgid "" -"- Upper or lower bounds may be omitted to skip checking the respective " -"limit.\n" -"- Bare integers are interpreted as upper limits.\n" -"- When checking multiple OIDs, separate ranges by commas like '-w " -"1:10,1:,:20'\n" -"- Note that only one string and one regex may be checked at present\n" -"- All evaluation methods other than PR, STR, and SUBSTR expect that the " -"value\n" -" returned from the SNMP query is an unsigned integer.\n" +msgid "- Bare integers are interpreted as upper limits." msgstr "" -#: plugins/check_ssh.c:152 +#: plugins/check_snmp.c:994 +msgid "" +"- When checking multiple OIDs, separate ranges by commas like '-w " +"1:10,1:,:20'" +msgstr "" + +#: plugins/check_snmp.c:995 +msgid "- Note that only one string and one regex may be checked at present" +msgstr "" + +#: plugins/check_snmp.c:996 +msgid "" +"- All evaluation methods other than PR, STR, and SUBSTR expect that the value" +msgstr "" + +#: plugins/check_snmp.c:997 +msgid " returned from the SNMP query is an unsigned integer." +msgstr "" + +#: plugins/check_ssh.c:170 #, fuzzy msgid "Port number must be a positive integer" msgstr "Port muss ein positiver Integer sein" -#: plugins/check_ssh.c:217 +#: plugins/check_ssh.c:235 #, c-format msgid "Server answer: %s" msgstr "" -#: plugins/check_ssh.c:235 +#: plugins/check_ssh.c:253 #, c-format msgid "SSH WARNING - %s (protocol %s) version mismatch, expected '%s'\n" msgstr "" -#: plugins/check_ssh.c:241 +#: plugins/check_ssh.c:259 #, c-format msgid "SSH OK - %s (protocol %s)\n" msgstr "" -#: plugins/check_ssh.c:261 -#, c-format -msgid "" -"Try to connect to an SSH server at specified server and port\n" -"\n" +#: plugins/check_ssh.c:279 +msgid "Try to connect to an SSH server at specified server and port" msgstr "" -#: plugins/check_ssh.c:273 -#, c-format +#: plugins/check_ssh.c:294 msgid "" -" -r, --remote-version=STRING\n" -" Warn if string doesn't match expected server version (ex: " -"OpenSSH_3.9p1)\n" +"Warn if string doesn't match expected server version (ex: OpenSSH_3.9p1)" msgstr "" -#: plugins/check_swap.c:149 +#: plugins/check_swap.c:172 #, c-format msgid "Command: %s\n" msgstr "" -#: plugins/check_swap.c:151 +#: plugins/check_swap.c:174 #, c-format msgid "Format: %s\n" msgstr "" -#: plugins/check_swap.c:187 +#: plugins/check_swap.c:210 #, c-format msgid "total=%.0f, used=%.0f, free=%.0f\n" msgstr "" -#: plugins/check_swap.c:201 +#: plugins/check_swap.c:224 #, c-format msgid "total=%.0f, free=%.0f\n" msgstr "" -#: plugins/check_swap.c:246 plugins/check_swap.c:288 +#: plugins/check_swap.c:256 +msgid "Error getting swap devices\n" +msgstr "" + +#: plugins/check_swap.c:259 +msgid "SWAP OK: No swap devices defined\n" +msgstr "" + +#: plugins/check_swap.c:280 plugins/check_swap.c:322 msgid "swapctl failed: " msgstr "" -#: plugins/check_swap.c:326 +#: plugins/check_swap.c:281 plugins/check_swap.c:323 +msgid "Error in swapctl call\n" +msgstr "" + +#: plugins/check_swap.c:360 #, c-format msgid "SWAP %s - %d%% free (%d MB out of %d MB) %s|" msgstr "" -#: plugins/check_swap.c:476 +#: plugins/check_swap.c:438 +msgid "Warning threshold must be integer or percentage!" +msgstr "Warning threshold muss ein Integer oder ein Prozentwert sein" + +#: plugins/check_swap.c:456 +msgid "Critical threshold must be integer or percentage!" +msgstr "Critical threshold muss ein Integer oder ein Prozentwert sein!" + +#: plugins/check_swap.c:510 #, fuzzy msgid "Warning percentage should be more than critical percentage" msgstr "Warning threshold muss ein Integer oder ein Prozentwert sein" -#: plugins/check_swap.c:480 +#: plugins/check_swap.c:514 msgid "Warning free space should be more than critical free space" msgstr "" -#: plugins/check_swap.c:494 -#, c-format -msgid "" -"Check swap space on local machine.\n" -"\n" +#: plugins/check_swap.c:528 +msgid "Check swap space on local machine." msgstr "" -#: plugins/check_swap.c:500 -#, c-format +#: plugins/check_swap.c:537 msgid "" -"\n" -" -w, --warning=INTEGER\n" -" Exit with WARNING status if less than INTEGER bytes of swap space are " -"free\n" -" -w, --warning=PERCENT%%\n" -" Exit with WARNING status if less than PERCENT of swap space is free\n" -" -c, --critical=INTEGER\n" -" Exit with CRITICAL status if less than INTEGER bytes of swap space are " -"free\n" -" -c, --critical=PERCENT%%\n" -" Exit with CRITCAL status if less than PERCENT of swap space is free\n" -" -a, --allswaps\n" -" Conduct comparisons for all swap partitions, one by one\n" -" -v, --verbose\n" -" Verbose output. Up to 3 levels\n" +"Exit with WARNING status if less than INTEGER bytes of swap space are free" msgstr "" -#: plugins/check_swap.c:514 -#, c-format -msgid "" -"\n" -"On AIX, if -a is specified, uses lsps -a, otherwise uses lsps -s.\n" +#: plugins/check_swap.c:539 +msgid "Exit with WARNING status if less than PERCENT of swap space is free" msgstr "" -#: plugins/check_tcp.c:186 +#: plugins/check_swap.c:541 +msgid "" +"Exit with CRITICAL status if less than INTEGER bytes of swap space are free" +msgstr "" + +#: plugins/check_swap.c:543 +msgid "Exit with CRITCAL status if less than PERCENT of swap space is free" +msgstr "" + +#: plugins/check_swap.c:545 +msgid "Conduct comparisons for all swap partitions, one by one" +msgstr "" + +#: plugins/check_swap.c:547 +msgid "Verbose output. Up to 3 levels" +msgstr "" + +#: plugins/check_swap.c:550 +msgid "On AIX, if -a is specified, uses lsps -a, otherwise uses lsps -s.\n" +msgstr "" + +#: plugins/check_tcp.c:199 msgid "CRITICAL - Generic check_tcp called with unknown service\n" msgstr "" -#: plugins/check_tcp.c:207 +#: plugins/check_tcp.c:220 msgid "With UDP checks, a send/expect string must be specified." msgstr "" -#: plugins/check_tcp.c:332 +#: plugins/check_tcp.c:239 #, c-format -msgid "%s %s - " -msgstr "" +msgid "CRITICAL - Cannot retrieve server certificate.\n" +msgstr "CRITICAL - Konnte kein Serverzertifikat erhalten\n" -#: plugins/check_tcp.c:405 +#: plugins/check_tcp.c:428 msgid "No arguments found" msgstr "" -#: plugins/check_tcp.c:513 +#: plugins/check_tcp.c:530 msgid "Maxbytes must be a positive integer" msgstr "Maxbytes muss ein positiver Integer sein" -#: plugins/check_tcp.c:530 +#: plugins/check_tcp.c:548 msgid "Refuse must be one of ok, warn, crit" msgstr "" -#: plugins/check_tcp.c:540 +#: plugins/check_tcp.c:558 msgid "Mismatch must be one of ok, warn, crit" msgstr "" -#: plugins/check_tcp.c:546 +#: plugins/check_tcp.c:564 msgid "Delay must be a positive integer" msgstr "Delay muss ein positiver Integer sein" -#: plugins/check_tcp.c:571 +#: plugins/check_tcp.c:589 #, fuzzy msgid "You must provide a server address" msgstr "%s: Hostname muss angegeben werden\n" -#: plugins/check_tcp.c:573 +#: plugins/check_tcp.c:591 #, fuzzy msgid "Invalid hostname, address or socket" msgstr "Ungültige(r) Hostname/Adresse" -#: plugins/check_tcp.c:587 +#: plugins/check_tcp.c:605 #, fuzzy, c-format msgid "" "This plugin tests %s connections with the specified host (or unix socket).\n" "\n" msgstr "Dieses plugin testet Gameserververbindungen zum angegebenen Host." -#: plugins/check_tcp.c:598 -#, c-format +#: plugins/check_tcp.c:617 msgid "" -" -E, --escape\n" -" Can use \\n, \\r, \\t or \\ in send or quit string.\n" -" Default: nothing added to send, \\r\\n added to end of quit\n" -" -s, --send=STRING\n" -" String to send to the server\n" -" -e, --expect=STRING\n" -" String to expect in server response\n" -" -q, --quit=STRING\n" -" String to send server to initiate a clean close of the connection\n" +"Can use \\n, \\r, \\t or \\ in send or quit string. Must come before send or " +"quit option" msgstr "" -#: plugins/check_tcp.c:609 -#, c-format -msgid "" -" -r, --refuse=ok|warn|crit\n" -" Accept tcp refusals with states ok, warn, crit (default: crit)\n" -" -M, --mismatch=ok|warn|crit\n" -" Accept expected string mismatches with states ok, warn, crit (default: " -"warn)\n" -" -j, --jail\n" -" Hide output from TCP socket\n" -" -m, --maxbytes=INTEGER\n" -" Close connection once more than this number of bytes are received\n" -" -d, --delay=INTEGER\n" -" Seconds to wait between sending string and polling for response\n" +#: plugins/check_tcp.c:618 +msgid "Default: nothing added to send, \\r\\n added to end of quit" +msgstr "" + +#: plugins/check_tcp.c:620 +msgid "String to send to the server" msgstr "" #: plugins/check_tcp.c:622 -#, c-format -msgid "" -" -D, --certificate=INTEGER\n" -" Minimum number of days a certificate has to be valid.\n" -" -S, --ssl\n" -" Use SSL for the connection.\n" +msgid "String to expect in server response" msgstr "" -#: plugins/check_time.c:90 +#: plugins/check_tcp.c:624 +msgid "String to send server to initiate a clean close of the connection" +msgstr "" + +#: plugins/check_tcp.c:626 +msgid "Accept tcp refusals with states ok, warn, crit (default: crit)" +msgstr "" + +#: plugins/check_tcp.c:628 +msgid "" +"Accept expected string mismatches with states ok, warn, crit (default: warn)" +msgstr "" + +#: plugins/check_tcp.c:630 +#, fuzzy +msgid "Hide output from TCP socket" +msgstr "Konnte TCP socket nicht öffnen\n" + +#: plugins/check_tcp.c:632 +msgid "Close connection once more than this number of bytes are received" +msgstr "" + +#: plugins/check_tcp.c:634 +msgid "Seconds to wait between sending string and polling for response" +msgstr "" + +#: plugins/check_tcp.c:640 +msgid "Use SSL for the connection." +msgstr "" + +#: plugins/check_time.c:106 #, c-format msgid "TIME UNKNOWN - could not connect to server %s, port %d\n" msgstr "" -#: plugins/check_time.c:103 +#: plugins/check_time.c:119 #, c-format msgid "TIME UNKNOWN - could not send UDP request to server %s, port %d\n" msgstr "" -#: plugins/check_time.c:127 +#: plugins/check_time.c:143 #, c-format msgid "TIME UNKNOWN - no data received from server %s, port %d\n" msgstr "" -#: plugins/check_time.c:140 +#: plugins/check_time.c:156 #, c-format msgid "TIME %s - %d second response time|%s\n" msgstr "" -#: plugins/check_time.c:158 +#: plugins/check_time.c:174 #, c-format msgid "TIME %s - %lu second time difference|%s %s\n" msgstr "" -#: plugins/check_time.c:242 +#: plugins/check_time.c:258 msgid "Warning thresholds must be a positive integer" msgstr "Warning thresholds muss ein positiver Integer sein" -#: plugins/check_time.c:261 +#: plugins/check_time.c:277 msgid "Critical thresholds must be a positive integer" msgstr "Critical thresholds muss ein positiver Integer sein" -#: plugins/check_time.c:327 -#, c-format -msgid "" -"This plugin will check the time on the specified host.\n" +#: plugins/check_time.c:343 +#, fuzzy +msgid "This plugin will check the time on the specified host." +msgstr "" +"Testet den DNS Dienst auf dem angegebenen Host mit dig\n" "\n" + +#: plugins/check_time.c:354 +msgid "Use UDP to connect, not TCP" msgstr "" -#: plugins/check_time.c:335 -#, c-format -msgid "" -" -u, --udp\n" -" Use UDP to connect, not TCP\n" -" -w, --warning-variance=INTEGER\n" -" Time difference (sec.) necessary to result in a warning status\n" -" -c, --critical-variance=INTEGER\n" -" Time difference (sec.) necessary to result in a critical status\n" -" -W, --warning-connect=INTEGER\n" -" Response time (sec.) necessary to result in warning status\n" -" -C, --critical-connect=INTEGER\n" -" Response time (sec.) necessary to result in critical status\n" +#: plugins/check_time.c:356 +msgid "Time difference (sec.) necessary to result in a warning status" msgstr "" -#: plugins/check_udp.c:70 -#, fuzzy, c-format -msgid "No response from host on port %d\n" -msgstr "Ungültige HTTP Antwort von Host erhalten auf Port %d\n" - -#: plugins/check_udp.c:79 -#, fuzzy, c-format -msgid "Invalid response received from host on port %d\n" -msgstr "Ungültige HTTP Antwort von Host erhalten auf Port %d\n" - -#: plugins/check_udp.c:95 -#, c-format -msgid "Connection %s on port %d - %d second response time\n" +#: plugins/check_time.c:358 +msgid "Time difference (sec.) necessary to result in a critical status" msgstr "" -#: plugins/check_udp.c:96 -msgid "accepted" +#: plugins/check_time.c:360 +msgid "Response time (sec.) necessary to result in warning status" msgstr "" -#: plugins/check_udp.c:96 -msgid "problem" +#: plugins/check_time.c:362 +msgid "Response time (sec.) necessary to result in critical status" msgstr "" -#: plugins/check_udp.c:225 -#, c-format -msgid "" -"\tThis plugin tests an UDP connection with the specified host.\n" -"\n" -msgstr "" - -#: plugins/check_udp.c:234 -#, c-format -msgid "" -" -e, --expect=STRING \n" -" String to expect in first line of server response\n" -" -s, --send=STRING \n" -" String to send to the server when initiating the connection\n" -msgstr "" - -#: plugins/check_udp.c:246 -#, c-format -msgid "" -"This plugin will attempt to connect to the specified port on the host.\n" -"Successful connects return STATE_OK, refusals and timeouts return\n" -"STATE_CRITICAL, other errors return STATE_UNKNOWN.\n" -"\n" -msgstr "" - -#: plugins/check_ups.c:137 +#: plugins/check_ups.c:147 msgid "On Battery, Low Battery" msgstr "" -#: plugins/check_ups.c:142 +#: plugins/check_ups.c:152 msgid "Online" msgstr "" -#: plugins/check_ups.c:145 +#: plugins/check_ups.c:155 msgid "On Battery" msgstr "" -#: plugins/check_ups.c:149 +#: plugins/check_ups.c:159 msgid ", Low Battery" msgstr "" -#: plugins/check_ups.c:153 +#: plugins/check_ups.c:163 msgid ", Calibrating" msgstr "" -#: plugins/check_ups.c:156 +#: plugins/check_ups.c:166 msgid ", Replace Battery" msgstr "" -#: plugins/check_ups.c:160 +#: plugins/check_ups.c:170 msgid ", On Bypass" msgstr "" -#: plugins/check_ups.c:163 +#: plugins/check_ups.c:173 msgid ", Overload" msgstr "" -#: plugins/check_ups.c:166 +#: plugins/check_ups.c:176 msgid ", Trimming" msgstr "" -#: plugins/check_ups.c:169 +#: plugins/check_ups.c:179 msgid ", Boosting" msgstr "" -#: plugins/check_ups.c:172 +#: plugins/check_ups.c:182 msgid ", Charging" msgstr "" -#: plugins/check_ups.c:175 +#: plugins/check_ups.c:185 msgid ", Discharging" msgstr "" -#: plugins/check_ups.c:178 +#: plugins/check_ups.c:188 msgid ", Unknown" msgstr "" -#: plugins/check_ups.c:317 +#: plugins/check_ups.c:327 #, fuzzy msgid "UPS does not support any available options\n" msgstr "IPv6 Unterstützung nicht vorhanden" -#: plugins/check_ups.c:341 plugins/check_ups.c:401 -#, fuzzy, c-format -msgid "Invalid response received from host\n" +#: plugins/check_ups.c:351 plugins/check_ups.c:411 +#, fuzzy +msgid "Invalid response received from host" msgstr "Ungültige HTTP Antwort von Host empfangen\n" -#: plugins/check_ups.c:409 +#: plugins/check_ups.c:419 #, c-format msgid "CRITICAL - no such ups '%s' on that host\n" msgstr "" -#: plugins/check_ups.c:419 -#, fuzzy, c-format -msgid "CRITICAL - UPS data is stale\n" +#: plugins/check_ups.c:429 +#, fuzzy +msgid "CRITICAL - UPS data is stale" msgstr "CRITICAL - Serverdatum \"%100s\" konnte nicht verarbeitet werden" -#: plugins/check_ups.c:424 +#: plugins/check_ups.c:434 #, fuzzy, c-format msgid "Unknown error: %s\n" msgstr "Papierfehler" -#: plugins/check_ups.c:431 -#, c-format -msgid "Error: unable to parse variable\n" +#: plugins/check_ups.c:441 +msgid "Error: unable to parse variable" msgstr "" -#: plugins/check_ups.c:538 +#: plugins/check_ups.c:548 msgid "Unrecognized UPS variable" msgstr "" -#: plugins/check_ups.c:576 -#, c-format -msgid "Error : no ups indicated\n" -msgstr "" - -#: plugins/check_ups.c:596 -#, c-format -msgid "" -"This plugin tests the UPS service on the specified host.\n" -"Network UPS Tools from www.networkupstools.org must be running for this\n" -"plugin to work.\n" -"\n" +#: plugins/check_ups.c:586 +msgid "Error : no ups indicated" msgstr "" #: plugins/check_ups.c:606 -#, c-format +#, fuzzy msgid "" -" -u, --ups=STRING\n" -" Name of UPS\n" +"This plugin tests the UPS service on the specified host.Network UPS Tools " +msgstr "" +"Testet den DNS Dienst auf dem angegebenen Host mit dig\n" +"\n" + +#: plugins/check_ups.c:607 +msgid "from www.networkupstools.org must be running for thisplugin to work." msgstr "" -#: plugins/check_ups.c:610 -#, c-format -msgid "" -" -T, --temperature\n" -" Output of temperatures in Celsius\n" +#: plugins/check_ups.c:618 +msgid "Name of UPS" msgstr "" #: plugins/check_ups.c:620 -#, c-format -msgid "" -"This plugin attempts to determine the status of a UPS (Uninterruptible " -"Power\n" -"Supply) on a local or remote host. If the UPS is online or calibrating, the\n" -"plugin will return an OK state. If the battery is on it will return a " -"WARNING\n" -"state. If the UPS is off or has a low battery the plugin will return a " -"CRITICAL\n" -"state.\n" -"\n" +msgid "Output of temperatures in Celsius" msgstr "" -#: plugins/check_ups.c:627 -#, c-format +#: plugins/check_ups.c:631 msgid "" -"You may also specify a variable to check [such as temperature, utility " -"voltage,\n" -"battery load, etc.] as well as warning and critical thresholds for the " -"value of\n" -"that variable. If the remote host has multiple UPS that are being monitored " -"you\n" -"will have to use the [ups] option to specify which UPS to check.\n" -"\n" +"This plugin attempts to determine the status of a UPS (Uninterruptible Power" +msgstr "" + +#: plugins/check_ups.c:632 +msgid "" +"Supply) on a local or remote host. If the UPS is online or calibrating, the" msgstr "" #: plugins/check_ups.c:633 -#, c-format msgid "" -"Notes:\n" -"\n" -"This plugin requires that the UPSD daemon distributed with Russel Kroll's\n" -"Smart UPS Tools be installed on the remote host. If you do not have the\n" -"package installed on your system, you can download it from\n" -"http://www.networkupstools.org\n" -"\n" +"plugin will return an OK state. If the battery is on it will return a WARNING" msgstr "" -#: plugins/check_users.c:78 +#: plugins/check_ups.c:634 +msgid "" +"state.If the UPS is off or has a low battery the plugin will return a " +"CRITICAL" +msgstr "" + +#: plugins/check_ups.c:635 +msgid "state." +msgstr "" + +#: plugins/check_ups.c:637 +msgid "" +"You may also specify a variable to check [such as temperature, utility " +"voltage," +msgstr "" + +#: plugins/check_ups.c:638 +msgid "" +"battery load, etc.] as well as warning and critical thresholds for the " +"value of" +msgstr "" + +#: plugins/check_ups.c:639 +msgid "" +"that variable. If the remote host has multiple UPS that are being monitored " +"you" +msgstr "" + +#: plugins/check_ups.c:640 +msgid "will have to use the [ups] option to specify which UPS to check." +msgstr "" + +#: plugins/check_ups.c:642 +msgid "" +"This plugin requires that the UPSD daemon distributed with Russel Kroll's" +msgstr "" + +#: plugins/check_ups.c:643 +msgid "" +"Smart UPS Tools be installed on the remote host. If you do not have the" +msgstr "" + +#: plugins/check_ups.c:644 +msgid "" +"package installed on your system, you can download it from http://www." +"networkupstools.org" +msgstr "" + +#: plugins/check_users.c:94 #, c-format msgid "# users=%d" msgstr "" -#: plugins/check_users.c:108 +#: plugins/check_users.c:117 +msgid "Unable to read output" +msgstr "" + +#: plugins/check_users.c:124 #, c-format msgid "USERS %s - %d users currently logged in |%s\n" msgstr "" -#: plugins/check_users.c:193 -#, c-format +#: plugins/check_users.c:209 +#, fuzzy +msgid "This plugin checks the number of users currently logged in on the local" +msgstr "" +"Dieses Plugin prüft den freien Speicher auf einem gemounteten Filesystem\n" +"und erzeugt einen Alarm wenn einer der angegebenen Schwellwerte " +"unterschritten wird.\n" +"\n" + +#: plugins/check_users.c:210 msgid "" -"This plugin checks the number of users currently logged in on the local\n" -"system and generates an error if the number exceeds the thresholds " -"specified.\n" +"system and generates an error if the number exceeds the thresholds specified." msgstr "" -#: plugins/check_users.c:201 -#, c-format -msgid "" -" -w, --warning=INTEGER\n" -" Set WARNING status if more than INTEGER users are logged in\n" -" -c, --critical=INTEGER\n" -" Set CRITICAL status if more than INTEGER users are logged in\n" +#: plugins/check_users.c:219 +msgid "Set WARNING status if more than INTEGER users are logged in" msgstr "" -#: plugins/check_ide_smart.c:230 +#: plugins/check_users.c:221 +msgid "Set CRITICAL status if more than INTEGER users are logged in" +msgstr "" + +#: plugins/check_ide_smart.c:231 #, fuzzy, c-format msgid "CRITICAL - Couldn't open device %s: %s\n" msgstr "CRITICAL - Device konnte nicht geöffnet werden: %s\n" -#: plugins/check_ide_smart.c:235 +#: plugins/check_ide_smart.c:236 #, c-format msgid "CRITICAL - SMART_CMD_ENABLE\n" msgstr "" -#: plugins/check_ide_smart.c:296 +#: plugins/check_ide_smart.c:297 #, c-format msgid "CRITICAL - SMART_READ_VALUES: %s\n" msgstr "" -#: plugins/check_ide_smart.c:365 +#: plugins/check_ide_smart.c:366 #, c-format msgid "CRITICAL - %d Harddrive PreFailure%cDetected! %d/%d tests failed.\n" msgstr "" -#: plugins/check_ide_smart.c:373 +#: plugins/check_ide_smart.c:374 #, c-format msgid "WARNING - %d Harddrive Advisor%s Detected. %d/%d tests failed.\n" msgstr "" -#: plugins/check_ide_smart.c:381 +#: plugins/check_ide_smart.c:382 #, c-format msgid "OK - Operational (%d/%d tests passed)\n" msgstr "" -#: plugins/check_ide_smart.c:385 +#: plugins/check_ide_smart.c:386 #, c-format msgid "ERROR - Status '%d' unkown. %d/%d tests passed\n" msgstr "" -#: plugins/check_ide_smart.c:418 +#: plugins/check_ide_smart.c:419 #, c-format msgid "OffLineStatus=%d {%s}, AutoOffLine=%s, OffLineTimeout=%d minutes\n" msgstr "" -#: plugins/check_ide_smart.c:424 +#: plugins/check_ide_smart.c:425 #, c-format msgid "OffLineCapability=%d {%s %s %s}\n" msgstr "" -#: plugins/check_ide_smart.c:430 +#: plugins/check_ide_smart.c:431 #, c-format msgid "SmartRevision=%d, CheckSum=%d, SmartCapability=%d {%s %s}\n" msgstr "" -#: plugins/check_ide_smart.c:468 +#: plugins/check_ide_smart.c:469 #, c-format msgid "CRITICAL - %s: %s\n" msgstr "" -#: plugins/check_ide_smart.c:487 +#: plugins/check_ide_smart.c:488 #, c-format msgid "CRITICAL - SMART_READ_THRESHOLDS: %s\n" msgstr "" -#: plugins/check_ide_smart.c:504 +#: plugins/check_ide_smart.c:505 #, c-format msgid "" "This plugin checks a local hard drive with the (Linux specific) SMART " -"interface [http://smartlinux.sourceforge.net/smart/index.php].\n" -"\n" +"interface [http://smartlinux.sourceforge.net/smart/index.php]." msgstr "" -#: plugins/negate.c:242 -#, c-format +#: plugins/check_ide_smart.c:514 +msgid "Select device DEVICE" +msgstr "" + +#: plugins/check_ide_smart.c:515 msgid "" -"Negates the status of a plugin (returns OK for CRITICAL, and vice-versa).\n" -"\n" +"Note: if the device is selected with this option, _no_ other options are " +"accepted" msgstr "" -#: plugins/negate.c:251 -#, c-format -msgid " [keep timeout than the plugin timeout to retain CRITICAL status]\n" +#: plugins/check_ide_smart.c:517 +msgid "Perform immediately offline tests" msgstr "" -#: plugins/negate.c:254 -#, c-format +#: plugins/check_ide_smart.c:519 +msgid "Returns the number of failed tests" +msgstr "" + +#: plugins/check_ide_smart.c:521 +msgid "Turn on automatic offline tests" +msgstr "" + +#: plugins/check_ide_smart.c:523 +msgid "Turn off automatic offline tests" +msgstr "" + +#: plugins/check_ide_smart.c:525 +msgid "Output suitable for Nagios" +msgstr "" + +#: plugins/negate.c:257 msgid "" -" negate \"/usr/local/nagios/libexec/check_ping -H host\"\n" -" Run check_ping and invert result. Must use full path to plugin\n" -" negate \"/usr/local/nagios/libexec/check_procs -a 'vi negate.c'\"\n" -" Use single quotes if you need to retain spaces\n" +"Negates the status of a plugin (returns OK for CRITICAL, and vice-versa)." msgstr "" -#: plugins/negate.c:260 -#, c-format +#: plugins/negate.c:267 +msgid "[keep timeout than the plugin timeout to retain CRITICAL status]" +msgstr "" + +#: plugins/negate.c:271 +msgid "Run check_ping and invert result. Must use full path to plugin" +msgstr "" + +#: plugins/negate.c:273 +msgid "Use single quotes if you need to retain spaces" +msgstr "" + +#: plugins/negate.c:277 +msgid "" +"This plugin is a wrapper to take the output of another plugin and invert it." +msgstr "" + +#: plugins/negate.c:278 msgid "" -"This plugin is a wrapper to take the output of another plugin and invert " -"it.\n" "If the wrapped plugin returns STATE_OK, the wrapper will return " -"STATE_CRITICAL.\n" +"STATE_CRITICAL." +msgstr "" + +#: plugins/negate.c:279 +msgid "" "If the wrapped plugin returns STATE_CRITICAL, the wrapper will return " -"STATE_OK.\n" -"Otherwise, the output state of the wrapped plugin is unchanged.\n" +"STATE_OK." +msgstr "" + +#: plugins/negate.c:280 +msgid "Otherwise, the output state of the wrapped plugin is unchanged." msgstr "" #: plugins/netutils.c:49 @@ -3890,31 +4594,24 @@ msgid "CRITICAL - Abnormal timeout after %d seconds\n" msgstr "CRITICAL - Dokumentendatum ist %d Sekunden in der Zukunft\n" #: plugins/netutils.c:79 plugins/netutils.c:270 -#, c-format -msgid "Send failed\n" +msgid "Send failed" msgstr "" #: plugins/netutils.c:96 plugins/netutils.c:285 -#, fuzzy, c-format -msgid "No data was received from host!\n" +#, fuzzy +msgid "No data was received from host!" msgstr "Keine Daten empfangen %s\n" -#: plugins/netutils.c:193 -#, c-format -msgid "Socket creation failed\n" +#: plugins/netutils.c:193 plugins/netutils.c:229 +msgid "Socket creation failed" msgstr "" #: plugins/netutils.c:222 msgid "Supplied path too long unix domain socket" msgstr "" -#: plugins/netutils.c:229 -msgid "Socket creation failed" -msgstr "" - #: plugins/netutils.c:294 -#, c-format -msgid "Receive failed\n" +msgid "Receive failed" msgstr "" #: plugins/netutils.c:320 @@ -3924,365 +4621,558 @@ msgstr "" "Ungültige(r) Name/Adresse: %s\n" "\n" -#: plugins/popen.c:124 -#, fuzzy, c-format -msgid "Could not malloc argv array in popen()\n" +#: plugins/popen.c:148 +#, fuzzy +msgid "Could not malloc argv array in popen()" msgstr "Konnte addr nicht zuweisen\n" -#: plugins/popen.c:134 -#, fuzzy, c-format -msgid "CRITICAL - You need more args!!!\n" +#: plugins/popen.c:158 +#, fuzzy +msgid "CRITICAL - You need more args!!!" msgstr "CRITICAL - Fehler: %s\n" -#: plugins/popen.c:183 +#: plugins/popen.c:207 #, fuzzy msgid "Cannot catch SIGCHLD" msgstr "Konnte SIGALRM nicht erhalten" -#: plugins/popen.c:278 plugins/utils.c:147 +#: plugins/popen.c:302 plugins/utils.c:146 #, fuzzy, c-format msgid "CRITICAL - Plugin timed out after %d seconds\n" msgstr "CRITICAL - Dokumentendatum ist %d Sekunden in der Zukunft\n" -#: plugins/popen.c:281 -#, c-format -msgid "CRITICAL - popen timeout received, but no child process\n" +#: plugins/popen.c:305 +msgid "CRITICAL - popen timeout received, but no child process" msgstr "" -#: plugins/popen.c:297 +#: plugins/popen.c:321 msgid "sysconf error for _SC_OPEN_MAX" msgstr "" -#: plugins/urlize.c:113 +#: plugins/urlize.c:137 #, c-format msgid "" "%s UNKNOWN - No data received from host\n" "CMD: %s\n" msgstr "" -#: plugins/urlize.c:152 -#, c-format -msgid "" -"\n" -"This plugin wraps the text output of another command (plugin) in HTML\n" -" tags, thus displaying the plugin output in as a clickable link in\n" -"the Nagios status screen. The return status is the same as the invoked\n" -"plugin.\n" -"\n" +#: plugins/urlize.c:176 +msgid "This plugin wraps the text output of another command (plugin)" msgstr "" -#: plugins/urlize.c:160 -#, c-format +#: plugins/urlize.c:177 msgid "" -"\n" -"Pay close attention to quoting to ensure that the shell passes the expected\n" -"data to the plugin. For example, in:\n" -"\n" -" urlize http://example.com/ check_http -H example.com -r 'two words'\n" -"\n" -"the shell will remove the single quotes and urlize will see:\n" -"\n" -" urlize http://example.com/ check_http -H example.com -r two words\n" -"\n" -"You probably want:\n" -"\n" -" urlize http://example.com/ \"check_http -H example.com -r 'two words'\"\n" +"in HTML tags, thus displaying the plugin output in as a clickable link in" msgstr "" -#: plugins/utils.c:592 +#: plugins/urlize.c:178 +msgid "" +"the Nagios status screen. The return status is the same as the invoked " +"plugin." +msgstr "" + +#: plugins/urlize.c:188 +msgid "" +"Pay close attention to quoting to ensure that the shell passes the expected" +msgstr "" + +#: plugins/urlize.c:189 +msgid "data to the plugin. For example, in:" +msgstr "" + +#: plugins/urlize.c:190 +msgid "urlize http://example.com/ check_http -H example.com -r 'two words'" +msgstr "" + +#: plugins/urlize.c:191 +msgid "the shell will remove the single quotes and urlize will see:" +msgstr "" + +#: plugins/urlize.c:192 +msgid "urlize http://example.com/ check_http -H example.com -r two words" +msgstr "" + +#: plugins/urlize.c:193 +msgid "You probably want:" +msgstr "" + +#: plugins/urlize.c:194 +msgid "urlize http://example.com/ \"check_http -H example.com -r 'two words'\"" +msgstr "" + +#: plugins/utils.c:441 #, fuzzy msgid "failed realloc in strpcpy\n" msgstr "konnte keinen Speicher für '%s' reservieren\n" -#: plugins/utils.c:634 +#: plugins/utils.c:483 #, fuzzy msgid "failed malloc in strscat\n" msgstr "konnte keinen Speicher für '%s' reservieren\n" -#: plugins-root/check_dhcp.c:293 +#: plugins-root/check_dhcp.c:298 #, c-format msgid "Error: Could not get hardware address of interface '%s'\n" msgstr "" -#: plugins-root/check_dhcp.c:315 +#: plugins-root/check_dhcp.c:320 #, c-format msgid "Error: if_nametoindex error - %s.\n" msgstr "" -#: plugins-root/check_dhcp.c:320 +#: plugins-root/check_dhcp.c:325 #, c-format msgid "Error: Couldn't get hardware address from %s. sysctl 1 error - %s.\n" msgstr "" -#: plugins-root/check_dhcp.c:325 +#: plugins-root/check_dhcp.c:330 #, c-format msgid "" "Error: Couldn't get hardware address from interface %s. malloc error - %s.\n" msgstr "" -#: plugins-root/check_dhcp.c:330 +#: plugins-root/check_dhcp.c:335 #, c-format msgid "Error: Couldn't get hardware address from %s. sysctl 2 error - %s.\n" msgstr "" -#: plugins-root/check_dhcp.c:355 +#: plugins-root/check_dhcp.c:361 #, c-format msgid "" "Error: can't find unit number in interface_name (%s) - expecting TypeNumber " "eg lnc0.\n" msgstr "" -#: plugins-root/check_dhcp.c:360 plugins-root/check_dhcp.c:372 +#: plugins-root/check_dhcp.c:366 plugins-root/check_dhcp.c:378 #, c-format msgid "" "Error: can't read MAC address from DLPI streams interface for device %s unit " "%d.\n" msgstr "" -#: plugins-root/check_dhcp.c:378 +#: plugins-root/check_dhcp.c:384 #, c-format msgid "Error: can't get MAC address for this architecture.\n" msgstr "" -#: plugins-root/check_dhcp.c:383 +#: plugins-root/check_dhcp.c:389 #, c-format msgid "Hardware address: " msgstr "" -#: plugins-root/check_dhcp.c:458 +#: plugins-root/check_dhcp.c:464 #, c-format msgid "DHCPDISCOVER to %s port %d\n" msgstr "" -#: plugins-root/check_dhcp.c:509 +#: plugins-root/check_dhcp.c:517 #, c-format msgid "Result=ERROR\n" msgstr "" -#: plugins-root/check_dhcp.c:515 +#: plugins-root/check_dhcp.c:523 #, c-format msgid "Result=OK\n" msgstr "" -#: plugins-root/check_dhcp.c:521 +#: plugins-root/check_dhcp.c:538 #, c-format -msgid "DHCPOFFER from IP address %s\n" +msgid "DHCPOFFER from IP address %s" msgstr "" -#: plugins-root/check_dhcp.c:528 +#: plugins-root/check_dhcp.c:539 +#, c-format +msgid " via %s\n" +msgstr "" + +#: plugins-root/check_dhcp.c:546 #, c-format msgid "" "DHCPOFFER XID (%lu) did not match DHCPDISCOVER XID (%lu) - ignoring packet\n" msgstr "" -#: plugins-root/check_dhcp.c:550 +#: plugins-root/check_dhcp.c:568 #, c-format msgid "DHCPOFFER hardware address did not match our own - ignoring packet\n" msgstr "" -#: plugins-root/check_dhcp.c:568 +#: plugins-root/check_dhcp.c:586 #, c-format msgid "Total responses seen on the wire: %d\n" msgstr "" -#: plugins-root/check_dhcp.c:569 +#: plugins-root/check_dhcp.c:587 #, fuzzy, c-format msgid "Valid responses for this machine: %d\n" msgstr "Keine Antwort vom Host \n" -#: plugins-root/check_dhcp.c:585 +#: plugins-root/check_dhcp.c:603 #, c-format msgid "send_dhcp_packet result: %d\n" msgstr "" -#: plugins-root/check_dhcp.c:614 +#: plugins-root/check_dhcp.c:632 #, fuzzy, c-format msgid "No (more) data received\n" msgstr "Keine Daten empfangen %s\n" -#: plugins-root/check_dhcp.c:633 +#: plugins-root/check_dhcp.c:651 #, c-format msgid "recvfrom() failed, " msgstr "" -#: plugins-root/check_dhcp.c:640 +#: plugins-root/check_dhcp.c:658 #, c-format msgid "receive_dhcp_packet() result: %d\n" msgstr "" -#: plugins-root/check_dhcp.c:641 +#: plugins-root/check_dhcp.c:659 #, c-format msgid "receive_dhcp_packet() source: %s\n" msgstr "" -#: plugins-root/check_dhcp.c:670 +#: plugins-root/check_dhcp.c:688 #, c-format msgid "Error: Could not create socket!\n" msgstr "" -#: plugins-root/check_dhcp.c:680 +#: plugins-root/check_dhcp.c:698 #, c-format msgid "Error: Could not set reuse address option on DHCP socket!\n" msgstr "" -#: plugins-root/check_dhcp.c:686 +#: plugins-root/check_dhcp.c:704 #, c-format msgid "Error: Could not set broadcast option on DHCP socket!\n" msgstr "" -#: plugins-root/check_dhcp.c:694 +#: plugins-root/check_dhcp.c:712 #, c-format msgid "" "Error: Could not bind socket to interface %s. Check your privileges...\n" msgstr "" -#: plugins-root/check_dhcp.c:704 +#: plugins-root/check_dhcp.c:722 #, c-format msgid "" "Error: Could not bind to DHCP socket (port %d)! Check your privileges...\n" msgstr "" -#: plugins-root/check_dhcp.c:737 +#: plugins-root/check_dhcp.c:756 #, c-format msgid "Requested server address: %s\n" msgstr "" -#: plugins-root/check_dhcp.c:796 +#: plugins-root/check_dhcp.c:812 #, c-format msgid "Lease Time: Infinite\n" msgstr "" -#: plugins-root/check_dhcp.c:798 +#: plugins-root/check_dhcp.c:814 #, c-format msgid "Lease Time: %lu seconds\n" msgstr "" -#: plugins-root/check_dhcp.c:800 +#: plugins-root/check_dhcp.c:816 #, c-format msgid "Renewal Time: Infinite\n" msgstr "" -#: plugins-root/check_dhcp.c:802 +#: plugins-root/check_dhcp.c:818 #, c-format msgid "Renewal Time: %lu seconds\n" msgstr "" -#: plugins-root/check_dhcp.c:804 +#: plugins-root/check_dhcp.c:820 #, c-format msgid "Rebinding Time: Infinite\n" msgstr "" -#: plugins-root/check_dhcp.c:805 +#: plugins-root/check_dhcp.c:821 #, c-format msgid "Rebinding Time: %lu seconds\n" msgstr "" -#: plugins-root/check_dhcp.c:821 +#: plugins-root/check_dhcp.c:837 #, c-format msgid "Added offer from server @ %s" msgstr "" -#: plugins-root/check_dhcp.c:822 +#: plugins-root/check_dhcp.c:838 #, c-format msgid " of IP address %s\n" msgstr "" -#: plugins-root/check_dhcp.c:889 +#: plugins-root/check_dhcp.c:905 #, c-format msgid "DHCP Server Match: Offerer=%s" msgstr "" -#: plugins-root/check_dhcp.c:890 +#: plugins-root/check_dhcp.c:906 #, c-format -msgid " Requested=%s\n" +msgid " Requested=%s" msgstr "" -#: plugins-root/check_dhcp.c:929 +#: plugins-root/check_dhcp.c:908 +#, c-format +msgid " (duplicate)" +msgstr "" + +#: plugins-root/check_dhcp.c:909 +#, c-format +msgid "\n" +msgstr "" + +#: plugins-root/check_dhcp.c:957 #, c-format msgid "No DHCPOFFERs were received.\n" msgstr "" -#: plugins-root/check_dhcp.c:933 +#: plugins-root/check_dhcp.c:961 #, c-format msgid "Received %d DHCPOFFER(s)" msgstr "" -#: plugins-root/check_dhcp.c:936 +#: plugins-root/check_dhcp.c:964 #, c-format msgid ", %s%d of %d requested servers responded" msgstr "" -#: plugins-root/check_dhcp.c:939 +#: plugins-root/check_dhcp.c:967 #, c-format msgid ", requested address (%s) was %soffered" msgstr "" -#: plugins-root/check_dhcp.c:939 +#: plugins-root/check_dhcp.c:967 msgid "not " msgstr "" -#: plugins-root/check_dhcp.c:941 +#: plugins-root/check_dhcp.c:969 #, c-format msgid ", max lease time = " msgstr "" -#: plugins-root/check_dhcp.c:943 +#: plugins-root/check_dhcp.c:971 #, c-format msgid "Infinity" msgstr "" -#: plugins-root/check_dhcp.c:1125 +#: plugins-root/check_dhcp.c:1148 #, c-format msgid "Error: DLPI stream API failed to get MAC in check_ctrl: %s.\n" msgstr "" -#: plugins-root/check_dhcp.c:1136 +#: plugins-root/check_dhcp.c:1160 #, c-format msgid "Error: DLPI stream API failed to get MAC in put_ctrl/putmsg(): %s.\n" msgstr "" -#: plugins-root/check_dhcp.c:1148 +#: plugins-root/check_dhcp.c:1173 #, c-format msgid "Error: DLPI stream API failed to get MAC in put_both/putmsg().\n" msgstr "" -#: plugins-root/check_dhcp.c:1159 +#: plugins-root/check_dhcp.c:1185 #, c-format msgid "" "Error: DLPI stream API failed to get MAC in dl_attach_req/open(%s..): %s.\n" msgstr "" -#: plugins-root/check_dhcp.c:1183 +#: plugins-root/check_dhcp.c:1209 #, c-format msgid "Error: DLPI stream API failed to get MAC in dl_bind/check_ctrl(): %s.\n" msgstr "" -#: plugins-root/check_dhcp.c:1231 -#, c-format -msgid "" -"This plugin tests the availability of DHCP servers on a network.\n" -"\n" +#: plugins-root/check_dhcp.c:1257 +msgid "This plugin tests the availability of DHCP servers on a network." msgstr "" -#: plugins-root/check_dhcp.c:1235 -#, c-format -msgid "" -" -s, --serverip=IPADDRESS\n" -" IP address of DHCP server that we must hear from\n" -" -r, --requestedip=IPADDRESS\n" -" IP address that should be offered by at least one DHCP server\n" -" -t, --timeout=INTEGER\n" -" Seconds to wait for DHCPOFFER before timeout occurs\n" -" -i, --interface=STRING\n" -" Interface to to use for listening (i.e. eth0)\n" -" -v, --verbose\n" -" Print extra information (command-line use only)\n" -" -h, --help\n" -" Print detailed help screen\n" -" -V, --version\n" -" Print version information\n" +#: plugins-root/check_dhcp.c:1268 +msgid "IP address of DHCP server that we must hear from" msgstr "" +#: plugins-root/check_dhcp.c:1270 +msgid "IP address that should be offered by at least one DHCP server" +msgstr "" + +#: plugins-root/check_dhcp.c:1272 +msgid "Seconds to wait for DHCPOFFER before timeout occurs" +msgstr "" + +#: plugins-root/check_dhcp.c:1274 +msgid "Interface to to use for listening (i.e. eth0)" +msgstr "" + +#: plugins-root/check_icmp.c:1227 +msgid "specify a target" +msgstr "" + +#: plugins-root/check_icmp.c:1229 +#, fuzzy +msgid "warning threshold (currently " +msgstr "Warning threshold Integer sein" + +#: plugins-root/check_icmp.c:1232 +#, fuzzy +msgid "critical threshold (currently " +msgstr "Critical threshold muss ein Integer sein" + +#: plugins-root/check_icmp.c:1235 +msgid "number of packets to send (currently " +msgstr "" + +#: plugins-root/check_icmp.c:1238 +msgid "max packet interval (currently " +msgstr "" + +#: plugins-root/check_icmp.c:1241 +msgid "max target interval (currently " +msgstr "" + +#: plugins-root/check_icmp.c:1244 +msgid "number of alive hosts required for success" +msgstr "" + +#: plugins-root/check_icmp.c:1247 +msgid "TTL on outgoing packets (currently " +msgstr "" + +#: plugins-root/check_icmp.c:1250 +msgid "timeout value (seconds, currently " +msgstr "" + +#: plugins-root/check_icmp.c:1253 +msgid "icmp packet size (currenly ignored)" +msgstr "" + +#: plugins-root/check_icmp.c:1255 +msgid "verbose" +msgstr "" + +#: plugins-root/check_icmp.c:1258 +msgid "The -H switch is optional. Naming a host (or several) to check is not." +msgstr "" + +#: plugins-root/check_icmp.c:1259 +msgid "" +"Threshold format for -w and -c is 200.25,60% for 200.25 msec RTA and 60%" +msgstr "" + +#: plugins-root/check_icmp.c:1260 +msgid "packet loss. The default values should work well for most users." +msgstr "" + +#: plugins-root/check_icmp.c:1261 +msgid "" +"You can specify different RTA factors using the standardized abbreviations" +msgstr "" + +#: plugins-root/check_icmp.c:1262 +msgid "" +"us (microseconds), ms (milliseconds, default) or just plain s for seconds." +msgstr "" + +#: plugins-root/check_icmp.c:1267 +msgid "The -v switch can be specified several times for increased verbosity." +msgstr "" + +#, fuzzy +#~ msgid "Unknown argument - %s" +#~ msgstr "" +#~ "%s: Unbekanntes Argument: %s\n" +#~ "\n" + +#~ msgid "No data received %s\n" +#~ msgstr "Keine Daten empfangen %s\n" + +#~ msgid "" +#~ " -1, --proto1\n" +#~ " tell ssh to use Protocol 1\n" +#~ " -2, --proto2\n" +#~ " tell ssh to use Protocol 2\n" +#~ " -S, --skiplines=n\n" +#~ " Ignore first n lines on STDERR (to suppress a logon banner)\n" +#~ " -f\n" +#~ " tells ssh to fork rather than create a tty\n" +#~ msgstr "" +#~ " -1, --proto1\n" +#~ " ssh anweisen Protokoll 1 zu verwenden\n" +#~ " -2, --proto2\n" +#~ " ssh anweisen Protokoll 2 zu verwenden\n" +#~ " -S, --skiplines=n\n" +#~ " Ignoriere die ersten n Zeilen auf STDERR (um Logon Banner zu " +#~ "unterdrücken)\n" +#~ " -f\n" +#~ " ssh anweisen fork zu nutzen statt ein tty zu erzeugen\n" + +#~ msgid "" +#~ " -C, --command='COMMAND STRING'\n" +#~ " command to execute on the remote machine\n" +#~ " -l, --logname=USERNAME\n" +#~ " SSH user name on remote host [optional]\n" +#~ " -i, --identity=KEYFILE\n" +#~ " identity of an authorized key [optional]\n" +#~ " -O, --output=FILE\n" +#~ " external command file for nagios [optional]\n" +#~ " -s, --services=LIST\n" +#~ " list of nagios service names, separated by ':' [optional]\n" +#~ " -n, --name=NAME\n" +#~ " short name of host in nagios configuration [optional]\n" +#~ msgstr "" +#~ " -C, --command='COMMAND STRING'\n" +#~ " Befehl der auf der entfernten Maschine ausgeführt werden soll\n" +#~ " -l, --logname=USERNAME\n" +#~ " SSH user name auf dem entfernten Host [optional]\n" +#~ " -i, --identity=KEYFILE\n" +#~ " zu verwendende Schlüsseldatei [optional]\n" +#~ " -O, --output=FILE\n" +#~ " externe Befehlsdatei für nagios [optional]\n" +#~ " -s, --services=LIST\n" +#~ " Liste von nagios Servicenamen, getrennt durch ':' [optional]\n" +#~ " -n, --name=NAME\n" +#~ " Shortname des Hosts in der nagios Konfiguration [optional]\n" + +#, fuzzy +#~ msgid "Warning inode threshold must be percentage!\n" +#~ msgstr "Warning threshold muss ein Integer oder ein Prozentwert sein!\n" + +#, fuzzy +#~ msgid "Critical inode threshold must be percentage!\n" +#~ msgstr "Critical threshold muss ein Integer oder ein Prozentwert sein!\n" + +#~ msgid "INPUT ERROR: No thresholds specified" +#~ msgstr "FEHLER: Kein Schwellwert angegeben" + +#~ msgid "" +#~ "INPUT ERROR: C_DFP (%f) should be less than W_DFP (%.1f) and both should " +#~ "be between zero and 100 percent, inclusive" +#~ msgstr "" +#~ "INPUT ERROR: C_DFP (%f) sollte kleiner sein als W_DFP (%.1f) und beide " +#~ "sollten zwischen 0 und 100 Prozent liegen" + +#, fuzzy +#~ msgid "" +#~ "INPUT ERROR: C_IDFP (%f) should be less than W_IDFP (%.1f) and both " +#~ "should be between zero and 100 percent, inclusive" +#~ msgstr "" +#~ "INPUT ERROR: C_DFP (%f) sollte kleiner sein als W_DFP (%.1f) und beide " +#~ "sollten zwischen 0 und 100 Prozent liegen" + +#~ msgid "" +#~ "INPUT ERROR: C_DF (%lu) should be less than W_DF (%lu) and both should be " +#~ "greater than zero" +#~ msgstr "" +#~ "INPUT ERROR: C_DF (%lu) sollte kleiner sein als W_DF (%lu) und beide " +#~ "sollten größer als 0 sein" + +#, fuzzy +#~ msgid "No response from host on port %d\n" +#~ msgstr "Ungültige HTTP Antwort von Host erhalten auf Port %d\n" + +#, fuzzy +#~ msgid "Invalid response received from host on port %d\n" +#~ msgstr "Ungültige HTTP Antwort von Host erhalten auf Port %d\n" + #~ msgid "%.3f seconds response time (%s)" #~ msgstr "%.3f Sekunden Antwortzeit (%s)" @@ -4368,10 +5258,6 @@ msgstr "" #~ msgid "Unexpected response from host: %s\n" #~ msgstr "Keine Antwort vom Host \n" -#, fuzzy -#~ msgid "Certificate expired on %s.\n" -#~ msgstr "Clientzertifikat benötigt\n" - #, fuzzy #~ msgid "Certificate expires today (%s).\n" #~ msgstr "Clientzertifikat benötigt\n" diff --git a/po/fr.gmo b/po/fr.gmo index fefd345..cb8493d 100644 Binary files a/po/fr.gmo and b/po/fr.gmo differ diff --git a/po/fr.po b/po/fr.po index 271c19c..75d59ea 100644 --- a/po/fr.po +++ b/po/fr.po @@ -4,100 +4,94 @@ # This file is distributed under the same license as the nagiosplug package. # # Karl DeBisschop , 2003. -# Benoit Mortier , 2004, 2006. +# Benoit Mortier , 2004, 2006, 2007. msgid "" msgstr "" "Project-Id-Version: fr\n" -"POT-Creation-Date: 2006-04-15 00:41+0200\n" -"PO-Revision-Date: 2006-04-17 23:07+0200\n" -"Last-Translator: Benoit Mortier \n" +"Report-Msgid-Bugs-To: nagiosplug-devel@lists.sourceforge.net\n" +"POT-Creation-Date: 2007-04-10 03:05-0400\n" +"PO-Revision-Date: 2007-04-10 02:46-0400\n" +"Last-Translator: Thomas Guyot-Sionnest \n" "Language-Team: Français \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Report-Msgid-Bugs-To: \n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: KBabel 1.11.1\n" -#: plugins-root/check_dhcp.c:251 plugins/check_by_ssh.c:69 -#: plugins/check_dig.c:76 plugins/check_disk.c:177 plugins/check_dns.c:78 -#: plugins/check_dummy.c:43 plugins/check_fping.c:73 plugins/check_game.c:68 -#: plugins/check_hpjd.c:89 plugins/check_http.c:130 plugins/check_ldap.c:92 -#: plugins/check_load.c:106 plugins/check_mrtgtraf.c:66 -#: plugins/check_mysql.c:65 plugins/check_nagios.c:75 plugins/check_nt.c:120 -#: plugins/check_nwstat.c:125 plugins/check_overcr.c:89 -#: plugins/check_pgsql.c:140 plugins/check_ping.c:83 plugins/check_procs.c:128 -#: plugins/check_radius.c:117 plugins/check_real.c:68 plugins/check_smtp.c:166 -#: plugins/check_snmp.c:168 plugins/check_ssh.c:61 plugins/check_swap.c:90 -#: plugins/check_tcp.c:195 plugins/check_time.c:66 plugins/check_udp.c:55 -#: plugins/check_ups.c:115 plugins/check_users.c:54 plugins/negate.c:87 +#: plugins/check_by_ssh.c:82 plugins/check_dig.c:89 plugins/check_disk.c:192 +#: plugins/check_dns.c:93 plugins/check_dummy.c:59 plugins/check_fping.c:89 +#: plugins/check_game.c:84 plugins/check_hpjd.c:106 plugins/check_http.c:147 +#: plugins/check_ldap.c:105 plugins/check_load.c:122 +#: plugins/check_mrtgtraf.c:83 plugins/check_mysql.c:88 +#: plugins/check_nagios.c:94 plugins/check_nt.c:126 plugins/check_ntp.c:758 +#: plugins/check_nwstat.c:177 plugins/check_overcr.c:106 +#: plugins/check_pgsql.c:156 plugins/check_ping.c:99 plugins/check_procs.c:143 +#: plugins/check_radius.c:133 plugins/check_real.c:85 plugins/check_smtp.c:180 +#: plugins/check_snmp.c:182 plugins/check_ssh.c:78 plugins/check_swap.c:113 +#: plugins/check_tcp.c:208 plugins/check_time.c:82 plugins/check_ups.c:125 +#: plugins/check_users.c:70 plugins/negate.c:102 plugins-root/check_dhcp.c:256 msgid "Could not parse arguments" msgstr "Impossible de parcourir les arguments" -#: plugins/check_by_ssh.c:73 plugins/check_dig.c:73 plugins/check_dns.c:74 -#: plugins/check_nagios.c:79 plugins/check_pgsql.c:144 plugins/check_ping.c:87 -#: plugins/check_procs.c:135 plugins/negate.c:91 +#: plugins/check_by_ssh.c:86 plugins/check_dig.c:86 plugins/check_dns.c:89 +#: plugins/check_nagios.c:98 plugins/check_pgsql.c:160 +#: plugins/check_ping.c:103 plugins/check_procs.c:150 plugins/negate.c:106 msgid "Cannot catch SIGALRM" msgstr "impossible d'obtenir le signal SIGALRM" -#: plugins/check_by_ssh.c:84 +#: plugins/check_by_ssh.c:97 #, c-format msgid "Remote command execution failed: %s\n" msgstr "L'exécution de la commande à distance %s à échoué\n" -#: plugins/check_by_ssh.c:85 +#: plugins/check_by_ssh.c:98 msgid "Unknown error" msgstr "Erreur inconnue" -#: plugins/check_by_ssh.c:103 +#: plugins/check_by_ssh.c:116 #, c-format msgid "SSH WARNING: could not open %s\n" msgstr "SSH AVERTISSEMENT: impossible d'ouvrir %s\n" -#: plugins/check_by_ssh.c:185 plugins/check_disk.c:366 -#: plugins/check_http.c:225 plugins/check_ldap.c:268 plugins/check_pgsql.c:221 -#: plugins/check_procs.c:359 plugins/check_radius.c:198 -#: plugins/check_radius.c:268 plugins/check_real.c:344 -#: plugins/check_smtp.c:595 plugins/check_snmp.c:479 plugins/check_ssh.c:125 -#: plugins/check_tcp.c:483 plugins/check_time.c:290 plugins/check_udp.c:180 -#: plugins/check_ups.c:545 plugins/negate.c:188 +#: plugins/check_by_ssh.c:200 plugins/check_disk.c:507 +#: plugins/check_http.c:241 plugins/check_ldap.c:281 plugins/check_pgsql.c:237 +#: plugins/check_procs.c:371 plugins/check_radius.c:215 +#: plugins/check_radius.c:285 plugins/check_real.c:361 +#: plugins/check_smtp.c:629 plugins/check_snmp.c:494 plugins/check_ssh.c:143 +#: plugins/check_tcp.c:500 plugins/check_time.c:306 plugins/check_ups.c:555 +#: plugins/negate.c:203 msgid "Timeout interval must be a positive integer" msgstr "Le délai d'attente doit être un entier positif" -#: plugins/check_by_ssh.c:195 plugins/check_pgsql.c:245 -#: plugins/check_radius.c:207 plugins/check_radius.c:241 -#: plugins/check_real.c:315 plugins/check_smtp.c:527 plugins/check_tcp.c:489 -#: plugins/check_time.c:284 plugins/check_udp.c:186 plugins/check_ups.c:507 +#: plugins/check_by_ssh.c:210 plugins/check_pgsql.c:261 +#: plugins/check_radius.c:224 plugins/check_radius.c:258 +#: plugins/check_real.c:332 plugins/check_smtp.c:561 plugins/check_tcp.c:506 +#: plugins/check_time.c:300 plugins/check_ups.c:517 msgid "Port must be a positive integer" msgstr "Le numéro du port doit être un entier positif" -#: plugins/check_by_ssh.c:239 +#: plugins/check_by_ssh.c:254 msgid "skip lines must be an integer" msgstr "Le nombres de lignes à sauter doit être un entier" -#: plugins/check_by_ssh.c:244 plugins/check_dig.c:255 plugins/check_dns.c:358 -#: plugins/check_game.c:236 plugins/check_nagios.c:242 -#, c-format -msgid "Unknown argument - %s" -msgstr "Argument inconnu - %s" - -#: plugins/check_by_ssh.c:251 +#: plugins/check_by_ssh.c:272 #, c-format msgid "%s: You must provide a host name\n" msgstr "%s: Vous devez fournir un nom d'hôte\n" -#: plugins/check_by_ssh.c:269 +#: plugins/check_by_ssh.c:290 msgid "No remotecmd" msgstr "Pas de commande distante" -#: plugins/check_by_ssh.c:285 +#: plugins/check_by_ssh.c:306 #, c-format msgid "" "%s: In passive mode, you must provide a service name for each command.\n" msgstr "" "%s: En mode passif, vous devez fournir un service pour chaque commande.\n" -#: plugins/check_by_ssh.c:288 +#: plugins/check_by_ssh.c:309 #, c-format msgid "" "%s: In passive mode, you must provide the host short name from the nagios " @@ -106,160 +100,182 @@ msgstr "" "%s: En mode passif, vous devez fournir le nom court du hôte mentionné dans " "la configuration de nagios.\n" -#: plugins/check_by_ssh.c:302 +#: plugins/check_by_ssh.c:323 #, c-format -msgid "" -"This plugin uses SSH to execute commands on a remote host\n" -"\n" -msgstr "" -"Ce plugin utilise SSH pour exécuter des commandes sur un hôte distant\n" -"\n" +msgid "This plugin uses SSH to execute commands on a remote host" +msgstr "Ce plugin utilise SSH pour exécuter des commandes sur un hôte distant" -#: plugins/check_by_ssh.c:312 -#, c-format -msgid "" -" -1, --proto1\n" -" tell ssh to use Protocol 1\n" -" -2, --proto2\n" -" tell ssh to use Protocol 2\n" -" -S, --skiplines=n\n" -" Ignore first n lines on STDERR (to suppress a logon banner)\n" -" -f\n" -" tells ssh to fork rather than create a tty\n" -msgstr "" -" -1, --proto1\n" -" demander à ssh d'utiliser le Protocole 1\n" -" -2, --proto2\n" -" demander à ssh d'utiliser le Protocole 2\n" -" -S, --skiplines=n\n" -" Ignore les premières lignes sur la sortie d'erreur standard\n" -" (pour supprimer une bannière de login )\n" -" -f\n" -" demander à ssh de passer en arrière plan plutôt que de créer un tty\n" +#: plugins/check_by_ssh.c:336 +msgid "tell ssh to use Protocol 1" +msgstr "dire à ssh d'utiliser le protocole version 1" -#: plugins/check_by_ssh.c:322 -#, c-format -msgid "" -" -C, --command='COMMAND STRING'\n" -" command to execute on the remote machine\n" -" -l, --logname=USERNAME\n" -" SSH user name on remote host [optional]\n" -" -i, --identity=KEYFILE\n" -" identity of an authorized key [optional]\n" -" -O, --output=FILE\n" -" external command file for nagios [optional]\n" -" -s, --services=LIST\n" -" list of nagios service names, separated by ':' [optional]\n" -" -n, --name=NAME\n" -" short name of host in nagios configuration [optional]\n" -msgstr "" -" -C, --command='COMMAND STRING'\n" -" commande à exécuter sur la machine distante\n" -" -l, --logname=USERNAME\n" -" nom de l'utilisateur ssh sur l'hôte distant [optionnel]\n" -" -i, --identity=KEYFILE\n" -" identité d'une clef autorisée [optionnel]\n" -" -O, --output=FILE\n" -" fichier de commandes externes pour Nagios [optionnel]\n" -" -s, --services=LIST\n" -" liste des services nagios séparés par ':' [optionnel]\n" -" -n, --name=NAME\n" -" nom d'hôte court dans la configuration de nagios [optionnel]\n" +#: plugins/check_by_ssh.c:338 +msgid "tell ssh to use Protocol 2" +msgstr "dire à ssh d'utiliser le protocole 2" #: plugins/check_by_ssh.c:340 -#, c-format -msgid "" -"\n" -"The most common mode of use is to refer to a local identity file with\n" -"the '-i' option. In this mode, the identity pair should have a null\n" -"passphrase and the public key should be listed in the authorized_keys\n" -"file of the remote host. Usually the key will be restricted to running\n" -"only one command on the remote server. If the remote SSH server tracks\n" -"invocation arguments, the one remote program may be an agent that can\n" -"execute additional commands as proxy\n" +msgid "Ignore first n lines on STDERR (to suppress a logon banner)" msgstr "" -"\n" -"L'utilisation la plus courantes est de se référer à une identité locale " -"avec\n" -"l'option -i. Dans ce mode, l'identité doit avoir une phrase nulle\n" -"et la clef publique doit être listée dans les authorized_keys\n" -"sur l'hôte distant. Habituellement la clef sera restreinte a l'exécution\n" -"d'une seule commande sur l'hôte distant. Si le serveur SSH lit les " -"arguments,\n" -"le programme distant peut être un agent qui peut exécuter des commandes\n" -"supplémentaires comme un proxy\n" +"ignorer les x premières lignes sur STDERR (pour supprimer une bannière de " +"connexion)" -#: plugins/check_by_ssh.c:349 -#, c-format -msgid "" -"\n" -"To use passive mode, provide multiple '-C' options, and provide\n" -"all of -O, -s, and -n options (servicelist order must match '-C'\n" -"options)\n" +#: plugins/check_by_ssh.c:342 +msgid "tells ssh to fork rather than create a tty" msgstr "" -"\n" -"Pour utiliser le mode passif, utilisez plusieurs fois l'option '-C',et les \n" -"options -O, -s, n (l'ordre des services doit correspondre aux multiples\n" -" options '-C'\n" -#: plugins/check_dig.c:88 plugins/check_dig.c:90 +#: plugins/check_by_ssh.c:344 +msgid "command to execute on the remote machine" +msgstr "commande à exécuter sur la machine distante" + +#: plugins/check_by_ssh.c:346 +msgid "SSH user name on remote host [optional]" +msgstr "Nom d'utilisateur ssh sur la machine distante [optionnel]" + +#: plugins/check_by_ssh.c:348 +msgid "identity of an authorized key [optional]" +msgstr "Identité de la clé autorisée [optionnel]" + +#: plugins/check_by_ssh.c:350 +msgid "external command file for nagios [optional]" +msgstr "commande externe pour nagios [optionnel]" + +#: plugins/check_by_ssh.c:352 +msgid "list of nagios service names, separated by ':' [optional]" +msgstr "liste des services nagios, séparés par ':' [optionnel] " + +#: plugins/check_by_ssh.c:354 +msgid "short name of host in nagios configuration [optional]" +msgstr "nom court de l'hôte dans la configuration nagios [optionnel]" + +#: plugins/check_by_ssh.c:356 +msgid "Call ssh with '-o OPTION' (may be used multiple times) [optional]" +msgstr "" +"appelle ssh avec '-o OPTION' (peut être utilisé plusieurs fois) [optionnel]" + +#: plugins/check_by_ssh.c:358 +msgid "Tell ssh to suppress warning and diagnostic messages [optional]" +msgstr "" +"dire à ssh de supprimer les messages d'erreurs et de diagnostic [optionnel]" + +#: plugins/check_by_ssh.c:361 +msgid "The most common mode of use is to refer to a local identity file with" +msgstr "" + +#: plugins/check_by_ssh.c:362 +msgid "the '-i' option. In this mode, the identity pair should have a null" +msgstr "" + +#: plugins/check_by_ssh.c:363 +msgid "passphrase and the public key should be listed in the authorized_keys" +msgstr "" + +#: plugins/check_by_ssh.c:364 +msgid "file of the remote host. Usually the key will be restricted to running" +msgstr "" + +#: plugins/check_by_ssh.c:365 +msgid "only one command on the remote server. If the remote SSH server tracks" +msgstr "" + +#: plugins/check_by_ssh.c:366 +msgid "invocation arguments, the one remote program may be an agent that can" +msgstr "" + +#: plugins/check_by_ssh.c:367 +msgid "execute additional commands as proxy" +msgstr "" + +#: plugins/check_by_ssh.c:368 +msgid "To use passive mode, provide multiple '-C' options, and provide" +msgstr "Pour utiliser le mode passif, utilisez plusieurs fois l'option '-C',et" + +#: plugins/check_by_ssh.c:369 +msgid "" +"all of -O, -s, and -n options (servicelist order must match '-C'options)" +msgstr "" +"et les options -O, -s, n (l'ordre des services doit correspondre aux " +"multiples options '-C)" + +#: plugins/check_by_ssh.c:371 plugins/check_disk.c:901 +#: plugins/check_http.c:1324 plugins/check_nagios.c:303 +#: plugins/check_procs.c:735 plugins/negate.c:269 plugins/urlize.c:187 +#, c-format +msgid "Examples:" +msgstr "Exemples:" + +#: plugins/check_by_ssh.c:385 plugins/check_dig.c:336 plugins/check_disk.c:912 +#: plugins/check_dns.c:447 plugins/check_dummy.c:127 plugins/check_fping.c:407 +#: plugins/check_game.c:334 plugins/check_hpjd.c:415 plugins/check_http.c:1347 +#: plugins/check_ldap.c:411 plugins/check_load.c:311 plugins/check_mrtg.c:383 +#: plugins/check_mysql.c:407 plugins/check_nagios.c:313 plugins/check_nt.c:707 +#: plugins/check_ntp.c:859 plugins/check_nwstat.c:1688 +#: plugins/check_overcr.c:469 plugins/check_pgsql.c:458 +#: plugins/check_ping.c:597 plugins/check_procs.c:753 +#: plugins/check_radius.c:349 plugins/check_real.c:454 +#: plugins/check_smtp.c:780 plugins/check_snmp.c:1007 plugins/check_ssh.c:306 +#: plugins/check_swap.c:560 plugins/check_tcp.c:656 plugins/check_time.c:373 +#: plugins/check_ups.c:653 plugins/check_users.c:230 +#: plugins/check_ide_smart.c:544 plugins/negate.c:290 plugins/urlize.c:204 +#: plugins-root/check_dhcp.c:1283 plugins-root/check_icmp.c:1282 +#, c-format +msgid "Usage:" +msgstr "Utilisation:" + +#: plugins/check_dig.c:101 plugins/check_dig.c:103 #, c-format msgid "Looking for: '%s'\n" msgstr "Recherche de: '%s'\n" -#: plugins/check_dig.c:97 +#: plugins/check_dig.c:110 msgid "dig returned an error status" msgstr "dig à renvoyé un message d'erreur" -#: plugins/check_dig.c:122 +#: plugins/check_dig.c:135 msgid "Server not found in ANSWER SECTION" msgstr "Le serveur n'a pas été trouvé dans l'ANSWER SECTION" -#: plugins/check_dig.c:132 +#: plugins/check_dig.c:145 msgid "No ANSWER SECTION found" msgstr "Pas d' ANSWER SECTION trouvé" -#: plugins/check_dig.c:157 +#: plugins/check_dig.c:170 msgid "Probably a non-existent host/domain" msgstr "Probablement un hôte/domaine inexistant" -#: plugins/check_dig.c:215 +#: plugins/check_dig.c:229 #, c-format msgid "Port must be a positive integer - %s" msgstr "Le numéro du port doit être un entier positif - %s" -#: plugins/check_dig.c:226 +#: plugins/check_dig.c:240 #, c-format msgid "Warning interval must be a positive integer - %s" msgstr "Le seuil d'avertissement doit être un entier positif - %s" -#: plugins/check_dig.c:234 +#: plugins/check_dig.c:248 #, c-format msgid "Critical interval must be a positive integer - %s" msgstr "Le seuil critique doit être un entier positif - %s" -#: plugins/check_dig.c:242 +#: plugins/check_dig.c:256 #, c-format msgid "Timeout interval must be a positive integer - %s" msgstr "Le délai d'attente doit être un entier positif - %s" -#: plugins/check_dig.c:295 +#: plugins/check_dig.c:309 #, c-format msgid "This plugin test the DNS service on the specified host using dig" msgstr "Ce plugin teste le service DNS sur l'hôte spécifié en utilisant dig" -#: plugins/check_dig.c:309 -#, c-format +#: plugins/check_dig.c:320 msgid "machine name to lookup" msgstr "nom de machine à vérifier" -#: plugins/check_dig.c:317 -#, c-format +#: plugins/check_dig.c:322 msgid "record type to lookup (default: A)" msgstr "type d'enregistrement à vérifier (par défaut: A)" -#: plugins/check_dig.c:325 -#, c-format +#: plugins/check_dig.c:324 msgid "" "an address expected to be in the answer section.if not set, uses whatever " "was in -l" @@ -267,362 +283,322 @@ msgstr "" "une adresse qui devrait se trouver dans l'ANSWER SECTION. Si elle ne si " "trouve pas, utilise ce qui a été précisé avec -l" -#: plugins/check_dig.c:343 plugins/check_disk.c:752 plugins/check_dns.c:431 -#: plugins/check_dummy.c:113 plugins/check_fping.c:430 -#: plugins/check_game.c:325 plugins/check_http.c:1340 +#: plugins/check_disk.c:213 #, c-format -msgid "Usage:" -msgstr "Utilisation:" +msgid "DISK %s: %s not found\n" +msgstr "DISK %s: %s non trouvé\n" -#: plugins/check_disk.c:268 -#, c-format -msgid "" -"%s\n" -"%.0f of %.0f %s (%.0f%% inode=%.0f%%) free on %s (type %s mounted on %s) " -"warn:%lu crit:%lu warn%%:%.0f%% crit%%:%.0f%%" -msgstr "" -"%s\n" -"%.0f de %.0f %s (%.0f%% inode=%.0f%%) libre sur %s (type %s monté sur %s) " -"warn:%lu crit:%lu warn%%:%.0f%% crit%%:%.0f%%" - -#: plugins/check_disk.c:285 -#, c-format -msgid "%s [%s not found]" -msgstr "%s [%s non trouvé]" - -#: plugins/check_disk.c:383 plugins/check_swap.c:404 -msgid "Warning threshold must be integer or percentage!" -msgstr "Le seuil d'avertissement doit être un entier ou un pourcentage!" - -#: plugins/check_disk.c:400 plugins/check_swap.c:422 -msgid "Critical threshold must be integer or percentage!" -msgstr "Le seuil critique doit être un entier ou un pourcentage!" - -#: plugins/check_disk.c:409 -msgid "Warning inode threshold must be percentage!\n" -msgstr "Le seuil d'avertissement pour les inodes doit être un pourcentage!\n" - -#: plugins/check_disk.c:416 -msgid "Critical inode threshold must be percentage!\n" -msgstr "Le seuil critique pour les inodes doit être un pourcentage!\n" - -#: plugins/check_disk.c:437 -#, c-format -msgid "unit type %s not known\n" -msgstr "unité de type %s inconnue\n" - -#: plugins/check_disk.c:440 -#, c-format -msgid "failed allocating storage for '%s'\n" -msgstr "Impossible d'allouer de l'espace pour '%s'\n" - -#: plugins-root/check_dhcp.c:1072 plugins/check_disk.c:530 -#: plugins/check_fping.c:245 plugins/check_hpjd.c:337 plugins/check_http.c:213 -#: plugins/check_ide_smart.c:214 plugins/check_ldap.c:315 -#: plugins/check_load.c:223 plugins/check_mrtg.c:229 -#: plugins/check_mrtgtraf.c:263 plugins/check_mysql.c:288 -#: plugins/check_nt.c:489 plugins/check_nwstat.c:870 -#: plugins/check_overcr.c:327 plugins/check_pgsql.c:212 -#: plugins/check_ping.c:198 plugins/check_procs.c:350 -#: plugins/check_radius.c:221 plugins/check_real.c:354 -#: plugins/check_smtp.c:631 plugins/check_snmp.c:432 plugins/check_ssh.c:113 -#: plugins/check_swap.c:437 plugins/check_tcp.c:433 plugins/check_time.c:219 -#: plugins/check_udp.c:149 plugins/check_ups.c:487 plugins/check_users.c:143 -#: plugins/negate.c:177 plugins/urlize.c:79 -msgid "Unknown argument" -msgstr "Argument inconnu" - -#: plugins/check_disk.c:561 plugins/check_dns.c:193 plugins/check_dummy.c:65 -#: plugins/check_http.c:948 plugins/check_mysql.c:191 -#: plugins/check_nagios.c:88 plugins/check_nagios.c:152 -#: plugins/check_nagios.c:156 plugins/check_procs.c:290 +#: plugins/check_disk.c:213 plugins/check_disk.c:751 plugins/check_dns.c:208 +#: plugins/check_dummy.c:81 plugins/check_http.c:959 plugins/check_http.c:1022 +#: plugins/check_mysql.c:214 plugins/check_nagios.c:107 +#: plugins/check_nagios.c:171 plugins/check_nagios.c:175 +#: plugins/check_procs.c:302 #, c-format msgid "CRITICAL" msgstr "CRITIQUE" -#: plugins/check_disk.c:562 +#: plugins/check_disk.c:581 +#, c-format +msgid "unit type %s not known\n" +msgstr "unité de type %s inconnue\n" + +#: plugins/check_disk.c:584 +#, c-format +msgid "failed allocating storage for '%s'\n" +msgstr "Impossible d'allouer de l'espace pour '%s'\n" + +#: plugins/check_disk.c:606 plugins/check_disk.c:643 plugins/check_disk.c:653 +#: plugins/check_disk.c:659 plugins/check_disk.c:678 plugins/check_dummy.c:84 +#: plugins/check_http.c:953 +#, c-format +msgid "UNKNOWN" +msgstr "INCONNU" + +#: plugins/check_disk.c:606 +msgid "Must set a threshold value before using -p\n" +msgstr "" + +#: plugins/check_disk.c:643 +msgid "Must set group value before using -p\n" +msgstr "" + +#: plugins/check_disk.c:653 +msgid "Must set a threshold value before using -r/-R\n" +msgstr "" + +#: plugins/check_disk.c:659 +#, fuzzy +msgid "Could not compile regular expression" +msgstr "Impossible de compiler l'expression régulière" + +#: plugins/check_disk.c:679 +msgid "Regular expression did not match any path or disk" +msgstr "" + +#: plugins/check_disk.c:723 +msgid "Unknown argument" +msgstr "Argument inconnu" + +#: plugins/check_disk.c:752 #, c-format msgid "%s does not exist\n" msgstr "%s n'existe pas\n" -#: plugins/check_disk.c:589 +#: plugins/check_disk.c:781 #, c-format msgid " for %s\n" msgstr " pour %s\n" -#: plugins/check_disk.c:600 -#, c-format -msgid "INPUT ERROR: No thresholds specified" -msgstr "Erreur: Pas de seuil spécifié" - -#: plugins/check_disk.c:606 -#, c-format -msgid "" -"INPUT ERROR: C_DFP (%f) should be less than W_DFP (%.1f) and both should be " -"between zero and 100 percent, inclusive" -msgstr "" -"ERREUR: C_DFP (%f) doit être plus petit que W_DFP (%.1f) et les deux doivent " -"être entre 0 et 100 pour-cent, inclus" - -#: plugins/check_disk.c:614 -#, c-format -msgid "" -"INPUT ERROR: C_IDFP (%f) should be less than W_IDFP (%.1f) and both should " -"be between zero and 100 percent, inclusive" -msgstr "" -"ERREUR: C_DFP (%f) doit être plus petit que W_DFP (%.1f) et les deux doivent " -"être entre 0 et 100 pour-cent inclus" - -#: plugins/check_disk.c:621 -#, c-format -msgid "" -"INPUT ERROR: C_DF (%lu) should be less than W_DF (%lu) and both should be " -"greater than zero" -msgstr "" -"ERREUR: C_DF (%lu) doit être plus petit que W_DF (%lu) et les deux doivent " -"être plus grands que zéro" - -#: plugins/check_disk.c:697 -#, c-format +#: plugins/check_disk.c:849 msgid "" "This plugin checks the amount of used disk space on a mounted file system" msgstr "Ce plugin vérifie la place utilisé sur un système de fichier monté" -#: plugins/check_disk.c:698 -#, c-format +#: plugins/check_disk.c:850 msgid "" "and generates an alert if free space is less than one of the threshold values" msgstr "" "et génère une alerte si la place disponible est plus petite qu'une des " "valeurs fournies" -#: plugins/check_disk.c:707 +#: plugins/check_disk.c:859 msgid "Exit with WARNING status if less than INTEGER units of disk are free" msgstr "" "Sortir avec un résultat AVERTISSEMENT si moins de x unités de disques sont " "libres" -#: plugins/check_disk.c:709 +#: plugins/check_disk.c:861 msgid "Exit with WARNING status if less than PERCENT of disk space is free" msgstr "" "Sortir avec un résultat AVERTISSEMENT si moins de x pour-cent du disque est " "libre" -#: plugins/check_disk.c:711 +#: plugins/check_disk.c:863 msgid "Exit with WARNING status if less than PERCENT of inode space is free" msgstr "" "Sortir avec un résultat AVERTISSEMENT si moins de x pour-cent des inodes " "sont libres" -#: plugins/check_disk.c:713 +#: plugins/check_disk.c:865 msgid "Exit with CRITICAL status if less than PERCENT of inode space is free" msgstr "" "Sortir avec un résultat CRITIQUE si moins de x pour-cent des inodes sont " "libres" -#: plugins/check_disk.c:715 +#: plugins/check_disk.c:867 msgid "Exit with CRITICAL status if less than INTEGER units of disk are free" msgstr "" "Sortir avec un résultat CRITIQUE si moins de x unités du disque sont libres" -#: plugins/check_disk.c:717 +#: plugins/check_disk.c:869 msgid "Exit with CRITCAL status if less than PERCENT of disk space is free" msgstr "" "Sortir avec un résultat CRITIQUE si moins de x pour-cent du disque est libre" -#: plugins/check_disk.c:719 +#: plugins/check_disk.c:871 msgid "Clear thresholds" msgstr "Effacer les seuils" -#: plugins/check_disk.c:721 +#: plugins/check_disk.c:873 msgid "Choose bytes, kB, MB, GB, TB (default: MB)" msgstr "Choisissez octets, kb, MB, GB, TB (par défaut: MB)" -#: plugins/check_disk.c:723 +#: plugins/check_disk.c:875 msgid "Same as '--units kB'" msgstr "Pareil à '--units kB'" -#: plugins/check_disk.c:725 +#: plugins/check_disk.c:877 msgid "Same as '--units MB'" msgstr "Pareil à '--units MB'" -#: plugins/check_disk.c:727 +#: plugins/check_disk.c:879 msgid "Only check local filesystems" msgstr "Vérifier seulement les systèmes de fichiers locaux" -#: plugins/check_disk.c:729 +#: plugins/check_disk.c:881 msgid "Path or partition (may be repeated)" msgstr "Répertoire ou partition (peut être utilisé plusieurs fois)" -#: plugins/check_disk.c:731 +#: plugins/check_disk.c:883 +#, fuzzy +msgid "Regular expression for path or partition (may be repeated)" +msgstr "Répertoire ou partition (peut être utilisé plusieurs fois)" + +#: plugins/check_disk.c:885 +#, fuzzy +msgid "" +"Case insensitive regular expression for path/partition (may be repeated)" +msgstr "Répertoire ou partition (peut être utilisé plusieurs fois)" + +#: plugins/check_disk.c:887 +msgid "" +"Group pathes. Thresholds apply to (free-)space of all partitions together" +msgstr "" + +#: plugins/check_disk.c:889 msgid "Ignore device (only works if -p unspecified)" msgstr "Ignorer le périphérique (marche seulement lorsque -p est utilisé)" -#: plugins/check_disk.c:732 -msgid "-X, --exclude-type=TYPE " -msgstr "" - -#: plugins/check_disk.c:733 +#: plugins/check_disk.c:891 msgid "Ignore all filesystems of indicated type (may be repeated)" msgstr "" "Ignorer tout les systèmes de fichiers qui correspondent au type indiqué " "(peut être utilisé plusieurs fois)" -#: plugins/check_disk.c:735 +#: plugins/check_disk.c:893 msgid "Display the mountpoint instead of the partition" msgstr "Afficher le point de montage au lieu de la partition" -#: plugins/check_disk.c:737 +#: plugins/check_disk.c:895 +msgid "For paths or partitions specified with -p, only check for exact paths" +msgstr "" + +#: plugins/check_disk.c:897 msgid "Display only devices/mountpoints with errors" msgstr "Afficher seulement les périphériques/point de montage avec des erreurs" -#: plugins/check_disk.c:741 -msgid "Examples:" -msgstr "Exemples:" - -#: plugins/check_disk.c:743 +#: plugins/check_disk.c:903 msgid "Checks /tmp and /var at 10% and 5%, and / at 100MB and 50MB" msgstr "Vérifie /tmp à 10% et /var à 5% et / à 100MB et 50MB" -#: plugins/check_dns.c:92 +#: plugins/check_dns.c:107 msgid "nslookup returned an error status" msgstr "nslookup à retourné un code d'erreur" -#: plugins/check_dns.c:105 +#: plugins/check_dns.c:120 msgid "Warning plugin error" msgstr "Alerte erreur de plugin" -#: plugins/check_dns.c:125 +#: plugins/check_dns.c:140 #, c-format msgid "DNS CRITICAL - '%s' returned empty host name string\n" msgstr "DNS CRITIQUE - '%s' à retourné un nom d'hôte vide\n" -#: plugins/check_dns.c:135 +#: plugins/check_dns.c:150 msgid "Non-authoritative answer:" msgstr "Réponse non autoritative:" -#: plugins/check_dns.c:163 +#: plugins/check_dns.c:178 #, c-format msgid "DNS CRITICAL - '%s' msg parsing exited with no address\n" msgstr "DNS CRITIQUE - '%s' n'a pas retourné d'adresse\n" -#: plugins/check_dns.c:169 +#: plugins/check_dns.c:184 #, c-format msgid "expected '%s' but got '%s'" msgstr "j'attendais '%s' mais j'ai reçu '%s'" -#: plugins/check_dns.c:175 +#: plugins/check_dns.c:190 #, c-format msgid "server %s is not authoritative for %s" msgstr "serveur %s n'est pas autoritaire pour %s" -#: plugins/check_dns.c:189 plugins/check_dummy.c:59 plugins/check_http.c:944 -#: plugins/check_nagios.c:166 plugins/check_procs.c:283 +#: plugins/check_dns.c:204 plugins/check_dummy.c:75 plugins/check_http.c:955 +#: plugins/check_nagios.c:185 plugins/check_procs.c:295 #, c-format msgid "OK" msgstr "OK" -#: plugins/check_dns.c:191 plugins/check_dummy.c:62 plugins/check_http.c:946 -#: plugins/check_mysql.c:188 plugins/check_nagios.c:166 -#: plugins/check_procs.c:285 +#: plugins/check_dns.c:206 plugins/check_dummy.c:78 plugins/check_http.c:957 +#: plugins/check_mysql.c:211 plugins/check_nagios.c:185 +#: plugins/check_procs.c:297 #, c-format msgid "WARNING" msgstr "AVERTISSEMENT" -#: plugins/check_dns.c:195 +#: plugins/check_dns.c:210 #, c-format msgid "%.3f second response time" msgid_plural "%.3f seconds response time" msgstr[0] "%.3f secondes de temps de réponse " msgstr[1] "%.3f secondes de temps de réponse " -#: plugins/check_dns.c:196 +#: plugins/check_dns.c:211 #, c-format msgid ". %s returns %s" msgstr ". %s renvoie %s" -#: plugins/check_dns.c:200 +#: plugins/check_dns.c:215 #, c-format msgid "DNS WARNING - %s\n" msgstr "DNS AVERTISSEMENT - %s\n" -#: plugins/check_dns.c:201 plugins/check_dns.c:204 plugins/check_dns.c:207 +#: plugins/check_dns.c:216 plugins/check_dns.c:219 plugins/check_dns.c:222 msgid " Probably a non-existent host/domain" msgstr " Probablement un hôte/domaine inexistant" -#: plugins/check_dns.c:203 +#: plugins/check_dns.c:218 #, c-format msgid "DNS CRITICAL - %s\n" msgstr "DNS CRITIQUE - %s\n" -#: plugins/check_dns.c:206 +#: plugins/check_dns.c:221 #, c-format msgid "DNS UNKNOW - %s\n" msgstr "DNS INCONNU - %s\n" -#: plugins/check_dns.c:219 +#: plugins/check_dns.c:234 msgid "Note: nslookup is deprecated and may be removed from future releases." msgstr "" "Note: nslookup est obsolète et pourra être retiré dans les prochaines " "versions." -#: plugins/check_dns.c:220 +#: plugins/check_dns.c:235 msgid "Consider using the `dig' or `host' programs instead. Run nslookup with" msgstr "" "Veuillez utiliser le programme 'dig' ou 'host' à la place. Faire fonctionner " "nslookup avec" -#: plugins/check_dns.c:221 +#: plugins/check_dns.c:236 msgid "the `-sil[ent]' option to prevent this message from appearing." msgstr "L'option '-sil[ent]' empêche l'apparition de ce message." -#: plugins/check_dns.c:226 +#: plugins/check_dns.c:241 #, c-format msgid "No response from DNS %s\n" msgstr "Pas de réponse du DNS %s\n" -#: plugins/check_dns.c:230 +#: plugins/check_dns.c:245 #, c-format msgid "DNS %s has no records\n" msgstr "Le DNS %s n'a pas d'enregistrements\n" -#: plugins/check_dns.c:238 +#: plugins/check_dns.c:253 #, c-format msgid "Connection to DNS %s was refused\n" msgstr "La connexion au DNS %s à été refusée\n" -#: plugins/check_dns.c:242 +#: plugins/check_dns.c:257 #, c-format msgid "Query was refused by DNS server at %s\n" msgstr "La requête à été refusée par le serveur DNS %s\n" -#: plugins/check_dns.c:246 +#: plugins/check_dns.c:261 #, c-format msgid "No information returned by DNS server at %s\n" msgstr "Pas d'information renvoyée par le serveur DNS %s\n" -#: plugins/check_dns.c:252 +#: plugins/check_dns.c:267 #, c-format msgid "Domain %s was not found by the server\n" msgstr "Le domaine %s n'a pas été trouvé par le serveur\n" -#: plugins/check_dns.c:256 +#: plugins/check_dns.c:271 msgid "Network is unreachable\n" msgstr "Le réseau est injoignable\n" -#: plugins/check_dns.c:260 +#: plugins/check_dns.c:275 #, c-format msgid "DNS failure for %s\n" msgstr "DNS à échoué pour %s\n" -#: plugins/check_dns.c:324 plugins/check_dns.c:332 plugins/check_dns.c:339 -#: plugins/check_dns.c:344 plugins/check_dns.c:365 plugins/check_dns.c:373 -#: plugins/check_game.c:197 plugins/check_game.c:205 +#: plugins/check_dns.c:339 plugins/check_dns.c:347 plugins/check_dns.c:354 +#: plugins/check_dns.c:359 plugins/check_dns.c:380 plugins/check_dns.c:388 +#: plugins/check_game.c:213 plugins/check_game.c:221 msgid "Input buffer overflow\n" msgstr "Le tampon d'entrée a débordé\n" -#: plugins/check_dns.c:401 -#, c-format +#: plugins/check_dns.c:416 msgid "" "This plugin uses the nslookup program to obtain the IP address for the given " "host/domain query." @@ -630,13 +606,11 @@ msgstr "" "Ce plugin utilise le programme nslookup pour obtenir l'adresse IP de l'hôte/" "domaine à interroger." -#: plugins/check_dns.c:403 -#, c-format +#: plugins/check_dns.c:417 msgid "An optional DNS server to use may be specified." msgstr "Un serveur DNS à utiliser peut être indiqué." -#: plugins/check_dns.c:405 -#, c-format +#: plugins/check_dns.c:418 msgid "" "If no DNS server is specified, the default server(s) specified in /etc/" "resolv.conf will be used." @@ -644,154 +618,143 @@ msgstr "" "Si aucun serveur DNS n'est spécifié, les serveurs spécifiés dans /etc/resolv." "conf seront utilisé." -#: plugins/check_dns.c:411 +#: plugins/check_dns.c:427 msgid "The name or address you want to query" msgstr "Le nom ou l'adresse que vous voulez interroger" -#: plugins/check_dns.c:413 +#: plugins/check_dns.c:429 msgid "Optional DNS server you want to use for the lookup" msgstr "Serveur DNS que vous voulez utiliser pour la recherche" -#: plugins/check_dns.c:415 +#: plugins/check_dns.c:431 msgid "" "Optional IP-ADDRESS you expect the DNS server to return. HOST must end with ." msgstr "" "Adresse IP que le serveur DNS doit renvoyer. Les hôtes doivent se terminer " "avec ." -#: plugins/check_dns.c:417 +#: plugins/check_dns.c:433 msgid "Optionally expect the DNS server to be authoritative for the lookup" msgstr "Serveur DNS qui doit normalement être autoritaire pour la recherche" -#: plugins/check_dns.c:419 +#: plugins/check_dns.c:435 msgid "Return warning if elapsed time exceeds value. Default off" msgstr "" "Renvoie une alerte si le temps écoulé dépasse la valeur indiquée. Désactivé " "par défaut" -#: plugins/check_dns.c:421 +#: plugins/check_dns.c:437 msgid "Return critical if elapsed time exceeds value. Default off" msgstr "" "Renvoie critique si le temps utilisé dépasse la valeur indiquée. Désactivé " "par défaut" -#: plugins/check_dummy.c:53 +#: plugins/check_dummy.c:69 msgid "Arguments to check_dummy must be an integer" msgstr "Les arguments pour check_dummy doivent être des entiers" -#: plugins/check_dummy.c:68 plugins/check_http.c:942 -#, c-format -msgid "UNKNOWN" -msgstr "INCONNU" - -#: plugins/check_dummy.c:71 +#: plugins/check_dummy.c:87 #, c-format msgid "Status %d is not a supported error state\n" msgstr "Le résultat %d n'est pas un résultat supporté\n" -#: plugins/check_dummy.c:93 -#, c-format +#: plugins/check_dummy.c:109 msgid "" "This plugin will simply return the state corresponding to the numeric value" msgstr "" "Ce plugin renverra simplement l'état correspondant à la valeur numérique" -#: plugins/check_dummy.c:97 -#, c-format +#: plugins/check_dummy.c:111 msgid "of the argument with optional text" msgstr "du paramètre avec un texte optionnel" -#: plugins/check_fping.c:87 plugins/check_hpjd.c:114 plugins/check_ping.c:411 -#: plugins/check_procs.c:144 plugins/check_snmp.c:189 plugins/check_swap.c:155 -#: plugins/check_users.c:59 plugins/negate.c:97 plugins/urlize.c:93 +#: plugins/check_fping.c:103 plugins/check_hpjd.c:131 plugins/check_ping.c:432 +#: plugins/check_procs.c:159 plugins/check_snmp.c:203 plugins/check_swap.c:178 +#: plugins/check_users.c:75 plugins/negate.c:112 plugins/urlize.c:117 #, c-format msgid "Could not open pipe: %s\n" msgstr "Impossible d'ouvrir le pipe: %s\n" -#: plugins/check_fping.c:93 plugins/check_hpjd.c:120 plugins/check_load.c:137 -#: plugins/check_procs.c:150 plugins/check_snmp.c:195 plugins/check_swap.c:161 -#: plugins/check_users.c:65 plugins/negate.c:102 plugins/urlize.c:99 +#: plugins/check_fping.c:109 plugins/check_hpjd.c:137 plugins/check_load.c:153 +#: plugins/check_procs.c:165 plugins/check_snmp.c:209 plugins/check_swap.c:184 +#: plugins/check_users.c:81 plugins/negate.c:117 plugins/urlize.c:123 #, c-format msgid "Could not open stderr for %s\n" msgstr "Impossible d'ouvrir la sortie d'erreur standard pour %s\n" -#: plugins/check_fping.c:133 +#: plugins/check_fping.c:149 #, c-format msgid "FPING UNKNOW - %s not found\n" msgstr "PING INCONNU - Hôte non trouvé (%s)\n" -#: plugins/check_fping.c:137 +#: plugins/check_fping.c:153 #, c-format msgid "FPING CRITICAL - %s is unreachable\n" msgstr "PING CRITIQUE - Hôte injoignable (%s)\n" -#: plugins/check_fping.c:142 +#: plugins/check_fping.c:158 #, c-format msgid "FPING CRITICAL - %s is down\n" msgstr "FPING CRITIQUE - %s est en panne\n" -#: plugins/check_fping.c:169 +#: plugins/check_fping.c:185 #, c-format msgid "FPING %s - %s (loss=%.0f%%, rta=%f ms)|%s %s\n" msgstr "FPING %s - %s (perte=%.0f%%, rta=%f ms)|%s %s\n" -#: plugins/check_fping.c:190 +#: plugins/check_fping.c:206 #, c-format msgid "FPING %s - %s (loss=%.0f%% )|%s\n" msgstr "FPING %s - %s (perte=%.0f%% )|%s\n" -#: plugins/check_fping.c:257 plugins/check_hpjd.c:324 plugins/check_hpjd.c:347 -#: plugins/check_mysql.c:254 plugins/check_mysql.c:303 -#: plugins/check_pgsql.c:239 plugins/check_ping.c:269 plugins/check_ping.c:392 -#: plugins/check_radius.c:233 plugins/check_real.c:302 -#: plugins/check_real.c:364 plugins/check_smtp.c:520 plugins/check_smtp.c:641 -#: plugins/check_ssh.c:144 plugins/check_time.c:228 plugins/check_time.c:303 -#: plugins/check_udp.c:161 plugins/check_udp.c:202 plugins/check_ups.c:493 -#: plugins/check_ups.c:562 +#: plugins/check_fping.c:273 plugins/check_hpjd.c:341 plugins/check_hpjd.c:364 +#: plugins/check_mysql.c:277 plugins/check_mysql.c:326 plugins/check_ntp.c:696 +#: plugins/check_pgsql.c:255 plugins/check_ping.c:290 plugins/check_ping.c:413 +#: plugins/check_radius.c:250 plugins/check_real.c:319 +#: plugins/check_real.c:381 plugins/check_smtp.c:554 plugins/check_smtp.c:675 +#: plugins/check_ssh.c:162 plugins/check_time.c:244 plugins/check_time.c:319 +#: plugins/check_ups.c:503 plugins/check_ups.c:572 msgid "Invalid hostname/address" msgstr "Adresse/Nom invalide" -#: plugins/check_fping.c:291 +#: plugins/check_fping.c:307 msgid "Packet size must be a positive integer" msgstr "La taille du paquet doit être un entier positif" -#: plugins/check_fping.c:297 +#: plugins/check_fping.c:313 msgid "Packet count must be a positive integer" msgstr "Le nombre de paquets doit être un entier positif" -#: plugins/check_fping.c:303 plugins/check_time.c:307 plugins/check_udp.c:207 +#: plugins/check_fping.c:319 plugins/check_ntp.c:728 plugins/check_time.c:323 msgid "Hostname was not supplied" msgstr "Le nom de l'hôte n'a pas été spécifié" -#: plugins/check_fping.c:323 +#: plugins/check_fping.c:339 #, c-format msgid "%s: Only one threshold may be packet loss (%s)\n" msgstr "" "%s: Seulement un seuil peut être utilisé pour les pertes de paquets (%s)\n" -#: plugins/check_fping.c:327 +#: plugins/check_fping.c:343 #, c-format msgid "%s: Only one threshold must be packet loss (%s)\n" msgstr "" "%s: Seulement un seuil doit être utilisé pour les pertes de paquets (%s)\n" -#: plugins/check_fping.c:359 -#, c-format +#: plugins/check_fping.c:375 msgid "" "This plugin will use the fping command to ping the specified host for a fast " "check" msgstr "" "Ce plugin va utiliser la commande fping pour pinger l'hôte de manière rapide." -#: plugins/check_fping.c:363 -#, c-format +#: plugins/check_fping.c:377 msgid "Note that it is necessary to set the suid flag on fping." msgstr "" "Veuillez noter qu'il est nécessaire de mettre le bit suid sur le programme " "fping." -#: plugins/check_fping.c:373 -#, c-format +#: plugins/check_fping.c:386 msgid "" "name or IP Address of host to ping (IP Address bypasses name lookup, " "reducing system load)" @@ -799,27 +762,25 @@ msgstr "" "nom ou adresse IP des hôtes à pinger (l'indication d'un adresse IP évite une " "recherche sur le nom, ce qui réduit la charge système)" -#: plugins/check_fping.c:381 -#, c-format +#: plugins/check_fping.c:388 plugins/check_ping.c:567 msgid "warning threshold pair" msgstr "Valeurs pour le seuil d'avertissement" -#: plugins/check_fping.c:389 -#, c-format +#: plugins/check_fping.c:390 plugins/check_ping.c:569 msgid "critical threshold pair" msgstr "Valeurs pour le seuil critique" -#: plugins/check_fping.c:395 +#: plugins/check_fping.c:392 #, c-format msgid "size of ICMP packet (default: %d)" msgstr "taille du paquet ICMP (%d par défaut)" -#: plugins/check_fping.c:403 +#: plugins/check_fping.c:394 #, c-format msgid "number of ICMP packets to send (default: %d)" msgstr "nombre de paquets ICMP à envoyer (%d par défaut)" -#: plugins/check_fping.c:411 +#: plugins/check_fping.c:397 #, c-format msgid "" "THRESHOLD is ,%% where is the round trip average travel time " @@ -828,70 +789,67 @@ msgstr "" "Le seuil est ,%% ou est le temps moyen pour l'aller retour " "(ms)" -#: plugins/check_fping.c:415 -#, c-format +#: plugins/check_fping.c:398 msgid "" "which triggers a WARNING or CRITICAL state, and is the percentage of" msgstr "" "qui déclenche résultat AVERTISSEMENT ou CRITIQUE, et est le pourcentage " "de" -#: plugins/check_fping.c:419 -#, c-format +#: plugins/check_fping.c:399 msgid "packet loss to trigger an alarm state." msgstr "paquets perdu pour déclencher une alarme." -#: plugins/check_game.c:97 +#: plugins/check_game.c:113 #, c-format msgid "CRITICAL - Host type parameter incorrect!\n" msgstr "CRITIQUE - Argument de type hôte incorrect!\n" -#: plugins/check_game.c:112 +#: plugins/check_game.c:128 #, c-format msgid "CRITICAL - Host not found\n" msgstr "CRITIQUE - Hôte non trouvé\n" -#: plugins/check_game.c:116 +#: plugins/check_game.c:132 #, c-format msgid "CRITICAL - Game server down or unavailable\n" msgstr "CRITIQUE - Serveur de jeux en panne ou non disponible\n" -#: plugins/check_game.c:120 +#: plugins/check_game.c:136 #, c-format msgid "CRITICAL - Game server timeout\n" msgstr "CRITIQUE - Temps d'attente pour le serveur de jeux dépassé\n" -#: plugins/check_game.c:283 +#: plugins/check_game.c:299 #, c-format msgid "This plugin tests game server connections with the specified host." msgstr "Le plugin teste la connexion au serveur de jeux avec l'hôte spécifié." -#: plugins/check_game.c:291 -#, c-format -msgid "" -" = Game type that is recognised by qstat (without the leading " -"dash)\n" -" = The IP address of the device you wish to query\n" -" [port] = Optional port of which to connect\n" -" [game_field] = Field number in raw qstat output that contains game name\n" -" [map_field] = Field number in raw qstat output that contains map name\n" -" [ping_field] = Field number in raw qstat output that contains ping time\n" +#: plugins/check_game.c:308 +msgid "Optional port of which to connect" msgstr "" -" = Type de jeux qui est reconnu par qstat (sans le tiret de " -"début)\n" -" = L'adresse IP de l'hôte qui héberge le serveur de jeu\n" -" [port] = Port optionnel sur lequel se connecter\n" -" [game_field] = Numéro du champ qui contient le nom du jeu\n" -" [map_field] = Numéro du champ qui contient le nom de la carte\n" -" [ping_field] = Numéro du champ qui contient le temps de réponse du ping\n" -#: plugins/check_game.c:301 +#: plugins/check_game.c:310 +msgid "Field number in raw qstat output that contains game name" +msgstr "" + +#: plugins/check_game.c:312 +msgid "Field number in raw qstat output that contains map name" +msgstr "" + +#: plugins/check_game.c:314 +msgid "Field number in raw qstat output that contains ping time" +msgstr "" + +#: plugins/check_game.c:318 plugins/check_http.c:1312 plugins/check_mrtg.c:364 +#: plugins/check_mrtgtraf.c:361 plugins/check_nt.c:693 +#: plugins/check_nwstat.c:1673 plugins/check_overcr.c:452 +#: plugins/check_swap.c:549 plugins/check_ups.c:629 plugins/negate.c:276 #, c-format msgid "Notes:" msgstr "Notes:" -#: plugins/check_game.c:305 -#, c-format +#: plugins/check_game.c:320 msgid "" "This plugin uses the 'qstat' command, the popular game server status query " "tool ." @@ -899,15 +857,13 @@ msgstr "" "Ce plugin utilise la commande 'qstat', le programme préféré pour tester les " "serveurs de jeux." -#: plugins/check_game.c:309 -#, c-format +#: plugins/check_game.c:322 msgid "" "If you don't have the package installed, you will need to download it from" msgstr "" "Si vous n'avez pas le programme installé, vous devrez le télécharger depuis" -#: plugins/check_game.c:313 -#, c-format +#: plugins/check_game.c:324 msgid "" "http://www.activesw.com/people/steve/qstat.html before you can use this " "plugin." @@ -915,649 +871,619 @@ msgstr "" "http://www.activesw.com/people/steve/qstat.html avant de pouvoir utiliser ce " "plugin." -#: plugins/check_hpjd.c:225 +#: plugins/check_hpjd.c:242 msgid "Paper Jam" msgstr "Bourrage Papier" -#: plugins/check_hpjd.c:229 +#: plugins/check_hpjd.c:246 msgid "Out of Paper" msgstr "Plus de Papier" -#: plugins/check_hpjd.c:234 +#: plugins/check_hpjd.c:251 msgid "Printer Offline" msgstr "Imprimante hors ligne" -#: plugins/check_hpjd.c:239 +#: plugins/check_hpjd.c:256 msgid "Peripheral Error" msgstr "Erreur du périphérique" -#: plugins/check_hpjd.c:243 +#: plugins/check_hpjd.c:260 msgid "Intervention Required" msgstr "Intervention Requise" -#: plugins/check_hpjd.c:247 +#: plugins/check_hpjd.c:264 msgid "Toner Low" msgstr "Toner Faible" -#: plugins/check_hpjd.c:251 +#: plugins/check_hpjd.c:268 msgid "Insufficient Memory" msgstr "Mémoire Insuffisante" -#: plugins/check_hpjd.c:255 +#: plugins/check_hpjd.c:272 msgid "A Door is Open" msgstr "Une porte est ouverte" -#: plugins/check_hpjd.c:259 +#: plugins/check_hpjd.c:276 msgid "Output Tray is Full" msgstr "Le bac de sortie est plein" -#: plugins/check_hpjd.c:263 +#: plugins/check_hpjd.c:280 msgid "Data too Slow for Engine" msgstr "Le données arrivent trop lentement pour l'imprimante" -#: plugins/check_hpjd.c:267 +#: plugins/check_hpjd.c:284 msgid "Unknown Paper Error" msgstr "Erreur de papier inconnue" -#: plugins/check_hpjd.c:272 +#: plugins/check_hpjd.c:289 #, c-format msgid "Printer ok - (%s)\n" msgstr "Imprimante ok - (%s)\n" -#: plugins/check_hpjd.c:377 -#, c-format -msgid "" -"This plugin tests the STATUS of an HP printer with a JetDirect card.\n" -"Net-snmp must be installed on the computer running the plugin.\n" -"\n" -msgstr "" -"Ce plugin teste l'état d'une imprimante HP avec une carte JetDirect.\n" -"Net-snmp doit être installé sur l'ordinateur qui exécute le plugin.\n" -"\n" +#: plugins/check_hpjd.c:394 +msgid "This plugin tests the STATUS of an HP printer with a JetDirect card." +msgstr "Ce plugin teste l'état d'une imprimante HP avec une carte JetDirect." -#: plugins/check_hpjd.c:385 -#, c-format -msgid "" -" -C, --community=STRING\n" -" The SNMP community name (default=%s)\n" -msgstr "" -" -C, --community=STRING\n" -" La communauté SNMP (défaut=%s)\n" +#: plugins/check_hpjd.c:395 +msgid "Net-snmp must be installed on the computer running the plugin." +msgstr "Net-snmp doit être installé sur l'ordinateur qui exécute le plugin." -#: plugins/check_http.c:231 +#: plugins/check_hpjd.c:404 +msgid "The SNMP community name " +msgstr "Le nom de la communauté SNMP " + +#: plugins/check_hpjd.c:405 +#, c-format +msgid "(default=%s)" +msgstr "(défaut=%s)" + +#: plugins/check_http.c:247 msgid "Critical threshold must be integer" msgstr "le seuil critique doit être un entier positif" -#: plugins/check_http.c:239 +#: plugins/check_http.c:255 msgid "Warning threshold must be integer" msgstr "Le seuil d'avertissement doit être un entier positif" -#: plugins/check_http.c:265 plugins/check_tcp.c:552 +#: plugins/check_http.c:281 plugins/check_tcp.c:570 msgid "Invalid certificate expiration period" msgstr "Période d'expiration du certificat invalide" -#: plugins/check_http.c:274 plugins/check_tcp.c:564 +#: plugins/check_http.c:290 plugins/check_tcp.c:582 msgid "Invalid option - SSL is not available" msgstr "Option invalide - SSL n'est pas disponible" -#: plugins/check_http.c:292 +#: plugins/check_http.c:308 #, c-format msgid "option f:%d \n" msgstr "option f:%d \n" -#: plugins/check_http.c:309 +#: plugins/check_http.c:325 msgid "Invalid port number" msgstr "Numéro de port invalide" -#: plugins/check_http.c:340 plugins/check_snmp.c:308 -#, c-format -msgid "Call for regex which was not a compiled option" -msgstr "Demande d'utilisation d'un regex qui n'est pas prévu dans le programme" - -#: plugins/check_http.c:354 +#: plugins/check_http.c:363 #, c-format msgid "Could Not Compile Regular Expression: %s" msgstr "Impossible de compiler l'expression régulière: %s" -#: plugins/check_http.c:366 plugins/check_smtp.c:621 plugins/check_ssh.c:136 -#: plugins/check_tcp.c:450 +#: plugins/check_http.c:377 plugins/check_ntp.c:709 plugins/check_smtp.c:655 +#: plugins/check_ssh.c:154 plugins/check_tcp.c:473 msgid "IPv6 support not available" msgstr "Support IPv6 non disponible" -#: plugins/check_http.c:428 plugins/check_ping.c:396 +#: plugins/check_http.c:439 plugins/check_ping.c:417 msgid "You must specify a server address or host name" msgstr "Vous devez spécifier une adresse ou un nom d'hôte" -#: plugins/check_http.c:654 +#: plugins/check_http.c:665 msgid "Server date unknown\n" msgstr "Date du serveur inconnue\n" -#: plugins/check_http.c:656 +#: plugins/check_http.c:667 msgid "Document modification date unknown\n" msgstr "Date de modification du document inconnue\n" -#: plugins/check_http.c:662 +#: plugins/check_http.c:673 #, c-format msgid "CRITICAL - Server date \"%100s\" unparsable" msgstr "CRITIQUE - Date du serveur \"%100s\" illisible" -#: plugins/check_http.c:664 +#: plugins/check_http.c:675 #, c-format msgid "CRITICAL - Document date \"%100s\" unparsable" msgstr "CRITIQUE - Date du document \"%100s\" illisible" -#: plugins/check_http.c:666 +#: plugins/check_http.c:677 #, c-format msgid "CRITICAL - Document is %d seconds in the future\n" msgstr "CRITIQUE - La date du document est %d secondes dans le futur\n" -#: plugins/check_http.c:671 +#: plugins/check_http.c:682 #, c-format msgid "CRITICAL - Last modified %.1f days ago\n" msgstr "CRITIQUE - Dernière modification %.1f jours auparavant\n" -#: plugins/check_http.c:675 +#: plugins/check_http.c:686 #, c-format msgid "CRITICAL - Last modified %d:%02d:%02d ago\n" msgstr "CRITIQUE - Dernière modification %d:%02d:%02d auparavant\n" -#: plugins/check_http.c:756 +#: plugins/check_http.c:767 msgid "Unable to open TCP socket\n" msgstr "Impossible d'ouvrir un socket TCP\n" -#: plugins/check_http.c:836 +#: plugins/check_http.c:847 msgid "Error on receive\n" msgstr "Erreur dans la réception\n" -#: plugins/check_http.c:846 +#: plugins/check_http.c:857 plugins/check_real.c:189 plugins/check_tcp.c:291 #, c-format -msgid "No data received %s\n" -msgstr "Pas de données reçues %s\n" +msgid "No data received from host\n" +msgstr "Pas de données reçues de l'hôte\n" -#: plugins/check_http.c:896 +#: plugins/check_http.c:907 msgid "Invalid HTTP response received from host\n" msgstr "Réponse HTTP invalide reçue de l'hôte\n" -#: plugins/check_http.c:899 +#: plugins/check_http.c:910 #, c-format msgid "Invalid HTTP response received from host on port %d\n" msgstr "Réponse HTTP invalide reçue de l'hôte sur le port %d\n" -#: plugins/check_http.c:907 +#: plugins/check_http.c:918 #, c-format msgid "HTTP OK: Status line output matched \"%s\"\n" msgstr "HTTP OK: La ligne d'état correspond à \"%s\"\n" -#: plugins/check_http.c:919 +#: plugins/check_http.c:930 #, c-format msgid "HTTP CRITICAL: Invalid Status Line (%s)\n" msgstr "HTTP CRITIQUE: Ligne d'état non valide (%s)\n" -#: plugins/check_http.c:926 +#: plugins/check_http.c:937 #, c-format msgid "HTTP CRITICAL: Invalid Status (%s)\n" msgstr "HTTP CRITIQUE: Etat Invalide (%s)\n" -#: plugins/check_http.c:930 +#: plugins/check_http.c:941 #, c-format msgid "HTTP CRITICAL: %s\n" msgstr "HTTP CRITIQUE: %s\n" -#: plugins/check_http.c:934 +#: plugins/check_http.c:945 #, c-format msgid "HTTP WARNING: %s\n" msgstr "HTTP AVERTISSEMENT: %s\n" -#: plugins/check_http.c:952 +#: plugins/check_http.c:963 #, c-format -msgid " - %s - %.3f second response time %s%s|%s %s\n" -msgstr " - %s - %.3f secondes de temps de réponse %s%s|%s %s\n" +msgid " - %s - %.3f second response time %s|%s %s\n" +msgstr " - %s - %.3f secondes de temps de réponse %s|%s %s\n" -#: plugins/check_http.c:968 +#: plugins/check_http.c:979 #, c-format -msgid "HTTP WARNING: %s - %.3f second response time %s%s|%s %s\n" -msgstr "HTTP AVERTISSEMENT %s - %.3f secondes de temps de réponse %s%s|%s %s\n" +msgid "HTTP WARNING: %s - %.3f second response time %s|%s %s\n" +msgstr "HTTP AVERTISSEMENT: %s - %.3f secondes de temps de réponse %s|%s %s\n" -#: plugins/check_http.c:982 plugins/check_http.c:999 +#: plugins/check_http.c:993 plugins/check_http.c:1010 #, c-format -msgid "HTTP OK %s - %.3f second response time %s%s|%s %s\n" -msgstr "HTTP OK %s - %.3f secondes de temps de réponse %s%s|%s %s\n" +msgid "HTTP OK %s - %.3f second response time %s|%s %s\n" +msgstr "HTTP OK %s - %.3f secondes de temps de réponse %s|%s %s\n" -#: plugins/check_http.c:989 +#: plugins/check_http.c:1000 #, c-format msgid "CRITICAL - string not found%s|%s %s\n" msgstr "CRITIQUE - chaîne non trouvée%s|%s %s\n" -#: plugins/check_http.c:1007 -#, c-format -msgid "CRITICAL - pattern not found%s|%s %s\n" -msgstr "CRITIQUE - chaîne non trouvée %s|%s %s\n" +#: plugins/check_http.c:1018 +msgid "pattern not found" +msgstr "chaîne non trouvée" -#: plugins/check_http.c:1014 +#: plugins/check_http.c:1020 +msgid "pattern found" +msgstr "chaîne de caractère trouvée" + +#: plugins/check_http.c:1030 #, c-format msgid "CRITICAL - Execute Error: %s\n" msgstr "CRITIQUE - Erreur d'exécution: %s\n" -#: plugins/check_http.c:1025 +#: plugins/check_http.c:1039 #, c-format msgid "HTTP WARNING: page size %d too large%s|%s\n" msgstr "HTTP AVERTISSEMENT: la taille de la page %d est trop grande%s|%s\n" -#: plugins/check_http.c:1029 +#: plugins/check_http.c:1043 #, c-format msgid "HTTP WARNING: page size %d too small%s|%s\n" msgstr "HTTP AVERTISSEMENT: la taille de la page %d est trop petite%s|%s\n" -#: plugins/check_http.c:1034 +#: plugins/check_http.c:1048 #, c-format -msgid "HTTP OK %s - %d bytes in %.3f seconds %s%s|%s %s\n" -msgstr "HTTP OK %s - %d bytes en %.3f secondes %s%s|%s %s\n" +msgid "HTTP OK %s - %d bytes in %.3f seconds %s|%s %s\n" +msgstr "HTTP OK %s - %d bytes en %.3f secondes %s|%s %s\n" -#: plugins/check_http.c:1069 +#: plugins/check_http.c:1083 msgid "Could not allocate addr\n" msgstr "Impossible d'allouer une adresse\n" -#: plugins/check_http.c:1073 +#: plugins/check_http.c:1087 msgid "Could not allocate url\n" msgstr "Impossible d'allouer une URL\n" -#: plugins/check_http.c:1083 +#: plugins/check_http.c:1096 #, c-format msgid "UNKNOWN - Could not find redirect location - %s%s\n" msgstr "INCONNU - Impossible de trouver l'endroit de la relocation - %s%s\n" -#: plugins/check_http.c:1093 +#: plugins/check_http.c:1106 msgid "could not allocate url\n" msgstr "Impossible d'allouer une URL\n" -#: plugins/check_http.c:1136 +#: plugins/check_http.c:1149 #, c-format msgid "UNKNOWN - Could not parse redirect location - %s%s\n" msgstr "INCONNU - Impossible de définir l'endroit de la relocation - %s%s\n" -#: plugins/check_http.c:1146 +#: plugins/check_http.c:1159 #, c-format msgid "WARNING - maximum redirection depth %d exceeded - %s://%s:%d%s%s\n" msgstr "" "AVERTISSEMENT - le niveau maximum de redirection %d à été dépassé - %s://%s:%" "d%s%s\n" -#: plugins/check_http.c:1154 +#: plugins/check_http.c:1167 #, c-format msgid "WARNING - redirection creates an infinite loop - %s://%s:%d%s%s\n" msgstr "" "AVERTISSEMENT - la redirection crée une boucle infinie - %s://%s:%d%s%s\n" -#: plugins/check_http.c:1218 -#, c-format -msgid "" -"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." -msgstr "" -"Ce plugin teste le service HTTP sur l'hôte spécifié. Il peut tester \n" -"la version normale (http) et la version sécurisée (https), suivre des\n" -"redirections, chercher pour des chaînes de caractères et des\n" -" expressions régulières, vérifier les temps de connexion, et avertir\n" -"lors de l'expiration des certificats." +#: plugins/check_http.c:1231 +msgid "This plugin tests the HTTP service on the specified host. It can test" +msgstr "Ce plugin teste le service HTTP sur l'hôte spécifié. Il peut tester" -#: plugins/check_http.c:1228 +#: plugins/check_http.c:1232 +msgid "normal (http) and secure (https) servers, follow redirects, search for" +msgstr "" + +#: plugins/check_http.c:1233 +msgid "strings and regular expressions, check connection times, and report on" +msgstr "" + +#: plugins/check_http.c:1234 +msgid "certificate expiration times." +msgstr "Période d'expiration du certificat invalide." + +#: plugins/check_http.c:1240 #, c-format msgid "NOTE: One or both of -H and -I must be specified" msgstr "NOTE: les paramètres -H et -I peuvent être spécifiés" -#: plugins/check_http.c:1234 -#, c-format -msgid "" -" -H, --hostname=ADDRESS\n" -" Host name argument for servers using host headers (virtual host)\n" -" Append a port to include it in the header (eg: example.com:5000)\n" -" -I, --IP-address=ADDRESS\n" -" IP address or name (use numeric address if possible to bypass DNS " -"lookup).\n" -" -p, --port=INTEGER\n" -" Port number (default: %d)\n" +#: plugins/check_http.c:1247 +msgid "Host name argument for servers using host headers (virtual host)" msgstr "" -" -H, --hostname=ADDRESS\n" -" Nom de l'hôte pour les serveurs utilisant les entêtes de l'hôte (hôtes " -"virtuels)\n" -" Rajoutez un port pour l'inclure dans les entêtes (ex: example.com:5000)\n" -" -I, --IP-address=ADDRESS\n" -" Adresse IP ou nom (utilisez une adresse numérique si possible pour ne pas " -"utiliser le DNS).\n" -" -p, --port=INTEGER\n" -" Numéro du port (défaut: %d)\n" -#: plugins/check_http.c:1246 -#, c-format -msgid "" -" -S, --ssl\n" -" Connect via SSL\n" -" -C, --certificate=INTEGER\n" -" Minimum number of days a certificate has to be valid.\n" -" (when this option is used the url is not checked.)\n" +#: plugins/check_http.c:1248 +msgid "Append a port to include it in the header (eg: example.com:5000)" msgstr "" -" -S, --ssl\n" -" Connexion via SSL\n" -" -C, --certificate=INTEGER\n" -" Nombre minimum de jours de validité du certificat.\n" -" (quand cette option est utilisée, l'URL n'est pas vérifiée.)\n" -#: plugins/check_http.c:1254 -#, c-format +#: plugins/check_http.c:1250 msgid "" -" -e, --expect=STRING\n" -" String to expect in first (status) line of server response (default: %s)\n" -" If specified skips all other status line logic (ex: 3xx, 4xx, 5xx " -"processing)\n" -" -s, --string=STRING\n" -" String to expect in the content\n" -" -u, --url=PATH\n" -" URL to GET or POST (default: /)\n" -" -P, --post=STRING\n" -" URL encoded http POST data\n" -" -N, --no-body\n" -" Don't wait for document body: stop reading after headers.\n" -" (Note that this still does an HTTP GET or POST, not a HEAD.)\n" -" -M, --max-age=SECONDS\n" -" Warn if document is more than SECONDS old. the number can also be of \n" -" the form \"10m\" for minutes, \"10h\" for hours, or \"10d\" for days.\n" -" -T, --content-type=STRING\n" -" specify Content-Type header media type when POSTing\n" +"IP address or name (use numeric address if possible to bypass DNS lookup)." msgstr "" -" -e, --expect=STRING\n" -" Chaîne attendue dans la 1ère ligne (statut) de réponse du serveur " -"(défaut: %s)\n" -" Si spécifié, ne lit aucune des autres lignes de statut (ex: 3xx, 4xx, " -"5xx )\n" -" -s, --string=STRING\n" -" Chaîne attendu dans le contenu\n" -" -u, --url=PATH\n" -" URL à envoyer pour le GET ou le POST (défaut: /)\n" -" -P, --post=STRING\n" -" URL encodée pour les données http POST\n" -" -N, --no-body\n" -" Ne pas attendre pour le corps du document: s'arrêter après l'entête.\n" -" (Notez que ceci exécute quand même un GET ou POST pas un HEAD.)\n" -" -M, --max-age=SECONDS\n" -" Prévient si le document est plus vieux que SECONDS. le nombre peut aussi " -"être de la forme \"10m\" pour minutes, \"10h\" pour heures, ou \"10d\" pour " -"jours.\n" -" -T, --content-type=STRING\n" -" spécifie le Content-Type type lors d'un POST\n" + +#: plugins/check_http.c:1252 +msgid "Port number (default: " +msgstr "Numéro du port (défaut: " + +#: plugins/check_http.c:1259 +msgid "Connect via SSL. Port defaults to 443" +msgstr "" + +#: plugins/check_http.c:1261 +msgid "" +"Minimum number of days a certificate has to be valid. Port defaults to 443" +msgstr "" +"Nombre de jours minimum pour que le certificat soit valide. Port par défaut " +"443" + +#: plugins/check_http.c:1262 +msgid "(when this option is used the url is not checked.)\n" +msgstr "" + +#: plugins/check_http.c:1266 +msgid "String to expect in first (status) line of server response (default: " +msgstr "Texte attendu dans la première ligne de réponse du serveur (défaut: " + +#: plugins/check_http.c:1268 +msgid "" +"If specified skips all other status line logic (ex: 3xx, 4xx, 5xx processing)" +msgstr "" + +#: plugins/check_http.c:1270 +msgid "String to expect in the content" +msgstr "Chaîne de caractère attendue dans le contenu" + +#: plugins/check_http.c:1272 +msgid "URL to GET or POST (default: /)" +msgstr "URL pour le GET ou le POST (défaut: /)" #: plugins/check_http.c:1274 -#, c-format -msgid "" -" -l, --linespan\n" -" Allow regex to span newlines (must precede -r or -R)\n" -" -r, --regex, --ereg=STRING\n" -" Search page for regex STRING\n" -" -R, --eregi=STRING\n" -" Search page for case-insensitive regex STRING\n" +msgid "URL encoded http POST data" msgstr "" -" -l, --linespan\n" -" Permettre à l'expression régulière d'être sur plusieurs lignes (doit " -"précéder -r or -R)\n" -" -r, --regex, --ereg=STRING\n" -" Chercher la page pour l'expression régulière STRING\n" -" -R, --eregi=STRING\n" -" Chercher la page pour l'expression régulière STRING sans faire attention " -"au\n" -" majuscules/minuscules\n" -#: plugins/check_http.c:1283 -#, c-format -msgid "" -" -a, --authorization=AUTH_PAIR\n" -" Username:password on sites with basic authentication\n" -" -A, --useragent=STRING\n" -" String to be sent in http header as \"User Agent\"\n" -" -k, --header=STRING\n" -" Any other tags to be sent in http header. Use multiple times for " -"additional headers\n" -" -L, --link=URL\n" -" Wrap output in HTML link (obsoleted by urlize)\n" -" -f, --onredirect=\n" -" How to handle redirected pages\n" -" -m, --pagesize=INTEGER<:INTEGER>\n" -" Minimum page size required (bytes) : Maximum page size required (bytes)\n" +#: plugins/check_http.c:1276 +msgid "Don't wait for document body: stop reading after headers." msgstr "" -" -a, --authorization=AUTH_PAIR\n" -" Nom d'utilisateur:mot de passe pour les sites avec un authentification " -"basique\n" -" -A, --useragent=STRING\n" -" Chaîne à envoyer dans l'entête String http comme \"User Agent\"\n" -" -k, --header=STRING\n" -" N'importe quel autre tags à envoyer dans l'entête http. Utiliser le " -"plusieurs fois pour rajouter de multiples entêtes\n" -" -L, --link=URL\n" -" Encapsuler la sortie dans du HTML (rendu obsolète par urlize)\n" -" -f, --onredirect=\n" -" Comment gèrer les pages redirigées\n" -" -m, --pagesize=INTEGER<:INTEGER>\n" -" Taille minimum exigée pour la page (bytes) : Taille maximum page exigée " -"pour la page (bytes)\n" +"Ne pas attendre pour le corps du document: arrêter de lire après les entêtes" -#: plugins/check_http.c:1303 -#, c-format -msgid "" -"This plugin will attempt to open an HTTP connection with the host. " -"Successful\n" -"connects return STATE_OK, refusals and timeouts return STATE_CRITICAL, " -"other\n" -"errors return STATE_UNKNOWN. Successful connects, but incorrect reponse\n" -"messages from the host result in STATE_WARNING return values. If you are\n" -"checking a virtual server that uses 'host headers' you must supply the FQDN\n" -"(fully qualified domain name) as the [host_name] argument.\n" -msgstr "" -"Ce plugin va essayer d'établir une connexion avec l'hôte.\n" -"Une connexion réussie renverra l'état OK, les refus et les dépassements\n" -"de temps renverront un état CRITIQUE, tous les autres renverrons un\n" -"état INCONNU. Une connexion réussie, mais une réponse incorrecte\n" -"de l'hôte renverra un état ALERTE. Si vous vérifier un hôte faisant du\n" -"hosting virtuel qui utilise des 'host headers' vous devrez fournir le FQDN\n" -"(nom de domaine qualifié) comme l'argument [host_name].\n" +#: plugins/check_http.c:1277 +msgid "(Note that this still does an HTTP GET or POST, not a HEAD.)" +msgstr "(Veuillez noter qu'un HTTP GET ou POST est effectué, pas un HEAD.)" -#: plugins/check_http.c:1312 -#, c-format -msgid "" -"\n" -"This plugin can also check whether an SSL enabled web server is able to\n" -"serve content (optionally within a specified time) or whether the X509 \n" -"certificate is still valid for the specified number of days.\n" +#: plugins/check_http.c:1279 +msgid "Warn if document is more than SECONDS old. the number can also be of" +msgstr "" + +#: plugins/check_http.c:1280 +msgid "the form \"10m\" for minutes, \"10h\" for hours, or \"10d\" for days." +msgstr "" + +#: plugins/check_http.c:1282 +msgid "specify Content-Type header media type when POSTing\n" +msgstr "" + +#: plugins/check_http.c:1285 +msgid "Allow regex to span newlines (must precede -r or -R)" +msgstr "" + +#: plugins/check_http.c:1287 +msgid "Search page for regex STRING" +msgstr "" + +#: plugins/check_http.c:1289 +msgid "Search page for case-insensitive regex STRING" +msgstr "" + +#: plugins/check_http.c:1291 +msgid "Return CRITICAL if found, OK if not\n" +msgstr "" + +#: plugins/check_http.c:1294 +msgid "Username:password on sites with basic authentication" +msgstr "" + +#: plugins/check_http.c:1296 +msgid "String to be sent in http header as \"User Agent\"" +msgstr "" + +#: plugins/check_http.c:1298 +msgid "" +" Any other tags to be sent in http header. Use multiple times for additional " +"headers" +msgstr "" + +#: plugins/check_http.c:1300 +msgid "Wrap output in HTML link (obsoleted by urlize)" +msgstr "" + +#: plugins/check_http.c:1302 +msgid "How to handle redirected pages" +msgstr "" + +#: plugins/check_http.c:1304 +msgid "Minimum page size required (bytes) : Maximum page size required (bytes)" +msgstr "" + +#: plugins/check_http.c:1313 +msgid "This plugin will attempt to open an HTTP connection with the host." +msgstr "Ce plugin va essayer d'ouvrir un connexion SMTP avec l'hôte." + +#: plugins/check_http.c:1314 +msgid "" +"Successful connects return STATE_OK, refusals and timeouts return " +"STATE_CRITICAL" +msgstr "" + +#: plugins/check_http.c:1315 +msgid "" +"other errors return STATE_UNKNOWN. Successful connects, but incorrect " +"reponse" msgstr "" -"\n" -"Ce plugin peut aussi chercher si un serveur web SSL peut fournir \n" -"le contenu (éventuellement dans un temps défini) ou si le certificat X509\n" -"est toujours valide pour le nombre de jours spécifiés.\n" #: plugins/check_http.c:1316 -#, c-format msgid "" -"\n" -"CHECK CONTENT: check_http -w 5 -c 10 --ssl www.verisign.com\n" -"\n" -"When the 'www.verisign.com' server returns its content within 5 seconds, a\n" -"STATE_OK will be returned. When the server returns its content but exceeds\n" -"the 5-second threshold, a STATE_WARNING will be returned. When an error " -"occurs,\n" -"a STATE_CRITICAL will be returned.\n" -"\n" +"messages from the host result in STATE_WARNING return values. If you are" +msgstr "" + +#: plugins/check_http.c:1317 +msgid "" +"checking a virtual server that uses 'host headers' you must supply the FQDN" +msgstr "" + +#: plugins/check_http.c:1318 +msgid "(fully qualified domain name) as the [host_name] argument." +msgstr "" + +#: plugins/check_http.c:1321 +msgid "This plugin can also check whether an SSL enabled web server is able to" +msgstr "" + +#: plugins/check_http.c:1322 +msgid "serve content (optionally within a specified time) or whether the X509 " msgstr "" -"\n" -"CHECK CONTENT: check_http -w 5 -c 10 --ssl www.verisign.com\n" -"\n" -"Quand le serveur 'www.verisign.com' renvoie son contenu dans les 5 secondes," -"un\n" -"résultat STATE_OK sera renvoyé. Quand le serveur renvoie son contenu, mais \n" -" dépasse les 5 secondes, un résultat STATE_WARNING sera retourné.\n" -"Quand une erreur se produit\n" -" un résultat STATE_CRITICAL sera retourné.\n" -"\n" #: plugins/check_http.c:1323 -#, c-format -msgid "" -"CHECK CERTIFICATE: check_http www.verisign.com -C 14\n" -"\n" -"When the certificate of 'www.verisign.com' is valid for more than 14 days, " -"a\n" -"STATE_OK is returned. When the certificate is still valid, but for less " -"than\n" -"14 days, a STATE_WARNING is returned. A STATE_CRITICAL will be returned " -"when\n" -"the certificate is expired.\n" +msgid "certificate is still valid for the specified number of days." msgstr "" -"CHECK CERTIFICATE: check_http www.verisign.com -C 14\n" -"\n" -"Quand le certificat de 'www.verisign.com' est valide pour plus de 14 jours, " -"un\n" -"résultat STATE_OK est renvoyé. Quand le certificat est valide pour moins de " -"14 jours\n" -"un résultat STATE_WARNING est renvoyé. un résultat STATE_CRITICAL est " -"renvoyé\n" -" quand le certificat est expiré.\n" -#: plugins/check_ldap.c:112 +#: plugins/check_http.c:1326 +msgid "" +"When the 'www.verisign.com' server returns its content within 5 seconds," +msgstr "" + +#: plugins/check_http.c:1327 +msgid "" +"a STATE_OK will be returned. When the server returns its content but exceeds" +msgstr "" + +#: plugins/check_http.c:1328 +msgid "" +"the 5-second threshold, a STATE_WARNING will be returned. When an error " +"occurs," +msgstr "" + +#: plugins/check_http.c:1329 +msgid "a STATE_CRITICAL will be returned." +msgstr "" + +#: plugins/check_http.c:1332 +msgid "" +"When the certificate of 'www.verisign.com' is valid for more than 14 days," +msgstr "" + +#: plugins/check_http.c:1333 +msgid "" +"a STATE_OK is returned. When the certificate is still valid, but for less " +"than" +msgstr "" + +#: plugins/check_http.c:1334 +msgid "" +"14 days, a STATE_WARNING is returned. A STATE_CRITICAL will be returned when" +msgstr "" + +#: plugins/check_http.c:1335 +msgid "the certificate is expired." +msgstr "le certificat est expiré." + +#: plugins/check_ldap.c:125 #, c-format msgid "Could not connect to the server at port %i\n" msgstr "Impossible de se connecter au serveur port %i\n" -#: plugins/check_ldap.c:121 +#: plugins/check_ldap.c:134 #, c-format msgid "Could not set protocol version %d\n" msgstr "Impossible d'utiliser le protocole version %d\n" -#: plugins/check_ldap.c:137 +#: plugins/check_ldap.c:150 #, c-format msgid "Could not init TLS at port %i!\n" msgstr "Impossible d'initialiser TLS sur le port %i!\n" -#: plugins/check_ldap.c:141 +#: plugins/check_ldap.c:154 #, c-format msgid "TLS not supported by the libraries!\n" msgstr "TLS n'est pas supporté!\n" -#: plugins/check_ldap.c:160 +#: plugins/check_ldap.c:173 #, c-format msgid "Could not init startTLS at port %i!\n" msgstr "Impossible d'initialiser startTLS sur le port %i!\n" -#: plugins/check_ldap.c:164 +#: plugins/check_ldap.c:177 #, c-format msgid "startTLS not supported by the library, needs LDAPv3!\n" msgstr "" "startTLS n'est pas supporté par la librairie LDAP, j'ai besoin de LDAPv3!\n" -#: plugins/check_ldap.c:174 +#: plugins/check_ldap.c:187 #, c-format msgid "Could not bind to the ldap-server\n" msgstr "Impossible de se connecter au serveur LDAP\n" -#: plugins/check_ldap.c:182 +#: plugins/check_ldap.c:195 #, c-format msgid "Could not search/find objectclasses in %s\n" msgstr "Impossible de chercher/trouver les objectclasses dans %s\n" -#: plugins/check_ldap.c:205 +#: plugins/check_ldap.c:218 #, c-format msgid "LDAP %s - %.3f seconds response time|%s\n" msgstr "LDAP %s - %.3f secondes de temps de réponse|%s\n" -#: plugins/check_ldap.c:311 plugins/check_ping.c:220 +#: plugins/check_ldap.c:324 plugins/check_ping.c:241 msgid "IPv6 support not available\n" msgstr "Support IPv6 non disponible\n" -#: plugins/check_ldap.c:334 +#: plugins/check_ldap.c:347 msgid "Please specify the host name\n" msgstr "Veuillez spécifier le nom de l'hôte\n" -#: plugins/check_ldap.c:337 +#: plugins/check_ldap.c:350 msgid "Please specify the LDAP base\n" msgstr "Veuillez spécifier la base LDAP\n" -#: plugins/check_ldap.c:362 -#, c-format -msgid "" -" -a [--attr]\n" -" ldap attribute to search (default: \"(objectclass=*)\"\n" -" -b [--base]\n" -" ldap base (eg. ou=my unit, o=my org, c=at)\n" -" -D [--bind]\n" -" ldap bind DN (if required)\n" -" -P [--pass]\n" -" ldap password (if required)\n" +#: plugins/check_ldap.c:378 +msgid "ldap attribute to search (default: \"(objectclass=*)\"" msgstr "" -" -a [--attr]\n" -" attribut ldap à chercher (défaut: \"(objectclass=*)\"\n" -" -b [--base]\n" -" base ldap (ex. ou=my unit, o=my org, c=at)\n" -" -D [--bind]\n" -" DN ldap (si nécessaire)\n" -" -P [--pass]\n" -" mot de passe ldap (si nécessaire)\n" -#: plugins/check_ldap.c:373 -#, c-format -msgid "" -" -2 [--ver2]\n" -" use ldap protocol version 2\n" -" -3 [--ver3]\n" -" use ldap protocol version 3\n" -" (default protocol version: %d)\n" +#: plugins/check_ldap.c:380 +msgid "ldap base (eg. ou=my unit, o=my org, c=at" msgstr "" -" -2 [--ver2]\n" -" utiliser le protocole ldap version 2\n" -" -3 [--ver3]\n" -" utiliser le protocole ldap version 3\n" -" (défaut protocole version: %d)\n" -#: plugins/check_load.c:75 +#: plugins/check_ldap.c:382 +msgid "ldap bind DN (if required)" +msgstr "" + +#: plugins/check_ldap.c:384 +msgid "ldap password (if required)" +msgstr "" + +#: plugins/check_ldap.c:388 +msgid "use ldap protocol version 2" +msgstr "utiliser le protocole version 2" + +#: plugins/check_ldap.c:390 +msgid "use ldap protocol version 3" +msgstr "Impossible d'utiliser le protocole version 3" + +#: plugins/check_load.c:91 msgid "Warning threshold must be float or float triplet!\n" msgstr "Le seuil d'alerte doit être un nombre à virgule flottante!\n" -#: plugins/check_load.c:116 plugins/check_load.c:132 +#: plugins/check_load.c:132 plugins/check_load.c:148 #, c-format msgid "Error opening %s\n" msgstr "Erreur à l'ouverture de %s\n" -#: plugins/check_load.c:144 +#: plugins/check_load.c:160 #, c-format msgid "Error code %d returned in %s\n" msgstr "Le code erreur %d à été retourné par %s\n" -#: plugins/check_load.c:152 +#: plugins/check_load.c:168 #, c-format msgid "Error in getloadavg()\n" msgstr "Erreur dans la fonction getloadavg()\n" -#: plugins/check_load.c:155 plugins/check_load.c:157 +#: plugins/check_load.c:171 plugins/check_load.c:173 #, c-format msgid "Error processing %s\n" msgstr "Erreur lors de l'utilisation de %s\n" -#: plugins/check_load.c:166 +#: plugins/check_load.c:182 #, c-format msgid "load average: %.2f, %.2f, %.2f" msgstr "Charge moyenne: %.2f, %.2f, %.2f" -#: plugins/check_load.c:255 +#: plugins/check_load.c:271 #, c-format msgid "Critical threshold for %d-minute load average is not specified\n" msgstr "" "Le seuil critique pour la charge système après %d minutes n'est pas " "spécifié\n" -#: plugins/check_load.c:257 +#: plugins/check_load.c:273 #, c-format msgid "Warning threshold for %d-minute load average is not specified\n" msgstr "" "Le seuil d'avertissement pour la charge système après %d minutes n'est pas " "spécifié\n" -#: plugins/check_load.c:259 +#: plugins/check_load.c:275 #, c-format msgid "" "Parameter inconsistency: %d-minute \"warning load\" is greater than " @@ -1566,69 +1492,58 @@ msgstr "" "Arguments Incorrects: %d-minute \"alerte charge système\" est plus grand que " "\"alerte critique charge système\"\n" -#: plugins/check_load.c:275 +#: plugins/check_load.c:291 #, c-format -msgid "" -"This plugin tests the current system load average.\n" -"\n" -msgstr "" -"Ce plugin teste la charge système actuelle.\n" -"\n" +msgid "This plugin tests the current system load average." +msgstr "Ce plugin teste la charge système actuelle." -#: plugins/check_load.c:281 -#, c-format -msgid "" -" -w, --warning=WLOAD1,WLOAD5,WLOAD15\n" -" Exit with WARNING status if load average exceeds WLOADn\n" -" -c, --critical=CLOAD1,CLOAD5,CLOAD15\n" -" Exit with CRITICAL status if load average exceed CLOADn\n" -"\n" -"the load average format is the same used by \"uptime\" and \"w\"\n" -"\n" +#: plugins/check_load.c:300 +msgid "Exit with WARNING status if load average exceeds WLOADn" msgstr "" -" -w, --warning=WLOAD1,WLOAD5,WLOAD15\n" -" Sort avec un statut ALERTE si la charge système excède WLOADn\n" -" -c, --critical=CLOAD1,CLOAD5,CLOAD15\n" -" Sort avec un statut ALERTE si la charge système excède CLOADn\n" -"\n" -"Le format pour la charge système est le même que celui utilisé par \"uptime" -"\" et \"w\"\n" -"\n" +"Sortir avec un résultat AVERTISSEMENT si la charge moyenne dépasse WLOAD" -#: plugins/check_mrtg.c:62 +#: plugins/check_load.c:302 +msgid "Exit with CRITICAL status if load average exceed CLOADn" +msgstr "Sortir avec un résultat CRITIQUE si la charge moyenne excède CLOAD" + +#: plugins/check_load.c:303 +msgid "the load average format is the same used by \"uptime\" and \"w\"" +msgstr "" + +#: plugins/check_mrtg.c:79 msgid "Could not parse arguments\n" msgstr "Lecture des arguments impossible\n" -#: plugins/check_mrtg.c:67 +#: plugins/check_mrtg.c:84 #, c-format msgid "Unable to open MRTG log file\n" msgstr "Impossible d'ouvrir le fichier de log de MRTG\n" -#: plugins/check_mrtg.c:114 +#: plugins/check_mrtg.c:131 #, c-format msgid "Unable to process MRTG log file\n" msgstr "Impossible de traiter le fichier de log de MRTG\n" -#: plugins/check_mrtg.c:122 plugins/check_mrtgtraf.c:119 +#: plugins/check_mrtg.c:139 plugins/check_mrtgtraf.c:136 #, c-format msgid "MRTG data has expired (%d minutes old)\n" msgstr "Les données de MRTG on expirées (vieilles de %d minutes)\n" -#: plugins/check_mrtg.c:139 plugins/check_mrtgtraf.c:178 -#: plugins/check_mrtgtraf.c:179 +#: plugins/check_mrtg.c:156 plugins/check_mrtgtraf.c:195 +#: plugins/check_mrtgtraf.c:196 msgid "Avg" msgstr "Moyenne" -#: plugins/check_mrtg.c:139 plugins/check_mrtgtraf.c:178 -#: plugins/check_mrtgtraf.c:179 +#: plugins/check_mrtg.c:156 plugins/check_mrtgtraf.c:195 +#: plugins/check_mrtgtraf.c:196 msgid "Max" msgstr "Max" -#: plugins/check_mrtg.c:208 +#: plugins/check_mrtg.c:225 msgid "Invalid variable number" msgstr "Numéro de la variable invalide" -#: plugins/check_mrtg.c:243 +#: plugins/check_mrtg.c:260 #, c-format msgid "" "%s is not a valid expiration time\n" @@ -1637,460 +1552,444 @@ msgstr "" "%s n'est pas un temps d'expiration valide\n" "Utilisez '%s -h' pour de l'aide supplémentaire\n" -#: plugins/check_mrtg.c:260 +#: plugins/check_mrtg.c:277 msgid "Invalid variable number\n" msgstr "Numéro de la variable invalide\n" -#: plugins/check_mrtg.c:287 +#: plugins/check_mrtg.c:304 msgid "You must supply the variable number" msgstr "Vous devez fournir le numéro de la variable" -#: plugins/check_mrtg.c:308 -#, c-format +#: plugins/check_mrtg.c:325 msgid "" -"This plugin will check either the average or maximum value of one of the\n" -"two variables recorded in an MRTG log file.\n" -"\n" -msgstr "" -"Ce plugin va vérifier la moyenne ou le maximum d'une ou deux variables\n" -"écrites dans un fichier de log MRTG.\n" -"\n" +"This plugin will check either the average or maximum value of one of the" +msgstr "Ce plugin va vérifier la moyenne ou le maximum d'une " -#: plugins/check_mrtg.c:316 -#, c-format -msgid "" -" -F, --logfile=FILE\n" -" The MRTG log file containing the data you want to monitor\n" -" -e, --expires=MINUTES\n" -" Minutes before MRTG data is considered to be too old\n" -" -a, --aggregation=AVG|MAX\n" -" Should we check average or maximum values?\n" -" -v, --variable=INTEGER\n" -" Which variable set should we inspect? (1 or 2)\n" -" -w, --warning=INTEGER\n" -" Threshold value for data to result in WARNING status\n" -" -c, --critical=INTEGER\n" -" Threshold value for data to result in CRITICAL status\n" -msgstr "" -" -F, --logfile=FILE\n" -" Le fichier log MRTG contenant les data que vous voulez surveiller\n" -" -e, --expires=MINUTES\n" -" Le nombre de minutes après lesquelles les données sont considérées être " -"trop vieilles\n" -" -a, --aggregation=AVG|MAX\n" -" Est ce qu'on doit vérifier les valeurs moyennes ou maximales ?\n" -" -v, --variable=INTEGER\n" -" Quelle variable doit t'on inspecter ? (1 or 2)\n" -" -w, --warning=INTEGER\n" -" Valeur d'intervalle qui doit déclencher un seuil AVERTISSEMENT\n" -" -c, --critical=INTEGER\n" -" Valeur d'intervalle qui doit déclencher un seuil CRITIQUE\n" +#: plugins/check_mrtg.c:326 +msgid "two variables recorded in an MRTG log file." +msgstr "deux variables du fichier de log de MRTG." -#: plugins/check_mrtg.c:330 -#, c-format -msgid "" -" -l, --label=STRING\n" -" Type label for data (Examples: Conns, \"Processor Load\", In, Out)\n" -" -u, --units=STRING\n" -" Option units label for data (Example: Packets/Sec, Errors/Sec, \n" -" \"Bytes Per Second\", \"%% Utilization\")\n" +#: plugins/check_mrtg.c:335 +msgid "The MRTG log file containing the data you want to monitor" msgstr "" -" -l, --label=STRING\n" -" Label de type pour les données (Exemples: Conns, \"Charge processeur\", " -"Entrée, Sortie)\n" -" -u, --units=STRING\n" -" Label optionnel pour les données (Exemple: Paquets/Sec, Erreurs/Sec, \n" -" \"Bytes Par Secondes\", \"%% Utilisation\")\n" #: plugins/check_mrtg.c:337 -#, c-format -msgid "" -"If the value exceeds the threshold, a WARNING status is returned. If\n" -"the value exceeds the threshold, a CRITICAL status is returned. If\n" -"the data in the log file is older than old, a WARNING\n" -"status is returned and a warning message is printed.\n" -"\n" +msgid "Minutes before MRTG data is considered to be too old" +msgstr "" + +#: plugins/check_mrtg.c:339 +msgid "Should we check average or maximum values?" +msgstr "" + +#: plugins/check_mrtg.c:341 +msgid "Which variable set should we inspect? (1 or 2)" msgstr "" -"Si la valeur dépasse le seuil défini dans , un résultat AVERTISSEMENT " -"sera\n" -" renvoyé.\n" -"Si la valeur dépasse le seuil défini dans , un résultat CRITIQUE sera " -"renvoyé\n" -"Si les données dans le fichier de log sont plus vieux que ,\n" -" un résultat AVERTISSEMENT est renvoyé et un message d'alerte est affiché.\n" -"\n" #: plugins/check_mrtg.c:343 -#, c-format -msgid "" -"This plugin is useful for monitoring MRTG data that does not correspond to\n" -"bandwidth usage. (Use the check_mrtgtraf plugin for monitoring bandwidth).\n" -"It can be used to monitor any kind of data that MRTG is monitoring - " -"errors,\n" -"packets/sec, etc. I use MRTG in conjuction with the Novell NLM that allows\n" -"me to track processor utilization, user connections, drive space, etc and\n" -"this plugin works well for monitoring that kind of data as well.\n" -"\n" +msgid "Threshold value for data to result in WARNING status" +msgstr "" + +#: plugins/check_mrtg.c:345 +msgid "Threshold value for data to result in CRITICAL status" +msgstr "" + +#: plugins/check_mrtg.c:347 +msgid "Type label for data (Examples: Conns, \"Processor Load\", In, Out)" +msgstr "" + +#: plugins/check_mrtg.c:349 +msgid "Option units label for data (Example: Packets/Sec, Errors/Sec," msgstr "" -"Ce plugin est utile pour surveiller des données MRTG qui ne correspondent " -"pas\n" -"à une mesure de bande passante. (Utilisez check_mrtgtraf pour surveiller " -"la \n" -"bande passante).\n" -"Il peut être utilisé pour surveiller n'importe quel type de données que " -"MRTG\n" -" surveille\n" -"J'utilise MRTG avec l'extension NLM Novell qui permet de surveiller " -"l'utilisation\n" -"processeur, le nombre de connexions utilisateurs, espace disque, etc et \n" -"il fonctionne bien pour surveiller ce type de données aussi.\n" -"\n" #: plugins/check_mrtg.c:350 #, c-format -msgid "" -"Notes:\n" -"- This plugin only monitors one of the two variables stored in the MRTG log\n" -" file. If you want to monitor both values you will have to define two\n" -" commands with different values for the argument. Of course,\n" -" you can always hack the code to make this plugin work for you...\n" -"- MRTG stands for the Multi Router Traffic Grapher. It can be downloaded " -"from\n" -" http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html\n" +msgid "\"Bytes Per Second\", \"%% Utilization\")" msgstr "" -"Notes:\n" -"- Ce plugin surveille seulement une des deux variables stockés dans les " -"fichiers\n" -" de logs. Si vous voulez surveiller les deux variables, vous devrez définir " -"deux \n" -" commandes avec des valeurs différentes pour l'argument . Bien " -"sur,\n" -" vous pouvez toujours modifier le code pour l'adapter à vos besoins...\n" -"- le nom MRTG veux dire Multi Router Traffic Grapher. Il peut être " -"téléchargé depuis\n" -" http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html\n" -#: plugins/check_mrtgtraf.c:71 +#: plugins/check_mrtg.c:352 +msgid "" +"If the value exceeds the threshold, a WARNING status is returned. If" +msgstr "" + +#: plugins/check_mrtg.c:353 +msgid "" +"the value exceeds the threshold, a CRITICAL status is returned. If" +msgstr "" + +#: plugins/check_mrtg.c:354 +msgid "the data in the log file is older than old, a WARNING" +msgstr "" + +#: plugins/check_mrtg.c:355 +msgid "status is returned and a warning message is printed." +msgstr "" + +#: plugins/check_mrtg.c:357 +msgid "" +"This plugin is useful for monitoring MRTG data that does not correspond to" +msgstr "" + +#: plugins/check_mrtg.c:358 +msgid "" +"bandwidth usage. (Use the check_mrtgtraf plugin for monitoring bandwidth)." +msgstr "" + +#: plugins/check_mrtg.c:359 +msgid "" +"It can be used to monitor any kind of data that MRTG is monitoring - errors," +msgstr "" + +#: plugins/check_mrtg.c:360 +msgid "" +"packets/sec, etc. I use MRTG in conjuction with the Novell NLM that allows" +msgstr "" + +#: plugins/check_mrtg.c:361 +msgid "" +"me to track processor utilization, user connections, drive space, etc and" +msgstr "" + +#: plugins/check_mrtg.c:362 +msgid "this plugin works well for monitoring that kind of data as well." +msgstr "" + +#: plugins/check_mrtg.c:365 +msgid "" +"- This plugin only monitors one of the two variables stored in the MRTG log" +msgstr "" +"- Ce plugin vérifie seulement une ou deux variables écrites dans un fichier " +"de log MRTG" + +#: plugins/check_mrtg.c:366 +msgid " file. If you want to monitor both values you will have to define two" +msgstr "" + +#: plugins/check_mrtg.c:367 +msgid "" +" commands with different values for the argument. Of course," +msgstr "" + +#: plugins/check_mrtg.c:368 +msgid "you can always hack the code to make this plugin work for you..." +msgstr "" + +#: plugins/check_mrtg.c:369 +msgid "" +"- MRTG stands for the Multi Router Traffic Grapher. It can be downloaded " +"from" +msgstr "" + +#: plugins/check_mrtgtraf.c:88 msgid "Unable to open MRTG log file" msgstr "Impossible d'ouvrir le fichier de log de MRTG" -#: plugins/check_mrtgtraf.c:113 +#: plugins/check_mrtgtraf.c:130 msgid "Unable to process MRTG log file" msgstr "Impossible de traiter le fichier de log de MRTG" -#: plugins/check_mrtgtraf.c:177 +#: plugins/check_mrtgtraf.c:194 #, c-format msgid "%s. In = %0.1f %s, %s. Out = %0.1f %s|%s %s\n" msgstr "%s. Entrée = %0.1f %s, %s. Sortie = %0.1f %s|%s %s\n" -#: plugins/check_mrtgtraf.c:190 +#: plugins/check_mrtgtraf.c:207 #, c-format msgid "Traffic %s - %s\n" msgstr "Trafic %s - %s\n" -#: plugins/check_mrtgtraf.c:320 -#, c-format +#: plugins/check_mrtgtraf.c:337 msgid "" -"\n" -"This plugin will check the incoming/outgoing transfer rates of a router,\n" -"switch, etc recorded in an MRTG log. If the newest log entry is older\n" -"than , a WARNING status is returned. If either the\n" -"incoming or outgoing rates exceed the or thresholds (in\n" -"Bytes/sec), a CRITICAL status results. If either of the rates exceed\n" -"the or thresholds (in Bytes/sec), a WARNING status results.\n" -"\n" +"This plugin will check the incoming/outgoing transfer rates of a router," msgstr "" -"\n" -"Ce plugin va surveiller le taux de transfert en entrée/sortie d'un routeur,\n" -"switch, etc enregistré dans un fichier de log MRTG. Si la nouvelle entrée " -"est\n" -"plus vieille que , un résultat AVERTISSEMENT est renvoyé. Si " -"le\n" -"taux d'entrée ou le taux de sortie dépasse le seuil indiqué dans ou " -"\n" -"(en Bytes/sec), un résultat CRITIQUE est renvoyé. Si le taux d'entrée ou\n" -"le taux de sortie dépasse le seuil indiqué dans ou (en Bytes/" -"sec),\n" -"un résultat AVERTISSEMENT est renvoyé.\n" -"\n" +"Ce plugin va vérifier le taux de transfert en entrée/sortie d'un routeur," -#: plugins/check_mrtgtraf.c:332 -#, c-format +#: plugins/check_mrtgtraf.c:338 +msgid "switch, etc recorded in an MRTG log. If the newest log entry is older" +msgstr "" + +#: plugins/check_mrtgtraf.c:339 +msgid "than , a WARNING status is returned. If either the" +msgstr "" + +#: plugins/check_mrtgtraf.c:340 +msgid "incoming or outgoing rates exceed the or thresholds (in" +msgstr "" + +#: plugins/check_mrtgtraf.c:341 +msgid "Bytes/sec), a CRITICAL status results. If either of the rates exceed" +msgstr "" + +#: plugins/check_mrtgtraf.c:342 +msgid "the or thresholds (in Bytes/sec), a WARNING status results." +msgstr "" + +#: plugins/check_mrtgtraf.c:351 +msgid "File to read log from" +msgstr "" + +#: plugins/check_mrtgtraf.c:353 +msgid "Minutes after which log expires" +msgstr "" + +#: plugins/check_mrtgtraf.c:355 +msgid "Test average or maximum" +msgstr "" + +#: plugins/check_mrtgtraf.c:357 +#, fuzzy +msgid "Warning threshold pair ," +msgstr "Valeurs pour le seuil d'avertissement" + +#: plugins/check_mrtgtraf.c:359 +#, fuzzy +msgid "Critical threshold pair ," +msgstr "Valeurs pour le seuil critique" + +#: plugins/check_mrtgtraf.c:362 msgid "" -" -F, --filename=STRING\n" -" File to read log from\n" -" -e, --expires=INTEGER\n" -" Minutes after which log expires\n" -" -a, --aggregation=(AVG|MAX)\n" -" Test average or maximum\n" -" -w, --warning\n" -" Warning threshold pair \",\"\n" -" -c, --critical\n" -" Critical threshold pair \",\"\n" +"- MRTG stands for Multi Router Traffic Grapher. It can be downloaded from" msgstr "" -" -F, --filename=STRING\n" -" Fichier contenant les logs\n" -" -e, --expires=INTEGER\n" -" Le nombres de minutes après lesquelle le fichier de log expire\n" -" -a, --aggregation=(AVG|MAX)\n" -" Teste la moyenne ou le maximum\n" -" -w, --warning\n" -" Seuil d'avertissement \",\"\n" -" -c, --critical\n" -" Seuil critique \",\"\n" -#: plugins/check_mrtgtraf.c:344 +#: plugins/check_mrtgtraf.c:364 +msgid "- While MRTG can monitor things other than traffic rates, this" +msgstr "" + +#: plugins/check_mrtgtraf.c:365 +msgid " plugin probably won't work with much else without modification." +msgstr "" + +#: plugins/check_mrtgtraf.c:366 +msgid "- The calculated i/o rates are a little off from what MRTG actually" +msgstr "" + +#: plugins/check_mrtgtraf.c:367 +msgid " reports. I'm not sure why this is right now, but will look into it" +msgstr "" + +#: plugins/check_mrtgtraf.c:368 +msgid " for future enhancements of this plugin." +msgstr "" + +#: plugins/check_mrtgtraf.c:378 #, c-format -msgid "" -"Notes:\n" -"- MRTG stands for Multi Router Traffic Grapher. It can be downloaded from\n" -" http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html\n" -"- While MRTG can monitor things other than traffic rates, this\n" -" plugin probably won't work with much else without modification.\n" -"- The calculated i/o rates are a little off from what MRTG actually\n" -" reports. I'm not sure why this is right now, but will look into it\n" -" for future enhancements of this plugin.\n" -msgstr "" -"Notes:\n" -"- MRTG signifie Multi Router Traffic Grapher. Il peut être téléchargé " -"depuis\n" -" http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html\n" -"- Alors que MTRG peut surveiller d'autres types de trafic, ce plugin ne\n" -" marchera pas sur d'autres types sans modification.\n" -"- Les taux de transferts calculés sont légèrement différents de ce que MRTG\n" -" rapporte. Je ne suis pas sur que ce soit juste, je regarderait lors des " -"futures\n" -" améliorations de ce plugin.\n" +msgid "Usage" +msgstr "Utilisation" -#: plugins/check_mysql.c:106 +#: plugins/check_mysql.c:129 #, c-format msgid "slave query error: %s\n" msgstr "erreur de requête de l'esclave: %s\n" -#: plugins/check_mysql.c:113 +#: plugins/check_mysql.c:136 #, c-format msgid "slave store_result error: %s\n" msgstr "erreur slave store_result: %s\n" -#: plugins/check_mysql.c:119 +#: plugins/check_mysql.c:142 msgid "No slaves defined" msgstr "Pas d'esclave spécifié" -#: plugins/check_mysql.c:127 +#: plugins/check_mysql.c:150 #, c-format msgid "slave fetch row error: %s\n" msgstr "erreur esclave lecture d'une ligne: %s\n" -#: plugins/check_mysql.c:132 +#: plugins/check_mysql.c:155 #, c-format msgid "Slave running: %s" msgstr "L'esclave fonctionne: %s" -#: plugins/check_mysql.c:350 -#, c-format -msgid "This program tests connections to a mysql server\n" -msgstr "Ce plugin teste une connexion vers un serveur mysql\n" +#: plugins/check_mysql.c:373 +msgid "This program tests connections to a mysql server" +msgstr "Ce plugin teste une connexion vers un serveur mysql" -#: plugins/check_mysql.c:358 -#, c-format -msgid "" -" -d, --database=STRING\n" -" Check database with indicated name\n" -" -u, --username=STRING\n" -" Connect using the indicated username\n" -" -p, --password=STRING\n" -" Use the indicated password to authenticate the connection\n" -" ==> IMPORTANT: THIS FORM OF AUTHENTICATION IS NOT SECURE!!! <==\n" -" Your clear-text password will be visible as a process table entry\n" -" -S, --check-slave\n" -" Check if the slave thread is running properly.\n" -" -w, --warning\n" -" Exit with WARNING status if slave server is more then INTEGER seconds " -"behind master\n" -" -c, --critical\n" -" Exit with CRITICAL status if slave server is more then INTEGER seconds " -"behind master\n" +#: plugins/check_mysql.c:384 +msgid "Check database with indicated name" msgstr "" -" -d, --database=STRING\n" -" Vérifie la base de données indiqué\n" -" -u, --username=STRING\n" -" Connexion avec le nom indiqué\n" -" -p, --password=STRING\n" -" Utilise le mot de passe indique pour se connecter authentifier la " -"connexion\n" -" ==> CETTE FORME D'AUTHENTIFICATION N'EST PAS SURE!!! <==\n" -" Votre mot de passe non crypté sera visible dans la liste des processus\n" -" -S, --check-slave\n" -" Vérifier si le processus esclave fonctionne correctement.\n" -" -w, --warning\n" -" s'arrêter avec un seuil d'alerte AVERTISSEMENT si l'esclave à plus de X " -"secondes d'écart du maître\n" -" -c, --critical\n" -" s'arrêter avec un seuil d'alerte CRITIQUE si l'esclave à plus de X " -"secondes d'écart du maître\n" -#: plugins/check_mysql.c:374 -#, c-format -msgid "" -"\n" -"There are no required arguments. By default, the local database with\n" -"a server listening on MySQL standard port %d will be checked\n" +#: plugins/check_mysql.c:386 +msgid "Connect using the indicated username" msgstr "" -"\n" -"Il n'y a pas d'arguments nécessaires. Par défaut la base de donnée locale\n" -"avec un serveur MySQL écoutant sur le port %d sera vérifiée\n" -#: plugins/check_nagios.c:88 +#: plugins/check_mysql.c:388 +msgid "Use the indicated password to authenticate the connection" +msgstr "" + +#: plugins/check_mysql.c:389 +msgid "==> IMPORTANT: THIS FORM OF AUTHENTICATION IS NOT SECURE!!! <==" +msgstr "" + +#: plugins/check_mysql.c:390 +msgid "Your clear-text password will be visible as a process table entry" +msgstr "" + +#: plugins/check_mysql.c:392 +msgid "Check if the slave thread is running properly." +msgstr "" + +#: plugins/check_mysql.c:394 +#, fuzzy +msgid "" +"Exit with WARNING status if slave server is more then INTEGER seconds behind " +"master" +msgstr "" +"Sortir avec un résultat AVERTISSEMENT si moins de x unités de disques sont " +"libres" + +#: plugins/check_mysql.c:396 +#, fuzzy +msgid "" +"Exit with CRITICAL status if slave server is more then INTEGER seconds " +"behind master" +msgstr "" +"Sortir avec un résultat CRITIQUE si moins de x unités du disque sont libres" + +#: plugins/check_mysql.c:397 +msgid "There are no required arguments. By default, the local database with" +msgstr "" +"Il n'y a pas d'arguments nécessaires. Par défaut la base de donnée locale" + +#: plugins/check_mysql.c:398 +#, c-format +msgid "a server listening on MySQL standard port %d will be checked\n" +msgstr "avec un serveur MySQL écoutant sur le port %d sera vérifiée\n" + +#: plugins/check_nagios.c:107 msgid "Cannot open status log for reading!" msgstr "Impossible d'ouvrir le fichier status log en lecture!" -#: plugins/check_nagios.c:138 +#: plugins/check_nagios.c:157 #, c-format msgid "Found process: %s %s\n" msgstr "Processus trouvé: %s %s\n" -#: plugins/check_nagios.c:152 +#: plugins/check_nagios.c:171 msgid "Could not locate a running Nagios process!" msgstr "Impossible de trouver un processus Nagios actif!" -#: plugins/check_nagios.c:156 +#: plugins/check_nagios.c:175 msgid "Cannot parse Nagios log file for valid time" msgstr "" "Impossible de trouver une date/heure valide dans le fichier de log de Nagios" -#: plugins/check_nagios.c:167 plugins/check_procs.c:295 +#: plugins/check_nagios.c:186 plugins/check_procs.c:307 #, c-format msgid "%d process" msgid_plural "%d processes" msgstr[0] "%d processus" msgstr[1] "%d processus" -#: plugins/check_nagios.c:170 +#: plugins/check_nagios.c:189 #, c-format msgid "status log updated %d second ago" msgid_plural "status log updated %d seconds ago" msgstr[0] "status log mis à jour %d secondes auparavant" msgstr[1] "status log mis à jour %d secondes auparavant" -#: plugins/check_nagios.c:207 plugins/check_nagios.c:236 +#: plugins/check_nagios.c:226 plugins/check_nagios.c:255 msgid "Expiration time must be an integer (seconds)\n" msgstr "Le délai d'expiration doit être un entier (en secondes)\n" -#: plugins/check_nagios.c:248 +#: plugins/check_nagios.c:267 msgid "You must provide the status_log\n" msgstr "Vous devez fournir le status_log\n" -#: plugins/check_nagios.c:251 +#: plugins/check_nagios.c:270 msgid "You must provide a process string\n" msgstr "Vous devez fournir un nom de processus\n" -#: plugins/check_nagios.c:265 -#, c-format +#: plugins/check_nagios.c:284 +#, fuzzy msgid "" -"This plugin checks the status of the Nagios process on the local\n" -"machine. The plugin will check to make sure the Nagios status log is no " -"older\n" -"than the number of minutes specified by the expires option. It also\n" -"checks the process table for a process matching the command argument.\n" -"\n" -msgstr "" -"Ce plugin essaye de vérifier l'état des processus Nagios sur la machine " -"locale.\n" -"Le plugin vérifiera si le status log de Nagios n'est pas plus vieux que le \n" -"nombre de minutes spécifiées par l'option expires. Il utilise la table des \n" -"processus pour vérifier un processus dont le nom est donné par l'option \n" -"commande.\n" -"\n" +"This plugin checks the status of the Nagios process on the local machine" +msgstr "Ce plugin vérifie la place utilisé sur un système de fichier monté" -#: plugins/check_nagios.c:275 -#, c-format +#: plugins/check_nagios.c:285 msgid "" -" -F, --filename=FILE\n" -" Name of the log file to check\n" -" -e, --expires=INTEGER\n" -" Minutes aging after which logfile is considered stale\n" -" -C, --command=STRING\n" -" Substring to search for in process arguments\n" -msgstr "" -"-F, --filename=FILE\n" -" Nom du fichier de log à vérifier\n" -"-e, --expires=INTEGER\n" -" Nombre de minutes après lesquelles le fichier de log est considère trop " -"ancien\n" -"-C, --command=STRING\n" -" Commande à chercher dans la table des processus\n" +"The plugin will check to make sure the Nagios status log is no older than" +msgstr "Ce plugin vérifie que le status log de Nagios n'est pas plus vieux que" -#: plugins/check_nagios.c:283 -#, c-format +#: plugins/check_nagios.c:286 +msgid "the number of minutes specified by the expires option." +msgstr "le nombre de minutes spécifies par l'option expire." + +#: plugins/check_nagios.c:287 msgid "" -"Example:\n" -" ./check_nagios -e 5 -F /usr/local/nagios/var/status.log -C /usr/local/" -"nagios/bin/nagios\n" +"It also checks the process table for a process matching the command argument." msgstr "" -"Exemple:\n" -" ./check_nagios -e 5 \\ -F /usr/local/nagios/var/status.log \\ -C /usr/" -"local/nagios/bin/nagios\n" -#: plugins/check_nt.c:135 +#: plugins/check_nagios.c:296 +msgid "Name of the log file to check" +msgstr "Nom du fichier log à vérifier" + +#: plugins/check_nagios.c:298 +msgid "Minutes aging after which logfile is considered stale" +msgstr "" + +#: plugins/check_nagios.c:300 +msgid "Substring to search for in process arguments" +msgstr "" + +#: plugins/check_nt.c:141 #, c-format msgid "Wrong client version - running: %s, required: %s" msgstr "Mauvaise version du client utilisée: %s, nécessaire: %s" -#: plugins/check_nt.c:146 plugins/check_nt.c:206 +#: plugins/check_nt.c:152 plugins/check_nt.c:212 msgid "missing -l parameters" msgstr "Arguments -l manquants" -#: plugins/check_nt.c:148 +#: plugins/check_nt.c:154 msgid "wrong -l parameter." msgstr "Arguments -l erronés." -#: plugins/check_nt.c:152 +#: plugins/check_nt.c:158 msgid "CPU Load" msgstr "Charge CPU" -#: plugins/check_nt.c:175 +#: plugins/check_nt.c:181 #, c-format msgid " %lu%% (%lu min average)" msgstr " %lu%% (%lu moyenne minimale)" -#: plugins/check_nt.c:177 +#: plugins/check_nt.c:183 #, c-format msgid " '%lu min avg Load'=%lu%%;%lu;%lu;0;100" msgstr " '%lu Charge moyenne minimale'=%lu%%;%lu;%lu;0;100" -#: plugins/check_nt.c:187 +#: plugins/check_nt.c:193 msgid "not enough values for -l parameters" msgstr "pas assez de valeur pour l'argument -l" -#: plugins/check_nt.c:199 +#: plugins/check_nt.c:205 #, c-format msgid "System Uptime - %u day(s) %u hour(s) %u minute(s)" msgstr "Système démarré - %u jour(s) %u heure(s) %u minute(s)" -#: plugins/check_nt.c:208 +#: plugins/check_nt.c:214 msgid "wrong -l argument" msgstr "Argument -l erroné" -#: plugins/check_nt.c:219 +#: plugins/check_nt.c:225 #, c-format msgid "%s:\\ - total: %.2f Gb - used: %.2f Gb (%.0f%%) - free %.2f Gb (%.0f%%)" msgstr "" "%s:\\ - total: %.2f Gb - utilisé: %.2f Gb (%.0f%%) - libre %.2f Gb (%.0f%%)" -#: plugins/check_nt.c:222 +#: plugins/check_nt.c:228 #, c-format msgid "'%s:\\ Used Space'=%.2fGb;%.2f;%.2f;0.00;%.2f" msgstr "'%s:\\ Espace Utilisé'=%.2fGb;%.2f;%.2f;0.00;%.2f" -#: plugins/check_nt.c:236 +#: plugins/check_nt.c:242 msgid "Free disk space : Invalid drive " msgstr "Espace disque libre : Lecteur invalide " -#: plugins/check_nt.c:246 +#: plugins/check_nt.c:252 msgid "No service/process specified" msgstr "Pas de service/processus spécifié" -#: plugins/check_nt.c:270 +#: plugins/check_nt.c:276 #, c-format msgid "" "Memory usage: total:%.2f Mb - used: %.2f Mb (%.0f%%) - free: %.2f Mb (%.0f%%)" @@ -2098,1203 +1997,1360 @@ msgstr "" "Mémoire utilisée: total:%.2f Mb - utilisée: %.2f Mb (%.0f%%) - libre: %.2f " "Mb (%.0f%%)" -#: plugins/check_nt.c:273 +#: plugins/check_nt.c:279 #, c-format msgid "'Memory usage'=%.2fMb;%.2f;%.2f;0.00;%.2f" msgstr "'Mémoire utilisée'=%.2fMb;%.2f;%.2f;0.00;%.2f" -#: plugins/check_nt.c:309 plugins/check_nt.c:395 +#: plugins/check_nt.c:315 plugins/check_nt.c:401 msgid "No counter specified" msgstr "Pas de compteur spécifié" -#: plugins/check_nt.c:342 +#: plugins/check_nt.c:348 msgid "Minimum value contains non-numbers" msgstr "La valeur minimum contient des caractères non numériques" -#: plugins/check_nt.c:346 +#: plugins/check_nt.c:352 msgid "Maximum value contains non-numbers" msgstr "La valeur maximum contient des caractères non numériques" -#: plugins/check_nt.c:353 +#: plugins/check_nt.c:359 msgid "No unit counter specified" msgstr "Pas de compteur spécifié" -#: plugins/check_nt.c:425 +#: plugins/check_nt.c:431 msgid "Please specify a variable to check" msgstr "Veuillez préciser une variable a vérifier" -#: plugins/check_nt.c:507 +#: plugins/check_nt.c:513 msgid "Server port must be an integer\n" msgstr "Le port du serveur doit être un nombre entier\n" -#: plugins/check_nt.c:560 +#: plugins/check_nt.c:566 msgid "None" msgstr "Aucun" -#: plugins/check_nt.c:573 +#: plugins/check_nt.c:579 msgid "could not fetch information from server\n" msgstr "Impossible d'obtenir l'information depuis le serveur\n" -#: plugins/check_nt.c:617 -#, c-format -msgid "" -"This plugin collects data from the NSClient service running on a\n" -"Windows NT/2000/XP/2003 server.\n" -"\n" +#: plugins/check_nt.c:623 +msgid "This plugin collects data from the NSClient service running on a" msgstr "" -"Ce plugin collecte les données depuis le service NSClient tournant sur un\n" -"serveur Windows NT/2000/XP.\n" -"\n" +"Ce plugin collecte les données depuis le service NSClient tournant sur un" -#: plugins/check_nt.c:622 -#, c-format -msgid "" -"\n" -"Options:\n" -"-H, --hostname=HOST\n" -" Name of the host to check\n" -"-p, --port=INTEGER\n" -" Optional port number (default: %d)\n" -"-s \n" -" Password needed for the request\n" -"-w, --warning=INTEGER\n" -" Threshold which will result in a warning status\n" -"-c, --critical=INTEGER\n" -" Threshold which will result in a critical status\n" -"-t, --timeout=INTEGER\n" -" Seconds before connection attempt times out (default: %d)\n" -"-h, --help\n" -" Print this help screen\n" -"-V, --version\n" -" Print version information\n" -msgstr "" -"\n" -"Options:\n" -"-H, --hostname=HOST\n" -" Nom de l'hôte à vérifier\n" -"-p, --port=INTEGER\n" -" Numéro de port optionnel (défaut: %d)\n" -"-s \n" -" Mot de passe nécessaire pour la requête\n" -"-w, --warning=INTEGER\n" -" Seuil qui donnera un résultat AVERTISSEMENT\n" -"-c, --critical=INTEGER\n" -" Seuil qui donnera un résultat CRITIQUE\n" -"-t, --timeout=INTEGER\n" -" Nombre de secondes avant le délai d'expiration de la connexion (défaut: %" -"d)\n" -"-h, --help\n" -" Afficher l'aide\n" -"-V, --version\n" -" Afficher le numéro de version\n" +#: plugins/check_nt.c:624 +msgid "Windows NT/2000/XP/2003 server." +msgstr "Serveur Windows NT/2000/XP/2003." -#: plugins/check_nt.c:640 -#, c-format -msgid "" -"-v, --variable=STRING\n" -" Variable to check. Valid variables are:\n" +#: plugins/check_nt.c:632 +msgid "Options:" msgstr "" -"-v, --variable=STRING\n" -" Variable à vérifier. Les variables valides sont:\n" -#: plugins/check_nt.c:643 -#, c-format -msgid "" -" CLIENTVERSION = Get the NSClient version\n" -" If -l is specified, will return warning if versions differ.\n" -msgstr "" -" CLIENTVERSION = Obtenir la version de NSClient\n" -" si l'argument -l est spécifié, une alerte AVERTISSEMENT sera " -"renvoyée,\n" -"si les versions sont différentes.\n" +#: plugins/check_nt.c:634 +msgid "Name of the host to check" +msgstr "Nom de l'hôte à vérifier" -#: plugins/check_nt.c:646 -#, c-format -msgid "" -" CPULOAD = Average CPU load on last x minutes.\n" -" Request a -l parameter with the following syntax:\n" -" -l ,,.\n" -" should be less than 24*60.\n" -" Thresholds are percentage and up to 10 requests can be done in one " -"shot.\n" -" ie: -l 60,90,95,120,90,95\n" +#: plugins/check_nt.c:636 +msgid "Optional port number (default: " +msgstr "Numéro de port optionnel (défaut: " + +#: plugins/check_nt.c:639 +msgid "Password needed for the request" +msgstr "Mot de passe nécessaire pour la requête" + +#: plugins/check_nt.c:641 plugins/check_nwstat.c:1664 +#: plugins/check_overcr.c:435 +msgid "Threshold which will result in a warning status" msgstr "" -" CPULOAD = Charge CPU sur les x minutes.\n" -" Un paramètre -l est nécessaire avec la syntaxe suivante:\n" -" -l <écarts en minutes>,,.\n" -" <> doit être plus petit que 24*60.\n" -" Les seuils sont des pourcentages et jusqu'à 10 requêtes peuvent être " -"faites en une fois.\n" -" ex: -l 60,90,95,120,90,95\n" + +#: plugins/check_nt.c:643 plugins/check_nwstat.c:1666 +#: plugins/check_overcr.c:437 +msgid "Threshold which will result in a critical status" +msgstr "" + +#: plugins/check_nt.c:645 +msgid "Seconds before connection attempt times out (default: " +msgstr "" + +#: plugins/check_nt.c:648 +msgid "Print this help screen" +msgstr "Afficher l'écran d'aide" + +#: plugins/check_nt.c:650 +msgid "Print version information" +msgstr "Afficher la version" + +#: plugins/check_nt.c:652 +msgid "Variable to check" +msgstr "Variable a vérifier" #: plugins/check_nt.c:653 -#, c-format -msgid "" -" UPTIME = Get the uptime of the machine.\n" -" No specific parameters. No warning or critical threshold\n" -msgstr "" -" UPTIME = Obtenir la durée de fonctionnement de la machine.\n" -" Pas d'argument spécifique. Pas de seuil d'avertissement ou critique\n" +msgid "Valid variables are:" +msgstr "Les variables valides sont" + +#: plugins/check_nt.c:655 +msgid "Get the NSClient version" +msgstr "Obtenir la version de NSClient" #: plugins/check_nt.c:656 -#, c-format -msgid "" -" USEDDISKSPACE = Size and percentage of disk use.\n" -" Request a -l parameter containing the drive letter only.\n" -" Warning and critical thresholds can be specified with -w and -c.\n" +msgid "If -l is specified, will return warning if versions differ." +msgstr "" +"si l'argument -l est spécifié, une alerte AVERTISSEMENT sera " +"renvoyée, si les versions sont différentes." + +#: plugins/check_nt.c:658 +msgid "Average CPU load on last x minutes." +msgstr "Moyenne de la charge CPU sur les dernières x minutes." + +#: plugins/check_nt.c:659 +msgid "Request a -l parameter with the following syntax:" msgstr "" -" USEDDISKSPACE = Taille et pourcentage du disque utilisé.\n" -" Nécessite un paramètres -l contenant la lettre du lecteur seulement.\n" -" Les seuils d'avertissements et critiques peuvent être spécifiés avec -w " -"et -c.\n" #: plugins/check_nt.c:660 -#, c-format -msgid "" -" MEMUSE = Memory use.\n" -" Warning and critical thresholds can be specified with -w and -c.\n" +msgid "-l ,,." msgstr "" -" MEMUSE = Utilisation mémoire.\n" -" Les seuil d'alerte et critiques peuvent être spécifiés avec -w et -c.\n" -#: plugins/check_nt.c:663 -#, c-format -msgid "" -" SERVICESTATE = Check the state of one or several services.\n" -" Request a -l parameters with the following syntax:\n" -" -l ,,,...\n" -" You can specify -d SHOWALL in case you want to see working services\n" -"\t\t in the returned string.\n" +#: plugins/check_nt.c:661 +msgid " should be less than 24*60." msgstr "" -" SERVICESTATE = Vérifié l'état d'un ou de plusieurs services.\n" -" Nécessite un paramètre -l avec la syntaxe suivante:\n" -" -l ,,,...\n" -" Vous pouvez spécifier -d SHOWALL pour voir les services qui " -"fonctionnent\n" -"\t\t dans la réponse.\n" + +#: plugins/check_nt.c:662 +msgid "" +"Thresholds are percentage and up to 10 requests can be done in one shot." +msgstr "" + +#: plugins/check_nt.c:665 +msgid "Get the uptime of the machine." +msgstr "" + +#: plugins/check_nt.c:666 +msgid "No specific parameters. No warning or critical threshold" +msgstr "Pas d'argument spécifique. Pas de seuil d'avertissement ou critique" + +#: plugins/check_nt.c:668 +msgid "Size and percentage of disk use." +msgstr "Taille et pourcentage de l'utilisation disque." #: plugins/check_nt.c:669 -#, c-format -msgid "" -" PROCSTATE = Check if one or several process are running.\n" -" Same syntax as SERVICESTATE.\n" +msgid "Request a -l parameter containing the drive letter only." msgstr "" -" PROCSTATE = Vérifie si un ou plusieurs processus sont démarrés.\n" -" même syntaxe que SERVICESTATE.\n" + +#: plugins/check_nt.c:670 plugins/check_nt.c:673 +msgid "Warning and critical thresholds can be specified with -w and -c." +msgstr "Les seuil d'alerte et critiques peuvent être spécifiés avec -w et -c." #: plugins/check_nt.c:672 -#, c-format -msgid "" -" COUNTER = Check any performance counter of Windows NT/2000.\n" -" Request a -l parameters with the following syntax:\n" -"\t\t -l \"\\\\\\\\counter\",\"\n" -" The parameter is optional and \n" -" is given to a printf output command which requires a float parameter.\n" -" If does not include \"%%\", it is used as a label.\n" -" Some examples:\n" -" \"Paging file usage is %%.2f %%%%\"\n" -" \"%%.f %%%% paging file used.\"\n" +msgid "Memory use." +msgstr "Mémoire utilisée." + +#: plugins/check_nt.c:675 +msgid "Check the state of one or several services." +msgstr "Vérifier l'état d'un ou plusieurs services." + +#: plugins/check_nt.c:676 plugins/check_nt.c:685 +msgid "Request a -l parameters with the following syntax:" msgstr "" -" COUNTER = Vérifie les compteurs de performance de Windows NT/2000.\n" -" Nécessite un paramètre -l avec la syntaxe suivante:\n" -"\t\t -l \"\\\\\\\\counter\",\"\n" -" Le paramètre est optionnel et \n" -" le résultat est donné a une commande printf qui à besoin d'un nombre " -"flottant.\n" -" Si n'inclus pas \"%%\", il est utilisé comme un titre.\n" -" Des exemples:\n" -" \"Paging file usage is %%.2f %%%%\"\n" -" \"%%.f %%%% paging file used.\"\n" + +#: plugins/check_nt.c:677 +msgid "-l ,,,..." +msgstr "" + +#: plugins/check_nt.c:678 +msgid "You can specify -d SHOWALL in case you want to see working services" +msgstr "" + +#: plugins/check_nt.c:679 +msgid "in the returned string." +msgstr "dans la chaîne de caractère renvoyée." + +#: plugins/check_nt.c:681 +msgid "Check if one or several process are running." +msgstr "Vérifie si un ou plusieurs processus sont démarrés." #: plugins/check_nt.c:682 -#, c-format -msgid "" -"Notes:\n" -" - The NSClient service should be running on the server to get any " -"information\n" -" (http://nsclient.ready2run.nl).\n" -" - Critical thresholds should be lower than warning thresholds\n" -msgstr "" -"Notes:\n" -" - Le service NSClient doit tourner sur le serveur à surveiller pour obtenir " -"des informations\n" -" (http://nsclient.ready2run.nl).\n" -" - Les seuil critiques doivent être plus bas que les seuils d'alertes\n" +msgid "Same syntax as SERVICESTATE." +msgstr "Même syntaxe que SERVICESTATE." -#: plugins/check_nwstat.c:146 +#: plugins/check_nt.c:684 +msgid "Check any performance counter of Windows NT/2000." +msgstr "Vérifier n'importe quel compteur de performance sur WIndows NT/2000." + +#: plugins/check_nt.c:686 +msgid "-l \"\\\\\\\\counter\",\"" +msgstr "" + +#: plugins/check_nt.c:687 +msgid "The parameter is optional and is given to a printf " +msgstr "" + +#: plugins/check_nt.c:688 +msgid "output command which requires a float parameter." +msgstr "" + +#: plugins/check_nt.c:689 +#, c-format +msgid "If does not include \"%%\", it is used as a label." +msgstr "" + +#: plugins/check_nt.c:690 +msgid "Some examples:" +msgstr "Exemples:" + +#: plugins/check_nt.c:694 +msgid "" +"- The NSClient service should be running on the server to get any information" +msgstr "" +"- Le service NSClient doit être exécuté sur le serveur pour obtenir les " +"informations" + +#: plugins/check_nt.c:696 +msgid "- Critical thresholds should be lower than warning thresholds" +msgstr "" + +#: plugins/check_nt.c:697 +msgid "- Default port 1248 is sometimes in use by other services. The error" +msgstr "" +"- Le port par défaut 1248 est de temps en temps utilisé par d'autres " +"services. L'erreur" + +#: plugins/check_nt.c:698 +msgid "" +"output when this happens contains \"Cannot map xxxxx to protocol number\"." +msgstr "" + +#: plugins/check_nt.c:699 +msgid "One fix for this is to change the port to something else on check_nt " +msgstr "" +"Une possibilité pour corriger ce problème est de changer le port dans " +"check_nt " + +#: plugins/check_nt.c:700 +msgid "and on the client service it's connecting to." +msgstr "et dans le service auquel il se connecte." + +#: plugins/check_ntp.c:720 +msgid "Critical offset should be larger than warning offset" +msgstr "" +"Le décalage critique devrait être plus large que le décalage d'avertissement" + +#: plugins/check_ntp.c:724 +msgid "Critical jitter should be larger than warning jitter" +msgstr "" +"La variation critique devrait être plus large que la variation " +"d'avertissement" + +#: plugins/check_ntp.c:810 +msgid "Offset unknown" +msgstr "Décalage inconnu" + +#: plugins/check_ntp.c:813 +msgid "Unable to fully sample sync server" +msgstr "Échantionage incomplet" + +#: plugins/check_ntp.c:836 +msgid "This plugin checks the selected ntp server" +msgstr "Ce plugin vérifie le service ntp sur l'hôte" + +#: plugins/check_ntp.c:844 +msgid "Offset to result in warning status (seconds)" +msgstr "Décalage résultant un avertissement (secondes)" + +#: plugins/check_ntp.c:846 +msgid "Offset to result in critical status (seconds)" +msgstr "Décalage résultant un état critique (secondes)" + +#: plugins/check_ntp.c:848 +msgid "Warning value for jitter" +msgstr "Valeur d'avertissement pour la variation (jitter)" + +#: plugins/check_ntp.c:850 +msgid "Critical value for jitter" +msgstr "Valeur critique pour la variation (jitter)" + +#: plugins/check_nwstat.c:198 #, c-format msgid "NetWare %s: " msgstr "NetWare %s: " -#: plugins/check_nwstat.c:184 +#: plugins/check_nwstat.c:236 #, c-format msgid "Up %s," msgstr "Démarré %s," -#: plugins/check_nwstat.c:192 +#: plugins/check_nwstat.c:244 #, c-format -msgid "Load %s - %s %s-min load average = %lu%%" -msgstr "Charge %s - %s %s charge système minimale = %lu%%" +msgid "Load %s - %s %s-min load average = %lu%%|load%s=%lu;%lu;%lu;0;100" +msgstr "" +"Charge %s - %s %s charge système minimale = %lu%%|charge%s=%lu;%lu;%lu;0;100" -#: plugins/check_nwstat.c:216 +#: plugins/check_nwstat.c:272 #, c-format -msgid "Conns %s - %lu current connections" -msgstr "Conns %s - %lu connections actuelles" +msgid "Conns %s - %lu current connections|Conns=%lu;%lu;%lu;;" +msgstr "Conns %s - %lu connections actuelles|Conns=%lu;%lu;%lu;;" -#: plugins/check_nwstat.c:238 +#: plugins/check_nwstat.c:297 #, c-format msgid "%s: Long term cache hits = %lu%%" msgstr "%s: Accès cache longue durée = %lu%%" -#: plugins/check_nwstat.c:260 +#: plugins/check_nwstat.c:319 #, c-format -msgid "%s: Total cache buffers = %lu" -msgstr "%s: Total des caches tampons= %lu" +msgid "%s: Total cache buffers = %lu|Cachebuffers=%lu;%lu;%lu;;" +msgstr "%s: Total des caches tampons= %lu|Caches Tampons=%lu,%lu;%lu;;" -#: plugins/check_nwstat.c:282 +#: plugins/check_nwstat.c:344 #, c-format -msgid "%s: Dirty cache buffers = %lu" -msgstr "%s: cache tampons sales = %lu" +msgid "%s: Dirty cache buffers = %lu|Dirty-Cache-Buffers=%lu;%lu;%lu;;" +msgstr "%s: cache tampons sales = %lu|caches tampons sales=%lu;%lu;%lu;;" -#: plugins/check_nwstat.c:304 +#: plugins/check_nwstat.c:369 #, c-format msgid "%s: LRU sitting time = %lu minutes" msgstr "" -#: plugins/check_nwstat.c:321 plugins/check_nwstat.c:349 -#: plugins/check_nwstat.c:494 plugins/check_nwstat.c:518 -#: plugins/check_nwstat.c:556 plugins/check_nwstat.c:580 +#: plugins/check_nwstat.c:386 plugins/check_nwstat.c:414 +#: plugins/check_nwstat.c:441 plugins/check_nwstat.c:474 +#: plugins/check_nwstat.c:654 plugins/check_nwstat.c:680 +#: plugins/check_nwstat.c:711 plugins/check_nwstat.c:757 +#: plugins/check_nwstat.c:781 #, c-format msgid "CRITICAL - Volume '%s' does not exist!" msgstr "CRITIQUE: Le volume '%s' n'existe pas!" -#: plugins/check_nwstat.c:330 +#: plugins/check_nwstat.c:395 #, c-format -msgid "%s%lu KB free on volume %s" -msgstr "%s%lu KB libre sur le volume %s" +msgid "%s%lu KB free on volume %s|KBFree%s=%lu;%lu;%lu;;" +msgstr "%s%lu KB libre sur le volume %s|KB libres%s=%lu;%lu;%lu;;" -#: plugins/check_nwstat.c:331 plugins/check_nwstat.c:502 -#: plugins/check_nwstat.c:564 +#: plugins/check_nwstat.c:396 plugins/check_nwstat.c:424 +#: plugins/check_nwstat.c:451 plugins/check_nwstat.c:663 +#: plugins/check_nwstat.c:689 plugins/check_nwstat.c:765 msgid "Only " msgstr "Seulement" -#: plugins/check_nwstat.c:373 +#: plugins/check_nwstat.c:423 #, c-format -msgid "%lu MB (%lu%%) free on volume %s - total %lu MB" -msgstr "%lu MB (%lu%%) libre sur le volume %s - total %lu MB" +msgid "%s%lu MB free on volume %s|MBFree%s=%lu;%lu;%lu;;" +msgstr "%s%lu MB libre sur le volume %s|MBlibre%s=%lu;%lu;%lu;;" -#: plugins/check_nwstat.c:398 +#: plugins/check_nwstat.c:450 +#, c-format +msgid "%s%lu MB used on volume %s|MBUsed%s=%lu;%lu;%lu;;" +msgstr "" + +#: plugins/check_nwstat.c:498 +#, c-format +msgid "" +"%lu MB (%lu%%) free on volume %s - total %lu MB|FreeMB%s=%lu;%lu;%lu;0;100" +msgstr "" +"%lu MB (%lu%%) libre sur le volume %s - total %lu MB|MBlibre%s=%lu;%lu;%" +"lu;0;100" + +#: plugins/check_nwstat.c:532 #, c-format msgid "Directory Services Database is %s (DS version %s)" msgstr "La base de données Directory Services est %s (DS version %s)" -#: plugins/check_nwstat.c:415 +#: plugins/check_nwstat.c:549 #, c-format msgid "Logins are %s" msgstr "Les logins sont %s" -#: plugins/check_nwstat.c:415 +#: plugins/check_nwstat.c:549 msgid "enabled" msgstr "activé" -#: plugins/check_nwstat.c:415 +#: plugins/check_nwstat.c:549 msgid "disabled" msgstr "désactivé" -#: plugins/check_nwstat.c:454 +#: plugins/check_nwstat.c:564 +msgid "CRITICAL - NRM Status is bad!" +msgstr "CRITIQUE - le statut NRM est mauvais!" + +#: plugins/check_nwstat.c:569 +msgid "Warning - NRM Status is suspect!" +msgstr "" + +#: plugins/check_nwstat.c:572 +msgid "OK - NRM Status is good!" +msgstr "OK - Le status du NRM est bon!" + +#: plugins/check_nwstat.c:614 #, c-format msgid "%lu of %lu (%lu%%) packet receive buffers used" msgstr "%lu de %lu (%lu%%) paquets du tampon de réception utilisés" -#: plugins/check_nwstat.c:478 +#: plugins/check_nwstat.c:638 #, c-format msgid "%lu entries in SAP table" msgstr "%lu entrées dans la table SAP" -#: plugins/check_nwstat.c:480 +#: plugins/check_nwstat.c:640 #, c-format msgid "%lu entries in SAP table for SAP type %d" msgstr "%lu entrées dans la table SAP pour le type SAP %d" -#: plugins/check_nwstat.c:502 +#: plugins/check_nwstat.c:662 #, c-format -msgid "%s%lu KB purgeable on volume %s" -msgstr "%s%lu KB effaçables sur le volume %s" +msgid "%s%lu KB purgeable on volume %s|Purge%s=%lu;%lu;%lu;;" +msgstr "%s%lu KB effaçables sur le volume %s|Purge%s=%lu;%lu;%lu;;" -#: plugins/check_nwstat.c:541 +#: plugins/check_nwstat.c:688 #, c-format -msgid "%lu MB (%lu%%) purgeable on volume %s" -msgstr "%lu MB (%lu%%) effaçables sur le volume %s" +msgid "%s%lu MB purgeable on volume %s|Purge%s=%lu;%lu;%lu;;" +msgstr "%s%lu KB effaçables sur le volume %s|Purge%s=%lu;%lu;%lu;;" -#: plugins/check_nwstat.c:564 +#: plugins/check_nwstat.c:734 +#, c-format +msgid "%lu MB (%lu%%) purgeable on volume %s|Purgeable%s=%lu;%lu;%lu;0;100" +msgstr "" +"%lu MB (%lu%%) effaçables sur le volume %s|Effacable%s=%lu;%lu;%lu;0;100" + +#: plugins/check_nwstat.c:765 #, c-format msgid "%s%lu KB not yet purgeable on volume %s" msgstr "%s%lu KB pas encore effaçables sur le volume %s" -#: plugins/check_nwstat.c:603 +#: plugins/check_nwstat.c:804 #, c-format msgid "%lu MB (%lu%%) not yet purgeable on volume %s" msgstr "%lu MB (%lu%%) pas encore effaçables sur le volume %s" -#: plugins/check_nwstat.c:624 +#: plugins/check_nwstat.c:825 #, c-format -msgid "%lu open files" -msgstr "%lu fichiers ouverts" +msgid "%lu open files|Openfiles=%lu;%lu;%lu;0,0" +msgstr "" -#: plugins/check_nwstat.c:644 +#: plugins/check_nwstat.c:850 #, c-format -msgid "%lu abended threads" -msgstr "%lu processus avortés" +msgid "%lu abended threads|Abends=%lu;%lu;%lu;;" +msgstr "%lu processus avortés|Avortés=%lu;%lu;%lu;;" -#: plugins/check_nwstat.c:675 +#: plugins/check_nwstat.c:885 #, c-format -msgid "%lu current service processes (%lu max)" -msgstr "%lu processus services actuels (%lu max)" +msgid "%lu current service processes (%lu max)|Processes=%lu;%lu;%lu;0;%lu" +msgstr "%lu processus services actuels (%lu max)|Processus=%lu;%lu;%lu;0;%lu" -#: plugins/check_nwstat.c:694 +#: plugins/check_nwstat.c:908 msgid "CRITICAL - Time not in sync with network!" msgstr "CRITIQUE - Le temps n'est pas synchronisé avec le réseau!" -#: plugins/check_nwstat.c:697 +#: plugins/check_nwstat.c:911 msgid "OK - Time in sync with network!" msgstr "OK - Le temps est synchronisé avec le réseau!" -#: plugins/check_nwstat.c:716 +#: plugins/check_nwstat.c:934 #, c-format msgid "LRU sitting time = %lu seconds" msgstr "LRU temps d'attente = %lu secondes" -#: plugins/check_nwstat.c:735 +#: plugins/check_nwstat.c:953 #, c-format -msgid "Dirty cache buffers = %lu%% of the total" -msgstr "Buffers cache sales = %lu%% du total" +msgid "Dirty cache buffers = %lu%% of the total|DCB=%lu;%lu;%lu;0;100" +msgstr "Buffers cache sales = %lu%% du total|DCB=%lu;%lu;%lu;0;100" -#: plugins/check_nwstat.c:753 +#: plugins/check_nwstat.c:975 #, c-format -msgid "Total cache buffers = %lu%% of the original" -msgstr "cache tampons totaux= %lu%% de l'original" +msgid "Total cache buffers = %lu%% of the original|TCB=%lu;%lu;%lu;0;100" +msgstr "cache tampons totaux= %lu%% de l'original|TCB=%lu;%lu;%lu;0;100" -#: plugins/check_nwstat.c:767 +#: plugins/check_nwstat.c:993 #, c-format msgid "NDS Version %s" msgstr "Version NDS %s" -#: plugins/check_nwstat.c:783 +#: plugins/check_nwstat.c:1009 #, c-format msgid "Up %s" msgstr "Démarré %s" -#: plugins/check_nwstat.c:797 +#: plugins/check_nwstat.c:1023 #, c-format msgid "Module %s version %s is loaded" msgstr "Le Module %s version %s est chargé" -#: plugins/check_nwstat.c:800 +#: plugins/check_nwstat.c:1026 #, c-format msgid "Module %s is not loaded" msgstr "Le Module %s n'est pas chargé" -#: plugins/check_nwstat.c:805 plugins/check_overcr.c:272 +#: plugins/check_nwstat.c:1037 plugins/check_nwstat.c:1063 +#: plugins/check_nwstat.c:1089 plugins/check_nwstat.c:1115 +#: plugins/check_nwstat.c:1141 plugins/check_nwstat.c:1167 +#: plugins/check_nwstat.c:1193 plugins/check_nwstat.c:1219 +#: plugins/check_nwstat.c:1245 plugins/check_nwstat.c:1271 +#, c-format +msgid "CRITICAL - Value '%s' does not exist!" +msgstr "CRITIQUE: Le valeur '%s' n'existe pas!" + +#: plugins/check_nwstat.c:1046 plugins/check_nwstat.c:1072 +#: plugins/check_nwstat.c:1098 plugins/check_nwstat.c:1124 +#: plugins/check_nwstat.c:1150 plugins/check_nwstat.c:1176 +#: plugins/check_nwstat.c:1202 plugins/check_nwstat.c:1228 +#: plugins/check_nwstat.c:1254 plugins/check_nwstat.c:1280 +#, c-format +msgid "%s is %lu|%s=%lu;%lu;%lu;;" +msgstr "%s est %lu|%s=%lu;%lu;%lu;;" + +#: plugins/check_nwstat.c:1293 plugins/check_overcr.c:289 msgid "Nothing to check!\n" msgstr "Rien à vérifier!\n" -#: plugins/check_nwstat.c:887 plugins/check_overcr.c:342 +#: plugins/check_nwstat.c:1375 plugins/check_overcr.c:359 msgid "Server port an integer\n" msgstr "Le port du serveur doit être un nombre entier\n" -#: plugins/check_nwstat.c:1016 -#, c-format -msgid "" -"This plugin attempts to contact the MRTGEXT NLM running on a\n" -"Novell server to gather the requested system information.\n" -"\n" -msgstr "" -"Ce plugin essaye de contacter le NLM MRTGEXT qui s'exécute sur\n" -"un serveur Novell pour récupérer l'information système demandée.\n" -"\n" +#: plugins/check_nwstat.c:1605 +msgid "This plugin attempts to contact the MRTGEXT NLM running on a" +msgstr "Ce plugin essaye de contacter le NLM MRTGEXT qui s'exécute sur" -#: plugins/check_nwstat.c:1026 -#, c-format -msgid "" -" -v, --variable=STRING\n" -" Variable to check. Valid variables include:\n" -" LOAD1 = 1 minute average CPU load\n" -" LOAD5 = 5 minute average CPU load\n" -" LOAD15 = 15 minute average CPU load\n" -" CSPROCS = number of current service processes (NW 5.x only)\n" -" ABENDS = number of abended threads (NW 5.x only)\n" -" UPTIME = server uptime\n" -msgstr "" -" -v, --variable=STRING\n" -" Variable à vérifier. Les variables correctes sont:\n" -" LOAD1 = Charge CPU après 1 minute\n" -" LOAD5 = Charge CPU après 5 minute\n" -" LOAD15 = Charge CPU après 15 minute\n" -" CSPROCS = nombres de processus services actuels (NW 5.x seulement)\n" -" ABENDS = nombre de processus avortés (NW 5.x seulement)\n" -" UPTIME = durée de fonctionnement sans interruption\n" +#: plugins/check_nwstat.c:1606 +msgid "Novell server to gather the requested system information." +msgstr "un serveur Novell pour récupérer l'information système demandée." -#: plugins/check_nwstat.c:1036 -#, c-format -msgid "" -" LTCH = percent long term cache hits\n" -" CBUFF = current number of cache buffers\n" -" CDBUFF = current number of dirty cache buffers\n" -" DCB = dirty cache buffers as a percentage of the total\n" -" TCB = dirty cache buffers as a percentage of the original\n" -msgstr "" -" LTCH = pourcentage de lecture en cache à long terme\n" -" CBUFF = nombre de caches tampons actuels\n" -" CDBUFF = nombre de cache tampons sales actuels\n" -" DCB = cache tampons sales en pourcentage du total\n" -" TCB = cache tampons sales en pourcentage de l'original\n" +#: plugins/check_nwstat.c:1617 plugins/check_overcr.c:439 +msgid "Variable to check. Valid variables include:" +msgstr "Variable à vérifier. Les variables valides sont:" -#: plugins/check_nwstat.c:1043 -#, c-format -msgid "" -" OFILES = number of open files\n" -" VPF = percent free space on volume \n" -" VKF = KB of free space on volume \n" -" VPP = percent purgeable space on volume \n" -" VKP = KB of purgeable space on volume \n" -" VPNP = percent not yet purgeable space on volume \n" -" VKNP = KB of not yet purgeable space on volume \n" +#: plugins/check_nwstat.c:1618 +msgid "LOAD1 = 1 minute average CPU load" msgstr "" -" OFILES = nombre de fichiers ouverts\n" -" VPF = pourcentage de place libre sur le volume \n" -" VKF = KB de place libre sur le volume \n" -" VPP = pourcentage de place libérable sur le volume \n" -" VKP = KB de place libérable sur le volume \n" -" VPNP = pourcentage de place non libérable sur le volume \n" -" VKNP = KB de place non libérable sur le volume \n" -#: plugins/check_nwstat.c:1052 -#, c-format -msgid "" -" LRUM = LRU sitting time in minutes\n" -" LRUS = LRU sitting time in seconds\n" -" DSDB = check to see if DS Database is open\n" -" DSVER = NDS version\n" -" UPRB = used packet receive buffers\n" -" PUPRB = percent (of max) used packet receive buffers\n" -" SAPENTRIES = number of entries in the SAP table\n" -" SAPENTRIES = number of entries in the SAP table for SAP type \n" +#: plugins/check_nwstat.c:1619 +msgid "LOAD5 = 5 minute average CPU load" msgstr "" -" LRUM = LRU sitting time in minutes\n" -" LRUS = LRU sitting time in seconds\n" -" DSDB = Vérifie si la base de données DS est ouverte\n" -" DSVER = version NDS\n" -" UPRB = paquets du tampon de réception utilisé\n" -" PUPRB = pourcentage (max) des paquets du tampon de réception " -"utilisés\n" -" SAPENTRIES = nombres d'entrées dans la table SAP\n" -" SAPENTRIES = nombres d'entrées dans la table SAP de type SAP \n" -#: plugins/check_nwstat.c:1062 -#, c-format -msgid "" -" TSYNC = timesync status \n" -" LOGINS = check to see if logins are enabled\n" -" CONNS = number of currently licensed connections\n" -" NLM: = check if NLM is loaded and report version\n" -" (e.g. \"NLM:TSANDS.NLM\")\n" +#: plugins/check_nwstat.c:1620 +msgid "LOAD15 = 15 minute average CPU load" msgstr "" -" TSYNC = statut de la synchronisation du temps \n" -" LOGINS = vérifier si les logins sont activés\n" -" CONNS = nombre de connexion ayant actuellement une licence\n" -" NLM: = vérifier si le NLM est chargé et donner la version\n" -" (ex. \"NLM:TSANDS.NLM\")\n" -#: plugins/check_nwstat.c:1069 -#, c-format -msgid "" -" -w, --warning=INTEGER\n" -" Threshold which will result in a warning status\n" -" -c, --critical=INTEGER\n" -" Threshold which will result in a critical status\n" -" -o, --osversion\n" -" Include server version string in results\n" +#: plugins/check_nwstat.c:1621 +msgid "CSPROCS = number of current service processes (NW 5.x only)" +msgstr "CSPROCS = nombres de processus services actuels (NW 5.x seulement)" + +#: plugins/check_nwstat.c:1622 +msgid "ABENDS = number of abended threads (NW 5.x only)" msgstr "" -" -w, --warning=INTEGER\n" -" Seuil qui donnera un résultat AVERTISSEMENT\n" -" -c, --critical=INTEGER\n" -" Seuil qui donnera un résultat CRITIQUE\n" -" -o, --osversion\n" -" Inclure la version du serveur dans les résultats\n" -#: plugins/check_nwstat.c:1079 -#, c-format -msgid "" -"\n" -"Notes:\n" -"- This plugin requres that the MRTGEXT.NLM file from James Drews' MRTG\n" -" extension for NetWare be loaded on the Novell servers you wish to check.\n" -" (available from http://www.engr.wisc.edu/~drews/mrtg/)\n" -"- Values for critical thresholds should be lower than warning thresholds\n" -" when the following variables are checked: VPF, VKF, LTCH, CBUFF, DCB, \n" -" TCB, LRUS and LRUM.\n" +#: plugins/check_nwstat.c:1623 +msgid "UPTIME = server uptime" msgstr "" -"\n" -"Notes:\n" -"- Ce plugin nécessite que le fichier MRTGEXT.NLM qui fait partie de " -"l'extension\n" -" MRTG pour Netware soit chargée sur les serveurs Novell à surveiller.\n" -" (disponible depuis http://http://www.engr.wisc.edu/~drews/mrtg/)\n" -"- Les valeurs pour les seuils d'alerte critiques doivent être plus bas que " -"les\n" -" seuils d'alerte attention quand les variables suivantes sont " -"surveillées: \n" -" VPF, VKF, LTCH, CBUFF, DCB,TCB, LRUS and LRUM.\n" -#: plugins/check_overcr.c:110 +#: plugins/check_nwstat.c:1624 +msgid "LTCH = percent long term cache hits" +msgstr "" + +#: plugins/check_nwstat.c:1625 +msgid "CBUFF = current number of cache buffers" +msgstr "" + +#: plugins/check_nwstat.c:1626 +msgid "CDBUFF = current number of dirty cache buffers" +msgstr "" + +#: plugins/check_nwstat.c:1627 +msgid "DCB = dirty cache buffers as a percentage of the total" +msgstr "" + +#: plugins/check_nwstat.c:1628 +msgid "TCB = dirty cache buffers as a percentage of the original" +msgstr "" + +#: plugins/check_nwstat.c:1629 +msgid "OFILES = number of open files" +msgstr "" + +#: plugins/check_nwstat.c:1630 +msgid " VMF = MB of free space on Volume " +msgstr "" + +#: plugins/check_nwstat.c:1631 +msgid " VMU = MB used space on Volume " +msgstr "" + +#: plugins/check_nwstat.c:1632 +msgid " VMP = MB of purgeable space on Volume " +msgstr "" + +#: plugins/check_nwstat.c:1633 +msgid " VPF = percent free space on volume " +msgstr "" + +#: plugins/check_nwstat.c:1634 +msgid " VKF = KB of free space on volume " +msgstr "" + +#: plugins/check_nwstat.c:1635 +msgid " VPP = percent purgeable space on volume " +msgstr "" + +#: plugins/check_nwstat.c:1636 +msgid " VKP = KB of purgeable space on volume " +msgstr "" + +#: plugins/check_nwstat.c:1637 +msgid " VPNP = percent not yet purgeable space on volume " +msgstr "" + +#: plugins/check_nwstat.c:1638 +msgid " VKNP = KB of not yet purgeable space on volume " +msgstr "" + +#: plugins/check_nwstat.c:1639 +msgid " LRUM = LRU sitting time in minutes" +msgstr "" + +#: plugins/check_nwstat.c:1640 +msgid " LRUS = LRU sitting time in seconds" +msgstr " LRUS = LRU temps d'attente en secondes" + +#: plugins/check_nwstat.c:1641 +msgid " DSDB = check to see if DS Database is open" +msgstr "" + +#: plugins/check_nwstat.c:1642 +msgid " DSVER = NDS version" +msgstr "" + +#: plugins/check_nwstat.c:1643 +msgid " UPRB = used packet receive buffers" +msgstr " UPRB = paquets du tampon de réception utilisés" + +#: plugins/check_nwstat.c:1644 +msgid " PUPRB = percent (of max) used packet receive buffers" +msgstr "" + +#: plugins/check_nwstat.c:1645 +msgid " SAPENTRIES = number of entries in the SAP table" +msgstr "" + +#: plugins/check_nwstat.c:1646 +msgid " SAPENTRIES = number of entries in the SAP table for SAP type " +msgstr " SAPENTRIES = entrées dans la table SAP pour le type SAP " + +#: plugins/check_nwstat.c:1647 +msgid " TSYNC = timesync status" +msgstr "" + +#: plugins/check_nwstat.c:1648 +msgid " LOGINS = check to see if logins are enabled" +msgstr "" + +#: plugins/check_nwstat.c:1649 +msgid " CONNS = number of currently licensed connections" +msgstr "" + +#: plugins/check_nwstat.c:1650 +msgid " NRMH\t= NRM Summary Status" +msgstr "" + +#: plugins/check_nwstat.c:1651 +msgid " NRMP = Returns the current value for a NRM health item" +msgstr "" + +#: plugins/check_nwstat.c:1652 +msgid " NRMM = Returns the current memory stats from NRM" +msgstr "" + +#: plugins/check_nwstat.c:1653 +msgid " NRMS = Returns the current Swapfile stats from NRM" +msgstr "" + +#: plugins/check_nwstat.c:1654 +msgid " NSS1 = Statistics from _Admin:Manage_NSS\\GeneralStats.xml" +msgstr "" + +#: plugins/check_nwstat.c:1655 +msgid " NSS3 = Statistics from _Admin:Manage_NSS\\NameCache.xml" +msgstr "" + +#: plugins/check_nwstat.c:1656 +msgid " NSS4 = Statistics from _Admin:Manage_NSS\\FileStats.xml" +msgstr "" + +#: plugins/check_nwstat.c:1657 +msgid " NSS5 = Statistics from _Admin:Manage_NSS\\ObjectCache.xml" +msgstr "" + +#: plugins/check_nwstat.c:1658 +msgid " NSS6 = Statistics from _Admin:Manage_NSS\\Thread.xml" +msgstr "" + +#: plugins/check_nwstat.c:1659 +msgid "" +" NSS7 = Statistics from _Admin:Manage_NSS\\AuthorizationCache.xml" +msgstr "" + +#: plugins/check_nwstat.c:1660 +msgid " NLM: = check if NLM is loaded and report version" +msgstr "" + +#: plugins/check_nwstat.c:1661 +msgid " (e.g. NLM:TSANDS.NLM)" +msgstr "" + +#: plugins/check_nwstat.c:1668 +msgid "Include server version string in results" +msgstr "" + +#: plugins/check_nwstat.c:1674 +msgid "- This plugin requres that the MRTGEXT.NLM file from James Drews' MRTG" +msgstr "" + +#: plugins/check_nwstat.c:1675 +msgid "" +" extension for NetWare be loaded on the Novell servers you wish to check." +msgstr "" + +#: plugins/check_nwstat.c:1676 +msgid " (available from http://www.engr.wisc.edu/~drews/mrtg/)" +msgstr " (disponible depuis http://www.engr.wisc.edu/~drews/mrtg/)" + +#: plugins/check_nwstat.c:1677 +msgid "" +"- Values for critical thresholds should be lower than warning thresholds" +msgstr "" + +#: plugins/check_nwstat.c:1678 +msgid "" +" when the following variables are checked: VPF, VKF, LTCH, CBUFF, DCB, " +msgstr "" + +#: plugins/check_nwstat.c:1679 +msgid " TCB, LRUS and LRUM.\n" +msgstr "" + +#: plugins/check_overcr.c:127 msgid "Unknown error fetching load data\n" msgstr "" "Erreur inconnue lors de la récupération des données de charge système\n" -#: plugins/check_overcr.c:114 +#: plugins/check_overcr.c:131 msgid "Invalid response from server - no load information\n" msgstr "Réponse invalide du serveur - pas d'information de charge système\n" -#: plugins/check_overcr.c:120 +#: plugins/check_overcr.c:137 msgid "Invalid response from server after load 1\n" msgstr "Réponse invalide du serveur après charge système à 1 minute\n" -#: plugins/check_overcr.c:126 +#: plugins/check_overcr.c:143 msgid "Invalid response from server after load 5\n" msgstr "Réponse invalide du serveur après charge système à 5 minute\n" -#: plugins/check_overcr.c:151 +#: plugins/check_overcr.c:168 #, c-format msgid "Load %s - %s-min load average = %0.2f" msgstr "Charge %s - %s-moyenne minimale de charge système = %0.2f" -#: plugins/check_overcr.c:161 +#: plugins/check_overcr.c:178 msgid "Unknown error fetching disk data\n" msgstr "Erreur inconnue en récupérant les données des disques\n" -#: plugins/check_overcr.c:171 plugins/check_overcr.c:223 -#: plugins/check_overcr.c:227 +#: plugins/check_overcr.c:188 plugins/check_overcr.c:240 +#: plugins/check_overcr.c:244 msgid "Invalid response from server\n" msgstr "Réponse invalide reçue du serveur\n" -#: plugins/check_overcr.c:198 +#: plugins/check_overcr.c:215 msgid "Unknown error fetching network status\n" msgstr "Erreur inconnue lors de la réception de l'état du réseau\n" -#: plugins/check_overcr.c:208 +#: plugins/check_overcr.c:225 #, c-format msgid "Net %s - %d connection%s on port %d" msgstr "Net %s - %d connections%s sur le port %d" -#: plugins/check_overcr.c:219 +#: plugins/check_overcr.c:236 msgid "Unknown error fetching process status\n" msgstr "Erreur inconnue en récupérant l'état des processus\n" -#: plugins/check_overcr.c:237 +#: plugins/check_overcr.c:254 #, c-format msgid "Process %s - %d instance%s of %s running" msgstr "Processus %s - %d instances%s de %s démarrées" -#: plugins/check_overcr.c:264 +#: plugins/check_overcr.c:281 #, c-format msgid "Uptime %s - Up %d days %d hours %d minutes" msgstr "Temps de fonctionnement %s - Up %d jours %d heures %d minutes" -#: plugins/check_overcr.c:406 -#, c-format +#: plugins/check_overcr.c:423 msgid "" -"This plugin attempts to contact the Over-CR collector daemon running on the\n" -"remote UNIX server in order to gather the requested system information.\n" -"\n" +"This plugin attempts to contact the Over-CR collector daemon running on the" msgstr "" -"Ce plugin essaye de joindre le service Over CR tournant sur le serveur UNIX\n" -"distant afin de récupérer les informations système demandées.\n" -"\n" +"Ce plugin essaye de joindre le service Over CR tournant sur le serveur UNIX" -#: plugins/check_overcr.c:416 -#, c-format -msgid "" -"-v, --variable=STRING\n" -" Variable to check. Valid variables include:\n" -" LOAD1 = 1 minute average CPU load\n" -" LOAD5 = 5 minute average CPU load\n" -" LOAD15 = 15 minute average CPU load\n" -" DPU = percent used disk space on filesystem \n" -" PROC = number of running processes with name \n" -" NET = number of active connections on TCP port \n" -" UPTIME = system uptime in seconds\n" -msgstr "" -"-v, --variable=STRING\n" -" Variable à vérifier. Les variables correctes sont:\n" -" LOAD1 = Charge CPU après 1 minute\n" -" LOAD5 = Charge CPU après 5 minutes\n" -" LOAD15 = Charge CPU après 15 minutes\n" -" DPU = pourcentage de place utilisée sur le système de fichier " -"\n" -" PROC = nombre de processus actifs avec le nom \n" -" NET = nombre de connections TCP actives sur le port \n" -" UPTIME = durée de fonctionnement du système en secondes\n" - -#: plugins/check_overcr.c:427 -#, c-format -msgid "" -" -w, --warning=INTEGER\n" -" Threshold which will result in a warning status\n" -" -c, --critical=INTEGER\n" -" Threshold which will result in a critical status\n" -msgstr "" -" -w, --warning=INTEGER\n" -" Seuil qui donnera un résultat AVERTISSEMENT\n" -" -c, --critical=INTEGER\n" -" Seuil qui donnera un résultat CRITIQUE\n" - -#: plugins/check_overcr.c:435 -#, c-format -msgid "" -"Notes:\n" -" - For the available options, the critical threshold value should always be\n" -" higher than the warning threshold value, EXCEPT with the uptime variable\n" -"\n" -msgstr "" -"Notes:\n" -" - Pour toutes les options disponibles, le seuil critique doit toujours être " -"plus\n" -" grand que le seuil d'alerte SAUF pour l'option uptime\n" -"\n" +#: plugins/check_overcr.c:424 +msgid "remote UNIX server in order to gather the requested system information." +msgstr "distant afin de récupérer les informations système demandées." #: plugins/check_overcr.c:440 -#, c-format -msgid "" -" - This plugin requres that Eric Molitors' Over-CR collector daemon be\n" -" running on the remote server. Over-CR can be downloaded from\n" -" http://www.molitor.org/overcr (This plugin was tested with version\n" -" 0.99.53 of the Over-CR collector)\n" -"\n" +msgid "LOAD1 = 1 minute average CPU load" msgstr "" -" - Ce plugin nécessite le service Over CR de Eric Molitors sur le serveur\n" -" distant. Over CR peut être téléchargé depuis \n" -" http://www.molitor.org/overcr (Ce plugin à été testé avec la version\n" -" 0.99.53 du service Over CR)\n" -"\n" -#: plugins/check_pgsql.c:157 +#: plugins/check_overcr.c:441 +msgid "LOAD5 = 5 minute average CPU load" +msgstr "" + +#: plugins/check_overcr.c:442 +msgid "LOAD15 = 15 minute average CPU load" +msgstr "" + +#: plugins/check_overcr.c:443 +msgid "DPU = percent used disk space on filesystem " +msgstr "" + +#: plugins/check_overcr.c:444 +msgid "PROC = number of running processes with name " +msgstr "" + +#: plugins/check_overcr.c:445 +msgid "NET = number of active connections on TCP port " +msgstr "" + +#: plugins/check_overcr.c:446 +msgid "UPTIME = system uptime in seconds" +msgstr "" + +#: plugins/check_overcr.c:454 +msgid "" +"For the available options, the critical threshold value should always be" +msgstr "" +"Pour toutes les options disponibles, le seuil critique doit toujours être" + +#: plugins/check_overcr.c:455 +msgid "" +"higher than the warning threshold value, EXCEPT with the uptime variable" +msgstr "plus grand que le seuil d'alerte SAUF pour l'option uptime" + +#: plugins/check_overcr.c:457 +msgid "This plugin requres that Eric Molitors' Over-CR collector daemon be" +msgstr "" + +#: plugins/check_overcr.c:458 +#, fuzzy +msgid "running on the remote server." +msgstr "Chaîne de caractères à envoyer au serveur" + +#: plugins/check_overcr.c:460 +#, fuzzy +msgid "This plugin was tested with version 0.99.53 of the Over-CR collector" +msgstr "" +"Ce plugin essaye de joindre le service Over CR tournant sur le serveur UNIX" + +#: plugins/check_pgsql.c:173 #, c-format msgid "CRITICAL - no connection to '%s' (%s).\n" msgstr "CRITIQUE - pas de connexion à '%s' (%s).\n" -#: plugins/check_pgsql.c:172 +#: plugins/check_pgsql.c:188 #, c-format msgid " %s - database %s (%d sec.)|%s\n" msgstr " %s - base de données %s (%d sec.)|%s\n" -#: plugins/check_pgsql.c:227 plugins/check_tcp.c:458 plugins/check_time.c:265 -#: plugins/check_time.c:277 plugins/check_udp.c:166 plugins/check_users.c:152 +#: plugins/check_pgsql.c:243 plugins/check_time.c:281 plugins/check_time.c:293 +#: plugins/check_users.c:168 msgid "Critical threshold must be a positive integer" msgstr "Le seuil critique doit être un entier positif" -#: plugins/check_pgsql.c:233 plugins/check_tcp.c:468 plugins/check_time.c:246 -#: plugins/check_time.c:270 plugins/check_udp.c:173 plugins/check_users.c:158 -#: plugins/check_users.c:168 plugins/check_users.c:175 +#: plugins/check_pgsql.c:249 plugins/check_time.c:262 plugins/check_time.c:286 +#: plugins/check_users.c:174 plugins/check_users.c:184 +#: plugins/check_users.c:191 msgid "Warning threshold must be a positive integer" msgstr "Le seuil d'avertissement doit être un entier positif" -#: plugins/check_pgsql.c:251 +#: plugins/check_pgsql.c:267 msgid "Database name is not valid" msgstr "Le nom de la base de données est invalide" -#: plugins/check_pgsql.c:257 +#: plugins/check_pgsql.c:273 msgid "User name is not valid" msgstr "Le nom de l'utilisateur est invalide" -#: plugins/check_pgsql.c:394 +#: plugins/check_pgsql.c:410 #, c-format -msgid "" -"Test whether a PostgreSQL Database is accepting connections.\n" -"\n" -msgstr "" -"Teste si une base de données Postgresql accepte les connections.\n" -"\n" +msgid "Test whether a PostgreSQL Database is accepting connections." +msgstr "Teste si une base de données Postgresql accepte les connections." -#: plugins/check_pgsql.c:404 +#: plugins/check_pgsql.c:423 +msgid "Database to check " +msgstr "" + +#: plugins/check_pgsql.c:424 #, c-format -msgid "" -" -d, --database=STRING\n" -" Database to check (default: %s)\n" -" -l, --logname = STRING\n" -" Login name of user\n" -" -p, --password = STRING\n" -" Password (BIG SECURITY ISSUE)\n" +msgid "(default: %s)" msgstr "" -" -d, --database=STRING\n" -" Base de données à vérifier (défaut: %s)\n" -" -l, --logname = STRING\n" -" Nom d'utilisateur\n" -" -p, --password = STRING\n" -" mot de passe (GROS PROBLEME DE SECURITE)\n" -#: plugins/check_pgsql.c:418 -#, c-format -msgid "" -"\n" -"All parameters are optional.\n" -"\n" -"This plugin tests a PostgreSQL DBMS to determine whether it is active and\n" -"accepting queries. In its current operation, it simply connects to the\n" -"specified database, and then disconnects. If no database is specified, it\n" -"connects to the template1 database, which is present in every functioning \n" -"PostgreSQL DBMS.\n" +#: plugins/check_pgsql.c:426 +msgid "Login name of user" +msgstr "Le nom d'un utilisateur" + +#: plugins/check_pgsql.c:428 +msgid "Password (BIG SECURITY ISSUE)" msgstr "" -"\n" -"Tout les paramètres sont optionnels.\n" -"\n" -"Ce plugin teste un base de données PostgreSQL pour déterminer si elle " -"démarrée et\n" -"accepte des requêtes. Dans sa version actuelle, il se connecte à la base de " -"données\n" -"spécifiée, il se connecte à la base de données template1, qui est présent " -"par défaut\n" -"dans toute base de données PostgreSQL.\n" -#: plugins/check_pgsql.c:425 -#, c-format -msgid "" -"\n" -"The plugin will connect to a local postmaster if no host is specified. To\n" -"connect to a remote host, be sure that the remote postmaster accepts TCP/IP\n" -"connections (start the postmaster with the -i option).\n" +#: plugins/check_pgsql.c:437 +msgid "All parameters are optional." msgstr "" -"\n" -"Ce plugin va se connecter à une base de données locale si aucun hôte n'est \n" -"spécifié. Pour se connecter à un hôte distant, assurez vous que celui ci \n" -"accepte les connections TCP/IP (démarrez le postmaster avec l'option -i).\n" -#: plugins/check_pgsql.c:429 -#, c-format +#: plugins/check_pgsql.c:438 msgid "" -"\n" -"Typically, the nagios user (unless the --logname option is used) should be\n" -"able to connect to the database without a password. The plugin can also " -"send\n" -"a password, but no effort is made to obsure or encrypt the password.\n" +"This plugin tests a PostgreSQL DBMS to determine whether it is active and" msgstr "" -"\n" -"Habituellement, l'utilisateur nagios (a moins que l'option --logname soit\n" -"utilisée) doit être capable de se connecter sans un mot de passe. Ce plugin\n" -"peut aussi transmettre un mot de passe, mais aucun effort n'est fait pour\n" -"camoufler ou encrypter le mot de passe.\n" -#: plugins/check_ping.c:124 +#: plugins/check_pgsql.c:439 +msgid "accepting queries. In its current operation, it simply connects to the" +msgstr "" + +#: plugins/check_pgsql.c:440 +msgid "" +"specified database, and then disconnects. If no database is specified, it" +msgstr "" + +#: plugins/check_pgsql.c:441 +msgid "" +"connects to the template1 database, which is present in every functioning" +msgstr "" + +#: plugins/check_pgsql.c:442 +msgid "PostgreSQL DBMS." +msgstr "" + +#: plugins/check_pgsql.c:443 +msgid "" +"The plugin will connect to a local postmaster if no host is specified. To" +msgstr "" +"Ce plugin va se connecter sur un postmaster local si aucun hôte n'est " +"spécifié." + +#: plugins/check_pgsql.c:444 +msgid "" +"connect to a remote host, be sure that the remote postmaster accepts TCP/IP" +msgstr "" + +#: plugins/check_pgsql.c:445 +msgid "connections (start the postmaster with the -i option)." +msgstr "" + +#: plugins/check_pgsql.c:446 +msgid "" +"Typically, the nagios user (unless the --logname option is used) should be" +msgstr "" + +#: plugins/check_pgsql.c:447 +msgid "" +"able to connect to the database without a password. The plugin can also send" +msgstr "" + +#: plugins/check_pgsql.c:448 +msgid "a password, but no effort is made to obsure or encrypt the password." +msgstr "" + +#: plugins/check_ping.c:145 msgid "CRITICAL - Could not interpret output from ping command\n" msgstr "CRITIQUE - Impossible d'interpréter le réponse de la commande ping\n" -#: plugins/check_ping.c:140 +#: plugins/check_ping.c:161 #, c-format msgid "PING %s - %sPacket loss = %d%%" msgstr "PING %s - %s Paquets perdus = %d%%" -#: plugins/check_ping.c:143 +#: plugins/check_ping.c:164 #, c-format msgid "PING %s - %sPacket loss = %d%%, RTA = %2.2f ms" msgstr "PING %s - %s Paquets perdus = %d%%, RTA = %2.2f ms" -#: plugins/check_ping.c:231 +#: plugins/check_ping.c:252 msgid "Could not realloc() addresses\n" msgstr "Impossible de réallouer les adresses\n" -#: plugins/check_ping.c:246 plugins/check_ping.c:326 +#: plugins/check_ping.c:267 plugins/check_ping.c:347 #, c-format msgid " (%s) must be a non-negative number\n" msgstr " (%s) doit être un nombre positif\n" -#: plugins/check_ping.c:280 +#: plugins/check_ping.c:301 #, c-format msgid " (%s) must be an integer percentage\n" msgstr " (%s) doit être un pourcentage entier\n" -#: plugins/check_ping.c:291 +#: plugins/check_ping.c:312 #, c-format msgid " (%s) must be an integer percentage\n" msgstr " (%s) doit être un pourcentage entier\n" -#: plugins/check_ping.c:302 +#: plugins/check_ping.c:323 #, c-format msgid " (%s) must be a non-negative number\n" msgstr " (%s) doit être un nombre positif\n" -#: plugins/check_ping.c:313 +#: plugins/check_ping.c:334 #, c-format msgid " (%s) must be a non-negative number\n" msgstr " (%s) doit être un nombre positif\n" -#: plugins/check_ping.c:346 +#: plugins/check_ping.c:367 #, c-format msgid "" "%s: Warning threshold must be integer or percentage!\n" "\n" msgstr "%s: Le seuil d'avertissement doit être un entier ou un pourcentage!\n" -#: plugins/check_ping.c:359 +#: plugins/check_ping.c:380 #, c-format msgid " was not set\n" msgstr " n'a pas été indiqué\n" -#: plugins/check_ping.c:363 +#: plugins/check_ping.c:384 #, c-format msgid " was not set\n" msgstr " n'a pas été indiqué\n" -#: plugins/check_ping.c:367 +#: plugins/check_ping.c:388 #, c-format msgid " was not set\n" msgstr " n'a pas été indiqué\n" -#: plugins/check_ping.c:371 +#: plugins/check_ping.c:392 #, c-format msgid " was not set\n" msgstr " n'a pas été indiqué\n" -#: plugins/check_ping.c:375 +#: plugins/check_ping.c:396 #, c-format msgid " (%f) cannot be larger than (%f)\n" msgstr " (%f) ne peut pas être plus large que (%f)\n" -#: plugins/check_ping.c:379 +#: plugins/check_ping.c:400 #, c-format msgid " (%d) cannot be larger than (%d)\n" msgstr " (%d) ne peut pas être plus large que (%d)\n" -#: plugins/check_ping.c:415 +#: plugins/check_ping.c:436 #, c-format msgid "Cannot open stderr for %s\n" msgstr "Impossible d'ouvrir le canal d'erreur standard pour %s\n" -#: plugins/check_ping.c:464 plugins/check_ping.c:466 +#: plugins/check_ping.c:485 plugins/check_ping.c:487 msgid "System call sent warnings to stderr " msgstr "" "Les appel système enverront leurs messages d'avertissement vers le canal " "d'erreur standard" -#: plugins/check_ping.c:491 -#, c-format -msgid "CRITICAL - Network unreachable (%s)" +#: plugins/check_ping.c:514 +#, fuzzy, c-format +msgid "CRITICAL - Network Unreachable (%s)" msgstr "CRITIQUE - Le réseau est injoignable (%s)" -#: plugins/check_ping.c:493 +#: plugins/check_ping.c:516 #, c-format msgid "CRITICAL - Host Unreachable (%s)" msgstr "CRITIQUE - Hôte injoignable (%s)" -#: plugins/check_ping.c:495 +#: plugins/check_ping.c:518 +#, c-format +msgid "CRITICAL - Bogus ICMP: Port Unreachable (%s)" +msgstr "CRITIQUE - Paquet ICMP incorrect: Port injoignable (%s)" + +#: plugins/check_ping.c:520 +#, c-format +msgid "CRITICAL - Bogus ICMP: Protocol Unreachable (%s)" +msgstr "CRITIQUE - Paquet ICMP incorrect: Protocole injoignable (%s)" + +#: plugins/check_ping.c:522 +#, c-format +msgid "CRITICAL - Network Prohibited (%s)" +msgstr "CRITIQUE - L'accès au réseau est interdit (%s)" + +#: plugins/check_ping.c:524 +#, c-format +msgid "CRITICAL - Host Prohibited (%s)" +msgstr "CRITIQUE - L'accès a l'hôte est interdit (%s)" + +#: plugins/check_ping.c:526 +#, c-format +msgid "CRITICAL - Packet Filtered (%s)" +msgstr "CRITIQUE - Paquet filtré (%s)" + +#: plugins/check_ping.c:528 #, c-format msgid "CRITICAL - Host not found (%s)" msgstr "CRITIQUE - Hôte non trouvé (%s)" -#: plugins/check_ping.c:497 +#: plugins/check_ping.c:530 #, c-format msgid "CRITICAL - Time to live exceeded (%s)" msgstr "CRITIQUE - La durée de vie du paquet est dépassée (%s)" -#: plugins/check_ping.c:504 +#: plugins/check_ping.c:537 msgid "Unable to realloc warn_text" msgstr "Impossible de réattribuer le texte d'avertissement" -#: plugins/check_ping.c:521 +#: plugins/check_ping.c:554 #, c-format -msgid "" -"Use ping to check connection statistics for a remote host.\n" -"\n" +msgid "Use ping to check connection statistics for a remote host." msgstr "" -"Utilise ping pour vérifier les statistiques de connections d'un hôte " -"distant.\n" -"\n" +"Utilise ping pour vérifier les statistiques de connections d'un hôte distant." -#: plugins/check_ping.c:529 -#, c-format -msgid "" -"-H, --hostname=HOST\n" -" host to ping\n" -"-w, --warning=THRESHOLD\n" -" warning threshold pair\n" -"-c, --critical=THRESHOLD\n" -" critical threshold pair\n" -"-p, --packets=INTEGER\n" -" number of ICMP ECHO packets to send (Default: %d)\n" -"-L, --link\n" -" show HTML in the plugin output (obsoleted by urlize)\n" +#: plugins/check_ping.c:565 +msgid "host to ping" +msgstr "hôte à tester" + +#: plugins/check_ping.c:571 +msgid "number of ICMP ECHO packets to send" +msgstr "nombre de paquets ICMP à envoyer" + +#: plugins/check_ping.c:572 +#, fuzzy, c-format +msgid "(Default: %d)\n" +msgstr "(Défaut: %d)" + +#: plugins/check_ping.c:574 +msgid "show HTML in the plugin output (obsoleted by urlize)" msgstr "" -"-H, --hostname=HOST\n" -" hôte à pinger\n" -"-w, --warning=THRESHOLD\n" -" Valeurs pour le seuil d'avertissement\n" -"-c, --critical=THRESHOLD\n" -" Valeurs pour le seuil critique\n" -"-p, --packets=INTEGER\n" -" nombre de paquets ICMP ECHO à envoyer (Défaut: %d)\n" -"-L, --link\n" -" montrer de l'HTML dans la sortie du plugin (obsolète a cause de urlize)\n" -#: plugins/check_ping.c:544 -#, c-format -msgid "" -"THRESHOLD is ,%% where is the round trip average travel\n" -"time (ms) which triggers a WARNING or CRITICAL state, and is the\n" -"percentage of packet loss to trigger an alarm state.\n" -"\n" +#: plugins/check_ping.c:578 +#, fuzzy +msgid "THRESHOLD is ,% where is the round trip average travel" msgstr "" -"Le seuil est ,%% ou est le temps d'aller/retour (ms) qui " -"donne\n" -" comme résultat un STATE_WARNING ou unSTATE_CRITICAL, et est \n" -"un pourcentage de paquets perdus déclenchant un avertissement.\n" -"\n" +"Le seuil est ,%% ou est le temps moyen pour l'aller retour " +"(ms)" -#: plugins/check_ping.c:549 -#, c-format +#: plugins/check_ping.c:579 +msgid "time (ms) which triggers a WARNING or CRITICAL state, and is the" +msgstr "" +"temps (ms) qui déclenche un résultat AVERTISSEMENT ou CRITIQUE, et est " +"le " + +#: plugins/check_ping.c:580 +msgid "percentage of packet loss to trigger an alarm state." +msgstr "pourcentage de paquets perdus pour déclencher une alarme." + +#: plugins/check_ping.c:584 +msgid "" +"This plugin uses the ping command to probe the specified host for packet loss" +msgstr "" +"Ce plugin utilise la commande ping pour vérifier l'hôte spécifié pour les " +"pertes de paquets" + +#: plugins/check_ping.c:585 msgid "" -"This plugin uses the ping command to probe the specified host for packet " -"loss\n" "(percentage) and round trip average (milliseconds). It can produce HTML " -"output\n" -"linking to a traceroute CGI contributed by Ian Cass. The CGI can be found " -"in\n" -"the contrib area of the downloads section at http://www.nagios.org\n" -"\n" +"output" msgstr "" -"Ce plugin utilise la commande ping afin de tester l'hôte spécifié pour les " -"pertes\n" -"de paquets (pourcentage) et le temps d'aller/retour (millisecondes). Il " -"peut\n" -" produire une sortie en HTML avec un lien vers un traceroute en CGI " -"contribué\n" -"par Ian Cass. Ce CGI peut être téléchargé dans le section contrib sur http://" -"www.nagios.org\n" -"\n" -#: plugins/check_procs.c:140 +#: plugins/check_ping.c:586 +msgid "" +"linking to a traceroute CGI contributed by Ian Cass. The CGI can be found in" +msgstr "" + +#: plugins/check_ping.c:587 +msgid "the contrib area of the downloads section at http://www.nagios.org/" +msgstr "" + +#: plugins/check_procs.c:155 #, c-format msgid "CMD: %s\n" msgstr "Commande: %s\n" -#: plugins/check_procs.c:249 +#: plugins/check_procs.c:261 #, c-format msgid "Not parseable: %s" msgstr "Impossible de parcourir les arguments: %s" -#: plugins/check_procs.c:258 +#: plugins/check_procs.c:270 #, c-format msgid "System call sent warnings to stderr\n" msgstr "" "Les alertes du système seront envoyées vers le canal d'erreur standard\n" -#: plugins/check_procs.c:265 +#: plugins/check_procs.c:277 #, c-format msgid "System call returned nonzero status\n" msgstr "L'appel système à retourné un statut non égal à zéro\n" -#: plugins/check_procs.c:270 plugins/check_users.c:101 +#: plugins/check_procs.c:282 #, c-format msgid "Unable to read output\n" msgstr "Impossible de lire les données en entrée\n" -#: plugins/check_procs.c:287 +#: plugins/check_procs.c:299 #, c-format msgid "%d warn out of " msgstr "%d avertissements sur" -#: plugins/check_procs.c:292 +#: plugins/check_procs.c:304 #, c-format msgid "%d crit, %d warn out of " msgstr "%d crit, %d alertes sur " -#: plugins/check_procs.c:298 +#: plugins/check_procs.c:310 #, c-format msgid " with %s" msgstr " avec %s" -#: plugins/check_procs.c:373 +#: plugins/check_procs.c:385 msgid "Critical Process Count must be an integer!" msgstr "Critique Le total des processus doit être un nombre entier!" -#: plugins/check_procs.c:385 +#: plugins/check_procs.c:397 msgid "Warning Process Count must be an integer!" msgstr "Avertissement Le total des processus doit être un nombre entier!" -#: plugins/check_procs.c:393 +#: plugins/check_procs.c:405 msgid "Parent Process ID must be an integer!" msgstr "L'identifiant du processus parent doit être un entier!" -#: plugins/check_procs.c:399 plugins/check_procs.c:501 +#: plugins/check_procs.c:411 plugins/check_procs.c:513 #, c-format msgid "%s%sSTATE = %s" msgstr "%s%sETAT = %s" -#: plugins/check_procs.c:408 +#: plugins/check_procs.c:420 #, c-format msgid "UID %s was not found" msgstr "UID %s n'a pas été trouvé" -#: plugins/check_procs.c:414 +#: plugins/check_procs.c:426 #, c-format msgid "User name %s was not found" msgstr "L'utilisateur %s n'a pas été trouvé" -#: plugins/check_procs.c:429 +#: plugins/check_procs.c:441 #, c-format msgid "%s%scommand name '%s'" msgstr "%s%snom de la commande '%s'" -#: plugins/check_procs.c:448 +#: plugins/check_procs.c:460 msgid "RSS must be an integer!" msgstr "RSS doit être un entier!" -#: plugins/check_procs.c:455 +#: plugins/check_procs.c:467 msgid "VSZ must be an integer!" msgstr "VSZ doit être un entier!" -#: plugins/check_procs.c:463 +#: plugins/check_procs.c:475 msgid "PCPU must be a float!" msgstr "PCPU doit être un nombre en virgule flottante!" -#: plugins/check_procs.c:487 +#: plugins/check_procs.c:499 msgid "Metric must be one of PROCS, VSZ, RSS, CPU, ELAPSED!" msgstr "Metric doit être l'un des PROCS, VSZ, RSS, CPU, ELAPSED!" -#: plugins/check_procs.c:520 +#: plugins/check_procs.c:532 #, c-format msgid "wmax (%d) cannot be greater than cmax (%d)\n" msgstr "wmax (%d) ne peut pas être plus grand que cmax (%d)\n" -#: plugins/check_procs.c:524 +#: plugins/check_procs.c:536 #, c-format msgid "wmin (%d) cannot be less than cmin (%d)\n" msgstr "wmin (%d) ne peut pas être plus petit que cmin (%d)\n" -#: plugins/check_procs.c:661 -#, c-format +#: plugins/check_procs.c:673 msgid "" "Checks all processes and generates WARNING or CRITICAL states if the " -"specified\n" -"metric is outside the required threshold ranges. The metric defaults to " -"number\n" -"of processes. Search filters can be applied to limit the processes to " -"check.\n" -"\n" +"specified" msgstr "" -"Vérifie tout les processus et génère un état ALERTE ou CRITIQUE si les " -"mesures\n" -"spécifiées sont au delà des seuils précisés. Les mesures par défaut sont " -"le \n" -"nombres de processus. Des filtres de recherches peuvent être utilisés pour \n" -"limiter la recherche.\n" -#: plugins/check_procs.c:668 -#, c-format +#: plugins/check_procs.c:674 msgid "" -"\n" -"Required Arguments:\n" -" -w, --warning=RANGE\n" -" Generate warning state if metric is outside this range\n" -" -c, --critical=RANGE\n" -" Generate critical state if metric is outside this range\n" +"metric is outside the required threshold ranges. The metric defaults to " +"number" msgstr "" -"\n" -"Arguments Obligatoires:\n" -" -w, --warning=RANGE\n" -" Résultat AVERTISSEMENT si cette valeur est dépassée\n" -" -c, --critical=RANGE\n" -" Résultat CRITIQUE si cette valeur est dépassée\n" #: plugins/check_procs.c:675 -#, fuzzy, c-format msgid "" -"\n" -"Optional Arguments:\n" -" -m, --metric=TYPE\n" -" Check thresholds against metric. Valid types:\n" -" PROCS - number of processes (default)\n" -" VSZ - virtual memory size\n" -" RSS - resident set memory size\n" -" CPU - percentage cpu\n" +"of processes. Search filters can be applied to limit the processes to check." +msgstr "" + +#: plugins/check_procs.c:681 +msgid "Required Arguments:" +msgstr "" + +#: plugins/check_procs.c:683 +msgid "Generate warning state if metric is outside this range" msgstr "" -"\n" -"Arguments Optionnels:\n" -" -m, --metric=TYPE\n" -" Vérifier le seuil d'après le type. Types valides:\n" -" PROCS - Nombre de processus (défaut)\n" -" VSZ - Taille de la mémoire virtuelle\n" -" RSS - resident set memory size\n" -" CPU - Pourcentage du cpu\n" #: plugins/check_procs.c:685 -#, c-format -msgid " ELAPSED - time elapsed in seconds\n" -msgstr " ELAPSED - temps écoulé en secondes\n" +msgid "Generate critical state if metric is outside this range" +msgstr "" + +#: plugins/check_procs.c:687 +msgid "Optional Arguments:" +msgstr "Arguments optionnels:" + +#: plugins/check_procs.c:689 +msgid "Check thresholds against metric. Valid types:" +msgstr "" #: plugins/check_procs.c:690 -#, c-format -msgid "" -" -v, --verbose\n" -" Extra information. Up to 3 verbosity levels\n" -msgstr "" -" -v, --verbose\n" -" information supplémentaires. Jusqu'à 3 niveaux de verbosité\n" +msgid "PROCS - number of processes (default)" +msgstr "PROCS - nombre de processus (défaut)" -#: plugins/check_procs.c:694 -#, c-format -msgid "" -"\n" -"Optional Filters:\n" -" -s, --state=STATUSFLAGS\n" -" Only scan for processes that have, in the output of `ps`, one or\n" -" more of the status flags you specify (for example R, Z, S, RS,\n" -" RSZDT, plus others based on the output of your 'ps' command).\n" -" -p, --ppid=PPID\n" -" Only scan for children of the parent process ID indicated.\n" -" -z, --vsz=VSZ\n" -" Only scan for processes with vsz higher than indicated.\n" -" -r, --rss=RSS\n" -" Only scan for processes with rss higher than indicated.\n" +#: plugins/check_procs.c:691 +msgid "VSZ - virtual memory size" +msgstr "VSZ - taille mémoire virtuelle" + +#: plugins/check_procs.c:692 +msgid "RSS - resident set memory size" +msgstr "" + +#: plugins/check_procs.c:693 +msgid "CPU - percentage cpu" +msgstr "CPU - pourcentage du cpu" + +#: plugins/check_procs.c:696 +msgid "ELAPSED - time elapsed in seconds" +msgstr "ELAPSED - temps écoulé en secondes" + +#: plugins/check_procs.c:701 +msgid "Extra information. Up to 3 verbosity levels" +msgstr "informations supplémentaires. Jusqu'à 3 niveaux de verbosité" + +#: plugins/check_procs.c:705 +msgid "Only scan for processes that have, in the output of `ps`, one or" +msgstr "" + +#: plugins/check_procs.c:706 +msgid "more of the status flags you specify (for example R, Z, S, RS," msgstr "" -"\n" -"Filtres Optionnels:\n" -" -s, --state=STATUSFLAGS\n" -" Seulement regarder les processus qui ont dans la sortie de la commande " -"'ps'\n" -" un ou plusieurs de flags spécifiés (par exemple R, Z, S, RSZDT, plus " -"d'autres \n" -" basés sur la sortie de votre commande 'ps').\n" -" -p, --ppid=PPID\n" -" Seulement regarder les processus fils du processus parent ID indiqués.\n" -" -z, --vsz=VSZ\n" -" Seulement regarder les processus avec vsz plus grand qu'indiqué.\n" -" -r, --rss=RSS\n" -" Seulement regarder les processus avec rss plus grand qu'indiqua.\n" #: plugins/check_procs.c:707 -#, c-format -msgid "" -" -P, --pcpu=PCPU\n" -" Only scan for processes with pcpu higher than indicated.\n" -" -u, --user=USER\n" -" Only scan for processes with user name or ID indicated.\n" -" -a, --argument-array=STRING\n" -" Only scan for processes with args that contain STRING.\n" -" -C, --command=COMMAND\n" -" Only scan for exact matches of COMMAND (without path).\n" +msgid "RSZDT, plus others based on the output of your 'ps' command)." +msgstr "" + +#: plugins/check_procs.c:709 +msgid "Only scan for children of the parent process ID indicated." +msgstr "" + +#: plugins/check_procs.c:711 +msgid "Only scan for processes with vsz higher than indicated." +msgstr "" + +#: plugins/check_procs.c:713 +msgid "Only scan for processes with rss higher than indicated." +msgstr "" + +#: plugins/check_procs.c:715 +msgid "Only scan for processes with pcpu higher than indicated." msgstr "" -" -P, --pcpu=PCPU\n" -" Seulement regarder les processus avec pcpu plus grand qu'indiqué.\n" -" -u, --user=USER\n" -" Seulement regarder les processus avec le nom de l'utilisateur ou ID " -"indiqué.\n" -" -a, --argument-array=STRING\n" -" Seulement regarder les processus avec les arguments qui contiennent " -"certaines\n" -" chaînes.\n" -" -C, --command=COMMAND\n" -" Seulement regarder pour la correspondance exacte avec la commande\n" -" (sans le chemin).\n" #: plugins/check_procs.c:717 +msgid "Only scan for processes with user name or ID indicated." +msgstr "" + +#: plugins/check_procs.c:719 +msgid "Only scan for processes with args that contain STRING." +msgstr "" + +#: plugins/check_procs.c:721 +msgid "Only scan for exact matches of COMMAND (without path)." +msgstr "" + +#: plugins/check_procs.c:723 #, c-format msgid "" "\n" @@ -3309,7 +3365,7 @@ msgstr "" "est à l'intérieur du seuil\n" "\n" -#: plugins/check_procs.c:722 +#: plugins/check_procs.c:728 #, c-format msgid "" "This plugin checks the number of currently running processes and\n" @@ -3326,421 +3382,403 @@ msgstr "" "état actuel (ex: 'Z'), ou par le nombre de processus en cours d'exécution\n" "\n" -#: plugins/check_procs.c:729 -#, c-format -msgid "" -"Examples:\n" -" check_procs -w 2:2 -c 2:1024 -C portsentry\n" -" Warning if not two processes with command name portsentry. Critical\n" -" if < 2 or > 1024 processes\n" -"\n" -" check_procs -w 10 -a '/usr/local/bin/perl' -u root\n" -" Warning alert if > 10 processes with command arguments containing \n" -" '/usr/local/bin/perl' and owned by root\n" -"\n" -" check_procs -w 50000 -c 100000 --metric=VSZ\n" -" Alert if vsz of any processes over 50K or 100K\n" -" check_procs -w 10 -c 20 --metric=CPU\n" -" Alert if cpu of any processes over 10%% or 20%%\n" -"\n" +#: plugins/check_procs.c:737 +msgid "Warning if not two processes with command name portsentry." msgstr "" -"Exemples:\n" -" check_procs -w 2:2 -c 2:1024 -C portsentry\n" -" Résultat AVERTISSEMENT si deux processus n'ont pas pour nom portsentry.\n" -" Résultat CRITIQUE si < 2 or > 1024 processus\n" -"\n" -" check_procs -w 10 -a '/usr/local/bin/perl' -u root\n" -" Résultat AVERTISSEMENT si > 10 processus avec des arguments contenant \n" -" '/usr/local/bin/perl' et détenus par root\n" -"\n" -" check_procs -w 50000 -c 100000 --metric=VSZ\n" -" Résultat AVERTISSEMENT si vsz de n'importe quel processus est au dessus " -"50K ou 100K\n" -" check_procs -w 10 -c 20 --metric=CPU\n" -" Résultat AVERTISSEMENT si le cpu d'un processus est au dessus de 10%% ou " -"20%%\n" -"\n" -#: plugins/check_radius.c:122 +#: plugins/check_procs.c:738 +msgid "Critical if < 2 or > 1024 processes" +msgstr "" + +#: plugins/check_procs.c:740 +msgid "Warning alert if > 10 processes with command arguments containing" +msgstr "" + +#: plugins/check_procs.c:741 +msgid "'/usr/local/bin/perl' and owned by root" +msgstr "" + +#: plugins/check_procs.c:743 +msgid "Alert if vsz of any processes over 50K or 100K" +msgstr "" + +#: plugins/check_procs.c:745 +#, c-format +msgid "Alert if cpu of any processes over 10%% or 20%%" +msgstr "" + +#: plugins/check_radius.c:138 msgid "Config file error" msgstr "Erreur dans le fichier de configuration" -#: plugins/check_radius.c:130 +#: plugins/check_radius.c:147 msgid "Out of Memory?" msgstr "Manque de Mémoire?" -#: plugins/check_radius.c:151 +#: plugins/check_radius.c:168 msgid "Timeout" msgstr "Temps dépassé" -#: plugins/check_radius.c:153 +#: plugins/check_radius.c:170 msgid "Auth Error" msgstr "Erreur d'authentification" -#: plugins/check_radius.c:155 +#: plugins/check_radius.c:172 msgid "Auth Failed" msgstr "L'authentification à échoué" -#: plugins/check_radius.c:159 +#: plugins/check_radius.c:176 msgid "Auth OK" msgstr "L'authentification à réussi" -#: plugins/check_radius.c:202 plugins/check_radius.c:262 +#: plugins/check_radius.c:219 plugins/check_radius.c:279 msgid "Number of retries must be a positive integer" msgstr "Le nombre d'essai doit être un entier positif" -#: plugins/check_radius.c:288 -#, c-format -msgid "" -"Tests to see if a radius server is accepting connections.\n" -"\n" -msgstr "" -"Teste si un serveur radius accepte les connections.\n" -"\n" +#: plugins/check_radius.c:305 +msgid "Tests to see if a radius server is accepting connections." +msgstr "Teste si un serveur radius accepte les connections." -#: plugins/check_radius.c:296 -#, c-format -msgid "" -" -u, --username=STRING\n" -" The user to authenticate\n" -" -p, --password=STRING\n" -" Password for autentication (SECURITY RISK)\n" -" -n, --nas-id=STRING\n" -" NAS identifier\n" -" -F, --filename=STRING\n" -" Configuration file\n" -" -e, --expect=STRING\n" -" Response string to expect from the server\n" -" -r, --retries=INTEGER\n" -" Number of times to retry a failed connection\n" +#: plugins/check_radius.c:316 +msgid "The user to authenticate" msgstr "" -" -u, --username=STRING\n" -" Le nom de l'utilisateur qui doit se connecter\n" -" -p, --password=STRING\n" -" Le mot de passe pour la connection (RISQUE DE SECURITE)\n" -" -n, --nas-id=STRING\n" -" Identifiant NAS\n" -" -F, --filename=STRING\n" -" Fichier de configuration\n" -" -e, --expect=STRING\n" -" Le réponse attendue du serveur \n" -" -r, --retries=INTEGER\n" -" Nombre de fois que l'on doit essayer de se connecter après un échec\n" -#: plugins/check_radius.c:312 -#, c-format -msgid "" -"\n" -"This plugin tests a radius server to see if it is accepting connections.\n" -"\n" -"The server to test must be specified in the invocation, as well as a user\n" -"name and password. A configuration file may also be present. The format of\n" -"the configuration file is described in the radiusclient library sources.\n" -"\n" +#: plugins/check_radius.c:318 +msgid "Password for autentication (SECURITY RISK)" msgstr "" -"\n" -"Ce plugin teste un serveur radius pour voir si il accepte des connections.\n" -"\n" -"Le serveur à tester doit être spécifié ainsi que l'utilisateur et son mot de " -"passe\n" -"Un fichier de configuration peut être utilisé. Le format du fichier de\n" -"configuration est décrit dans la documentation de la librairies du client " -"radius.\n" -"\n" -#: plugins/check_radius.c:319 -#, c-format -msgid "" -"The password option presents a substantial security issue because the\n" -"password can be determined by careful watching of the command line in\n" -"a process listing. This risk is exacerbated because nagios will\n" -"run the plugin at regular prdictable intervals. Please be sure that\n" -"the password used does not allow access to sensitive system resources,\n" -"otherwise compormise could occur.\n" +#: plugins/check_radius.c:320 +msgid "NAS identifier" msgstr "" -"Le mot de passe représente un risque de sécurité assez important car il " -"peut\n" -"être déterminé en regardant la ligne de commande dans un listing des " -"processus\n" -"Ce risque est accru parce que Nagios vas exécuter le plugin a des " -"intervalles\n" -"prévisibles. Assurez vous que le mot de passe ne permet pas d'accéder à des\n" -"ressources importantes, autrement une brèche pourrait être ouverte dans " -"votre\n" -"sécurité.\n" -#: plugins/check_real.c:79 +#: plugins/check_radius.c:322 +msgid "Configuration file" +msgstr "Fichier de configuration" + +#: plugins/check_radius.c:324 +msgid "Response string to expect from the server" +msgstr "" + +#: plugins/check_radius.c:326 +msgid "Number of times to retry a failed connection" +msgstr "" + +#: plugins/check_radius.c:330 +msgid "" +"This plugin tests a radius server to see if it is accepting connections." +msgstr "" +"Ce plugin teste un serveur radius afin de vérifier si il accepte les " +"connections." + +#: plugins/check_radius.c:331 +msgid "" +"The server to test must be specified in the invocation, as well as a user" +msgstr "" + +#: plugins/check_radius.c:332 +msgid "" +"name and password. A configuration file may also be present. The format of" +msgstr "" + +#: plugins/check_radius.c:333 +msgid "" +"the configuration file is described in the radiusclient library sources." +msgstr "" + +#: plugins/check_radius.c:334 +msgid "The password option presents a substantial security issue because the" +msgstr "" + +#: plugins/check_radius.c:335 +msgid "password can be determined by careful watching of the command line in" +msgstr "" + +#: plugins/check_radius.c:336 +msgid "a process listing. This risk is exacerbated because nagios will" +msgstr "" + +#: plugins/check_radius.c:337 +msgid "run the plugin at regular prdictable intervals. Please be sure that" +msgstr "" + +#: plugins/check_radius.c:338 +msgid "the password used does not allow access to sensitive system resources," +msgstr "" + +#: plugins/check_radius.c:339 +msgid "otherwise compormise could occur." +msgstr "" + +#: plugins/check_real.c:96 #, c-format msgid "Unable to connect to %s on port %d\n" msgstr "Impossible de se connecter à %s sur le port %d\n" -#: plugins/check_real.c:101 +#: plugins/check_real.c:118 #, c-format msgid "No data received from %s\n" msgstr "Pas de données reçues de %s\n" -#: plugins/check_real.c:106 plugins/check_real.c:179 -#, c-format -msgid "Invalid REAL response received from host\n" -msgstr "Réponses REAL invalide reçue de l'hôte\n" +#: plugins/check_real.c:123 plugins/check_real.c:196 +msgid "Invalid REAL response received from host" +msgstr "Réponses REAL invalide reçue de l'hôte" -#: plugins/check_real.c:108 plugins/check_real.c:181 +#: plugins/check_real.c:125 plugins/check_real.c:198 #, c-format msgid "Invalid REAL response received from host on port %d\n" msgstr "Réponses REAL invalide reçue de l'hôte sur le port %d\n" -#: plugins/check_real.c:172 plugins/check_tcp.c:278 -#, c-format -msgid "No data received from host\n" -msgstr "Pas de données reçues de l'hôte\n" - -#: plugins/check_real.c:235 +#: plugins/check_real.c:252 #, c-format msgid "REAL %s - %d second response time\n" msgstr "REAL %s - %d secondes de temps de réponse\n" -#: plugins/check_real.c:324 plugins/check_smtp.c:584 plugins/check_ups.c:525 +#: plugins/check_real.c:341 plugins/check_smtp.c:618 plugins/check_ups.c:535 msgid "Warning time must be a positive integer" msgstr "Le seuil d'avertissement doit être un entier positif" -#: plugins/check_real.c:333 plugins/check_smtp.c:575 plugins/check_ups.c:516 +#: plugins/check_real.c:350 plugins/check_smtp.c:609 plugins/check_ups.c:526 msgid "Critical time must be a positive integer" msgstr "Le seuil critique doit être un entier positif" -#: plugins/check_real.c:369 +#: plugins/check_real.c:386 msgid "You must provide a server to check" msgstr "Vous devez fournir un serveur à vérifier" -#: plugins/check_real.c:401 -#, c-format -msgid "" -"This plugin tests the REAL service on the specified host.\n" -"\n" -msgstr "" -"Ce plugin teste le service REAL sur l'hôte spécifié.\n" -"\n" +#: plugins/check_real.c:418 +msgid "This plugin tests the REAL service on the specified host." +msgstr "Ce plugin teste le service REAL sur l'hôte spécifié." -#: plugins/check_real.c:409 -#, c-format -msgid "" -" -u, --url=STRING\n" -" Connect to this url\n" -" -e, --expect=STRING\n" -" String to expect in first line of server response (default: %s)\n" +#: plugins/check_real.c:429 +msgid "Connect to this url" msgstr "" -" -u, --url=STRING\n" -" Connexion à cette url\n" -" -e, --expect=STRING\n" -" Texte attendu dans la première ligne de réponse du serveur (défaut: %s)\n" -#: plugins/check_real.c:422 +#: plugins/check_real.c:431 #, c-format -msgid "" -"This plugin will attempt to open an RTSP connection with the host.\n" -"Successul connects return STATE_OK, refusals and timeouts return\n" -"STATE_CRITICAL, other errors return STATE_UNKNOWN. Successful connects,\n" -"but incorrect reponse messages from the host result in STATE_WARNING return\n" -"values." +msgid "String to expect in first line of server response (default: %s)\n" msgstr "" -"Ce plugin vas essayer d'ouvrir une connexion RTSP avec l'hôte.\n" -"Une connexion réussie va renvoyer un résultat STATE_OK, les refus et les " -"délais\n" -"d'attente dépassé vont renvoyer STATE_CRITICAL, les autres erreurs " -"retournent\n" -"STATE_UNKNOWN. Les connexion réussies, mais avec une réponse incorrecte \n" -"depuis l'hôte donnent un résultat STATE_WARNING." +"Texte attendu dans la première ligne de réponse du serveur (défaut: %s)\n" -#: plugins/check_smtp.c:172 +#: plugins/check_real.c:440 +msgid "This plugin will attempt to open an RTSP connection with the host." +msgstr "Ce plugin va essayer d'ouvrir un connexion RTSP avec l'hôte." + +#: plugins/check_real.c:441 plugins/check_smtp.c:767 +msgid "Successul connects return STATE_OK, refusals and timeouts return" +msgstr "" + +#: plugins/check_real.c:442 +msgid "" +"STATE_CRITICAL, other errors return STATE_UNKNOWN. Successful connects," +msgstr "" + +#: plugins/check_real.c:443 +msgid "" +"but incorrect reponse messages from the host result in STATE_WARNING return" +msgstr "" + +#: plugins/check_real.c:444 +msgid "values." +msgstr "" + +#: plugins/check_smtp.c:186 plugins/check_swap.c:268 plugins/check_swap.c:274 #, c-format msgid "malloc() failed!\n" msgstr "l'allocation mémoire à échoué!\n" -#: plugins/check_smtp.c:176 +#: plugins/check_smtp.c:190 #, c-format msgid "gethostname() failed!\n" msgstr "La commande gethostname() à échoué\n" -#: plugins/check_smtp.c:213 plugins/check_smtp.c:237 +#: plugins/check_smtp.c:225 plugins/check_smtp.c:249 #, c-format msgid "recv() failed\n" msgstr "La commande recv() à échoué\n" -#: plugins/check_smtp.c:224 +#: plugins/check_smtp.c:236 #, c-format msgid "Invalid SMTP response received from host\n" msgstr "Réponse SMTP invalide reçue de l'hôte\n" -#: plugins/check_smtp.c:226 +#: plugins/check_smtp.c:238 #, c-format msgid "Invalid SMTP response received from host on port %d\n" msgstr "Réponse SMTP invalide reçue de l'hôte sur le port %d\n" -#: plugins/check_smtp.c:248 +#: plugins/check_smtp.c:260 #, c-format msgid "WARNING - TLS not supported by server\n" msgstr "AVERTISSEMENT: - TLS n'est pas supporté par ce serveur\n" -#: plugins/check_smtp.c:260 +#: plugins/check_smtp.c:272 #, c-format msgid "Server does not support STARTTLS\n" msgstr "Le serveur ne supporte pas STARTTLS\n" -#: plugins/check_smtp.c:266 +#: plugins/check_smtp.c:278 #, c-format msgid "CRITICAL - Cannot create SSL context.\n" msgstr "CRITIQUE - Impossible de créer le contexte SSL.\n" -#: plugins/check_smtp.c:277 plugins/check_tcp.c:226 +#: plugins/check_smtp.c:298 +msgid "SMTP UNKNOWN - Cannot send EHLO command via TLS." +msgstr "" + +#: plugins/check_smtp.c:303 #, c-format -msgid "CRITICAL - Cannot retrieve server certificate.\n" +msgid "sent %s" +msgstr "envoyé %s" + +#: plugins/check_smtp.c:305 +msgid "SMTP UNKNOWN - Cannot read EHLO response via TLS." +msgstr "" + +#: plugins/check_smtp.c:318 +#, fuzzy +msgid "CRITICAL - Cannot retrieve server certificate." msgstr "CRITIQUE - Impossible d'obtenir le certificat du serveur.\n" -#: plugins/check_smtp.c:316 plugins/check_snmp.c:556 +#: plugins/check_smtp.c:356 plugins/check_snmp.c:568 #, c-format msgid "Could Not Compile Regular Expression" msgstr "Impossible de compiler l'expression régulière" -#: plugins/check_smtp.c:325 plugins/check_smtp.c:335 +#: plugins/check_smtp.c:365 #, c-format msgid "SMTP %s - Invalid response '%s' to command '%s'\n" msgstr "SMTP %s - réponse invalide de '%s' à la commande '%s'\n" -#: plugins/check_smtp.c:329 plugins/check_snmp.c:301 +#: plugins/check_smtp.c:369 plugins/check_snmp.c:318 #, c-format msgid "Execute Error: %s\n" msgstr "Erreur d'exécution: %s\n" -#: plugins/check_smtp.c:349 +#: plugins/check_smtp.c:383 msgid "no authuser specified, " msgstr "Pas d'utilisateur pour l'authentification spécifié, " -#: plugins/check_smtp.c:354 +#: plugins/check_smtp.c:388 msgid "no authpass specified, " msgstr "pas de mot de passe spécifié, " -#: plugins/check_smtp.c:361 plugins/check_smtp.c:383 plugins/check_smtp.c:404 +#: plugins/check_smtp.c:395 plugins/check_smtp.c:417 plugins/check_smtp.c:438 #, c-format msgid "sent %s\n" msgstr "envoyé %s\n" -#: plugins/check_smtp.c:364 -msgid "recv() failed after AUTH LOGIN, \n" +#: plugins/check_smtp.c:398 +#, fuzzy +msgid "recv() failed after AUTH LOGIN, " msgstr "la commande recv() à échoué après AUTH LOGIN, \n" -#: plugins/check_smtp.c:370 plugins/check_smtp.c:392 plugins/check_smtp.c:413 +#: plugins/check_smtp.c:404 plugins/check_smtp.c:426 plugins/check_smtp.c:447 #, c-format msgid "received %s\n" msgstr "reçu %s\n" -#: plugins/check_smtp.c:374 +#: plugins/check_smtp.c:408 msgid "invalid response received after AUTH LOGIN, " msgstr "Réponse invalide reçue après AUTH LOGIN, " -#: plugins/check_smtp.c:387 +#: plugins/check_smtp.c:421 msgid "recv() failed after sending authuser, " msgstr "La commande recv() a échoué après authuser, " -#: plugins/check_smtp.c:396 +#: plugins/check_smtp.c:430 msgid "invalid response received after authuser, " msgstr "Réponse invalide reçue après authuser, " -#: plugins/check_smtp.c:408 +#: plugins/check_smtp.c:442 msgid "recv() failed after sending authpass, " msgstr "la commande recv() à échoué après authpass, " -#: plugins/check_smtp.c:417 +#: plugins/check_smtp.c:451 msgid "invalid response received after authpass, " msgstr "Réponse invalide reçue après authpass, " -#: plugins/check_smtp.c:424 +#: plugins/check_smtp.c:458 msgid "only authtype LOGIN is supported, " msgstr "seul la méthode d'authentification LOGIN est supportée, " -#: plugins/check_smtp.c:448 +#: plugins/check_smtp.c:482 #, c-format msgid "SMTP %s - %s%.3f sec. response time%s%s|%s\n" msgstr "SMTP %s - %s%.3f sec. de temps de réponse%s%s|%s\n" -#: plugins/check_smtp.c:554 plugins/check_smtp.c:564 +#: plugins/check_smtp.c:588 plugins/check_smtp.c:598 #, c-format msgid "Could not realloc() units [%d]\n" msgstr "Impossible de réallouer des unités [%d]\n" -#: plugins/check_smtp.c:611 +#: plugins/check_smtp.c:645 msgid "SSL support not available - install OpenSSL and recompile" msgstr "SSL n'est pas disponible - installer OpenSSL et recompilez" -#: plugins/check_smtp.c:681 -#, c-format -msgid "" -"This plugin will attempt to open an SMTP connection with the host.\n" -"\n" -msgstr "" -"Ce plugin va essayer d'ouvrir un connexion SMTP avec l'hôte.\n" -"\n" +#: plugins/check_smtp.c:724 +msgid "This plugin will attempt to open an SMTP connection with the host." +msgstr "Ce plugin va essayer d'ouvrir un connexion SMTP avec l'hôte." -#: plugins/check_smtp.c:691 +#: plugins/check_smtp.c:737 #, c-format -msgid "" -" -e, --expect=STRING\n" -" String to expect in first line of server response (default: '%s')\n" -" -n, nocommand\n" -" Suppress SMTP command\n" -" -C, --command=STRING\n" -" SMTP command (may be used repeatedly)\n" -" -R, --command=STRING\n" -" Expected response to command (may be used repeatedly)\n" -" -f, --from=STRING\n" -" FROM-address to include in MAIL command, required by Exchange 2000\n" +msgid " String to expect in first line of server response (default: '%s')\n" msgstr "" -" -e, --expect=STRING\n" -" La chaîne de caractères se trouvant dans la 1ere ligne de réponse " -"(défaut: '%s')\n" -" -n, nocommand\n" -" Supprimer la commande SMTP\n" -" -C, --command=STRING\n" -" Commande SMTP (peut être utilisée de manière répétée)\n" -" -R, --command=STRING\n" -" Réponse attendue à la commande (peut être utilisée de manière répétée)\n" -" -f, --from=STRING\n" -" Adresse FROM-à inclure dans la commande MAIL , nécessaire pour\n" -" Exchange 2000\n" +" Texte attendu dans la première ligne de réponse du serveur (défaut: '%" +"s')\n" -#: plugins/check_smtp.c:704 -#, c-format -msgid "" -" -D, --certificate=INTEGER\n" -" Minimum number of days a certificate has to be valid.\n" -" -S, --starttls\n" -" Use STARTTLS for the connection.\n" +#: plugins/check_smtp.c:739 +msgid "Suppress SMTP command" msgstr "" -" -D, --certificate=INTEGER\n" -" Nombre minimum de jours de validité du certificat.\n" -" -S, --starttls\n" -" Utilisez STARTTLS pour la connexion.\n" -#: plugins/check_smtp.c:726 -#, c-format -msgid "" -"\n" -"Successul connects return STATE_OK, refusals and timeouts return\n" -"STATE_CRITICAL, other errors return STATE_UNKNOWN. Successful\n" -"connects, but incorrect reponse messages from the host result in\n" -"STATE_WARNING return values.\n" +#: plugins/check_smtp.c:741 +msgid "SMTP command (may be used repeatedly)" +msgstr "Commande SMTP (peut être utilisé plusieurs fois)" + +#: plugins/check_smtp.c:743 +msgid "Expected response to command (may be used repeatedly)" msgstr "" -"\n" -"Un connexion réussie renvoie STATE_OK, les refus et délias d'attente " -"dépassé \n" -"renvoient STATE_CRITICAL, les autres erreurs renvoient STATE_INCONNU.\n" -"Les connexions réussies, mais avec une réponse incorrecte de l'hôte " -"renvoient\n" -"STATE_WARNING.\n" -#: plugins/check_snmp.c:278 +#: plugins/check_smtp.c:745 +msgid "FROM-address to include in MAIL command, required by Exchange 2000" +msgstr "" + +#: plugins/check_smtp.c:748 plugins/check_tcp.c:638 +msgid "Minimum number of days a certificate has to be valid." +msgstr "Nombre de jours minimum pour que le certificat soit valide." + +#: plugins/check_smtp.c:750 +msgid "Use STARTTLS for the connection." +msgstr "" + +#: plugins/check_smtp.c:754 +msgid "SMTP AUTH type to check (default none, only LOGIN supported)" +msgstr "" + +#: plugins/check_smtp.c:756 +msgid "SMTP AUTH username" +msgstr "" + +#: plugins/check_smtp.c:758 +msgid "SMTP AUTH password" +msgstr "" + +#: plugins/check_smtp.c:768 +msgid "STATE_CRITICAL, other errors return STATE_UNKNOWN. Successful" +msgstr "" + +#: plugins/check_smtp.c:769 +msgid "connects, but incorrect reponse messages from the host result in" +msgstr "" + +#: plugins/check_smtp.c:770 +msgid "STATE_WARNING return values." +msgstr "" + +#: plugins/check_snmp.c:296 msgid "No valid data returned" msgstr "Pas de données valides reçues" -#: plugins/check_snmp.c:349 plugins/negate.c:113 +#: plugins/check_snmp.c:364 plugins/negate.c:128 #, c-format msgid "" "%s problem - No data received from host\n" @@ -3749,455 +3787,426 @@ msgstr "" "%s problème - Pas de données reçues de l'hôte\n" "Commande: %s\n" -#: plugins/check_snmp.c:487 +#: plugins/check_snmp.c:502 #, c-format msgid "Invalid critical threshold: %s\n" msgstr "Seuil critique invalide: %s\n" -#: plugins/check_snmp.c:498 +#: plugins/check_snmp.c:513 #, c-format msgid "Invalid warning threshold: %s\n" msgstr "Seuil d'avertissement invalide: %s\n" -#: plugins/check_snmp.c:510 +#: plugins/check_snmp.c:525 msgid "Retries interval must be a positive integer" msgstr "L'intervalle pour les essais doit être un entier positif" -#: plugins/check_snmp.c:562 -#, c-format -msgid "call for regex which was not a compiled option" -msgstr "demande d'utilisation d'un regex qui n'est pas prévu dans le programme" - -#: plugins/check_snmp.c:581 +#: plugins/check_snmp.c:589 #, c-format msgid "Could not reallocate labels[%d]" msgstr "Impossible de réallouer des labels[%d]" -#: plugins/check_snmp.c:593 +#: plugins/check_snmp.c:601 msgid "Could not reallocate labels\n" msgstr "Impossible de réallouer des labels\n" -#: plugins/check_snmp.c:610 +#: plugins/check_snmp.c:618 #, c-format msgid "Could not reallocate units [%d]\n" msgstr "Impossible de réallouer des unités [%d]\n" -#: plugins/check_snmp.c:622 +#: plugins/check_snmp.c:630 msgid "Could not realloc() units\n" msgstr "Impossible de réallouer des unités\n" -#: plugins/check_snmp.c:707 +#: plugins/check_snmp.c:715 #, c-format msgid "Missing secname (%s) or authpassword (%s) ! \n" msgstr "Manque secname (%s) ou authpassword (%s) ! \n" -#: plugins/check_snmp.c:715 +#: plugins/check_snmp.c:723 #, c-format msgid "Missing secname (%s), authpassword (%s), or privpasswd (%s)! \n" msgstr "Manque secname (%s) ou authpassword (%s) ou privpassword (%s)! \n" -#: plugins/check_snmp.c:724 +#: plugins/check_snmp.c:732 msgid "Invalid SNMP version" msgstr "Version de SNMP invalide" -#: plugins/check_snmp.c:852 +#: plugins/check_snmp.c:860 msgid "Unbalanced quotes\n" msgstr "Guillemets manquants\n" -#: plugins/check_snmp.c:901 -#, c-format -msgid "" -"Check status of remote machines and obtain sustem information via SNMP\n" -"\n" +#: plugins/check_snmp.c:909 +msgid "Check status of remote machines and obtain sustem information via SNMP" msgstr "" "Vérifie l'état des machines distantes et obtient l'information système via " -"SNMP\n" -"\n" +"SNMP" -#: plugins/check_snmp.c:911 -#, c-format -msgid "" -" -n, --next\n" -" Use SNMP GETNEXT instead of SNMP GET\n" -" -P, --protocol=[1|2c|3]\n" -" SNMP protocol version\n" -" -L, --seclevel=[noAuthNoPriv|authNoPriv|authPriv]\n" -" SNMPv3 securityLevel\n" -" -a, --authproto=[MD5|SHA]\n" -" SNMPv3 auth proto\n" +#: plugins/check_snmp.c:921 +msgid "Use SNMP GETNEXT instead of SNMP GET" msgstr "" -" -P, --protocol=[1|3]\n" -" Version du protocole SNMP\n" -" -L, --seclevel=[noAuthNoPriv|authNoPriv|authPriv]\n" -" Niveau de sécurité SNMPv3\n" -" -a, --authproto=[MD5|SHA]\n" -" Protocole d'authenfication SNMPv3\n" -#: plugins/check_snmp.c:922 -#, c-format -msgid "" -" -C, --community=STRING\n" -" Optional community string for SNMP communication\n" -" (default is \"%s\")\n" -" -U, --secname=USERNAME\n" -" SNMPv3 username\n" -" -A, --authpassword=PASSWORD\n" -" SNMPv3 authentication password\n" -" -X, --privpasswd=PASSWORD\n" -" SNMPv3 crypt passwd (DES)\n" +#: plugins/check_snmp.c:923 +msgid "SNMP protocol version" +msgstr "Version du protocole SNMP" + +#: plugins/check_snmp.c:925 +msgid "SNMPv3 securityLevel" msgstr "" -" -C, --community=STRING\n" -" nom de la communauté SNMP pour la communication\n" -" (défaut est \"%s\")\n" -" -U, --secname=USERNAME\n" -" nom d'utilisateur pour SNMPv3\n" -" -A, --authpassword=PASSWORD\n" -" mot de passe pour SNMPv3\n" -" -X, --privpasswd=PASSWORD\n" -" mot de passe crypté pour SNMPv3 (DES)\n" + +#: plugins/check_snmp.c:927 +msgid "SNMPv3 auth proto" +msgstr "" + +#: plugins/check_snmp.c:931 +msgid "Optional community string for SNMP communication" +msgstr "" + +#: plugins/check_snmp.c:932 +#, c-format +msgid "(default is \"%s\")" +msgstr "(défaut \"%s\")" #: plugins/check_snmp.c:934 -#, c-format -msgid "" -" -o, --oid=OID(s)\n" -" Object identifier(s) or SNMP variables whose value you wish to query\n" -" -m, --miblist=STRING\n" -" List of MIBS to be loaded (default = none if using numeric oids or " -"'ALL'\n" -"\t\tfor symbolic oids.)\n" -" -d, --delimiter=STRING\n" -" Delimiter to use when parsing returned data. Default is \"%s\"\n" -" Any data on the right hand side of the delimiter is considered\n" -" to be the data that should be used in the evaluation.\n" +msgid "SNMPv3 username" msgstr "" -" -o, --oid=OID(s)\n" -" Identifiant des objets ou variables SNMP que vous voulez interroger\n" -" -m, --miblist=STRING\n" -" Liste de MIBS à charger (défaut = aucune si on utilise des oids " -"numériques ou 'ALL'\n" -"\t\tpour les oids symboliques.)\n" -" -d, --delimiter=STRING\n" -" Délimiteur à utiliser quand on lit les données reçues. Défaut est \"%s" -"\"\n" -" N'importe quel données à la droite du délimiteur est considère comme \n" -" une donnée qui doit être utilisée dans l'évaluation.\n" -#: plugins/check_snmp.c:946 -#, c-format -msgid "" -" -w, --warning=INTEGER_RANGE(s)\n" -" Range(s) which will not result in a WARNING status\n" -" -c, --critical=INTEGER_RANGE(s)\n" -" Range(s) which will not result in a CRITICAL status\n" +#: plugins/check_snmp.c:936 +msgid "SNMPv3 authentication password" +msgstr "" + +#: plugins/check_snmp.c:938 +msgid "SNMPv3 crypt passwd (DES)" +msgstr "" + +#: plugins/check_snmp.c:942 +msgid "Object identifier(s) or SNMP variables whose value you wish to query" +msgstr "" + +#: plugins/check_snmp.c:944 +msgid "" +"List of MIBS to be loaded (default = none if using numeric oids or 'ALL'" +msgstr "" + +#: plugins/check_snmp.c:945 +msgid "for symbolic oids.)" +msgstr "" + +#: plugins/check_snmp.c:947 +#, c-format +msgid " Delimiter to use when parsing returned data. Default is \"%s\"" +msgstr "" + +#: plugins/check_snmp.c:948 +msgid "Any data on the right hand side of the delimiter is considered" +msgstr "" + +#: plugins/check_snmp.c:949 +msgid "to be the data that should be used in the evaluation." msgstr "" -" -w, --warning=INTEGER_RANGE(s)\n" -" Seuil qui ne donnera pas un résultat AVERTISSEMENT\n" -" -c, --critical=INTEGER_RANGE(s)\n" -" Seuil qui ne donnera pas un résultat CRITIQUE\n" #: plugins/check_snmp.c:953 -#, c-format -msgid "" -" -s, --string=STRING\n" -" Return OK state (for that OID) if STRING is an exact match\n" -" -r, --ereg=REGEX\n" -" Return OK state (for that OID) if extended regular expression REGEX " -"matches\n" -" -R, --eregi=REGEX\n" -" Return OK state (for that OID) if case-insensitive extended REGEX " -"matches\n" -" -l, --label=STRING\n" -" Prefix label for output from plugin (default -s 'SNMP')\n" +msgid "Range(s) which will not result in a WARNING status" msgstr "" -" -s, --string=STRING\n" -" Résultat OK (pour cet OID) si la chaîne de caractère correspond " -"exactement\n" -" -r, --ereg=REGEX\n" -" Résultat OK (pour cet OID) si l'expression régulière étendue correspond\n" -" -R, --eregi=REGEX\n" -" Résultat OK (pour cet OID) si l'expression régulière étendue sans " -"différencier les majuscules des minuscules correspond\n" -" -l, --label=STRING\n" -" titre pour la sortie du plugin (défaut -s 'SNMP')\n" -#: plugins/check_snmp.c:964 -#, c-format -msgid "" -" -u, --units=STRING\n" -" Units label(s) for output data (e.g., 'sec.').\n" -" -D, --output-delimiter=STRING\n" -" Separates output on multiple OID requests\n" +#: plugins/check_snmp.c:955 +msgid "Range(s) which will not result in a CRITICAL status" msgstr "" -" -u, --units=STRING\n" -" TItre des champs pour les données reçues (ex: 'sec.').\n" -" -D, --output-delimiter=STRING\n" -" Séparation des données reçues lors de l'interrogation d'OID multiples\n" -#: plugins/check_snmp.c:974 -#, c-format -msgid "" -"\n" -"- This plugin uses the 'snmpget' command included with the NET-SNMP " -"package.\n" -" If you don't have the package installed, you will need to download it " -"from\n" -" http://net-snmp.sourceforge.net before you can use this plugin.\n" +#: plugins/check_snmp.c:959 +msgid "Return OK state (for that OID) if STRING is an exact match" msgstr "" -"\n" -"- Ce plugin utilise la commande 'snmpget' inclus dans la distribution NET-" -"SNMP\n" -"Si vous n'avez pas ce logiciel installé, vous devez le télécharger depuis \n" -"http://net-snmp.sourceforge.net avant de pouvoir utiliser ce plugin.\n" + +#: plugins/check_snmp.c:961 +msgid "" +"Return OK state (for that OID) if extended regular expression REGEX matches" +msgstr "" + +#: plugins/check_snmp.c:963 +msgid "" +"Return OK state (for that OID) if case-insensitive extended REGEX matches" +msgstr "" + +#: plugins/check_snmp.c:965 +msgid "Prefix label for output from plugin (default -s 'SNMP')" +msgstr "" + +#: plugins/check_snmp.c:969 +msgid "Units label(s) for output data (e.g., 'sec.')." +msgstr "" + +#: plugins/check_snmp.c:971 +msgid "Separates output on multiple OID requests" +msgstr "" + +#: plugins/check_snmp.c:977 +msgid "" +"This plugin uses the 'snmpget' command included with the NET-SNMP package." +msgstr "" + +#: plugins/check_snmp.c:978 +msgid "" +"if you don't have the package installed, you will need to download it from" +msgstr "" +"Si vous n'avez pas le programme installé, vous devrez le télécharger depuis" #: plugins/check_snmp.c:979 -#, c-format +msgid "http://net-snmp.sourceforge.net before you can use this plugin." +msgstr "http://net-snmp.sourceforge.net avant de pouvoir utiliser ce plugin." + +#: plugins/check_snmp.c:981 msgid "" "- Multiple OIDs may be indicated by a comma- or space-delimited list (lists " -"with\n" -" internal spaces must be quoted) [max 8 OIDs]\n" +"with" msgstr "" -"- Des OIDs multiples peuvent être indiquées par une virgule ou par des " -"listes\n" -"séparées par des espaces (des listes avec des espaces intérieurs doivent " -"êtres\n" -"mise entre guillemets) [max 8 OIDs]\n" +"- Des OIDs multiples peuvent être indiquées par une virgule ou par des listes" -#: plugins/check_snmp.c:983 -#, c-format -msgid "" -"- Ranges are inclusive and are indicated with colons. When specified as\n" -" 'min:max' a STATE_OK will be returned if the result is within the " -"indicated\n" -" range or is equal to the upper or lower bound. A non-OK state will be\n" -" returned if the result is outside the specified range.\n" +#: plugins/check_snmp.c:982 +msgid " internal spaces must be quoted) [max 8 OIDs]" +msgstr "" + +#: plugins/check_snmp.c:984 +msgid "- Ranges are inclusive and are indicated with colons. When specified as" +msgstr "" + +#: plugins/check_snmp.c:985 +msgid "" +" 'min:max' a STATE_OK will be returned if the result is within the indicated" +msgstr "" +" 'max:min' un résultat STATE_OK sera retourné si le résultat est dans " +"l'écart spécifié." + +#: plugins/check_snmp.c:986 +msgid " range or is equal to the upper or lower bound. A non-OK state will be" +msgstr "" + +#: plugins/check_snmp.c:987 +msgid " returned if the result is outside the specified range." msgstr "" -"- Les écarts sont inclusif et indiqués avec des points virgules . Quand il " -"sont \n" -" indiqués comme 'min:max' un résultat STATE_OK sera retourné si le " -"résultat \n" -" est dans l'écart, ou sil il est égal à la limite supérieure ou " -"inférieure. \n" -"- Un résultat autre que STATE_OK sera retourné si le résultat est à " -"l'extérieur \n" -" de l'écart indiqué.\n" #: plugins/check_snmp.c:989 -#, c-format msgid "" -"- If specified in the order 'max:min' a non-OK state will be returned if " -"the\n" -" result is within the (inclusive) range.\n" +"- If specified in the order 'max:min' a non-OK state will be returned if the" +msgstr "" +"- Si l'écart est indiqué comme 'max:min' un résultat autre que STATE_OK sera " +"retourné si le" + +#: plugins/check_snmp.c:990 +msgid " result is within the (inclusive) range." +msgstr "" + +#: plugins/check_snmp.c:992 +msgid "" +"- Upper or lower bounds may be omitted to skip checking the respective limit." msgstr "" -"- Si l'écart est indiqué comme 'max:min' un résultat autre que STATE_OK " -"sera\n" -" retourné si le résultat est dans l'écart spécifié.\n" #: plugins/check_snmp.c:993 -#, c-format -msgid "" -"- Upper or lower bounds may be omitted to skip checking the respective " -"limit.\n" -"- Bare integers are interpreted as upper limits.\n" -"- When checking multiple OIDs, separate ranges by commas like '-w " -"1:10,1:,:20'\n" -"- Note that only one string and one regex may be checked at present\n" -"- All evaluation methods other than PR, STR, and SUBSTR expect that the " -"value\n" -" returned from the SNMP query is an unsigned integer.\n" +msgid "- Bare integers are interpreted as upper limits." msgstr "" -"- Les limites supérieure et inférieures peuvent être omises pour ne pas les " -"vérifier.\n" -"- Les entiers sont interprétés comme des limites supérieures.\n" -"- Quand vous vérifiez de multiple OIDs, séparer les écarts par des , comme '-" -"w 1:10,1:,:20'\n" -"- Notez que seulement une chaîne et un regex peut être évalué actuellement\n" -"- Toutes les méthodes d'évaluations autres que PR, STR, and SUBSTR " -"attendent\n" -"que la valeur retourné par la requête SNMP est un entier non signé.\n" -#: plugins/check_ssh.c:152 +#: plugins/check_snmp.c:994 +msgid "" +"- When checking multiple OIDs, separate ranges by commas like '-w " +"1:10,1:,:20'" +msgstr "" + +#: plugins/check_snmp.c:995 +msgid "- Note that only one string and one regex may be checked at present" +msgstr "" + +#: plugins/check_snmp.c:996 +msgid "" +"- All evaluation methods other than PR, STR, and SUBSTR expect that the value" +msgstr "" + +#: plugins/check_snmp.c:997 +msgid " returned from the SNMP query is an unsigned integer." +msgstr "" + +#: plugins/check_ssh.c:170 msgid "Port number must be a positive integer" msgstr "Le numéro du port doit être un nombre entier positif" -#: plugins/check_ssh.c:217 +#: plugins/check_ssh.c:235 #, c-format msgid "Server answer: %s" msgstr "Réponse du serveur: %s" -#: plugins/check_ssh.c:235 +#: plugins/check_ssh.c:253 #, c-format msgid "SSH WARNING - %s (protocol %s) version mismatch, expected '%s'\n" msgstr "" "SSH AVERTISSEMENT - %s (protocole %s) différence de version, attendu'%s'\n" -#: plugins/check_ssh.c:241 +#: plugins/check_ssh.c:259 #, c-format msgid "SSH OK - %s (protocol %s)\n" msgstr "SSH OK - %s (protocole %s)\n" -#: plugins/check_ssh.c:261 -#, c-format -msgid "" -"Try to connect to an SSH server at specified server and port\n" -"\n" -msgstr "" -"Essaye de se connecter à un serveur SSH précisé à un port précis\n" -"\n" +#: plugins/check_ssh.c:279 +msgid "Try to connect to an SSH server at specified server and port" +msgstr "Essaye de se connecter à un serveur SSH précisé à un port précis" -#: plugins/check_ssh.c:273 -#, c-format +#: plugins/check_ssh.c:294 msgid "" -" -r, --remote-version=STRING\n" -" Warn if string doesn't match expected server version (ex: " -"OpenSSH_3.9p1)\n" +"Warn if string doesn't match expected server version (ex: OpenSSH_3.9p1)" msgstr "" -" -r, --remote-version=STRING\n" -" Résultat AVERTISSEMENT si la chaîne ne correspond pas à la version " -"précisée (ex: OpenSSH_3.9p1)\n" +"AVERTISSEMENT si la chaîne ne correspond pas à la version précisée (ex: " +"OpenSSH_3.9p1)" -#: plugins/check_swap.c:149 +#: plugins/check_swap.c:172 #, c-format msgid "Command: %s\n" msgstr "Commande: %s\n" -#: plugins/check_swap.c:151 +#: plugins/check_swap.c:174 #, c-format msgid "Format: %s\n" msgstr "Format: %s\n" -#: plugins/check_swap.c:187 +#: plugins/check_swap.c:210 #, c-format msgid "total=%.0f, used=%.0f, free=%.0f\n" msgstr "total=%.0f, utilisé=%.0f, libre=%.0ff\n" -#: plugins/check_swap.c:201 +#: plugins/check_swap.c:224 #, c-format msgid "total=%.0f, free=%.0f\n" msgstr "total=%.0f, libre=%.0f\n" -#: plugins/check_swap.c:246 plugins/check_swap.c:288 +#: plugins/check_swap.c:256 +msgid "Error getting swap devices\n" +msgstr "" + +#: plugins/check_swap.c:259 +msgid "SWAP OK: No swap devices defined\n" +msgstr "SWAP OK: Pas de périphériques swap définis\n" + +#: plugins/check_swap.c:280 plugins/check_swap.c:322 msgid "swapctl failed: " msgstr "swapctl à échoué:" -#: plugins/check_swap.c:326 +#: plugins/check_swap.c:281 plugins/check_swap.c:323 +msgid "Error in swapctl call\n" +msgstr "" + +#: plugins/check_swap.c:360 #, c-format msgid "SWAP %s - %d%% free (%d MB out of %d MB) %s|" msgstr "SWAP %s - %d%% libre (%d MB sur un total de %d MB) %s|" -#: plugins/check_swap.c:476 +#: plugins/check_swap.c:438 +msgid "Warning threshold must be integer or percentage!" +msgstr "Le seuil d'avertissement doit être un entier ou un pourcentage!" + +#: plugins/check_swap.c:456 +msgid "Critical threshold must be integer or percentage!" +msgstr "Le seuil critique doit être un entier ou un pourcentage!" + +#: plugins/check_swap.c:510 msgid "Warning percentage should be more than critical percentage" msgstr "" "Le pourcentage d'avertissement doit être plus important que le pourcentage " "critique" -#: plugins/check_swap.c:480 +#: plugins/check_swap.c:514 msgid "Warning free space should be more than critical free space" msgstr "" "Le seuil d'avertissement pour la place libre doit être plus grand que le " "seuil critique" -#: plugins/check_swap.c:494 -#, c-format -msgid "" -"Check swap space on local machine.\n" -"\n" -msgstr "" -"Vérifie l'espace swap sur la machine locale.\n" -"\n" +#: plugins/check_swap.c:528 +msgid "Check swap space on local machine." +msgstr "Vérifie l'espace swap sur la machine locale." -#: plugins/check_swap.c:500 -#, c-format +#: plugins/check_swap.c:537 +#, fuzzy msgid "" -"\n" -" -w, --warning=INTEGER\n" -" Exit with WARNING status if less than INTEGER bytes of swap space are " -"free\n" -" -w, --warning=PERCENT%%\n" -" Exit with WARNING status if less than PERCENT of swap space is free\n" -" -c, --critical=INTEGER\n" -" Exit with CRITICAL status if less than INTEGER bytes of swap space are " -"free\n" -" -c, --critical=PERCENT%%\n" -" Exit with CRITCAL status if less than PERCENT of swap space is free\n" -" -a, --allswaps\n" -" Conduct comparisons for all swap partitions, one by one\n" -" -v, --verbose\n" -" Verbose output. Up to 3 levels\n" +"Exit with WARNING status if less than INTEGER bytes of swap space are free" msgstr "" -"\n" -" -w, --warning=INTEGER\n" -" Sortie avec un résultat AVERTISSEMENT si moins de INTEGER bytes de place " -"swap sont libres\n" -" -w, --warning=PERCENT%%\n" -" Sortie avec un résultat AVERTISSEMENT si moins de PERCENT de place swap " -"sont libres\n" -" -c, --critical=INTEGER\n" -" Sortie avec un résultat CRITIQUE si moins de INTEGER bytes de place swap " -"sont libres\n" -" -c, --critical=PERCENT%%\n" -" Sortie avec un résultat CRITIQUE si moins de PERCENT de place swap sont " -"libres\n" -" -a, --allswaps\n" -" Effectuer des comparaisons pour toutes les partitions de swap, un par " -"une\n" -" -v, --verbose\n" -" Verbosité du plugin. 3 niveaux sont disponibles\n" +"Sortir avec un résultat AVERTISSEMENT si moins de x unités de disques sont " +"libres" -#: plugins/check_swap.c:514 -#, c-format -msgid "" -"\n" -"On AIX, if -a is specified, uses lsps -a, otherwise uses lsps -s.\n" +#: plugins/check_swap.c:539 +#, fuzzy +msgid "Exit with WARNING status if less than PERCENT of swap space is free" +msgstr "" +"Sortir avec un résultat AVERTISSEMENT si moins de x pour-cent du disque est " +"libre" + +#: plugins/check_swap.c:541 +#, fuzzy +msgid "" +"Exit with CRITICAL status if less than INTEGER bytes of swap space are free" +msgstr "" +"Sortir avec un résultat CRITIQUE si moins de x unités du disque sont libres" + +#: plugins/check_swap.c:543 +#, fuzzy +msgid "Exit with CRITCAL status if less than PERCENT of swap space is free" +msgstr "" +"Sortir avec un résultat CRITIQUE si moins de x pour-cent du disque est libre" + +#: plugins/check_swap.c:545 +msgid "Conduct comparisons for all swap partitions, one by one" +msgstr "" + +#: plugins/check_swap.c:547 +msgid "Verbose output. Up to 3 levels" +msgstr "" + +#: plugins/check_swap.c:550 +msgid "On AIX, if -a is specified, uses lsps -a, otherwise uses lsps -s.\n" msgstr "" -"\n" "Sur AIX, si -a est spécifié, le plugin utilise lsps -a, au sinon il utilise " "lsps -s.\n" -#: plugins/check_tcp.c:186 +#: plugins/check_tcp.c:199 msgid "CRITICAL - Generic check_tcp called with unknown service\n" msgstr "" "CRITIQUE -check_tcp version générique utilisé avec un service inconnu\n" -#: plugins/check_tcp.c:207 +#: plugins/check_tcp.c:220 msgid "With UDP checks, a send/expect string must be specified." msgstr "" "Avec la surveillance UDP, une chaîne d'envoi et un chaîne de réponse doit " "être spécifiée." -#: plugins/check_tcp.c:332 +#: plugins/check_tcp.c:239 #, c-format -msgid "%s %s - " -msgstr "" +msgid "CRITICAL - Cannot retrieve server certificate.\n" +msgstr "CRITIQUE - Impossible d'obtenir le certificat du serveur.\n" -#: plugins/check_tcp.c:405 +#: plugins/check_tcp.c:428 msgid "No arguments found" msgstr "Pas de paramètres" -#: plugins/check_tcp.c:513 +#: plugins/check_tcp.c:530 msgid "Maxbytes must be a positive integer" msgstr "Maxbytes doit être un entier positif" -#: plugins/check_tcp.c:530 +#: plugins/check_tcp.c:548 msgid "Refuse must be one of ok, warn, crit" msgstr "Refuse doit être parmis ok, warn, crit" -#: plugins/check_tcp.c:540 +#: plugins/check_tcp.c:558 msgid "Mismatch must be one of ok, warn, crit" msgstr "Mismatch doit être parmis ok, warn, crit" -#: plugins/check_tcp.c:546 +#: plugins/check_tcp.c:564 msgid "Delay must be a positive integer" msgstr "Delay doit être un entier positif" -#: plugins/check_tcp.c:571 +#: plugins/check_tcp.c:589 msgid "You must provide a server address" msgstr "Vous devez fournir une adresse serveur" -#: plugins/check_tcp.c:573 +#: plugins/check_tcp.c:591 msgid "Invalid hostname, address or socket" msgstr "Adresse/Nom/Socket invalide" -#: plugins/check_tcp.c:587 +#: plugins/check_tcp.c:605 #, c-format msgid "" "This plugin tests %s connections with the specified host (or unix socket).\n" @@ -4206,538 +4215,463 @@ msgstr "" "Ce plugin teste %s connections avec l'hôte spécifié (ou socket unix).\n" "\n" -#: plugins/check_tcp.c:598 -#, c-format +#: plugins/check_tcp.c:617 msgid "" -" -E, --escape\n" -" Can use \\n, \\r, \\t or \\ in send or quit string.\n" -" Default: nothing added to send, \\r\\n added to end of quit\n" -" -s, --send=STRING\n" -" String to send to the server\n" -" -e, --expect=STRING\n" -" String to expect in server response\n" -" -q, --quit=STRING\n" -" String to send server to initiate a clean close of the connection\n" +"Can use \\n, \\r, \\t or \\ in send or quit string. Must come before send or " +"quit option" msgstr "" -" -E, --escape\n" -" Peut utiliser \\n, \\r, \\t or \\ dans l'envoie ou la chaîne de fin.\n" -" Défaut: rien ajouté à l'envoi, \\r\\n ajouté à la chaîne de fin\n" -" -s, --send=STRING\n" -" Chaîne de caractères à envoyer au serveur\n" -" -e, --expect=STRING\n" -" Chaîne de réponse à recevoir du serveur\n" -" -q, --quit=STRING\n" -" Chaîne de caractères à envoyer au serveur pour fermer la connexion " -"proprement\n" -#: plugins/check_tcp.c:609 -#, c-format -msgid "" -" -r, --refuse=ok|warn|crit\n" -" Accept tcp refusals with states ok, warn, crit (default: crit)\n" -" -M, --mismatch=ok|warn|crit\n" -" Accept expected string mismatches with states ok, warn, crit (default: " -"warn)\n" -" -j, --jail\n" -" Hide output from TCP socket\n" -" -m, --maxbytes=INTEGER\n" -" Close connection once more than this number of bytes are received\n" -" -d, --delay=INTEGER\n" -" Seconds to wait between sending string and polling for response\n" +#: plugins/check_tcp.c:618 +msgid "Default: nothing added to send, \\r\\n added to end of quit" msgstr "" -" -r, --refuse=ok|warn|crit\n" -" Accepter les refus tcp avec un résultat ok, warn, crit (défaut: crit)\n" -" -M, --mismatch=ok|warn|crit\n" -" Accepter des erreur de chaînes avec ok, warn, crit (défaut: warn)\n" -" -j, --jail\n" -" Cacher la sortie du socket TCP\n" -" -m, --maxbytes=INTEGER\n" -" Fermer la connexion une fois que ce nombre de bytes on été reçus\n" -" -d, --delay=INTEGER\n" -" Secondes à attendre entre l'envoi de la demande et la réception de la " -"réponse\n" + +#: plugins/check_tcp.c:620 +msgid "String to send to the server" +msgstr "Chaîne de caractères à envoyer au serveur" #: plugins/check_tcp.c:622 -#, c-format -msgid "" -" -D, --certificate=INTEGER\n" -" Minimum number of days a certificate has to be valid.\n" -" -S, --ssl\n" -" Use SSL for the connection.\n" +msgid "String to expect in server response" msgstr "" -" -D, --certificate=INTEGER\n" -" Nombre minimum de jours de validité du certificat.\n" -" -S, --ssl\n" -" Connexion via SSL\n" -#: plugins/check_time.c:90 +#: plugins/check_tcp.c:624 +msgid "String to send server to initiate a clean close of the connection" +msgstr "" + +#: plugins/check_tcp.c:626 +msgid "Accept tcp refusals with states ok, warn, crit (default: crit)" +msgstr "" + +#: plugins/check_tcp.c:628 +msgid "" +"Accept expected string mismatches with states ok, warn, crit (default: warn)" +msgstr "" + +#: plugins/check_tcp.c:630 +#, fuzzy +msgid "Hide output from TCP socket" +msgstr "Impossible d'ouvrir un socket TCP\n" + +#: plugins/check_tcp.c:632 +msgid "Close connection once more than this number of bytes are received" +msgstr "" + +#: plugins/check_tcp.c:634 +msgid "Seconds to wait between sending string and polling for response" +msgstr "" + +#: plugins/check_tcp.c:640 +msgid "Use SSL for the connection." +msgstr "" + +#: plugins/check_time.c:106 #, c-format msgid "TIME UNKNOWN - could not connect to server %s, port %d\n" msgstr "TEMPS INCONNU - impossible de se connecter au serveur %s, au port %d\n" -#: plugins/check_time.c:103 +#: plugins/check_time.c:119 #, c-format msgid "TIME UNKNOWN - could not send UDP request to server %s, port %d\n" msgstr "" "TEMPS INCONNU - impossible d'envoyer une requête UDP au serveur %s, au port %" "d\n" -#: plugins/check_time.c:127 +#: plugins/check_time.c:143 #, c-format msgid "TIME UNKNOWN - no data received from server %s, port %d\n" msgstr "TEMPS INCONNU - pas de données reçues du serveur %s, du port %d\n" -#: plugins/check_time.c:140 +#: plugins/check_time.c:156 #, c-format msgid "TIME %s - %d second response time|%s\n" msgstr "TEMPS %s - %d secondes de temps de réponse|%s\n" -#: plugins/check_time.c:158 +#: plugins/check_time.c:174 #, c-format msgid "TIME %s - %lu second time difference|%s %s\n" msgstr "TEMPS %s - %lu secondes de différence|%s %s\n" -#: plugins/check_time.c:242 +#: plugins/check_time.c:258 msgid "Warning thresholds must be a positive integer" msgstr "Les seuils d'avertissement doivent être un entier positif" -#: plugins/check_time.c:261 +#: plugins/check_time.c:277 msgid "Critical thresholds must be a positive integer" msgstr "Les seuils critiques doivent être un entier positif" -#: plugins/check_time.c:327 -#, c-format -msgid "" -"This plugin will check the time on the specified host.\n" -"\n" +#: plugins/check_time.c:343 +msgid "This plugin will check the time on the specified host." +msgstr "Ce plugin va vérifier l'heure sur l'hôte spécifié." + +#: plugins/check_time.c:354 +msgid "Use UDP to connect, not TCP" msgstr "" -"Ce plugin va vérifier l'heure sur l'hôte spécifié.\n" -"\n" -#: plugins/check_time.c:335 -#, c-format -msgid "" -" -u, --udp\n" -" Use UDP to connect, not TCP\n" -" -w, --warning-variance=INTEGER\n" -" Time difference (sec.) necessary to result in a warning status\n" -" -c, --critical-variance=INTEGER\n" -" Time difference (sec.) necessary to result in a critical status\n" -" -W, --warning-connect=INTEGER\n" -" Response time (sec.) necessary to result in warning status\n" -" -C, --critical-connect=INTEGER\n" -" Response time (sec.) necessary to result in critical status\n" +#: plugins/check_time.c:356 +msgid "Time difference (sec.) necessary to result in a warning status" msgstr "" -" -u, --udp\n" -" Utiliser UDP pour se connecter, pas TCP\n" -" -w, --warning-variance=INTEGER\n" -" Différence de temps (sec.) nécessaire pour avoir un résultat " -"AVERTISSEMENT\n" -" -c, --critical-variance=INTEGER\n" -" Différence de temps (sec.) nécessaire pour avoir un résultat CRITIQUE\n" -" -W, --warning-connect=INTEGER\n" -" Temps de réponse (sec.) nécessaire pour avoir un résultat AVERTISSEMENT\n" -" -C, --critical-connect=INTEGER\n" -" Temps de réponse (sec.) nécessaire pour avoir un résultat CRITIQUE\n" -#: plugins/check_udp.c:70 -#, c-format -msgid "No response from host on port %d\n" -msgstr "Pas de réponse de l'hôte sur le port %d\n" - -#: plugins/check_udp.c:79 -#, c-format -msgid "Invalid response received from host on port %d\n" -msgstr "Réponse Invalide reçue de l'hôte sur le port %d\n" - -#: plugins/check_udp.c:95 -#, c-format -msgid "Connection %s on port %d - %d second response time\n" -msgstr "Connexion %s sur le port %d - %d secondes de temps de réponse\n" - -#: plugins/check_udp.c:96 -msgid "accepted" -msgstr "accepté" - -#: plugins/check_udp.c:96 -msgid "problem" -msgstr "problème" - -#: plugins/check_udp.c:225 -#, c-format -msgid "" -"\tThis plugin tests an UDP connection with the specified host.\n" -"\n" +#: plugins/check_time.c:358 +msgid "Time difference (sec.) necessary to result in a critical status" msgstr "" -"Ce plugin teste un connexion UDP avec l'hôte spécifié.\n" -"\n" -#: plugins/check_udp.c:234 -#, c-format -msgid "" -" -e, --expect=STRING \n" -" String to expect in first line of server response\n" -" -s, --send=STRING \n" -" String to send to the server when initiating the connection\n" +#: plugins/check_time.c:360 +msgid "Response time (sec.) necessary to result in warning status" msgstr "" -" -e, --expect=STRING \n" -" Chaîne attendue dans la première ligne de réponse du serveur\n" -" -s, --send=STRING \n" -" Chaîne à envoyer au serveur lors de l'initialisation de la connexion\n" -#: plugins/check_udp.c:246 -#, c-format -msgid "" -"This plugin will attempt to connect to the specified port on the host.\n" -"Successful connects return STATE_OK, refusals and timeouts return\n" -"STATE_CRITICAL, other errors return STATE_UNKNOWN.\n" -"\n" +#: plugins/check_time.c:362 +msgid "Response time (sec.) necessary to result in critical status" msgstr "" -"Ce plugin vas essayer de se connecter au port spécifié sur l'hôte spécifié.\n" -"Un connexion réussie donnera un résultat STATE_OK, les refus et les délai " -"de \n" -"connexion dépassés donneront un résultat STATE_CRITICAL, les autres erreurs " -"donneront un STATE_UNKNOWN.\n" -#: plugins/check_ups.c:137 +#: plugins/check_ups.c:147 msgid "On Battery, Low Battery" msgstr "Sur Batterie, Batterie faible" -#: plugins/check_ups.c:142 +#: plugins/check_ups.c:152 msgid "Online" msgstr "En marche" -#: plugins/check_ups.c:145 +#: plugins/check_ups.c:155 msgid "On Battery" msgstr "Sur Batterie" -#: plugins/check_ups.c:149 +#: plugins/check_ups.c:159 msgid ", Low Battery" msgstr ", Batterie faible" -#: plugins/check_ups.c:153 +#: plugins/check_ups.c:163 msgid ", Calibrating" msgstr ", Calibration" -#: plugins/check_ups.c:156 +#: plugins/check_ups.c:166 msgid ", Replace Battery" msgstr ", Remplacer la batterie" -#: plugins/check_ups.c:160 +#: plugins/check_ups.c:170 msgid ", On Bypass" msgstr ", Sur Secteur" -#: plugins/check_ups.c:163 +#: plugins/check_ups.c:173 msgid ", Overload" msgstr ", Surcharge" -#: plugins/check_ups.c:166 +#: plugins/check_ups.c:176 msgid ", Trimming" msgstr ", En Test" -#: plugins/check_ups.c:169 +#: plugins/check_ups.c:179 msgid ", Boosting" msgstr "" -#: plugins/check_ups.c:172 +#: plugins/check_ups.c:182 msgid ", Charging" msgstr ", En charge" -#: plugins/check_ups.c:175 +#: plugins/check_ups.c:185 msgid ", Discharging" msgstr ", Déchargement" -#: plugins/check_ups.c:178 +#: plugins/check_ups.c:188 msgid ", Unknown" msgstr ", Inconnu" -#: plugins/check_ups.c:317 +#: plugins/check_ups.c:327 msgid "UPS does not support any available options\n" msgstr "L'UPS ne supporte aucune des options disponibles\n" -#: plugins/check_ups.c:341 plugins/check_ups.c:401 -#, c-format -msgid "Invalid response received from host\n" -msgstr "Réponse invalide reçue de l'hôte\n" +#: plugins/check_ups.c:351 plugins/check_ups.c:411 +msgid "Invalid response received from host" +msgstr "Réponse invalide reçue de l'hôte" -#: plugins/check_ups.c:409 +#: plugins/check_ups.c:419 #, c-format msgid "CRITICAL - no such ups '%s' on that host\n" msgstr "CRITIQUE - pas d'ups '%s' sur cet hôte\n" -#: plugins/check_ups.c:419 -#, c-format -msgid "CRITICAL - UPS data is stale\n" -msgstr "CRITIQUE - les données de l'ups ne sont plus valables\n" +#: plugins/check_ups.c:429 +msgid "CRITICAL - UPS data is stale" +msgstr "CRITIQUE - les données de l'ups ne sont plus valables" -#: plugins/check_ups.c:424 +#: plugins/check_ups.c:434 #, c-format msgid "Unknown error: %s\n" msgstr "Erreur inconnue: %s\n" -#: plugins/check_ups.c:431 -#, c-format -msgid "Error: unable to parse variable\n" -msgstr "Erreur: impossible de lire la variable\n" +#: plugins/check_ups.c:441 +msgid "Error: unable to parse variable" +msgstr "Erreur: impossible de lire la variable" -#: plugins/check_ups.c:538 +#: plugins/check_ups.c:548 msgid "Unrecognized UPS variable" msgstr "Variable d'UPS non reconnue" -#: plugins/check_ups.c:576 -#, c-format -msgid "Error : no ups indicated\n" -msgstr "Erreur: pas d'ups indiqué\n" - -#: plugins/check_ups.c:596 -#, c-format -msgid "" -"This plugin tests the UPS service on the specified host.\n" -"Network UPS Tools from www.networkupstools.org must be running for this\n" -"plugin to work.\n" -"\n" -msgstr "" -"Ce plugin teste le service UPS sur l'hôte spécifié.\n" -"Le logiciel Network UPS Tools de www.networkupstools.org doit fonctionner \n" -"sur l'hôte pour que ce plugin fonctionne.\n" -"\n" +#: plugins/check_ups.c:586 +msgid "Error : no ups indicated" +msgstr "Erreur: pas d'ups indiqué" #: plugins/check_ups.c:606 -#, c-format msgid "" -" -u, --ups=STRING\n" -" Name of UPS\n" +"This plugin tests the UPS service on the specified host.Network UPS Tools " msgstr "" -" -u, --ups=STRING\n" -" Nom de l'UPS\n" +"Ce plugin teste le service UPS sur l'hôte spécifié en utilisant Network UPS " +"Tools " -#: plugins/check_ups.c:610 -#, c-format -msgid "" -" -T, --temperature\n" -" Output of temperatures in Celsius\n" +#: plugins/check_ups.c:607 +msgid "from www.networkupstools.org must be running for thisplugin to work." +msgstr "" +"de www.networkupstools.org doit fonctionner sur l'hôte pour que ce plugin " +"fonctionne." + +#: plugins/check_ups.c:618 +msgid "Name of UPS" msgstr "" -" -T, --temperature\n" -" Affichage des températures en Celsius\n" #: plugins/check_ups.c:620 -#, c-format -msgid "" -"This plugin attempts to determine the status of a UPS (Uninterruptible " -"Power\n" -"Supply) on a local or remote host. If the UPS is online or calibrating, the\n" -"plugin will return an OK state. If the battery is on it will return a " -"WARNING\n" -"state. If the UPS is off or has a low battery the plugin will return a " -"CRITICAL\n" -"state.\n" -"\n" -msgstr "" -"Ce plugin essaie de déterminer l'état d'un UPS (Uninterruptible Power " -"Supply)\n" -"sur une hôte local ou distant. Si l'UPS est en ligne ou en recalibration, le " -"plugin\n" -"donnera un résultat STATE_OK. Si la batterie est en cours d'utilisation il\n" -"retournera un résultat STATE_WARNING. Si l'UPS est hors-ligne ou à une " -"batterie\n" -"basse le plugin retournera un résultat STATE_CRITICAL.\n" -"\n" +msgid "Output of temperatures in Celsius" +msgstr "Affichage des températures en Celsius" -#: plugins/check_ups.c:627 -#, c-format +#: plugins/check_ups.c:631 msgid "" -"You may also specify a variable to check [such as temperature, utility " -"voltage,\n" -"battery load, etc.] as well as warning and critical thresholds for the " -"value of\n" -"that variable. If the remote host has multiple UPS that are being monitored " -"you\n" -"will have to use the [ups] option to specify which UPS to check.\n" -"\n" +"This plugin attempts to determine the status of a UPS (Uninterruptible Power" +msgstr "" + +#: plugins/check_ups.c:632 +msgid "" +"Supply) on a local or remote host. If the UPS is online or calibrating, the" msgstr "" -"Vous pouvez aussi spécifier une variable à vérifier [comme la température, \n" -"le voltage, l'utilisation de la batterie, etc ] ainsi que des seuils " -"critiques\n" -"ou d'avertissements pour cette variable. Si l'hôte distant à plusieurs UPS\n" -"qui sont surveillés vous devrez utiliser l'option ups pour spécifier quel " -"UPS\n" -"surveiller.\n" -"\n" #: plugins/check_ups.c:633 -#, c-format msgid "" -"Notes:\n" -"\n" -"This plugin requires that the UPSD daemon distributed with Russel Kroll's\n" -"Smart UPS Tools be installed on the remote host. If you do not have the\n" -"package installed on your system, you can download it from\n" -"http://www.networkupstools.org\n" -"\n" +"plugin will return an OK state. If the battery is on it will return a WARNING" msgstr "" -"Notes:\n" -"\n" -"Ce plugin nécessite que service UPSD distribué avec les Smart UPS Tools\n" -"de Russel Kroll' soit installé sur votre hôte distant. Si vous ne les avez " -"pas,\n" -"vous pouvez les télécharger depuis\n" -"http://www.networkupstools.org\n" -"\n" -#: plugins/check_users.c:78 +#: plugins/check_ups.c:634 +msgid "" +"state.If the UPS is off or has a low battery the plugin will return a " +"CRITICAL" +msgstr "" + +#: plugins/check_ups.c:635 +msgid "state." +msgstr "" + +#: plugins/check_ups.c:637 +msgid "" +"You may also specify a variable to check [such as temperature, utility " +"voltage," +msgstr "" + +#: plugins/check_ups.c:638 +msgid "" +"battery load, etc.] as well as warning and critical thresholds for the " +"value of" +msgstr "" + +#: plugins/check_ups.c:639 +msgid "" +"that variable. If the remote host has multiple UPS that are being monitored " +"you" +msgstr "" + +#: plugins/check_ups.c:640 +msgid "will have to use the [ups] option to specify which UPS to check." +msgstr "" + +#: plugins/check_ups.c:642 +msgid "" +"This plugin requires that the UPSD daemon distributed with Russel Kroll's" +msgstr "" + +#: plugins/check_ups.c:643 +msgid "" +"Smart UPS Tools be installed on the remote host. If you do not have the" +msgstr "" + +#: plugins/check_ups.c:644 +msgid "" +"package installed on your system, you can download it from http://www." +"networkupstools.org" +msgstr "" + +#: plugins/check_users.c:94 #, c-format msgid "# users=%d" msgstr "# utilisateurs=%d" -#: plugins/check_users.c:108 +#: plugins/check_users.c:117 +msgid "Unable to read output" +msgstr "Impossible de lire les données en entrée" + +#: plugins/check_users.c:124 #, c-format msgid "USERS %s - %d users currently logged in |%s\n" msgstr "UTILISATEURS %s - %d utilisateurs actuellement connectés sur |%s\n" -#: plugins/check_users.c:193 -#, c-format -msgid "" -"This plugin checks the number of users currently logged in on the local\n" -"system and generates an error if the number exceeds the thresholds " -"specified.\n" +#: plugins/check_users.c:209 +msgid "This plugin checks the number of users currently logged in on the local" msgstr "" "Ce plugin vérifie le nombre d'utilisateurs actuellement connecté sur le " -"système\n" -"local et génère une erreur si le nombre excède le seuil spécifié.\n" +"système local" -#: plugins/check_users.c:201 -#, c-format +#: plugins/check_users.c:210 msgid "" -" -w, --warning=INTEGER\n" -" Set WARNING status if more than INTEGER users are logged in\n" -" -c, --critical=INTEGER\n" -" Set CRITICAL status if more than INTEGER users are logged in\n" -msgstr "" -" -w, --warning=INTEGER\n" -" Résultat AVERTISSEMENT si plus de INTEGER utilisateurs sont connectés\n" -" -c, --critical=INTEGER\n" -" Résultat CRITIQUE si plus de INTEGER utilisateurs sont connectés\n" +"system and generates an error if the number exceeds the thresholds specified." +msgstr "et génère une erreur si le nombre excède le seuil spécifié." -#: plugins/check_ide_smart.c:230 +#: plugins/check_users.c:219 +msgid "Set WARNING status if more than INTEGER users are logged in" +msgstr "" +"Sortir avec un résultat AVERTISSEMENT si plus de INTEGER utilisateurs sont " +"connectés" + +#: plugins/check_users.c:221 +msgid "Set CRITICAL status if more than INTEGER users are logged in" +msgstr "" +"Sortir avec un résultat CRITIQUE si plus de INTEGER utilisateurs sont " +"connectés" + +#: plugins/check_ide_smart.c:231 #, c-format msgid "CRITICAL - Couldn't open device %s: %s\n" msgstr "Critique - Impossible d'ouvrir le périphérique %s: %s\n" -#: plugins/check_ide_smart.c:235 +#: plugins/check_ide_smart.c:236 #, c-format msgid "CRITICAL - SMART_CMD_ENABLE\n" msgstr "CRITIQUE - SMART_CMD_ENABLE\n" -#: plugins/check_ide_smart.c:296 +#: plugins/check_ide_smart.c:297 #, c-format msgid "CRITICAL - SMART_READ_VALUES: %s\n" msgstr "CRITIQUE - SMART_READ_VALUES: %s\n" -#: plugins/check_ide_smart.c:365 +#: plugins/check_ide_smart.c:366 #, c-format msgid "CRITICAL - %d Harddrive PreFailure%cDetected! %d/%d tests failed.\n" msgstr "" "CRITIQUE - %d État de pré-panne %c Détecté! %d/%d les tests on échoués.\n" -#: plugins/check_ide_smart.c:373 +#: plugins/check_ide_smart.c:374 #, c-format msgid "WARNING - %d Harddrive Advisor%s Detected. %d/%d tests failed.\n" msgstr "" "AVERTISSEMENT - %d État de pré-panne %s Détecté! %d/%d les tests on " "échoués.\n" -#: plugins/check_ide_smart.c:381 +#: plugins/check_ide_smart.c:382 #, c-format msgid "OK - Operational (%d/%d tests passed)\n" msgstr "OK - En fonctionnement (%d/%d les tests on été réussi)\n" -#: plugins/check_ide_smart.c:385 +#: plugins/check_ide_smart.c:386 #, c-format msgid "ERROR - Status '%d' unkown. %d/%d tests passed\n" msgstr "ERREUR - État '%d' inconnu. %d/%d les tests on réussi\n" -#: plugins/check_ide_smart.c:418 +#: plugins/check_ide_smart.c:419 #, c-format msgid "OffLineStatus=%d {%s}, AutoOffLine=%s, OffLineTimeout=%d minutes\n" msgstr "" "Etat Hors Ligne=%d {%s}, Hors Ligne Auto=%s, Temps avant arrêt=%d minutes\n" -#: plugins/check_ide_smart.c:424 +#: plugins/check_ide_smart.c:425 #, c-format msgid "OffLineCapability=%d {%s %s %s}\n" msgstr "Capacité Hors Ligne=%d {%s %s %s}\n" -#: plugins/check_ide_smart.c:430 +#: plugins/check_ide_smart.c:431 #, c-format msgid "SmartRevision=%d, CheckSum=%d, SmartCapability=%d {%s %s}\n" msgstr "Révision Smart=%d, Somme de contrôle=%d, Capacité Smart=%d {%s %s}\n" -#: plugins/check_ide_smart.c:468 +#: plugins/check_ide_smart.c:469 #, c-format msgid "CRITICAL - %s: %s\n" msgstr "CRITIQUE - %s: %s\n" -#: plugins/check_ide_smart.c:487 +#: plugins/check_ide_smart.c:488 #, c-format msgid "CRITICAL - SMART_READ_THRESHOLDS: %s\n" msgstr "CRITIQUE - SMART_READ_THRESHOLDS: %s\n" -#: plugins/check_ide_smart.c:504 +#: plugins/check_ide_smart.c:505 #, c-format msgid "" "This plugin checks a local hard drive with the (Linux specific) SMART " -"interface [http://smartlinux.sourceforge.net/smart/index.php].\n" -"\n" +"interface [http://smartlinux.sourceforge.net/smart/index.php]." msgstr "" "Ce plugin vérifie un disque dur local à l'aide de l'interface SMART (pour " -"Linux) [http://smartlinux.sourceforge.net/smart/index.php].\n" -"\n" +"Linux) [http://smartlinux.sourceforge.net/smart/index.php]." -#: plugins/negate.c:242 -#, c-format -msgid "" -"Negates the status of a plugin (returns OK for CRITICAL, and vice-versa).\n" -"\n" +#: plugins/check_ide_smart.c:514 +msgid "Select device DEVICE" msgstr "" -"Inverse le statut d'un plugin (retourne OK pour CRITIQUE, et vice-versa).\n" -"\n" -#: plugins/negate.c:251 -#, c-format -msgid " [keep timeout than the plugin timeout to retain CRITICAL status]\n" -msgstr "" -" [conserver le délai de réponse dépassé du plugin original afin de " -"conserver le résultat CRITIQUE]\n" - -#: plugins/negate.c:254 -#, c-format +#: plugins/check_ide_smart.c:515 msgid "" -" negate \"/usr/local/nagios/libexec/check_ping -H host\"\n" -" Run check_ping and invert result. Must use full path to plugin\n" -" negate \"/usr/local/nagios/libexec/check_procs -a 'vi negate.c'\"\n" -" Use single quotes if you need to retain spaces\n" +"Note: if the device is selected with this option, _no_ other options are " +"accepted" msgstr "" -" negate \"/usr/local/nagios/libexec/check_ping -H host\"\n" -" Executer check_ping et inverser le résultat. Il faut utiliser le chemin\n" -" complet vers le plugin\n" -" negate \"/usr/local/nagios/libexec/check_procs -a 'vi negate.c'\"\n" -" Utilisez des guillemets simples pour conserver les espaces\n" -#: plugins/negate.c:260 -#, c-format +#: plugins/check_ide_smart.c:517 +msgid "Perform immediately offline tests" +msgstr "" + +#: plugins/check_ide_smart.c:519 +msgid "Returns the number of failed tests" +msgstr "" + +#: plugins/check_ide_smart.c:521 +msgid "Turn on automatic offline tests" +msgstr "" + +#: plugins/check_ide_smart.c:523 +msgid "Turn off automatic offline tests" +msgstr "" + +#: plugins/check_ide_smart.c:525 +msgid "Output suitable for Nagios" +msgstr "" + +#: plugins/negate.c:257 +msgid "" +"Negates the status of a plugin (returns OK for CRITICAL, and vice-versa)." +msgstr "" +"Inverse le statut d'un plugin (retourne OK pour CRITIQUE, et vice-versa)." + +#: plugins/negate.c:267 +msgid "[keep timeout than the plugin timeout to retain CRITICAL status]" +msgstr "" +"[conserver le délai de réponse dépassé du plugin original afin de conserver " +"le résultat CRITIQUE]" + +#: plugins/negate.c:271 +msgid "Run check_ping and invert result. Must use full path to plugin" +msgstr "" + +#: plugins/negate.c:273 +msgid "Use single quotes if you need to retain spaces" +msgstr "" + +#: plugins/negate.c:277 +msgid "" +"This plugin is a wrapper to take the output of another plugin and invert it." +msgstr "" + +#: plugins/negate.c:278 msgid "" -"This plugin is a wrapper to take the output of another plugin and invert " -"it.\n" "If the wrapped plugin returns STATE_OK, the wrapper will return " -"STATE_CRITICAL.\n" -"If the wrapped plugin returns STATE_CRITICAL, the wrapper will return " -"STATE_OK.\n" -"Otherwise, the output state of the wrapped plugin is unchanged.\n" +"STATE_CRITICAL." +msgstr "" + +#: plugins/negate.c:279 +msgid "" +"If the wrapped plugin returns STATE_CRITICAL, the wrapper will return " +"STATE_OK." +msgstr "" + +#: plugins/negate.c:280 +msgid "Otherwise, the output state of the wrapped plugin is unchanged." msgstr "" -"Ce plugin prend le résultat d'un plugin en entrée et l'inverse.\n" -"Si le résultat du plugin est STATE_OK, ce plugin donnera STATE_CRITICAL.\n" -"Si le résultat du plugin est STATE_CRITICAL, ce plugin donnera STATE_OK.\n" -"Dans les autres cas le résultat du plugin n'est pas changé.\n" #: plugins/netutils.c:49 #, c-format @@ -4750,70 +4684,58 @@ msgid "CRITICAL - Abnormal timeout after %d seconds\n" msgstr "CRITIQUE - dépassement anormal du temps de réponse après %d secondes\n" #: plugins/netutils.c:79 plugins/netutils.c:270 -#, c-format -msgid "Send failed\n" -msgstr "L'envoi à échoué\n" +msgid "Send failed" +msgstr "L'envoi à échoué" #: plugins/netutils.c:96 plugins/netutils.c:285 -#, c-format -msgid "No data was received from host!\n" -msgstr "Pas de données reçues de l'hôte\n" +msgid "No data was received from host!" +msgstr "Pas de données reçues de l'hôte!" -#: plugins/netutils.c:193 -#, c-format -msgid "Socket creation failed\n" -msgstr "La création du socket à échoué\n" - -#: plugins/netutils.c:222 -#, fuzzy -msgid "Supplied path too long unix domain socket" -msgstr "Le chemin fourni est trop long pour un socket unix" - -#: plugins/netutils.c:229 +#: plugins/netutils.c:193 plugins/netutils.c:229 msgid "Socket creation failed" msgstr "La création du socket à échoué " +#: plugins/netutils.c:222 +msgid "Supplied path too long unix domain socket" +msgstr "Le chemin fourni est trop long pour un socket unix" + #: plugins/netutils.c:294 -#, c-format -msgid "Receive failed\n" -msgstr "La réception à échoué\n" +msgid "Receive failed" +msgstr "La réception à échoué" #: plugins/netutils.c:320 #, c-format msgid "Invalid hostname/address - %s" msgstr "Adresse/Nom invalide - %s" -#: plugins/popen.c:124 -#, c-format -msgid "Could not malloc argv array in popen()\n" -msgstr "Impossible de réallouer un tableau pour les paramètres dans popen()\n" +#: plugins/popen.c:148 +msgid "Could not malloc argv array in popen()" +msgstr "Impossible de réallouer un tableau pour les paramètres dans popen()" -#: plugins/popen.c:134 -#, c-format -msgid "CRITICAL - You need more args!!!\n" -msgstr "CRITIQUE - Vous devez spécifier plus d'arguments!!!\n" +#: plugins/popen.c:158 +msgid "CRITICAL - You need more args!!!" +msgstr "CRITIQUE - Vous devez spécifier plus d'arguments!!!" -#: plugins/popen.c:183 +#: plugins/popen.c:207 msgid "Cannot catch SIGCHLD" msgstr "impossible d'obtenir le signal SIGCHLD" -#: plugins/popen.c:278 plugins/utils.c:147 +#: plugins/popen.c:302 plugins/utils.c:146 #, c-format msgid "CRITICAL - Plugin timed out after %d seconds\n" msgstr "CRITIQUE - Le plugin n'as pas répondu dans les %d secondes\n" -#: plugins/popen.c:281 -#, c-format -msgid "CRITICAL - popen timeout received, but no child process\n" +#: plugins/popen.c:305 +msgid "CRITICAL - popen timeout received, but no child process" msgstr "" "CRITIQUE - le temps d'attente à été dépassé dans la fonction popen, mais il " -"n'y a pas de processus fils\n" +"n'y a pas de processus fils" -#: plugins/popen.c:297 +#: plugins/popen.c:321 msgid "sysconf error for _SC_OPEN_MAX" msgstr "" -#: plugins/urlize.c:113 +#: plugins/urlize.c:137 #, c-format msgid "" "%s UNKNOWN - No data received from host\n" @@ -4822,84 +4744,77 @@ msgstr "" "%s INCONNU - Pas de données reçues de l'hôte\n" "Commande: %s\n" -#: plugins/urlize.c:152 -#, c-format -msgid "" -"\n" -"This plugin wraps the text output of another command (plugin) in HTML\n" -" tags, thus displaying the plugin output in as a clickable link in\n" -"the Nagios status screen. The return status is the same as the invoked\n" -"plugin.\n" -"\n" +#: plugins/urlize.c:176 +msgid "This plugin wraps the text output of another command (plugin)" msgstr "" -"\n" -"Ce plugin encapsule la sortie d'une autre commande (plugin) dans des tags " -"HTML\n" -", permettant d'afficher la sortie du plugin comme un lien clickable dans\n" -"l'écran de statuts de Nagios. Le résultat est le même que celui dans le " -"plugin\n" -"encapsulé.\n" -"\n" -#: plugins/urlize.c:160 -#, c-format +#: plugins/urlize.c:177 msgid "" -"\n" -"Pay close attention to quoting to ensure that the shell passes the expected\n" -"data to the plugin. For example, in:\n" -"\n" -" urlize http://example.com/ check_http -H example.com -r 'two words'\n" -"\n" -"the shell will remove the single quotes and urlize will see:\n" -"\n" -" urlize http://example.com/ check_http -H example.com -r two words\n" -"\n" -"You probably want:\n" -"\n" -" urlize http://example.com/ \"check_http -H example.com -r 'two words'\"\n" +"in HTML tags, thus displaying the plugin output in as a clickable link in" msgstr "" -"\n" -"Veuillez faire attention au guillemets simples et doubles pour que le shell " -"passe\n" -"les données correctement au plugin. Par exemple:\n" -"\n" -" urlize http://exemple.com/ check_http -H exemple.com -r 'deux mots'\n" -"\n" -"le shell enlèvera les guillemets simples et urlize verra:\n" -"\n" -" urlize http://exemple.com/ check_http -H exemple.com -r deux mots\n" -"\n" -"Vous voulez probablement:\n" -"\n" -" urlize http://exemple.com/ \"check_http -H exemple.com -r 'deux mots'\"\n" -#: plugins/utils.c:592 +#: plugins/urlize.c:178 +msgid "" +"the Nagios status screen. The return status is the same as the invoked " +"plugin." +msgstr "" + +#: plugins/urlize.c:188 +msgid "" +"Pay close attention to quoting to ensure that the shell passes the expected" +msgstr "" + +#: plugins/urlize.c:189 +msgid "data to the plugin. For example, in:" +msgstr "" + +#: plugins/urlize.c:190 +msgid "urlize http://example.com/ check_http -H example.com -r 'two words'" +msgstr "" + +#: plugins/urlize.c:191 +msgid "the shell will remove the single quotes and urlize will see:" +msgstr "" + +#: plugins/urlize.c:192 +msgid "urlize http://example.com/ check_http -H example.com -r two words" +msgstr "" + +#: plugins/urlize.c:193 +msgid "You probably want:" +msgstr "" + +#: plugins/urlize.c:194 +msgid "urlize http://example.com/ \"check_http -H example.com -r 'two words'\"" +msgstr "" + +#: plugins/utils.c:441 msgid "failed realloc in strpcpy\n" msgstr "La fonction realloc à échoué dans strpcpy\n" -#: plugins/utils.c:634 +#: plugins/utils.c:483 msgid "failed malloc in strscat\n" msgstr "La fonction malloc à échoué dans strscat\n" -#: plugins-root/check_dhcp.c:293 +#: plugins-root/check_dhcp.c:298 #, c-format msgid "Error: Could not get hardware address of interface '%s'\n" msgstr "" "Erreur: Impossible d'obtenir l'adresse matérielle pour l'interface '%s'\n" -#: plugins-root/check_dhcp.c:315 +#: plugins-root/check_dhcp.c:320 #, c-format msgid "Error: if_nametoindex error - %s.\n" msgstr "Erreur: if_nametoindex erreur - %s.\n" -#: plugins-root/check_dhcp.c:320 +#: plugins-root/check_dhcp.c:325 #, c-format msgid "Error: Couldn't get hardware address from %s. sysctl 1 error - %s.\n" msgstr "" "Erreur: Impossible d'obtenir l'adresse matérielle depuis %s. erreur sysctl 1 " "- %s.\n" -#: plugins-root/check_dhcp.c:325 +#: plugins-root/check_dhcp.c:330 #, c-format msgid "" "Error: Couldn't get hardware address from interface %s. malloc error - %s.\n" @@ -4907,14 +4822,14 @@ msgstr "" "Erreur: Impossible d'obtenir l'adresse matérielle depuis l'interface %s\n" " erreur malloc - %s.\n" -#: plugins-root/check_dhcp.c:330 +#: plugins-root/check_dhcp.c:335 #, c-format msgid "Error: Couldn't get hardware address from %s. sysctl 2 error - %s.\n" msgstr "" "Erreur: Impossible d'obtenir l'adresse matérielle depuis %s erreur sysctl 2 " "- %s.\n" -#: plugins-root/check_dhcp.c:355 +#: plugins-root/check_dhcp.c:361 #, c-format msgid "" "Error: can't find unit number in interface_name (%s) - expecting TypeNumber " @@ -4923,7 +4838,7 @@ msgstr "" "Erreur: impossible de trouver le numéro dans le nom de l'interface (%s).\n" "J'attendais le nom suivi du type ex lnc0.\n" -#: plugins-root/check_dhcp.c:360 plugins-root/check_dhcp.c:372 +#: plugins-root/check_dhcp.c:366 plugins-root/check_dhcp.c:378 #, c-format msgid "" "Error: can't read MAC address from DLPI streams interface for device %s unit " @@ -4932,37 +4847,42 @@ msgstr "" "Erreur: impossible de lire l'adresse MAC depuis l'interface DLPI pour le \n" "périphérique %s numéro %d.\n" -#: plugins-root/check_dhcp.c:378 +#: plugins-root/check_dhcp.c:384 #, c-format msgid "Error: can't get MAC address for this architecture.\n" msgstr "Erreur: impossible d'obtenir l'adresse MAC pour cette architecture.\n" -#: plugins-root/check_dhcp.c:383 +#: plugins-root/check_dhcp.c:389 #, c-format msgid "Hardware address: " msgstr "Adresse matérielle: " -#: plugins-root/check_dhcp.c:458 +#: plugins-root/check_dhcp.c:464 #, c-format msgid "DHCPDISCOVER to %s port %d\n" msgstr "DHCPDISCOVER vers %s port %d\n" -#: plugins-root/check_dhcp.c:509 +#: plugins-root/check_dhcp.c:517 #, c-format msgid "Result=ERROR\n" msgstr "Résultat=ERREUR\n" -#: plugins-root/check_dhcp.c:515 +#: plugins-root/check_dhcp.c:523 #, c-format msgid "Result=OK\n" msgstr "Résultat=OK\n" -#: plugins-root/check_dhcp.c:521 +#: plugins-root/check_dhcp.c:538 #, c-format -msgid "DHCPOFFER from IP address %s\n" -msgstr "DHCPOFFER depuis l'adresse IP %s\n" +msgid "DHCPOFFER from IP address %s" +msgstr "DHCPOFFER depuis l'adresse IP %s" -#: plugins-root/check_dhcp.c:528 +#: plugins-root/check_dhcp.c:539 +#, c-format +msgid " via %s\n" +msgstr " depuis %s\n" + +#: plugins-root/check_dhcp.c:546 #, c-format msgid "" "DHCPOFFER XID (%lu) did not match DHCPDISCOVER XID (%lu) - ignoring packet\n" @@ -4970,67 +4890,67 @@ msgstr "" "DHCPOFFER XID (%lu) ne correspond pas à DHCPDISCOVER XID (%lu) - paquet " "ignoré\n" -#: plugins-root/check_dhcp.c:550 +#: plugins-root/check_dhcp.c:568 #, c-format msgid "DHCPOFFER hardware address did not match our own - ignoring packet\n" msgstr "" "l'adresse matérielle du DHCPOFFER ne correspond pas à la notre paquet " "ignoré\n" -#: plugins-root/check_dhcp.c:568 +#: plugins-root/check_dhcp.c:586 #, c-format msgid "Total responses seen on the wire: %d\n" msgstr "Nombre total de réponses vues: %d\n" -#: plugins-root/check_dhcp.c:569 +#: plugins-root/check_dhcp.c:587 #, c-format msgid "Valid responses for this machine: %d\n" msgstr "Nombre de réponse valides pour cette machine: %d\n" -#: plugins-root/check_dhcp.c:585 +#: plugins-root/check_dhcp.c:603 #, c-format msgid "send_dhcp_packet result: %d\n" msgstr "résultat de send_dchp_packet: %d\n" -#: plugins-root/check_dhcp.c:614 +#: plugins-root/check_dhcp.c:632 #, c-format msgid "No (more) data received\n" msgstr "Plus de données reçues\n" -#: plugins-root/check_dhcp.c:633 +#: plugins-root/check_dhcp.c:651 #, c-format msgid "recvfrom() failed, " msgstr "recvfrom() a échoué, " -#: plugins-root/check_dhcp.c:640 +#: plugins-root/check_dhcp.c:658 #, c-format msgid "receive_dhcp_packet() result: %d\n" msgstr "résultat de receive_dchp_packet(): %d\n" -#: plugins-root/check_dhcp.c:641 +#: plugins-root/check_dhcp.c:659 #, c-format msgid "receive_dhcp_packet() source: %s\n" msgstr "source de receive_dchp_packet(): %s\n" -#: plugins-root/check_dhcp.c:670 +#: plugins-root/check_dhcp.c:688 #, c-format msgid "Error: Could not create socket!\n" msgstr "Erreur: Impossible de créer un socket!\n" -#: plugins-root/check_dhcp.c:680 +#: plugins-root/check_dhcp.c:698 #, c-format msgid "Error: Could not set reuse address option on DHCP socket!\n" msgstr "" "Erreur: Impossible de configurer l'option de réutilisation de l'adresse sur\n" "le socket DHCP!\n" -#: plugins-root/check_dhcp.c:686 +#: plugins-root/check_dhcp.c:704 #, c-format msgid "Error: Could not set broadcast option on DHCP socket!\n" msgstr "" "Erreur: Impossible de configurer l'option broadcast sur le socket DHCP!\n" -#: plugins-root/check_dhcp.c:694 +#: plugins-root/check_dhcp.c:712 #, c-format msgid "" "Error: Could not bind socket to interface %s. Check your privileges...\n" @@ -5038,7 +4958,7 @@ msgstr "" "Erreur: Impossible de connecter le socket à l'interface %s.\n" "Vérifiez vos droits...\n" -#: plugins-root/check_dhcp.c:704 +#: plugins-root/check_dhcp.c:722 #, c-format msgid "" "Error: Could not bind to DHCP socket (port %d)! Check your privileges...\n" @@ -5046,115 +4966,125 @@ msgstr "" "Erreur: Impossible de se connecter au socket (port %d)! Vérifiez vos " "droits..\n" -#: plugins-root/check_dhcp.c:737 +#: plugins-root/check_dhcp.c:756 #, c-format msgid "Requested server address: %s\n" msgstr "Adresse serveur demandée: %s\n" -#: plugins-root/check_dhcp.c:796 +#: plugins-root/check_dhcp.c:812 #, c-format msgid "Lease Time: Infinite\n" msgstr "Durée du Bail: Infini\n" -#: plugins-root/check_dhcp.c:798 +#: plugins-root/check_dhcp.c:814 #, c-format msgid "Lease Time: %lu seconds\n" msgstr "Durée du Bail: %lu secondes\n" -#: plugins-root/check_dhcp.c:800 +#: plugins-root/check_dhcp.c:816 #, c-format msgid "Renewal Time: Infinite\n" msgstr "Renouvellement du bail: Infini\n" -#: plugins-root/check_dhcp.c:802 +#: plugins-root/check_dhcp.c:818 #, c-format msgid "Renewal Time: %lu seconds\n" msgstr "Durée du renouvellement = %lu secondes\n" -#: plugins-root/check_dhcp.c:804 +#: plugins-root/check_dhcp.c:820 #, c-format msgid "Rebinding Time: Infinite\n" msgstr "Délai de nouvelle demande: Infini\n" -#: plugins-root/check_dhcp.c:805 +#: plugins-root/check_dhcp.c:821 #, c-format msgid "Rebinding Time: %lu seconds\n" msgstr "Délai de nouvelle demande: %lu secondes\n" -#: plugins-root/check_dhcp.c:821 +#: plugins-root/check_dhcp.c:837 #, c-format msgid "Added offer from server @ %s" msgstr "Rajouté offre du serveur @ %s" -#: plugins-root/check_dhcp.c:822 +#: plugins-root/check_dhcp.c:838 #, c-format msgid " of IP address %s\n" msgstr "de l'adresse IP %s\n" -#: plugins-root/check_dhcp.c:889 +#: plugins-root/check_dhcp.c:905 #, c-format msgid "DHCP Server Match: Offerer=%s" msgstr "Correspondance du serveur DHCP: Offrant=%s" -#: plugins-root/check_dhcp.c:890 +#: plugins-root/check_dhcp.c:906 #, c-format -msgid " Requested=%s\n" -msgstr " Demandé=%s\n" +msgid " Requested=%s" +msgstr " Demandé=%s" -#: plugins-root/check_dhcp.c:929 +#: plugins-root/check_dhcp.c:908 +#, c-format +msgid " (duplicate)" +msgstr "" + +#: plugins-root/check_dhcp.c:909 +#, c-format +msgid "\n" +msgstr "" + +#: plugins-root/check_dhcp.c:957 #, c-format msgid "No DHCPOFFERs were received.\n" msgstr "Pas de DHCPOFFERs reçus.\n" -#: plugins-root/check_dhcp.c:933 +#: plugins-root/check_dhcp.c:961 #, c-format msgid "Received %d DHCPOFFER(s)" msgstr "Reçu %d DHCPOFFER(s)" -#: plugins-root/check_dhcp.c:936 +#: plugins-root/check_dhcp.c:964 #, c-format msgid ", %s%d of %d requested servers responded" msgstr ", %s%d de %d serveurs ont répondus" -#: plugins-root/check_dhcp.c:939 +#: plugins-root/check_dhcp.c:967 #, c-format msgid ", requested address (%s) was %soffered" msgstr ", l'adresse demandée (%s) %s été offerte" -#: plugins-root/check_dhcp.c:939 +#: plugins-root/check_dhcp.c:967 msgid "not " msgstr "n'as pas" -#: plugins-root/check_dhcp.c:941 +#: plugins-root/check_dhcp.c:969 #, c-format msgid ", max lease time = " msgstr ", bail maximum = " -#: plugins-root/check_dhcp.c:943 +#: plugins-root/check_dhcp.c:971 #, c-format msgid "Infinity" msgstr "Infini" -#: plugins-root/check_dhcp.c:1125 +#: plugins-root/check_dhcp.c:1148 #, c-format msgid "Error: DLPI stream API failed to get MAC in check_ctrl: %s.\n" msgstr "" "Erreur: Impossible d'obtenir la MAC par l'API DLPI dans check_ctrl: %s.\n" -#: plugins-root/check_dhcp.c:1136 +#: plugins-root/check_dhcp.c:1160 #, c-format msgid "Error: DLPI stream API failed to get MAC in put_ctrl/putmsg(): %s.\n" msgstr "" "Erreur: Impossible d'obtenir la MAC par l'API DLPI dans put_ctrl/putmsg(): %" "s.\n" -#: plugins-root/check_dhcp.c:1148 +#: plugins-root/check_dhcp.c:1173 #, c-format msgid "Error: DLPI stream API failed to get MAC in put_both/putmsg().\n" msgstr "" "Erreur: Impossible d'obtenir la MAC par l'API DLPI dans put_both/putmsg().\n" -#: plugins-root/check_dhcp.c:1159 +#: plugins-root/check_dhcp.c:1185 #, c-format msgid "" "Error: DLPI stream API failed to get MAC in dl_attach_req/open(%s..): %s.\n" @@ -5162,50 +5092,100 @@ msgstr "" "Erreur: Impossible d'obtenir la MAC par l'API DLPI dans dl_attach_req/open(%" "s..): %s.\n" -#: plugins-root/check_dhcp.c:1183 +#: plugins-root/check_dhcp.c:1209 #, c-format msgid "Error: DLPI stream API failed to get MAC in dl_bind/check_ctrl(): %s.\n" msgstr "" "Erreur: Impossible d'obtenir la MAC par l'API DLPI dans dl_bind/check_ctrl" "(): %s.\n" -#: plugins-root/check_dhcp.c:1231 -#, c-format -msgid "" -"This plugin tests the availability of DHCP servers on a network.\n" -"\n" -msgstr "Ce plugin teste la disponibilité de serveurs DHCP dans un réseau.\n" +#: plugins-root/check_dhcp.c:1257 +msgid "This plugin tests the availability of DHCP servers on a network." +msgstr "Ce plugin teste la disponibilité de serveurs DHCP dans un réseau." -#: plugins-root/check_dhcp.c:1235 -#, c-format -msgid "" -" -s, --serverip=IPADDRESS\n" -" IP address of DHCP server that we must hear from\n" -" -r, --requestedip=IPADDRESS\n" -" IP address that should be offered by at least one DHCP server\n" -" -t, --timeout=INTEGER\n" -" Seconds to wait for DHCPOFFER before timeout occurs\n" -" -i, --interface=STRING\n" -" Interface to to use for listening (i.e. eth0)\n" -" -v, --verbose\n" -" Print extra information (command-line use only)\n" -" -h, --help\n" -" Print detailed help screen\n" -" -V, --version\n" -" Print version information\n" +#: plugins-root/check_dhcp.c:1268 +msgid "IP address of DHCP server that we must hear from" +msgstr "" + +#: plugins-root/check_dhcp.c:1270 +msgid "IP address that should be offered by at least one DHCP server" +msgstr "" + +#: plugins-root/check_dhcp.c:1272 +msgid "Seconds to wait for DHCPOFFER before timeout occurs" +msgstr "" + +#: plugins-root/check_dhcp.c:1274 +msgid "Interface to to use for listening (i.e. eth0)" +msgstr "" + +#: plugins-root/check_icmp.c:1227 +msgid "specify a target" +msgstr "" + +#: plugins-root/check_icmp.c:1229 +msgid "warning threshold (currently " +msgstr "Valeurs pour le seuil d'avertissement (actuellement " + +#: plugins-root/check_icmp.c:1232 +msgid "critical threshold (currently " +msgstr "Valeurs pour le seuil critique (actuellement " + +#: plugins-root/check_icmp.c:1235 +msgid "number of packets to send (currently " +msgstr "nombre de paquets à envoyer (actuellement " + +#: plugins-root/check_icmp.c:1238 +msgid "max packet interval (currently " +msgstr "" + +#: plugins-root/check_icmp.c:1241 +msgid "max target interval (currently " +msgstr "" + +#: plugins-root/check_icmp.c:1244 +msgid "number of alive hosts required for success" +msgstr "nombre d'hôtes vivants requis pour réussite" + +#: plugins-root/check_icmp.c:1247 +msgid "TTL on outgoing packets (currently " +msgstr "" + +#: plugins-root/check_icmp.c:1250 +msgid "timeout value (seconds, currently " +msgstr "" + +#: plugins-root/check_icmp.c:1253 +msgid "icmp packet size (currenly ignored)" +msgstr "" + +#: plugins-root/check_icmp.c:1255 +msgid "verbose" +msgstr "" + +#: plugins-root/check_icmp.c:1258 +msgid "The -H switch is optional. Naming a host (or several) to check is not." +msgstr "" + +#: plugins-root/check_icmp.c:1259 +msgid "" +"Threshold format for -w and -c is 200.25,60% for 200.25 msec RTA and 60%" +msgstr "" + +#: plugins-root/check_icmp.c:1260 +msgid "packet loss. The default values should work well for most users." +msgstr "" + +#: plugins-root/check_icmp.c:1261 +msgid "" +"You can specify different RTA factors using the standardized abbreviations" +msgstr "" + +#: plugins-root/check_icmp.c:1262 +msgid "" +"us (microseconds), ms (milliseconds, default) or just plain s for seconds." +msgstr "" + +#: plugins-root/check_icmp.c:1267 +msgid "The -v switch can be specified several times for increased verbosity." msgstr "" -" -s, --serverip=IPADDRESS\n" -" Adresse IP du serveur DHCP qui doit nous donner la réponse\n" -" -r, --requestedip=IPADDRESS\n" -" Adresse IP qui doit être donnée par un serveur DHCP au minimum\n" -" -t, --timeout=INTEGER\n" -" Secondes à attendre avant que le délai d'attente dépassé du DHCPOFFER se " -"produise\n" -" -i, --interface=STRING\n" -" Interface à utiliser pour l'écoute (ex. eth0)\n" -" -v, --verbose\n" -" Donner des informations supplémentaires (ligne de commande seulement)\n" -" -h, --help\n" -" Afficher l'aide détaillée\n" -" -V, --version\n" -" Afficher le numéro de version\n" diff --git a/po/nagios-plugins.pot b/po/nagios-plugins.pot index cd7bbb1..8e28bc5 100644 --- a/po/nagios-plugins.pot +++ b/po/nagios-plugins.pot @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2006-04-15 00:41+0200\n" +"Report-Msgid-Bugs-To: nagiosplug-devel@lists.sourceforge.net\n" +"POT-Creation-Date: 2007-04-10 03:05-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,2664 +17,3212 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" -#: plugins/check_by_ssh.c:69 plugins/check_dig.c:76 plugins/check_disk.c:177 -#: plugins/check_dns.c:78 plugins/check_dummy.c:43 plugins/check_fping.c:73 -#: plugins/check_game.c:68 plugins/check_hpjd.c:89 plugins/check_http.c:130 -#: plugins/check_ldap.c:92 plugins/check_load.c:106 -#: plugins/check_mrtgtraf.c:66 plugins/check_mysql.c:65 -#: plugins/check_nagios.c:75 plugins/check_nt.c:120 plugins/check_nwstat.c:125 -#: plugins/check_overcr.c:89 plugins/check_pgsql.c:140 plugins/check_ping.c:83 -#: plugins/check_procs.c:128 plugins/check_radius.c:117 -#: plugins/check_real.c:68 plugins/check_smtp.c:166 plugins/check_snmp.c:168 -#: plugins/check_ssh.c:61 plugins/check_swap.c:90 plugins/check_tcp.c:195 -#: plugins/check_time.c:66 plugins/check_udp.c:55 plugins/check_ups.c:115 -#: plugins/check_users.c:54 plugins/negate.c:87 plugins-root/check_dhcp.c:251 +#: plugins/check_by_ssh.c:82 plugins/check_dig.c:89 plugins/check_disk.c:192 +#: plugins/check_dns.c:93 plugins/check_dummy.c:59 plugins/check_fping.c:89 +#: plugins/check_game.c:84 plugins/check_hpjd.c:106 plugins/check_http.c:147 +#: plugins/check_ldap.c:105 plugins/check_load.c:122 +#: plugins/check_mrtgtraf.c:83 plugins/check_mysql.c:88 +#: plugins/check_nagios.c:94 plugins/check_nt.c:126 plugins/check_ntp.c:758 +#: plugins/check_nwstat.c:177 plugins/check_overcr.c:106 +#: plugins/check_pgsql.c:156 plugins/check_ping.c:99 plugins/check_procs.c:143 +#: plugins/check_radius.c:133 plugins/check_real.c:85 plugins/check_smtp.c:180 +#: plugins/check_snmp.c:182 plugins/check_ssh.c:78 plugins/check_swap.c:113 +#: plugins/check_tcp.c:208 plugins/check_time.c:82 plugins/check_ups.c:125 +#: plugins/check_users.c:70 plugins/negate.c:102 plugins-root/check_dhcp.c:256 msgid "Could not parse arguments" msgstr "" -#: plugins/check_by_ssh.c:73 plugins/check_dig.c:73 plugins/check_dns.c:74 -#: plugins/check_nagios.c:79 plugins/check_pgsql.c:144 plugins/check_ping.c:87 -#: plugins/check_procs.c:135 plugins/negate.c:91 +#: plugins/check_by_ssh.c:86 plugins/check_dig.c:86 plugins/check_dns.c:89 +#: plugins/check_nagios.c:98 plugins/check_pgsql.c:160 +#: plugins/check_ping.c:103 plugins/check_procs.c:150 plugins/negate.c:106 msgid "Cannot catch SIGALRM" msgstr "" -#: plugins/check_by_ssh.c:84 +#: plugins/check_by_ssh.c:97 #, c-format msgid "Remote command execution failed: %s\n" msgstr "" -#: plugins/check_by_ssh.c:85 +#: plugins/check_by_ssh.c:98 msgid "Unknown error" msgstr "" -#: plugins/check_by_ssh.c:103 +#: plugins/check_by_ssh.c:116 #, c-format msgid "SSH WARNING: could not open %s\n" msgstr "" -#: plugins/check_by_ssh.c:185 plugins/check_disk.c:366 -#: plugins/check_http.c:225 plugins/check_ldap.c:268 plugins/check_pgsql.c:221 -#: plugins/check_procs.c:359 plugins/check_radius.c:198 -#: plugins/check_radius.c:268 plugins/check_real.c:344 -#: plugins/check_smtp.c:595 plugins/check_snmp.c:479 plugins/check_ssh.c:125 -#: plugins/check_tcp.c:483 plugins/check_time.c:290 plugins/check_udp.c:180 -#: plugins/check_ups.c:545 plugins/negate.c:188 +#: plugins/check_by_ssh.c:200 plugins/check_disk.c:507 +#: plugins/check_http.c:241 plugins/check_ldap.c:281 plugins/check_pgsql.c:237 +#: plugins/check_procs.c:371 plugins/check_radius.c:215 +#: plugins/check_radius.c:285 plugins/check_real.c:361 +#: plugins/check_smtp.c:629 plugins/check_snmp.c:494 plugins/check_ssh.c:143 +#: plugins/check_tcp.c:500 plugins/check_time.c:306 plugins/check_ups.c:555 +#: plugins/negate.c:203 msgid "Timeout interval must be a positive integer" msgstr "" -#: plugins/check_by_ssh.c:195 plugins/check_pgsql.c:245 -#: plugins/check_radius.c:207 plugins/check_radius.c:241 -#: plugins/check_real.c:315 plugins/check_smtp.c:527 plugins/check_tcp.c:489 -#: plugins/check_time.c:284 plugins/check_udp.c:186 plugins/check_ups.c:507 +#: plugins/check_by_ssh.c:210 plugins/check_pgsql.c:261 +#: plugins/check_radius.c:224 plugins/check_radius.c:258 +#: plugins/check_real.c:332 plugins/check_smtp.c:561 plugins/check_tcp.c:506 +#: plugins/check_time.c:300 plugins/check_ups.c:517 msgid "Port must be a positive integer" msgstr "" -#: plugins/check_by_ssh.c:239 +#: plugins/check_by_ssh.c:254 msgid "skip lines must be an integer" msgstr "" -#: plugins/check_by_ssh.c:244 plugins/check_dig.c:255 plugins/check_dns.c:358 -#: plugins/check_game.c:236 plugins/check_nagios.c:242 -#, c-format -msgid "Unknown argument - %s" -msgstr "" - -#: plugins/check_by_ssh.c:251 +#: plugins/check_by_ssh.c:272 #, c-format msgid "%s: You must provide a host name\n" msgstr "" -#: plugins/check_by_ssh.c:269 +#: plugins/check_by_ssh.c:290 msgid "No remotecmd" msgstr "" -#: plugins/check_by_ssh.c:285 +#: plugins/check_by_ssh.c:306 #, c-format msgid "" "%s: In passive mode, you must provide a service name for each command.\n" msgstr "" -#: plugins/check_by_ssh.c:288 +#: plugins/check_by_ssh.c:309 #, c-format msgid "" "%s: In passive mode, you must provide the host short name from the nagios " "configs.\n" msgstr "" -#: plugins/check_by_ssh.c:302 +#: plugins/check_by_ssh.c:323 #, c-format -msgid "" -"This plugin uses SSH to execute commands on a remote host\n" -"\n" +msgid "This plugin uses SSH to execute commands on a remote host" msgstr "" -#: plugins/check_by_ssh.c:312 -#, c-format -msgid "" -" -1, --proto1\n" -" tell ssh to use Protocol 1\n" -" -2, --proto2\n" -" tell ssh to use Protocol 2\n" -" -S, --skiplines=n\n" -" Ignore first n lines on STDERR (to suppress a logon banner)\n" -" -f\n" -" tells ssh to fork rather than create a tty\n" +#: plugins/check_by_ssh.c:336 +msgid "tell ssh to use Protocol 1" msgstr "" -#: plugins/check_by_ssh.c:322 -#, c-format -msgid "" -" -C, --command='COMMAND STRING'\n" -" command to execute on the remote machine\n" -" -l, --logname=USERNAME\n" -" SSH user name on remote host [optional]\n" -" -i, --identity=KEYFILE\n" -" identity of an authorized key [optional]\n" -" -O, --output=FILE\n" -" external command file for nagios [optional]\n" -" -s, --services=LIST\n" -" list of nagios service names, separated by ':' [optional]\n" -" -n, --name=NAME\n" -" short name of host in nagios configuration [optional]\n" +#: plugins/check_by_ssh.c:338 +msgid "tell ssh to use Protocol 2" msgstr "" #: plugins/check_by_ssh.c:340 -#, c-format -msgid "" -"\n" -"The most common mode of use is to refer to a local identity file with\n" -"the '-i' option. In this mode, the identity pair should have a null\n" -"passphrase and the public key should be listed in the authorized_keys\n" -"file of the remote host. Usually the key will be restricted to running\n" -"only one command on the remote server. If the remote SSH server tracks\n" -"invocation arguments, the one remote program may be an agent that can\n" -"execute additional commands as proxy\n" +msgid "Ignore first n lines on STDERR (to suppress a logon banner)" msgstr "" -#: plugins/check_by_ssh.c:349 -#, c-format -msgid "" -"\n" -"To use passive mode, provide multiple '-C' options, and provide\n" -"all of -O, -s, and -n options (servicelist order must match '-C'\n" -"options)\n" +#: plugins/check_by_ssh.c:342 +msgid "tells ssh to fork rather than create a tty" msgstr "" -#: plugins/check_dig.c:88 plugins/check_dig.c:90 +#: plugins/check_by_ssh.c:344 +msgid "command to execute on the remote machine" +msgstr "" + +#: plugins/check_by_ssh.c:346 +msgid "SSH user name on remote host [optional]" +msgstr "" + +#: plugins/check_by_ssh.c:348 +msgid "identity of an authorized key [optional]" +msgstr "" + +#: plugins/check_by_ssh.c:350 +msgid "external command file for nagios [optional]" +msgstr "" + +#: plugins/check_by_ssh.c:352 +msgid "list of nagios service names, separated by ':' [optional]" +msgstr "" + +#: plugins/check_by_ssh.c:354 +msgid "short name of host in nagios configuration [optional]" +msgstr "" + +#: plugins/check_by_ssh.c:356 +msgid "Call ssh with '-o OPTION' (may be used multiple times) [optional]" +msgstr "" + +#: plugins/check_by_ssh.c:358 +msgid "Tell ssh to suppress warning and diagnostic messages [optional]" +msgstr "" + +#: plugins/check_by_ssh.c:361 +msgid "The most common mode of use is to refer to a local identity file with" +msgstr "" + +#: plugins/check_by_ssh.c:362 +msgid "the '-i' option. In this mode, the identity pair should have a null" +msgstr "" + +#: plugins/check_by_ssh.c:363 +msgid "passphrase and the public key should be listed in the authorized_keys" +msgstr "" + +#: plugins/check_by_ssh.c:364 +msgid "file of the remote host. Usually the key will be restricted to running" +msgstr "" + +#: plugins/check_by_ssh.c:365 +msgid "only one command on the remote server. If the remote SSH server tracks" +msgstr "" + +#: plugins/check_by_ssh.c:366 +msgid "invocation arguments, the one remote program may be an agent that can" +msgstr "" + +#: plugins/check_by_ssh.c:367 +msgid "execute additional commands as proxy" +msgstr "" + +#: plugins/check_by_ssh.c:368 +msgid "To use passive mode, provide multiple '-C' options, and provide" +msgstr "" + +#: plugins/check_by_ssh.c:369 +msgid "" +"all of -O, -s, and -n options (servicelist order must match '-C'options)" +msgstr "" + +#: plugins/check_by_ssh.c:371 plugins/check_disk.c:901 +#: plugins/check_http.c:1324 plugins/check_nagios.c:303 +#: plugins/check_procs.c:735 plugins/negate.c:269 plugins/urlize.c:187 +#, c-format +msgid "Examples:" +msgstr "" + +#: plugins/check_by_ssh.c:385 plugins/check_dig.c:336 plugins/check_disk.c:912 +#: plugins/check_dns.c:447 plugins/check_dummy.c:127 plugins/check_fping.c:407 +#: plugins/check_game.c:334 plugins/check_hpjd.c:415 plugins/check_http.c:1347 +#: plugins/check_ldap.c:411 plugins/check_load.c:311 plugins/check_mrtg.c:383 +#: plugins/check_mysql.c:407 plugins/check_nagios.c:313 plugins/check_nt.c:707 +#: plugins/check_ntp.c:859 plugins/check_nwstat.c:1688 +#: plugins/check_overcr.c:469 plugins/check_pgsql.c:458 +#: plugins/check_ping.c:597 plugins/check_procs.c:753 +#: plugins/check_radius.c:349 plugins/check_real.c:454 +#: plugins/check_smtp.c:780 plugins/check_snmp.c:1007 plugins/check_ssh.c:306 +#: plugins/check_swap.c:560 plugins/check_tcp.c:656 plugins/check_time.c:373 +#: plugins/check_ups.c:653 plugins/check_users.c:230 +#: plugins/check_ide_smart.c:544 plugins/negate.c:290 plugins/urlize.c:204 +#: plugins-root/check_dhcp.c:1283 plugins-root/check_icmp.c:1282 +#, c-format +msgid "Usage:" +msgstr "" + +#: plugins/check_dig.c:101 plugins/check_dig.c:103 #, c-format msgid "Looking for: '%s'\n" msgstr "" -#: plugins/check_dig.c:97 +#: plugins/check_dig.c:110 msgid "dig returned an error status" msgstr "" -#: plugins/check_dig.c:122 +#: plugins/check_dig.c:135 msgid "Server not found in ANSWER SECTION" msgstr "" -#: plugins/check_dig.c:132 +#: plugins/check_dig.c:145 msgid "No ANSWER SECTION found" msgstr "" -#: plugins/check_dig.c:157 +#: plugins/check_dig.c:170 msgid "Probably a non-existent host/domain" msgstr "" -#: plugins/check_dig.c:215 +#: plugins/check_dig.c:229 #, c-format msgid "Port must be a positive integer - %s" msgstr "" -#: plugins/check_dig.c:226 +#: plugins/check_dig.c:240 #, c-format msgid "Warning interval must be a positive integer - %s" msgstr "" -#: plugins/check_dig.c:234 +#: plugins/check_dig.c:248 #, c-format msgid "Critical interval must be a positive integer - %s" msgstr "" -#: plugins/check_dig.c:242 +#: plugins/check_dig.c:256 #, c-format msgid "Timeout interval must be a positive integer - %s" msgstr "" -#: plugins/check_dig.c:295 +#: plugins/check_dig.c:309 #, c-format msgid "This plugin test the DNS service on the specified host using dig" msgstr "" -#: plugins/check_dig.c:309 -#, c-format +#: plugins/check_dig.c:320 msgid "machine name to lookup" msgstr "" -#: plugins/check_dig.c:317 -#, c-format +#: plugins/check_dig.c:322 msgid "record type to lookup (default: A)" msgstr "" -#: plugins/check_dig.c:325 -#, c-format +#: plugins/check_dig.c:324 msgid "" "an address expected to be in the answer section.if not set, uses whatever " "was in -l" msgstr "" -#: plugins/check_dig.c:343 plugins/check_disk.c:752 plugins/check_dns.c:431 -#: plugins/check_dummy.c:113 plugins/check_fping.c:430 -#: plugins/check_game.c:325 plugins/check_http.c:1340 +#: plugins/check_disk.c:213 #, c-format -msgid "Usage:" +msgid "DISK %s: %s not found\n" msgstr "" -#: plugins/check_disk.c:268 -#, c-format -msgid "" -"%s\n" -"%.0f of %.0f %s (%.0f%% inode=%.0f%%) free on %s (type %s mounted on %s) " -"warn:%lu crit:%lu warn%%:%.0f%% crit%%:%.0f%%" -msgstr "" - -#: plugins/check_disk.c:285 -#, c-format -msgid "%s [%s not found]" -msgstr "" - -#: plugins/check_disk.c:383 plugins/check_swap.c:404 -msgid "Warning threshold must be integer or percentage!" -msgstr "" - -#: plugins/check_disk.c:400 plugins/check_swap.c:422 -msgid "Critical threshold must be integer or percentage!" -msgstr "" - -#: plugins/check_disk.c:409 -msgid "Warning inode threshold must be percentage!\n" -msgstr "" - -#: plugins/check_disk.c:416 -msgid "Critical inode threshold must be percentage!\n" -msgstr "" - -#: plugins/check_disk.c:437 -#, c-format -msgid "unit type %s not known\n" -msgstr "" - -#: plugins/check_disk.c:440 -#, c-format -msgid "failed allocating storage for '%s'\n" -msgstr "" - -#: plugins/check_disk.c:530 plugins/check_fping.c:245 plugins/check_hpjd.c:337 -#: plugins/check_http.c:213 plugins/check_ldap.c:315 plugins/check_load.c:223 -#: plugins/check_mrtg.c:229 plugins/check_mrtgtraf.c:263 -#: plugins/check_mysql.c:288 plugins/check_nt.c:489 plugins/check_nwstat.c:870 -#: plugins/check_overcr.c:327 plugins/check_pgsql.c:212 -#: plugins/check_ping.c:198 plugins/check_procs.c:350 -#: plugins/check_radius.c:221 plugins/check_real.c:354 -#: plugins/check_smtp.c:631 plugins/check_snmp.c:432 plugins/check_ssh.c:113 -#: plugins/check_swap.c:437 plugins/check_tcp.c:433 plugins/check_time.c:219 -#: plugins/check_udp.c:149 plugins/check_ups.c:487 plugins/check_users.c:143 -#: plugins/check_ide_smart.c:214 plugins/negate.c:177 plugins/urlize.c:79 -#: plugins-root/check_dhcp.c:1072 -msgid "Unknown argument" -msgstr "" - -#: plugins/check_disk.c:561 plugins/check_dns.c:193 plugins/check_dummy.c:65 -#: plugins/check_http.c:948 plugins/check_mysql.c:191 -#: plugins/check_nagios.c:88 plugins/check_nagios.c:152 -#: plugins/check_nagios.c:156 plugins/check_procs.c:290 +#: plugins/check_disk.c:213 plugins/check_disk.c:751 plugins/check_dns.c:208 +#: plugins/check_dummy.c:81 plugins/check_http.c:959 plugins/check_http.c:1022 +#: plugins/check_mysql.c:214 plugins/check_nagios.c:107 +#: plugins/check_nagios.c:171 plugins/check_nagios.c:175 +#: plugins/check_procs.c:302 #, c-format msgid "CRITICAL" msgstr "" -#: plugins/check_disk.c:562 +#: plugins/check_disk.c:581 +#, c-format +msgid "unit type %s not known\n" +msgstr "" + +#: plugins/check_disk.c:584 +#, c-format +msgid "failed allocating storage for '%s'\n" +msgstr "" + +#: plugins/check_disk.c:606 plugins/check_disk.c:643 plugins/check_disk.c:653 +#: plugins/check_disk.c:659 plugins/check_disk.c:678 plugins/check_dummy.c:84 +#: plugins/check_http.c:953 +#, c-format +msgid "UNKNOWN" +msgstr "" + +#: plugins/check_disk.c:606 +msgid "Must set a threshold value before using -p\n" +msgstr "" + +#: plugins/check_disk.c:643 +msgid "Must set group value before using -p\n" +msgstr "" + +#: plugins/check_disk.c:653 +msgid "Must set a threshold value before using -r/-R\n" +msgstr "" + +#: plugins/check_disk.c:659 +msgid "Could not compile regular expression" +msgstr "" + +#: plugins/check_disk.c:679 +msgid "Regular expression did not match any path or disk" +msgstr "" + +#: plugins/check_disk.c:723 +msgid "Unknown argument" +msgstr "" + +#: plugins/check_disk.c:752 #, c-format msgid "%s does not exist\n" msgstr "" -#: plugins/check_disk.c:589 +#: plugins/check_disk.c:781 #, c-format msgid " for %s\n" msgstr "" -#: plugins/check_disk.c:600 -#, c-format -msgid "INPUT ERROR: No thresholds specified" -msgstr "" - -#: plugins/check_disk.c:606 -#, c-format -msgid "" -"INPUT ERROR: C_DFP (%f) should be less than W_DFP (%.1f) and both should be " -"between zero and 100 percent, inclusive" -msgstr "" - -#: plugins/check_disk.c:614 -#, c-format -msgid "" -"INPUT ERROR: C_IDFP (%f) should be less than W_IDFP (%.1f) and both should " -"be between zero and 100 percent, inclusive" -msgstr "" - -#: plugins/check_disk.c:621 -#, c-format -msgid "" -"INPUT ERROR: C_DF (%lu) should be less than W_DF (%lu) and both should be " -"greater than zero" -msgstr "" - -#: plugins/check_disk.c:697 -#, c-format +#: plugins/check_disk.c:849 msgid "" "This plugin checks the amount of used disk space on a mounted file system" msgstr "" -#: plugins/check_disk.c:698 -#, c-format +#: plugins/check_disk.c:850 msgid "" "and generates an alert if free space is less than one of the threshold values" msgstr "" -#: plugins/check_disk.c:707 +#: plugins/check_disk.c:859 msgid "Exit with WARNING status if less than INTEGER units of disk are free" msgstr "" -#: plugins/check_disk.c:709 +#: plugins/check_disk.c:861 msgid "Exit with WARNING status if less than PERCENT of disk space is free" msgstr "" -#: plugins/check_disk.c:711 +#: plugins/check_disk.c:863 msgid "Exit with WARNING status if less than PERCENT of inode space is free" msgstr "" -#: plugins/check_disk.c:713 +#: plugins/check_disk.c:865 msgid "Exit with CRITICAL status if less than PERCENT of inode space is free" msgstr "" -#: plugins/check_disk.c:715 +#: plugins/check_disk.c:867 msgid "Exit with CRITICAL status if less than INTEGER units of disk are free" msgstr "" -#: plugins/check_disk.c:717 +#: plugins/check_disk.c:869 msgid "Exit with CRITCAL status if less than PERCENT of disk space is free" msgstr "" -#: plugins/check_disk.c:719 +#: plugins/check_disk.c:871 msgid "Clear thresholds" msgstr "" -#: plugins/check_disk.c:721 +#: plugins/check_disk.c:873 msgid "Choose bytes, kB, MB, GB, TB (default: MB)" msgstr "" -#: plugins/check_disk.c:723 +#: plugins/check_disk.c:875 msgid "Same as '--units kB'" msgstr "" -#: plugins/check_disk.c:725 +#: plugins/check_disk.c:877 msgid "Same as '--units MB'" msgstr "" -#: plugins/check_disk.c:727 +#: plugins/check_disk.c:879 msgid "Only check local filesystems" msgstr "" -#: plugins/check_disk.c:729 +#: plugins/check_disk.c:881 msgid "Path or partition (may be repeated)" msgstr "" -#: plugins/check_disk.c:731 +#: plugins/check_disk.c:883 +msgid "Regular expression for path or partition (may be repeated)" +msgstr "" + +#: plugins/check_disk.c:885 +msgid "" +"Case insensitive regular expression for path/partition (may be repeated)" +msgstr "" + +#: plugins/check_disk.c:887 +msgid "" +"Group pathes. Thresholds apply to (free-)space of all partitions together" +msgstr "" + +#: plugins/check_disk.c:889 msgid "Ignore device (only works if -p unspecified)" msgstr "" -#: plugins/check_disk.c:732 -msgid "-X, --exclude-type=TYPE " -msgstr "" - -#: plugins/check_disk.c:733 +#: plugins/check_disk.c:891 msgid "Ignore all filesystems of indicated type (may be repeated)" msgstr "" -#: plugins/check_disk.c:735 +#: plugins/check_disk.c:893 msgid "Display the mountpoint instead of the partition" msgstr "" -#: plugins/check_disk.c:737 +#: plugins/check_disk.c:895 +msgid "For paths or partitions specified with -p, only check for exact paths" +msgstr "" + +#: plugins/check_disk.c:897 msgid "Display only devices/mountpoints with errors" msgstr "" -#: plugins/check_disk.c:741 -msgid "Examples:" -msgstr "" - -#: plugins/check_disk.c:743 +#: plugins/check_disk.c:903 msgid "Checks /tmp and /var at 10% and 5%, and / at 100MB and 50MB" msgstr "" -#: plugins/check_dns.c:92 +#: plugins/check_dns.c:107 msgid "nslookup returned an error status" msgstr "" -#: plugins/check_dns.c:105 +#: plugins/check_dns.c:120 msgid "Warning plugin error" msgstr "" -#: plugins/check_dns.c:125 +#: plugins/check_dns.c:140 #, c-format msgid "DNS CRITICAL - '%s' returned empty host name string\n" msgstr "" -#: plugins/check_dns.c:135 +#: plugins/check_dns.c:150 msgid "Non-authoritative answer:" msgstr "" -#: plugins/check_dns.c:163 +#: plugins/check_dns.c:178 #, c-format msgid "DNS CRITICAL - '%s' msg parsing exited with no address\n" msgstr "" -#: plugins/check_dns.c:169 +#: plugins/check_dns.c:184 #, c-format msgid "expected '%s' but got '%s'" msgstr "" -#: plugins/check_dns.c:175 +#: plugins/check_dns.c:190 #, c-format msgid "server %s is not authoritative for %s" msgstr "" -#: plugins/check_dns.c:189 plugins/check_dummy.c:59 plugins/check_http.c:944 -#: plugins/check_nagios.c:166 plugins/check_procs.c:283 +#: plugins/check_dns.c:204 plugins/check_dummy.c:75 plugins/check_http.c:955 +#: plugins/check_nagios.c:185 plugins/check_procs.c:295 #, c-format msgid "OK" msgstr "" -#: plugins/check_dns.c:191 plugins/check_dummy.c:62 plugins/check_http.c:946 -#: plugins/check_mysql.c:188 plugins/check_nagios.c:166 -#: plugins/check_procs.c:285 +#: plugins/check_dns.c:206 plugins/check_dummy.c:78 plugins/check_http.c:957 +#: plugins/check_mysql.c:211 plugins/check_nagios.c:185 +#: plugins/check_procs.c:297 #, c-format msgid "WARNING" msgstr "" -#: plugins/check_dns.c:195 +#: plugins/check_dns.c:210 #, c-format msgid "%.3f second response time" msgid_plural "%.3f seconds response time" msgstr[0] "" msgstr[1] "" -#: plugins/check_dns.c:196 +#: plugins/check_dns.c:211 #, c-format msgid ". %s returns %s" msgstr "" -#: plugins/check_dns.c:200 +#: plugins/check_dns.c:215 #, c-format msgid "DNS WARNING - %s\n" msgstr "" -#: plugins/check_dns.c:201 plugins/check_dns.c:204 plugins/check_dns.c:207 +#: plugins/check_dns.c:216 plugins/check_dns.c:219 plugins/check_dns.c:222 msgid " Probably a non-existent host/domain" msgstr "" -#: plugins/check_dns.c:203 +#: plugins/check_dns.c:218 #, c-format msgid "DNS CRITICAL - %s\n" msgstr "" -#: plugins/check_dns.c:206 +#: plugins/check_dns.c:221 #, c-format msgid "DNS UNKNOW - %s\n" msgstr "" -#: plugins/check_dns.c:219 +#: plugins/check_dns.c:234 msgid "Note: nslookup is deprecated and may be removed from future releases." msgstr "" -#: plugins/check_dns.c:220 +#: plugins/check_dns.c:235 msgid "Consider using the `dig' or `host' programs instead. Run nslookup with" msgstr "" -#: plugins/check_dns.c:221 +#: plugins/check_dns.c:236 msgid "the `-sil[ent]' option to prevent this message from appearing." msgstr "" -#: plugins/check_dns.c:226 +#: plugins/check_dns.c:241 #, c-format msgid "No response from DNS %s\n" msgstr "" -#: plugins/check_dns.c:230 +#: plugins/check_dns.c:245 #, c-format msgid "DNS %s has no records\n" msgstr "" -#: plugins/check_dns.c:238 +#: plugins/check_dns.c:253 #, c-format msgid "Connection to DNS %s was refused\n" msgstr "" -#: plugins/check_dns.c:242 +#: plugins/check_dns.c:257 #, c-format msgid "Query was refused by DNS server at %s\n" msgstr "" -#: plugins/check_dns.c:246 +#: plugins/check_dns.c:261 #, c-format msgid "No information returned by DNS server at %s\n" msgstr "" -#: plugins/check_dns.c:252 +#: plugins/check_dns.c:267 #, c-format msgid "Domain %s was not found by the server\n" msgstr "" -#: plugins/check_dns.c:256 +#: plugins/check_dns.c:271 msgid "Network is unreachable\n" msgstr "" -#: plugins/check_dns.c:260 +#: plugins/check_dns.c:275 #, c-format msgid "DNS failure for %s\n" msgstr "" -#: plugins/check_dns.c:324 plugins/check_dns.c:332 plugins/check_dns.c:339 -#: plugins/check_dns.c:344 plugins/check_dns.c:365 plugins/check_dns.c:373 -#: plugins/check_game.c:197 plugins/check_game.c:205 +#: plugins/check_dns.c:339 plugins/check_dns.c:347 plugins/check_dns.c:354 +#: plugins/check_dns.c:359 plugins/check_dns.c:380 plugins/check_dns.c:388 +#: plugins/check_game.c:213 plugins/check_game.c:221 msgid "Input buffer overflow\n" msgstr "" -#: plugins/check_dns.c:401 -#, c-format +#: plugins/check_dns.c:416 msgid "" "This plugin uses the nslookup program to obtain the IP address for the given " "host/domain query." msgstr "" -#: plugins/check_dns.c:403 -#, c-format +#: plugins/check_dns.c:417 msgid "An optional DNS server to use may be specified." msgstr "" -#: plugins/check_dns.c:405 -#, c-format +#: plugins/check_dns.c:418 msgid "" "If no DNS server is specified, the default server(s) specified in /etc/" "resolv.conf will be used." msgstr "" -#: plugins/check_dns.c:411 +#: plugins/check_dns.c:427 msgid "The name or address you want to query" msgstr "" -#: plugins/check_dns.c:413 +#: plugins/check_dns.c:429 msgid "Optional DNS server you want to use for the lookup" msgstr "" -#: plugins/check_dns.c:415 +#: plugins/check_dns.c:431 msgid "" "Optional IP-ADDRESS you expect the DNS server to return. HOST must end with ." msgstr "" -#: plugins/check_dns.c:417 +#: plugins/check_dns.c:433 msgid "Optionally expect the DNS server to be authoritative for the lookup" msgstr "" -#: plugins/check_dns.c:419 +#: plugins/check_dns.c:435 msgid "Return warning if elapsed time exceeds value. Default off" msgstr "" -#: plugins/check_dns.c:421 +#: plugins/check_dns.c:437 msgid "Return critical if elapsed time exceeds value. Default off" msgstr "" -#: plugins/check_dummy.c:53 +#: plugins/check_dummy.c:69 msgid "Arguments to check_dummy must be an integer" msgstr "" -#: plugins/check_dummy.c:68 plugins/check_http.c:942 -#, c-format -msgid "UNKNOWN" -msgstr "" - -#: plugins/check_dummy.c:71 +#: plugins/check_dummy.c:87 #, c-format msgid "Status %d is not a supported error state\n" msgstr "" -#: plugins/check_dummy.c:93 -#, c-format +#: plugins/check_dummy.c:109 msgid "" "This plugin will simply return the state corresponding to the numeric value" msgstr "" -#: plugins/check_dummy.c:97 -#, c-format +#: plugins/check_dummy.c:111 msgid "of the argument with optional text" msgstr "" -#: plugins/check_fping.c:87 plugins/check_hpjd.c:114 plugins/check_ping.c:411 -#: plugins/check_procs.c:144 plugins/check_snmp.c:189 plugins/check_swap.c:155 -#: plugins/check_users.c:59 plugins/negate.c:97 plugins/urlize.c:93 +#: plugins/check_fping.c:103 plugins/check_hpjd.c:131 plugins/check_ping.c:432 +#: plugins/check_procs.c:159 plugins/check_snmp.c:203 plugins/check_swap.c:178 +#: plugins/check_users.c:75 plugins/negate.c:112 plugins/urlize.c:117 #, c-format msgid "Could not open pipe: %s\n" msgstr "" -#: plugins/check_fping.c:93 plugins/check_hpjd.c:120 plugins/check_load.c:137 -#: plugins/check_procs.c:150 plugins/check_snmp.c:195 plugins/check_swap.c:161 -#: plugins/check_users.c:65 plugins/negate.c:102 plugins/urlize.c:99 +#: plugins/check_fping.c:109 plugins/check_hpjd.c:137 plugins/check_load.c:153 +#: plugins/check_procs.c:165 plugins/check_snmp.c:209 plugins/check_swap.c:184 +#: plugins/check_users.c:81 plugins/negate.c:117 plugins/urlize.c:123 #, c-format msgid "Could not open stderr for %s\n" msgstr "" -#: plugins/check_fping.c:133 +#: plugins/check_fping.c:149 #, c-format msgid "FPING UNKNOW - %s not found\n" msgstr "" -#: plugins/check_fping.c:137 +#: plugins/check_fping.c:153 #, c-format msgid "FPING CRITICAL - %s is unreachable\n" msgstr "" -#: plugins/check_fping.c:142 +#: plugins/check_fping.c:158 #, c-format msgid "FPING CRITICAL - %s is down\n" msgstr "" -#: plugins/check_fping.c:169 +#: plugins/check_fping.c:185 #, c-format msgid "FPING %s - %s (loss=%.0f%%, rta=%f ms)|%s %s\n" msgstr "" -#: plugins/check_fping.c:190 +#: plugins/check_fping.c:206 #, c-format msgid "FPING %s - %s (loss=%.0f%% )|%s\n" msgstr "" -#: plugins/check_fping.c:257 plugins/check_hpjd.c:324 plugins/check_hpjd.c:347 -#: plugins/check_mysql.c:254 plugins/check_mysql.c:303 -#: plugins/check_pgsql.c:239 plugins/check_ping.c:269 plugins/check_ping.c:392 -#: plugins/check_radius.c:233 plugins/check_real.c:302 -#: plugins/check_real.c:364 plugins/check_smtp.c:520 plugins/check_smtp.c:641 -#: plugins/check_ssh.c:144 plugins/check_time.c:228 plugins/check_time.c:303 -#: plugins/check_udp.c:161 plugins/check_udp.c:202 plugins/check_ups.c:493 -#: plugins/check_ups.c:562 +#: plugins/check_fping.c:273 plugins/check_hpjd.c:341 plugins/check_hpjd.c:364 +#: plugins/check_mysql.c:277 plugins/check_mysql.c:326 plugins/check_ntp.c:696 +#: plugins/check_pgsql.c:255 plugins/check_ping.c:290 plugins/check_ping.c:413 +#: plugins/check_radius.c:250 plugins/check_real.c:319 +#: plugins/check_real.c:381 plugins/check_smtp.c:554 plugins/check_smtp.c:675 +#: plugins/check_ssh.c:162 plugins/check_time.c:244 plugins/check_time.c:319 +#: plugins/check_ups.c:503 plugins/check_ups.c:572 msgid "Invalid hostname/address" msgstr "" -#: plugins/check_fping.c:291 +#: plugins/check_fping.c:307 msgid "Packet size must be a positive integer" msgstr "" -#: plugins/check_fping.c:297 +#: plugins/check_fping.c:313 msgid "Packet count must be a positive integer" msgstr "" -#: plugins/check_fping.c:303 plugins/check_time.c:307 plugins/check_udp.c:207 +#: plugins/check_fping.c:319 plugins/check_ntp.c:728 plugins/check_time.c:323 msgid "Hostname was not supplied" msgstr "" -#: plugins/check_fping.c:323 +#: plugins/check_fping.c:339 #, c-format msgid "%s: Only one threshold may be packet loss (%s)\n" msgstr "" -#: plugins/check_fping.c:327 +#: plugins/check_fping.c:343 #, c-format msgid "%s: Only one threshold must be packet loss (%s)\n" msgstr "" -#: plugins/check_fping.c:359 -#, c-format +#: plugins/check_fping.c:375 msgid "" "This plugin will use the fping command to ping the specified host for a fast " "check" msgstr "" -#: plugins/check_fping.c:363 -#, c-format +#: plugins/check_fping.c:377 msgid "Note that it is necessary to set the suid flag on fping." msgstr "" -#: plugins/check_fping.c:373 -#, c-format +#: plugins/check_fping.c:386 msgid "" "name or IP Address of host to ping (IP Address bypasses name lookup, " "reducing system load)" msgstr "" -#: plugins/check_fping.c:381 -#, c-format +#: plugins/check_fping.c:388 plugins/check_ping.c:567 msgid "warning threshold pair" msgstr "" -#: plugins/check_fping.c:389 -#, c-format +#: plugins/check_fping.c:390 plugins/check_ping.c:569 msgid "critical threshold pair" msgstr "" -#: plugins/check_fping.c:395 +#: plugins/check_fping.c:392 #, c-format msgid "size of ICMP packet (default: %d)" msgstr "" -#: plugins/check_fping.c:403 +#: plugins/check_fping.c:394 #, c-format msgid "number of ICMP packets to send (default: %d)" msgstr "" -#: plugins/check_fping.c:411 +#: plugins/check_fping.c:397 #, c-format msgid "" "THRESHOLD is ,%% where is the round trip average travel time " "(ms)" msgstr "" -#: plugins/check_fping.c:415 -#, c-format +#: plugins/check_fping.c:398 msgid "" "which triggers a WARNING or CRITICAL state, and is the percentage of" msgstr "" -#: plugins/check_fping.c:419 -#, c-format +#: plugins/check_fping.c:399 msgid "packet loss to trigger an alarm state." msgstr "" -#: plugins/check_game.c:97 +#: plugins/check_game.c:113 #, c-format msgid "CRITICAL - Host type parameter incorrect!\n" msgstr "" -#: plugins/check_game.c:112 +#: plugins/check_game.c:128 #, c-format msgid "CRITICAL - Host not found\n" msgstr "" -#: plugins/check_game.c:116 +#: plugins/check_game.c:132 #, c-format msgid "CRITICAL - Game server down or unavailable\n" msgstr "" -#: plugins/check_game.c:120 +#: plugins/check_game.c:136 #, c-format msgid "CRITICAL - Game server timeout\n" msgstr "" -#: plugins/check_game.c:283 +#: plugins/check_game.c:299 #, c-format msgid "This plugin tests game server connections with the specified host." msgstr "" -#: plugins/check_game.c:291 -#, c-format -msgid "" -" = Game type that is recognised by qstat (without the leading " -"dash)\n" -" = The IP address of the device you wish to query\n" -" [port] = Optional port of which to connect\n" -" [game_field] = Field number in raw qstat output that contains game name\n" -" [map_field] = Field number in raw qstat output that contains map name\n" -" [ping_field] = Field number in raw qstat output that contains ping time\n" +#: plugins/check_game.c:308 +msgid "Optional port of which to connect" msgstr "" -#: plugins/check_game.c:301 +#: plugins/check_game.c:310 +msgid "Field number in raw qstat output that contains game name" +msgstr "" + +#: plugins/check_game.c:312 +msgid "Field number in raw qstat output that contains map name" +msgstr "" + +#: plugins/check_game.c:314 +msgid "Field number in raw qstat output that contains ping time" +msgstr "" + +#: plugins/check_game.c:318 plugins/check_http.c:1312 plugins/check_mrtg.c:364 +#: plugins/check_mrtgtraf.c:361 plugins/check_nt.c:693 +#: plugins/check_nwstat.c:1673 plugins/check_overcr.c:452 +#: plugins/check_swap.c:549 plugins/check_ups.c:629 plugins/negate.c:276 #, c-format msgid "Notes:" msgstr "" -#: plugins/check_game.c:305 -#, c-format +#: plugins/check_game.c:320 msgid "" "This plugin uses the 'qstat' command, the popular game server status query " "tool ." msgstr "" -#: plugins/check_game.c:309 -#, c-format +#: plugins/check_game.c:322 msgid "" "If you don't have the package installed, you will need to download it from" msgstr "" -#: plugins/check_game.c:313 -#, c-format +#: plugins/check_game.c:324 msgid "" "http://www.activesw.com/people/steve/qstat.html before you can use this " "plugin." msgstr "" -#: plugins/check_hpjd.c:225 +#: plugins/check_hpjd.c:242 msgid "Paper Jam" msgstr "" -#: plugins/check_hpjd.c:229 +#: plugins/check_hpjd.c:246 msgid "Out of Paper" msgstr "" -#: plugins/check_hpjd.c:234 +#: plugins/check_hpjd.c:251 msgid "Printer Offline" msgstr "" -#: plugins/check_hpjd.c:239 +#: plugins/check_hpjd.c:256 msgid "Peripheral Error" msgstr "" -#: plugins/check_hpjd.c:243 +#: plugins/check_hpjd.c:260 msgid "Intervention Required" msgstr "" -#: plugins/check_hpjd.c:247 +#: plugins/check_hpjd.c:264 msgid "Toner Low" msgstr "" -#: plugins/check_hpjd.c:251 +#: plugins/check_hpjd.c:268 msgid "Insufficient Memory" msgstr "" -#: plugins/check_hpjd.c:255 +#: plugins/check_hpjd.c:272 msgid "A Door is Open" msgstr "" -#: plugins/check_hpjd.c:259 +#: plugins/check_hpjd.c:276 msgid "Output Tray is Full" msgstr "" -#: plugins/check_hpjd.c:263 +#: plugins/check_hpjd.c:280 msgid "Data too Slow for Engine" msgstr "" -#: plugins/check_hpjd.c:267 +#: plugins/check_hpjd.c:284 msgid "Unknown Paper Error" msgstr "" -#: plugins/check_hpjd.c:272 +#: plugins/check_hpjd.c:289 #, c-format msgid "Printer ok - (%s)\n" msgstr "" -#: plugins/check_hpjd.c:377 -#, c-format -msgid "" -"This plugin tests the STATUS of an HP printer with a JetDirect card.\n" -"Net-snmp must be installed on the computer running the plugin.\n" -"\n" +#: plugins/check_hpjd.c:394 +msgid "This plugin tests the STATUS of an HP printer with a JetDirect card." msgstr "" -#: plugins/check_hpjd.c:385 -#, c-format -msgid "" -" -C, --community=STRING\n" -" The SNMP community name (default=%s)\n" +#: plugins/check_hpjd.c:395 +msgid "Net-snmp must be installed on the computer running the plugin." msgstr "" -#: plugins/check_http.c:231 +#: plugins/check_hpjd.c:404 +msgid "The SNMP community name " +msgstr "" + +#: plugins/check_hpjd.c:405 +#, c-format +msgid "(default=%s)" +msgstr "" + +#: plugins/check_http.c:247 msgid "Critical threshold must be integer" msgstr "" -#: plugins/check_http.c:239 +#: plugins/check_http.c:255 msgid "Warning threshold must be integer" msgstr "" -#: plugins/check_http.c:265 plugins/check_tcp.c:552 +#: plugins/check_http.c:281 plugins/check_tcp.c:570 msgid "Invalid certificate expiration period" msgstr "" -#: plugins/check_http.c:274 plugins/check_tcp.c:564 +#: plugins/check_http.c:290 plugins/check_tcp.c:582 msgid "Invalid option - SSL is not available" msgstr "" -#: plugins/check_http.c:292 +#: plugins/check_http.c:308 #, c-format msgid "option f:%d \n" msgstr "" -#: plugins/check_http.c:309 +#: plugins/check_http.c:325 msgid "Invalid port number" msgstr "" -#: plugins/check_http.c:340 plugins/check_snmp.c:308 -#, c-format -msgid "Call for regex which was not a compiled option" -msgstr "" - -#: plugins/check_http.c:354 +#: plugins/check_http.c:363 #, c-format msgid "Could Not Compile Regular Expression: %s" msgstr "" -#: plugins/check_http.c:366 plugins/check_smtp.c:621 plugins/check_ssh.c:136 -#: plugins/check_tcp.c:450 +#: plugins/check_http.c:377 plugins/check_ntp.c:709 plugins/check_smtp.c:655 +#: plugins/check_ssh.c:154 plugins/check_tcp.c:473 msgid "IPv6 support not available" msgstr "" -#: plugins/check_http.c:428 plugins/check_ping.c:396 +#: plugins/check_http.c:439 plugins/check_ping.c:417 msgid "You must specify a server address or host name" msgstr "" -#: plugins/check_http.c:654 +#: plugins/check_http.c:665 msgid "Server date unknown\n" msgstr "" -#: plugins/check_http.c:656 +#: plugins/check_http.c:667 msgid "Document modification date unknown\n" msgstr "" -#: plugins/check_http.c:662 +#: plugins/check_http.c:673 #, c-format msgid "CRITICAL - Server date \"%100s\" unparsable" msgstr "" -#: plugins/check_http.c:664 +#: plugins/check_http.c:675 #, c-format msgid "CRITICAL - Document date \"%100s\" unparsable" msgstr "" -#: plugins/check_http.c:666 +#: plugins/check_http.c:677 #, c-format msgid "CRITICAL - Document is %d seconds in the future\n" msgstr "" -#: plugins/check_http.c:671 +#: plugins/check_http.c:682 #, c-format msgid "CRITICAL - Last modified %.1f days ago\n" msgstr "" -#: plugins/check_http.c:675 +#: plugins/check_http.c:686 #, c-format msgid "CRITICAL - Last modified %d:%02d:%02d ago\n" msgstr "" -#: plugins/check_http.c:756 +#: plugins/check_http.c:767 msgid "Unable to open TCP socket\n" msgstr "" -#: plugins/check_http.c:836 +#: plugins/check_http.c:847 msgid "Error on receive\n" msgstr "" -#: plugins/check_http.c:846 +#: plugins/check_http.c:857 plugins/check_real.c:189 plugins/check_tcp.c:291 #, c-format -msgid "No data received %s\n" +msgid "No data received from host\n" msgstr "" -#: plugins/check_http.c:896 +#: plugins/check_http.c:907 msgid "Invalid HTTP response received from host\n" msgstr "" -#: plugins/check_http.c:899 +#: plugins/check_http.c:910 #, c-format msgid "Invalid HTTP response received from host on port %d\n" msgstr "" -#: plugins/check_http.c:907 +#: plugins/check_http.c:918 #, c-format msgid "HTTP OK: Status line output matched \"%s\"\n" msgstr "" -#: plugins/check_http.c:919 +#: plugins/check_http.c:930 #, c-format msgid "HTTP CRITICAL: Invalid Status Line (%s)\n" msgstr "" -#: plugins/check_http.c:926 +#: plugins/check_http.c:937 #, c-format msgid "HTTP CRITICAL: Invalid Status (%s)\n" msgstr "" -#: plugins/check_http.c:930 +#: plugins/check_http.c:941 #, c-format msgid "HTTP CRITICAL: %s\n" msgstr "" -#: plugins/check_http.c:934 +#: plugins/check_http.c:945 #, c-format msgid "HTTP WARNING: %s\n" msgstr "" -#: plugins/check_http.c:952 +#: plugins/check_http.c:963 #, c-format -msgid " - %s - %.3f second response time %s%s|%s %s\n" +msgid " - %s - %.3f second response time %s|%s %s\n" msgstr "" -#: plugins/check_http.c:968 +#: plugins/check_http.c:979 #, c-format -msgid "HTTP WARNING: %s - %.3f second response time %s%s|%s %s\n" +msgid "HTTP WARNING: %s - %.3f second response time %s|%s %s\n" msgstr "" -#: plugins/check_http.c:982 plugins/check_http.c:999 +#: plugins/check_http.c:993 plugins/check_http.c:1010 #, c-format -msgid "HTTP OK %s - %.3f second response time %s%s|%s %s\n" +msgid "HTTP OK %s - %.3f second response time %s|%s %s\n" msgstr "" -#: plugins/check_http.c:989 +#: plugins/check_http.c:1000 #, c-format msgid "CRITICAL - string not found%s|%s %s\n" msgstr "" -#: plugins/check_http.c:1007 -#, c-format -msgid "CRITICAL - pattern not found%s|%s %s\n" +#: plugins/check_http.c:1018 +msgid "pattern not found" msgstr "" -#: plugins/check_http.c:1014 +#: plugins/check_http.c:1020 +msgid "pattern found" +msgstr "" + +#: plugins/check_http.c:1030 #, c-format msgid "CRITICAL - Execute Error: %s\n" msgstr "" -#: plugins/check_http.c:1025 +#: plugins/check_http.c:1039 #, c-format msgid "HTTP WARNING: page size %d too large%s|%s\n" msgstr "" -#: plugins/check_http.c:1029 +#: plugins/check_http.c:1043 #, c-format msgid "HTTP WARNING: page size %d too small%s|%s\n" msgstr "" -#: plugins/check_http.c:1034 +#: plugins/check_http.c:1048 #, c-format -msgid "HTTP OK %s - %d bytes in %.3f seconds %s%s|%s %s\n" -msgstr "" - -#: plugins/check_http.c:1069 -msgid "Could not allocate addr\n" -msgstr "" - -#: plugins/check_http.c:1073 -msgid "Could not allocate url\n" +msgid "HTTP OK %s - %d bytes in %.3f seconds %s|%s %s\n" msgstr "" #: plugins/check_http.c:1083 +msgid "Could not allocate addr\n" +msgstr "" + +#: plugins/check_http.c:1087 +msgid "Could not allocate url\n" +msgstr "" + +#: plugins/check_http.c:1096 #, c-format msgid "UNKNOWN - Could not find redirect location - %s%s\n" msgstr "" -#: plugins/check_http.c:1093 +#: plugins/check_http.c:1106 msgid "could not allocate url\n" msgstr "" -#: plugins/check_http.c:1136 +#: plugins/check_http.c:1149 #, c-format msgid "UNKNOWN - Could not parse redirect location - %s%s\n" msgstr "" -#: plugins/check_http.c:1146 +#: plugins/check_http.c:1159 #, c-format msgid "WARNING - maximum redirection depth %d exceeded - %s://%s:%d%s%s\n" msgstr "" -#: plugins/check_http.c:1154 +#: plugins/check_http.c:1167 #, c-format msgid "WARNING - redirection creates an infinite loop - %s://%s:%d%s%s\n" msgstr "" -#: plugins/check_http.c:1218 -#, c-format -msgid "" -"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." +#: plugins/check_http.c:1231 +msgid "This plugin tests the HTTP service on the specified host. It can test" msgstr "" -#: plugins/check_http.c:1228 +#: plugins/check_http.c:1232 +msgid "normal (http) and secure (https) servers, follow redirects, search for" +msgstr "" + +#: plugins/check_http.c:1233 +msgid "strings and regular expressions, check connection times, and report on" +msgstr "" + +#: plugins/check_http.c:1234 +msgid "certificate expiration times." +msgstr "" + +#: plugins/check_http.c:1240 #, c-format msgid "NOTE: One or both of -H and -I must be specified" msgstr "" -#: plugins/check_http.c:1234 -#, c-format -msgid "" -" -H, --hostname=ADDRESS\n" -" Host name argument for servers using host headers (virtual host)\n" -" Append a port to include it in the header (eg: example.com:5000)\n" -" -I, --IP-address=ADDRESS\n" -" IP address or name (use numeric address if possible to bypass DNS " -"lookup).\n" -" -p, --port=INTEGER\n" -" Port number (default: %d)\n" +#: plugins/check_http.c:1247 +msgid "Host name argument for servers using host headers (virtual host)" msgstr "" -#: plugins/check_http.c:1246 -#, c-format -msgid "" -" -S, --ssl\n" -" Connect via SSL\n" -" -C, --certificate=INTEGER\n" -" Minimum number of days a certificate has to be valid.\n" -" (when this option is used the url is not checked.)\n" +#: plugins/check_http.c:1248 +msgid "Append a port to include it in the header (eg: example.com:5000)" msgstr "" -#: plugins/check_http.c:1254 -#, c-format +#: plugins/check_http.c:1250 msgid "" -" -e, --expect=STRING\n" -" String to expect in first (status) line of server response (default: %s)\n" -" If specified skips all other status line logic (ex: 3xx, 4xx, 5xx " -"processing)\n" -" -s, --string=STRING\n" -" String to expect in the content\n" -" -u, --url=PATH\n" -" URL to GET or POST (default: /)\n" -" -P, --post=STRING\n" -" URL encoded http POST data\n" -" -N, --no-body\n" -" Don't wait for document body: stop reading after headers.\n" -" (Note that this still does an HTTP GET or POST, not a HEAD.)\n" -" -M, --max-age=SECONDS\n" -" Warn if document is more than SECONDS old. the number can also be of \n" -" the form \"10m\" for minutes, \"10h\" for hours, or \"10d\" for days.\n" -" -T, --content-type=STRING\n" -" specify Content-Type header media type when POSTing\n" +"IP address or name (use numeric address if possible to bypass DNS lookup)." +msgstr "" + +#: plugins/check_http.c:1252 +msgid "Port number (default: " +msgstr "" + +#: plugins/check_http.c:1259 +msgid "Connect via SSL. Port defaults to 443" +msgstr "" + +#: plugins/check_http.c:1261 +msgid "" +"Minimum number of days a certificate has to be valid. Port defaults to 443" +msgstr "" + +#: plugins/check_http.c:1262 +msgid "(when this option is used the url is not checked.)\n" +msgstr "" + +#: plugins/check_http.c:1266 +msgid "String to expect in first (status) line of server response (default: " +msgstr "" + +#: plugins/check_http.c:1268 +msgid "" +"If specified skips all other status line logic (ex: 3xx, 4xx, 5xx processing)" +msgstr "" + +#: plugins/check_http.c:1270 +msgid "String to expect in the content" +msgstr "" + +#: plugins/check_http.c:1272 +msgid "URL to GET or POST (default: /)" msgstr "" #: plugins/check_http.c:1274 -#, c-format -msgid "" -" -l, --linespan\n" -" Allow regex to span newlines (must precede -r or -R)\n" -" -r, --regex, --ereg=STRING\n" -" Search page for regex STRING\n" -" -R, --eregi=STRING\n" -" Search page for case-insensitive regex STRING\n" +msgid "URL encoded http POST data" msgstr "" -#: plugins/check_http.c:1283 -#, c-format -msgid "" -" -a, --authorization=AUTH_PAIR\n" -" Username:password on sites with basic authentication\n" -" -A, --useragent=STRING\n" -" String to be sent in http header as \"User Agent\"\n" -" -k, --header=STRING\n" -" Any other tags to be sent in http header. Use multiple times for " -"additional headers\n" -" -L, --link=URL\n" -" Wrap output in HTML link (obsoleted by urlize)\n" -" -f, --onredirect=\n" -" How to handle redirected pages\n" -" -m, --pagesize=INTEGER<:INTEGER>\n" -" Minimum page size required (bytes) : Maximum page size required (bytes)\n" +#: plugins/check_http.c:1276 +msgid "Don't wait for document body: stop reading after headers." msgstr "" -#: plugins/check_http.c:1303 -#, c-format -msgid "" -"This plugin will attempt to open an HTTP connection with the host. " -"Successful\n" -"connects return STATE_OK, refusals and timeouts return STATE_CRITICAL, " -"other\n" -"errors return STATE_UNKNOWN. Successful connects, but incorrect reponse\n" -"messages from the host result in STATE_WARNING return values. If you are\n" -"checking a virtual server that uses 'host headers' you must supply the FQDN\n" -"(fully qualified domain name) as the [host_name] argument.\n" +#: plugins/check_http.c:1277 +msgid "(Note that this still does an HTTP GET or POST, not a HEAD.)" msgstr "" -#: plugins/check_http.c:1312 -#, c-format +#: plugins/check_http.c:1279 +msgid "Warn if document is more than SECONDS old. the number can also be of" +msgstr "" + +#: plugins/check_http.c:1280 +msgid "the form \"10m\" for minutes, \"10h\" for hours, or \"10d\" for days." +msgstr "" + +#: plugins/check_http.c:1282 +msgid "specify Content-Type header media type when POSTing\n" +msgstr "" + +#: plugins/check_http.c:1285 +msgid "Allow regex to span newlines (must precede -r or -R)" +msgstr "" + +#: plugins/check_http.c:1287 +msgid "Search page for regex STRING" +msgstr "" + +#: plugins/check_http.c:1289 +msgid "Search page for case-insensitive regex STRING" +msgstr "" + +#: plugins/check_http.c:1291 +msgid "Return CRITICAL if found, OK if not\n" +msgstr "" + +#: plugins/check_http.c:1294 +msgid "Username:password on sites with basic authentication" +msgstr "" + +#: plugins/check_http.c:1296 +msgid "String to be sent in http header as \"User Agent\"" +msgstr "" + +#: plugins/check_http.c:1298 msgid "" -"\n" -"This plugin can also check whether an SSL enabled web server is able to\n" -"serve content (optionally within a specified time) or whether the X509 \n" -"certificate is still valid for the specified number of days.\n" +" Any other tags to be sent in http header. Use multiple times for additional " +"headers" +msgstr "" + +#: plugins/check_http.c:1300 +msgid "Wrap output in HTML link (obsoleted by urlize)" +msgstr "" + +#: plugins/check_http.c:1302 +msgid "How to handle redirected pages" +msgstr "" + +#: plugins/check_http.c:1304 +msgid "Minimum page size required (bytes) : Maximum page size required (bytes)" +msgstr "" + +#: plugins/check_http.c:1313 +msgid "This plugin will attempt to open an HTTP connection with the host." +msgstr "" + +#: plugins/check_http.c:1314 +msgid "" +"Successful connects return STATE_OK, refusals and timeouts return " +"STATE_CRITICAL" +msgstr "" + +#: plugins/check_http.c:1315 +msgid "" +"other errors return STATE_UNKNOWN. Successful connects, but incorrect " +"reponse" msgstr "" #: plugins/check_http.c:1316 -#, c-format msgid "" -"\n" -"CHECK CONTENT: check_http -w 5 -c 10 --ssl www.verisign.com\n" -"\n" -"When the 'www.verisign.com' server returns its content within 5 seconds, a\n" -"STATE_OK will be returned. When the server returns its content but exceeds\n" -"the 5-second threshold, a STATE_WARNING will be returned. When an error " -"occurs,\n" -"a STATE_CRITICAL will be returned.\n" -"\n" +"messages from the host result in STATE_WARNING return values. If you are" +msgstr "" + +#: plugins/check_http.c:1317 +msgid "" +"checking a virtual server that uses 'host headers' you must supply the FQDN" +msgstr "" + +#: plugins/check_http.c:1318 +msgid "(fully qualified domain name) as the [host_name] argument." +msgstr "" + +#: plugins/check_http.c:1321 +msgid "This plugin can also check whether an SSL enabled web server is able to" +msgstr "" + +#: plugins/check_http.c:1322 +msgid "serve content (optionally within a specified time) or whether the X509 " msgstr "" #: plugins/check_http.c:1323 -#, c-format -msgid "" -"CHECK CERTIFICATE: check_http www.verisign.com -C 14\n" -"\n" -"When the certificate of 'www.verisign.com' is valid for more than 14 days, " -"a\n" -"STATE_OK is returned. When the certificate is still valid, but for less " -"than\n" -"14 days, a STATE_WARNING is returned. A STATE_CRITICAL will be returned " -"when\n" -"the certificate is expired.\n" +msgid "certificate is still valid for the specified number of days." msgstr "" -#: plugins/check_ldap.c:112 +#: plugins/check_http.c:1326 +msgid "" +"When the 'www.verisign.com' server returns its content within 5 seconds," +msgstr "" + +#: plugins/check_http.c:1327 +msgid "" +"a STATE_OK will be returned. When the server returns its content but exceeds" +msgstr "" + +#: plugins/check_http.c:1328 +msgid "" +"the 5-second threshold, a STATE_WARNING will be returned. When an error " +"occurs," +msgstr "" + +#: plugins/check_http.c:1329 +msgid "a STATE_CRITICAL will be returned." +msgstr "" + +#: plugins/check_http.c:1332 +msgid "" +"When the certificate of 'www.verisign.com' is valid for more than 14 days," +msgstr "" + +#: plugins/check_http.c:1333 +msgid "" +"a STATE_OK is returned. When the certificate is still valid, but for less " +"than" +msgstr "" + +#: plugins/check_http.c:1334 +msgid "" +"14 days, a STATE_WARNING is returned. A STATE_CRITICAL will be returned when" +msgstr "" + +#: plugins/check_http.c:1335 +msgid "the certificate is expired." +msgstr "" + +#: plugins/check_ldap.c:125 #, c-format msgid "Could not connect to the server at port %i\n" msgstr "" -#: plugins/check_ldap.c:121 +#: plugins/check_ldap.c:134 #, c-format msgid "Could not set protocol version %d\n" msgstr "" -#: plugins/check_ldap.c:137 +#: plugins/check_ldap.c:150 #, c-format msgid "Could not init TLS at port %i!\n" msgstr "" -#: plugins/check_ldap.c:141 +#: plugins/check_ldap.c:154 #, c-format msgid "TLS not supported by the libraries!\n" msgstr "" -#: plugins/check_ldap.c:160 +#: plugins/check_ldap.c:173 #, c-format msgid "Could not init startTLS at port %i!\n" msgstr "" -#: plugins/check_ldap.c:164 +#: plugins/check_ldap.c:177 #, c-format msgid "startTLS not supported by the library, needs LDAPv3!\n" msgstr "" -#: plugins/check_ldap.c:174 +#: plugins/check_ldap.c:187 #, c-format msgid "Could not bind to the ldap-server\n" msgstr "" -#: plugins/check_ldap.c:182 +#: plugins/check_ldap.c:195 #, c-format msgid "Could not search/find objectclasses in %s\n" msgstr "" -#: plugins/check_ldap.c:205 +#: plugins/check_ldap.c:218 #, c-format msgid "LDAP %s - %.3f seconds response time|%s\n" msgstr "" -#: plugins/check_ldap.c:311 plugins/check_ping.c:220 +#: plugins/check_ldap.c:324 plugins/check_ping.c:241 msgid "IPv6 support not available\n" msgstr "" -#: plugins/check_ldap.c:334 +#: plugins/check_ldap.c:347 msgid "Please specify the host name\n" msgstr "" -#: plugins/check_ldap.c:337 +#: plugins/check_ldap.c:350 msgid "Please specify the LDAP base\n" msgstr "" -#: plugins/check_ldap.c:362 -#, c-format -msgid "" -" -a [--attr]\n" -" ldap attribute to search (default: \"(objectclass=*)\"\n" -" -b [--base]\n" -" ldap base (eg. ou=my unit, o=my org, c=at)\n" -" -D [--bind]\n" -" ldap bind DN (if required)\n" -" -P [--pass]\n" -" ldap password (if required)\n" +#: plugins/check_ldap.c:378 +msgid "ldap attribute to search (default: \"(objectclass=*)\"" msgstr "" -#: plugins/check_ldap.c:373 -#, c-format -msgid "" -" -2 [--ver2]\n" -" use ldap protocol version 2\n" -" -3 [--ver3]\n" -" use ldap protocol version 3\n" -" (default protocol version: %d)\n" +#: plugins/check_ldap.c:380 +msgid "ldap base (eg. ou=my unit, o=my org, c=at" msgstr "" -#: plugins/check_load.c:75 +#: plugins/check_ldap.c:382 +msgid "ldap bind DN (if required)" +msgstr "" + +#: plugins/check_ldap.c:384 +msgid "ldap password (if required)" +msgstr "" + +#: plugins/check_ldap.c:388 +msgid "use ldap protocol version 2" +msgstr "" + +#: plugins/check_ldap.c:390 +msgid "use ldap protocol version 3" +msgstr "" + +#: plugins/check_load.c:91 msgid "Warning threshold must be float or float triplet!\n" msgstr "" -#: plugins/check_load.c:116 plugins/check_load.c:132 +#: plugins/check_load.c:132 plugins/check_load.c:148 #, c-format msgid "Error opening %s\n" msgstr "" -#: plugins/check_load.c:144 +#: plugins/check_load.c:160 #, c-format msgid "Error code %d returned in %s\n" msgstr "" -#: plugins/check_load.c:152 +#: plugins/check_load.c:168 #, c-format msgid "Error in getloadavg()\n" msgstr "" -#: plugins/check_load.c:155 plugins/check_load.c:157 +#: plugins/check_load.c:171 plugins/check_load.c:173 #, c-format msgid "Error processing %s\n" msgstr "" -#: plugins/check_load.c:166 +#: plugins/check_load.c:182 #, c-format msgid "load average: %.2f, %.2f, %.2f" msgstr "" -#: plugins/check_load.c:255 +#: plugins/check_load.c:271 #, c-format msgid "Critical threshold for %d-minute load average is not specified\n" msgstr "" -#: plugins/check_load.c:257 +#: plugins/check_load.c:273 #, c-format msgid "Warning threshold for %d-minute load average is not specified\n" msgstr "" -#: plugins/check_load.c:259 +#: plugins/check_load.c:275 #, c-format msgid "" "Parameter inconsistency: %d-minute \"warning load\" is greater than " "\"critical load\"\n" msgstr "" -#: plugins/check_load.c:275 +#: plugins/check_load.c:291 #, c-format -msgid "" -"This plugin tests the current system load average.\n" -"\n" +msgid "This plugin tests the current system load average." msgstr "" -#: plugins/check_load.c:281 -#, c-format -msgid "" -" -w, --warning=WLOAD1,WLOAD5,WLOAD15\n" -" Exit with WARNING status if load average exceeds WLOADn\n" -" -c, --critical=CLOAD1,CLOAD5,CLOAD15\n" -" Exit with CRITICAL status if load average exceed CLOADn\n" -"\n" -"the load average format is the same used by \"uptime\" and \"w\"\n" -"\n" +#: plugins/check_load.c:300 +msgid "Exit with WARNING status if load average exceeds WLOADn" msgstr "" -#: plugins/check_mrtg.c:62 +#: plugins/check_load.c:302 +msgid "Exit with CRITICAL status if load average exceed CLOADn" +msgstr "" + +#: plugins/check_load.c:303 +msgid "the load average format is the same used by \"uptime\" and \"w\"" +msgstr "" + +#: plugins/check_mrtg.c:79 msgid "Could not parse arguments\n" msgstr "" -#: plugins/check_mrtg.c:67 +#: plugins/check_mrtg.c:84 #, c-format msgid "Unable to open MRTG log file\n" msgstr "" -#: plugins/check_mrtg.c:114 +#: plugins/check_mrtg.c:131 #, c-format msgid "Unable to process MRTG log file\n" msgstr "" -#: plugins/check_mrtg.c:122 plugins/check_mrtgtraf.c:119 +#: plugins/check_mrtg.c:139 plugins/check_mrtgtraf.c:136 #, c-format msgid "MRTG data has expired (%d minutes old)\n" msgstr "" -#: plugins/check_mrtg.c:139 plugins/check_mrtgtraf.c:178 -#: plugins/check_mrtgtraf.c:179 +#: plugins/check_mrtg.c:156 plugins/check_mrtgtraf.c:195 +#: plugins/check_mrtgtraf.c:196 msgid "Avg" msgstr "" -#: plugins/check_mrtg.c:139 plugins/check_mrtgtraf.c:178 -#: plugins/check_mrtgtraf.c:179 +#: plugins/check_mrtg.c:156 plugins/check_mrtgtraf.c:195 +#: plugins/check_mrtgtraf.c:196 msgid "Max" msgstr "" -#: plugins/check_mrtg.c:208 +#: plugins/check_mrtg.c:225 msgid "Invalid variable number" msgstr "" -#: plugins/check_mrtg.c:243 +#: plugins/check_mrtg.c:260 #, c-format msgid "" "%s is not a valid expiration time\n" "Use '%s -h' for additional help\n" msgstr "" -#: plugins/check_mrtg.c:260 +#: plugins/check_mrtg.c:277 msgid "Invalid variable number\n" msgstr "" -#: plugins/check_mrtg.c:287 +#: plugins/check_mrtg.c:304 msgid "You must supply the variable number" msgstr "" -#: plugins/check_mrtg.c:308 -#, c-format +#: plugins/check_mrtg.c:325 msgid "" -"This plugin will check either the average or maximum value of one of the\n" -"two variables recorded in an MRTG log file.\n" -"\n" +"This plugin will check either the average or maximum value of one of the" msgstr "" -#: plugins/check_mrtg.c:316 -#, c-format -msgid "" -" -F, --logfile=FILE\n" -" The MRTG log file containing the data you want to monitor\n" -" -e, --expires=MINUTES\n" -" Minutes before MRTG data is considered to be too old\n" -" -a, --aggregation=AVG|MAX\n" -" Should we check average or maximum values?\n" -" -v, --variable=INTEGER\n" -" Which variable set should we inspect? (1 or 2)\n" -" -w, --warning=INTEGER\n" -" Threshold value for data to result in WARNING status\n" -" -c, --critical=INTEGER\n" -" Threshold value for data to result in CRITICAL status\n" +#: plugins/check_mrtg.c:326 +msgid "two variables recorded in an MRTG log file." msgstr "" -#: plugins/check_mrtg.c:330 -#, c-format -msgid "" -" -l, --label=STRING\n" -" Type label for data (Examples: Conns, \"Processor Load\", In, Out)\n" -" -u, --units=STRING\n" -" Option units label for data (Example: Packets/Sec, Errors/Sec, \n" -" \"Bytes Per Second\", \"%% Utilization\")\n" +#: plugins/check_mrtg.c:335 +msgid "The MRTG log file containing the data you want to monitor" msgstr "" #: plugins/check_mrtg.c:337 -#, c-format -msgid "" -"If the value exceeds the threshold, a WARNING status is returned. If\n" -"the value exceeds the threshold, a CRITICAL status is returned. If\n" -"the data in the log file is older than old, a WARNING\n" -"status is returned and a warning message is printed.\n" -"\n" +msgid "Minutes before MRTG data is considered to be too old" +msgstr "" + +#: plugins/check_mrtg.c:339 +msgid "Should we check average or maximum values?" +msgstr "" + +#: plugins/check_mrtg.c:341 +msgid "Which variable set should we inspect? (1 or 2)" msgstr "" #: plugins/check_mrtg.c:343 -#, c-format -msgid "" -"This plugin is useful for monitoring MRTG data that does not correspond to\n" -"bandwidth usage. (Use the check_mrtgtraf plugin for monitoring bandwidth).\n" -"It can be used to monitor any kind of data that MRTG is monitoring - " -"errors,\n" -"packets/sec, etc. I use MRTG in conjuction with the Novell NLM that allows\n" -"me to track processor utilization, user connections, drive space, etc and\n" -"this plugin works well for monitoring that kind of data as well.\n" -"\n" +msgid "Threshold value for data to result in WARNING status" +msgstr "" + +#: plugins/check_mrtg.c:345 +msgid "Threshold value for data to result in CRITICAL status" +msgstr "" + +#: plugins/check_mrtg.c:347 +msgid "Type label for data (Examples: Conns, \"Processor Load\", In, Out)" +msgstr "" + +#: plugins/check_mrtg.c:349 +msgid "Option units label for data (Example: Packets/Sec, Errors/Sec," msgstr "" #: plugins/check_mrtg.c:350 #, c-format -msgid "" -"Notes:\n" -"- This plugin only monitors one of the two variables stored in the MRTG log\n" -" file. If you want to monitor both values you will have to define two\n" -" commands with different values for the argument. Of course,\n" -" you can always hack the code to make this plugin work for you...\n" -"- MRTG stands for the Multi Router Traffic Grapher. It can be downloaded " -"from\n" -" http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html\n" +msgid "\"Bytes Per Second\", \"%% Utilization\")" msgstr "" -#: plugins/check_mrtgtraf.c:71 +#: plugins/check_mrtg.c:352 +msgid "" +"If the value exceeds the threshold, a WARNING status is returned. If" +msgstr "" + +#: plugins/check_mrtg.c:353 +msgid "" +"the value exceeds the threshold, a CRITICAL status is returned. If" +msgstr "" + +#: plugins/check_mrtg.c:354 +msgid "the data in the log file is older than old, a WARNING" +msgstr "" + +#: plugins/check_mrtg.c:355 +msgid "status is returned and a warning message is printed." +msgstr "" + +#: plugins/check_mrtg.c:357 +msgid "" +"This plugin is useful for monitoring MRTG data that does not correspond to" +msgstr "" + +#: plugins/check_mrtg.c:358 +msgid "" +"bandwidth usage. (Use the check_mrtgtraf plugin for monitoring bandwidth)." +msgstr "" + +#: plugins/check_mrtg.c:359 +msgid "" +"It can be used to monitor any kind of data that MRTG is monitoring - errors," +msgstr "" + +#: plugins/check_mrtg.c:360 +msgid "" +"packets/sec, etc. I use MRTG in conjuction with the Novell NLM that allows" +msgstr "" + +#: plugins/check_mrtg.c:361 +msgid "" +"me to track processor utilization, user connections, drive space, etc and" +msgstr "" + +#: plugins/check_mrtg.c:362 +msgid "this plugin works well for monitoring that kind of data as well." +msgstr "" + +#: plugins/check_mrtg.c:365 +msgid "" +"- This plugin only monitors one of the two variables stored in the MRTG log" +msgstr "" + +#: plugins/check_mrtg.c:366 +msgid " file. If you want to monitor both values you will have to define two" +msgstr "" + +#: plugins/check_mrtg.c:367 +msgid "" +" commands with different values for the argument. Of course," +msgstr "" + +#: plugins/check_mrtg.c:368 +msgid "you can always hack the code to make this plugin work for you..." +msgstr "" + +#: plugins/check_mrtg.c:369 +msgid "" +"- MRTG stands for the Multi Router Traffic Grapher. It can be downloaded " +"from" +msgstr "" + +#: plugins/check_mrtgtraf.c:88 msgid "Unable to open MRTG log file" msgstr "" -#: plugins/check_mrtgtraf.c:113 +#: plugins/check_mrtgtraf.c:130 msgid "Unable to process MRTG log file" msgstr "" -#: plugins/check_mrtgtraf.c:177 +#: plugins/check_mrtgtraf.c:194 #, c-format msgid "%s. In = %0.1f %s, %s. Out = %0.1f %s|%s %s\n" msgstr "" -#: plugins/check_mrtgtraf.c:190 +#: plugins/check_mrtgtraf.c:207 #, c-format msgid "Traffic %s - %s\n" msgstr "" -#: plugins/check_mrtgtraf.c:320 -#, c-format +#: plugins/check_mrtgtraf.c:337 msgid "" -"\n" -"This plugin will check the incoming/outgoing transfer rates of a router,\n" -"switch, etc recorded in an MRTG log. If the newest log entry is older\n" -"than , a WARNING status is returned. If either the\n" -"incoming or outgoing rates exceed the or thresholds (in\n" -"Bytes/sec), a CRITICAL status results. If either of the rates exceed\n" -"the or thresholds (in Bytes/sec), a WARNING status results.\n" -"\n" +"This plugin will check the incoming/outgoing transfer rates of a router," msgstr "" -#: plugins/check_mrtgtraf.c:332 -#, c-format -msgid "" -" -F, --filename=STRING\n" -" File to read log from\n" -" -e, --expires=INTEGER\n" -" Minutes after which log expires\n" -" -a, --aggregation=(AVG|MAX)\n" -" Test average or maximum\n" -" -w, --warning\n" -" Warning threshold pair \",\"\n" -" -c, --critical\n" -" Critical threshold pair \",\"\n" +#: plugins/check_mrtgtraf.c:338 +msgid "switch, etc recorded in an MRTG log. If the newest log entry is older" msgstr "" -#: plugins/check_mrtgtraf.c:344 -#, c-format -msgid "" -"Notes:\n" -"- MRTG stands for Multi Router Traffic Grapher. It can be downloaded from\n" -" http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html\n" -"- While MRTG can monitor things other than traffic rates, this\n" -" plugin probably won't work with much else without modification.\n" -"- The calculated i/o rates are a little off from what MRTG actually\n" -" reports. I'm not sure why this is right now, but will look into it\n" -" for future enhancements of this plugin.\n" +#: plugins/check_mrtgtraf.c:339 +msgid "than , a WARNING status is returned. If either the" msgstr "" -#: plugins/check_mysql.c:106 +#: plugins/check_mrtgtraf.c:340 +msgid "incoming or outgoing rates exceed the or thresholds (in" +msgstr "" + +#: plugins/check_mrtgtraf.c:341 +msgid "Bytes/sec), a CRITICAL status results. If either of the rates exceed" +msgstr "" + +#: plugins/check_mrtgtraf.c:342 +msgid "the or thresholds (in Bytes/sec), a WARNING status results." +msgstr "" + +#: plugins/check_mrtgtraf.c:351 +msgid "File to read log from" +msgstr "" + +#: plugins/check_mrtgtraf.c:353 +msgid "Minutes after which log expires" +msgstr "" + +#: plugins/check_mrtgtraf.c:355 +msgid "Test average or maximum" +msgstr "" + +#: plugins/check_mrtgtraf.c:357 +msgid "Warning threshold pair ," +msgstr "" + +#: plugins/check_mrtgtraf.c:359 +msgid "Critical threshold pair ," +msgstr "" + +#: plugins/check_mrtgtraf.c:362 +msgid "" +"- MRTG stands for Multi Router Traffic Grapher. It can be downloaded from" +msgstr "" + +#: plugins/check_mrtgtraf.c:364 +msgid "- While MRTG can monitor things other than traffic rates, this" +msgstr "" + +#: plugins/check_mrtgtraf.c:365 +msgid " plugin probably won't work with much else without modification." +msgstr "" + +#: plugins/check_mrtgtraf.c:366 +msgid "- The calculated i/o rates are a little off from what MRTG actually" +msgstr "" + +#: plugins/check_mrtgtraf.c:367 +msgid " reports. I'm not sure why this is right now, but will look into it" +msgstr "" + +#: plugins/check_mrtgtraf.c:368 +msgid " for future enhancements of this plugin." +msgstr "" + +#: plugins/check_mrtgtraf.c:378 +#, c-format +msgid "Usage" +msgstr "" + +#: plugins/check_mysql.c:129 #, c-format msgid "slave query error: %s\n" msgstr "" -#: plugins/check_mysql.c:113 +#: plugins/check_mysql.c:136 #, c-format msgid "slave store_result error: %s\n" msgstr "" -#: plugins/check_mysql.c:119 +#: plugins/check_mysql.c:142 msgid "No slaves defined" msgstr "" -#: plugins/check_mysql.c:127 +#: plugins/check_mysql.c:150 #, c-format msgid "slave fetch row error: %s\n" msgstr "" -#: plugins/check_mysql.c:132 +#: plugins/check_mysql.c:155 #, c-format msgid "Slave running: %s" msgstr "" -#: plugins/check_mysql.c:350 -#, c-format -msgid "This program tests connections to a mysql server\n" +#: plugins/check_mysql.c:373 +msgid "This program tests connections to a mysql server" msgstr "" -#: plugins/check_mysql.c:358 -#, c-format +#: plugins/check_mysql.c:384 +msgid "Check database with indicated name" +msgstr "" + +#: plugins/check_mysql.c:386 +msgid "Connect using the indicated username" +msgstr "" + +#: plugins/check_mysql.c:388 +msgid "Use the indicated password to authenticate the connection" +msgstr "" + +#: plugins/check_mysql.c:389 +msgid "==> IMPORTANT: THIS FORM OF AUTHENTICATION IS NOT SECURE!!! <==" +msgstr "" + +#: plugins/check_mysql.c:390 +msgid "Your clear-text password will be visible as a process table entry" +msgstr "" + +#: plugins/check_mysql.c:392 +msgid "Check if the slave thread is running properly." +msgstr "" + +#: plugins/check_mysql.c:394 msgid "" -" -d, --database=STRING\n" -" Check database with indicated name\n" -" -u, --username=STRING\n" -" Connect using the indicated username\n" -" -p, --password=STRING\n" -" Use the indicated password to authenticate the connection\n" -" ==> IMPORTANT: THIS FORM OF AUTHENTICATION IS NOT SECURE!!! <==\n" -" Your clear-text password will be visible as a process table entry\n" -" -S, --check-slave\n" -" Check if the slave thread is running properly.\n" -" -w, --warning\n" -" Exit with WARNING status if slave server is more then INTEGER seconds " -"behind master\n" -" -c, --critical\n" -" Exit with CRITICAL status if slave server is more then INTEGER seconds " -"behind master\n" +"Exit with WARNING status if slave server is more then INTEGER seconds behind " +"master" msgstr "" -#: plugins/check_mysql.c:374 -#, c-format +#: plugins/check_mysql.c:396 msgid "" -"\n" -"There are no required arguments. By default, the local database with\n" -"a server listening on MySQL standard port %d will be checked\n" +"Exit with CRITICAL status if slave server is more then INTEGER seconds " +"behind master" msgstr "" -#: plugins/check_nagios.c:88 +#: plugins/check_mysql.c:397 +msgid "There are no required arguments. By default, the local database with" +msgstr "" + +#: plugins/check_mysql.c:398 +#, c-format +msgid "a server listening on MySQL standard port %d will be checked\n" +msgstr "" + +#: plugins/check_nagios.c:107 msgid "Cannot open status log for reading!" msgstr "" -#: plugins/check_nagios.c:138 +#: plugins/check_nagios.c:157 #, c-format msgid "Found process: %s %s\n" msgstr "" -#: plugins/check_nagios.c:152 +#: plugins/check_nagios.c:171 msgid "Could not locate a running Nagios process!" msgstr "" -#: plugins/check_nagios.c:156 +#: plugins/check_nagios.c:175 msgid "Cannot parse Nagios log file for valid time" msgstr "" -#: plugins/check_nagios.c:167 plugins/check_procs.c:295 +#: plugins/check_nagios.c:186 plugins/check_procs.c:307 #, c-format msgid "%d process" msgid_plural "%d processes" msgstr[0] "" msgstr[1] "" -#: plugins/check_nagios.c:170 +#: plugins/check_nagios.c:189 #, c-format msgid "status log updated %d second ago" msgid_plural "status log updated %d seconds ago" msgstr[0] "" msgstr[1] "" -#: plugins/check_nagios.c:207 plugins/check_nagios.c:236 +#: plugins/check_nagios.c:226 plugins/check_nagios.c:255 msgid "Expiration time must be an integer (seconds)\n" msgstr "" -#: plugins/check_nagios.c:248 +#: plugins/check_nagios.c:267 msgid "You must provide the status_log\n" msgstr "" -#: plugins/check_nagios.c:251 +#: plugins/check_nagios.c:270 msgid "You must provide a process string\n" msgstr "" -#: plugins/check_nagios.c:265 -#, c-format +#: plugins/check_nagios.c:284 msgid "" -"This plugin checks the status of the Nagios process on the local\n" -"machine. The plugin will check to make sure the Nagios status log is no " -"older\n" -"than the number of minutes specified by the expires option. It also\n" -"checks the process table for a process matching the command argument.\n" -"\n" +"This plugin checks the status of the Nagios process on the local machine" msgstr "" -#: plugins/check_nagios.c:275 -#, c-format +#: plugins/check_nagios.c:285 msgid "" -" -F, --filename=FILE\n" -" Name of the log file to check\n" -" -e, --expires=INTEGER\n" -" Minutes aging after which logfile is considered stale\n" -" -C, --command=STRING\n" -" Substring to search for in process arguments\n" +"The plugin will check to make sure the Nagios status log is no older than" msgstr "" -#: plugins/check_nagios.c:283 -#, c-format -msgid "" -"Example:\n" -" ./check_nagios -e 5 -F /usr/local/nagios/var/status.log -C /usr/local/" -"nagios/bin/nagios\n" +#: plugins/check_nagios.c:286 +msgid "the number of minutes specified by the expires option." msgstr "" -#: plugins/check_nt.c:135 +#: plugins/check_nagios.c:287 +msgid "" +"It also checks the process table for a process matching the command argument." +msgstr "" + +#: plugins/check_nagios.c:296 +msgid "Name of the log file to check" +msgstr "" + +#: plugins/check_nagios.c:298 +msgid "Minutes aging after which logfile is considered stale" +msgstr "" + +#: plugins/check_nagios.c:300 +msgid "Substring to search for in process arguments" +msgstr "" + +#: plugins/check_nt.c:141 #, c-format msgid "Wrong client version - running: %s, required: %s" msgstr "" -#: plugins/check_nt.c:146 plugins/check_nt.c:206 +#: plugins/check_nt.c:152 plugins/check_nt.c:212 msgid "missing -l parameters" msgstr "" -#: plugins/check_nt.c:148 +#: plugins/check_nt.c:154 msgid "wrong -l parameter." msgstr "" -#: plugins/check_nt.c:152 +#: plugins/check_nt.c:158 msgid "CPU Load" msgstr "" -#: plugins/check_nt.c:175 +#: plugins/check_nt.c:181 #, c-format msgid " %lu%% (%lu min average)" msgstr "" -#: plugins/check_nt.c:177 +#: plugins/check_nt.c:183 #, c-format msgid " '%lu min avg Load'=%lu%%;%lu;%lu;0;100" msgstr "" -#: plugins/check_nt.c:187 +#: plugins/check_nt.c:193 msgid "not enough values for -l parameters" msgstr "" -#: plugins/check_nt.c:199 +#: plugins/check_nt.c:205 #, c-format msgid "System Uptime - %u day(s) %u hour(s) %u minute(s)" msgstr "" -#: plugins/check_nt.c:208 +#: plugins/check_nt.c:214 msgid "wrong -l argument" msgstr "" -#: plugins/check_nt.c:219 +#: plugins/check_nt.c:225 #, c-format msgid "%s:\\ - total: %.2f Gb - used: %.2f Gb (%.0f%%) - free %.2f Gb (%.0f%%)" msgstr "" -#: plugins/check_nt.c:222 +#: plugins/check_nt.c:228 #, c-format msgid "'%s:\\ Used Space'=%.2fGb;%.2f;%.2f;0.00;%.2f" msgstr "" -#: plugins/check_nt.c:236 +#: plugins/check_nt.c:242 msgid "Free disk space : Invalid drive " msgstr "" -#: plugins/check_nt.c:246 +#: plugins/check_nt.c:252 msgid "No service/process specified" msgstr "" -#: plugins/check_nt.c:270 +#: plugins/check_nt.c:276 #, c-format msgid "" "Memory usage: total:%.2f Mb - used: %.2f Mb (%.0f%%) - free: %.2f Mb (%.0f%%)" msgstr "" -#: plugins/check_nt.c:273 +#: plugins/check_nt.c:279 #, c-format msgid "'Memory usage'=%.2fMb;%.2f;%.2f;0.00;%.2f" msgstr "" -#: plugins/check_nt.c:309 plugins/check_nt.c:395 +#: plugins/check_nt.c:315 plugins/check_nt.c:401 msgid "No counter specified" msgstr "" -#: plugins/check_nt.c:342 +#: plugins/check_nt.c:348 msgid "Minimum value contains non-numbers" msgstr "" -#: plugins/check_nt.c:346 +#: plugins/check_nt.c:352 msgid "Maximum value contains non-numbers" msgstr "" -#: plugins/check_nt.c:353 +#: plugins/check_nt.c:359 msgid "No unit counter specified" msgstr "" -#: plugins/check_nt.c:425 +#: plugins/check_nt.c:431 msgid "Please specify a variable to check" msgstr "" -#: plugins/check_nt.c:507 +#: plugins/check_nt.c:513 msgid "Server port must be an integer\n" msgstr "" -#: plugins/check_nt.c:560 +#: plugins/check_nt.c:566 msgid "None" msgstr "" -#: plugins/check_nt.c:573 +#: plugins/check_nt.c:579 msgid "could not fetch information from server\n" msgstr "" -#: plugins/check_nt.c:617 -#, c-format -msgid "" -"This plugin collects data from the NSClient service running on a\n" -"Windows NT/2000/XP/2003 server.\n" -"\n" +#: plugins/check_nt.c:623 +msgid "This plugin collects data from the NSClient service running on a" msgstr "" -#: plugins/check_nt.c:622 -#, c-format -msgid "" -"\n" -"Options:\n" -"-H, --hostname=HOST\n" -" Name of the host to check\n" -"-p, --port=INTEGER\n" -" Optional port number (default: %d)\n" -"-s \n" -" Password needed for the request\n" -"-w, --warning=INTEGER\n" -" Threshold which will result in a warning status\n" -"-c, --critical=INTEGER\n" -" Threshold which will result in a critical status\n" -"-t, --timeout=INTEGER\n" -" Seconds before connection attempt times out (default: %d)\n" -"-h, --help\n" -" Print this help screen\n" -"-V, --version\n" -" Print version information\n" +#: plugins/check_nt.c:624 +msgid "Windows NT/2000/XP/2003 server." msgstr "" -#: plugins/check_nt.c:640 -#, c-format -msgid "" -"-v, --variable=STRING\n" -" Variable to check. Valid variables are:\n" +#: plugins/check_nt.c:632 +msgid "Options:" msgstr "" -#: plugins/check_nt.c:643 -#, c-format -msgid "" -" CLIENTVERSION = Get the NSClient version\n" -" If -l is specified, will return warning if versions differ.\n" +#: plugins/check_nt.c:634 +msgid "Name of the host to check" msgstr "" -#: plugins/check_nt.c:646 -#, c-format -msgid "" -" CPULOAD = Average CPU load on last x minutes.\n" -" Request a -l parameter with the following syntax:\n" -" -l ,,.\n" -" should be less than 24*60.\n" -" Thresholds are percentage and up to 10 requests can be done in one " -"shot.\n" -" ie: -l 60,90,95,120,90,95\n" +#: plugins/check_nt.c:636 +msgid "Optional port number (default: " +msgstr "" + +#: plugins/check_nt.c:639 +msgid "Password needed for the request" +msgstr "" + +#: plugins/check_nt.c:641 plugins/check_nwstat.c:1664 +#: plugins/check_overcr.c:435 +msgid "Threshold which will result in a warning status" +msgstr "" + +#: plugins/check_nt.c:643 plugins/check_nwstat.c:1666 +#: plugins/check_overcr.c:437 +msgid "Threshold which will result in a critical status" +msgstr "" + +#: plugins/check_nt.c:645 +msgid "Seconds before connection attempt times out (default: " +msgstr "" + +#: plugins/check_nt.c:648 +msgid "Print this help screen" +msgstr "" + +#: plugins/check_nt.c:650 +msgid "Print version information" +msgstr "" + +#: plugins/check_nt.c:652 +msgid "Variable to check" msgstr "" #: plugins/check_nt.c:653 -#, c-format -msgid "" -" UPTIME = Get the uptime of the machine.\n" -" No specific parameters. No warning or critical threshold\n" +msgid "Valid variables are:" +msgstr "" + +#: plugins/check_nt.c:655 +msgid "Get the NSClient version" msgstr "" #: plugins/check_nt.c:656 -#, c-format -msgid "" -" USEDDISKSPACE = Size and percentage of disk use.\n" -" Request a -l parameter containing the drive letter only.\n" -" Warning and critical thresholds can be specified with -w and -c.\n" +msgid "If -l is specified, will return warning if versions differ." +msgstr "" + +#: plugins/check_nt.c:658 +msgid "Average CPU load on last x minutes." +msgstr "" + +#: plugins/check_nt.c:659 +msgid "Request a -l parameter with the following syntax:" msgstr "" #: plugins/check_nt.c:660 -#, c-format -msgid "" -" MEMUSE = Memory use.\n" -" Warning and critical thresholds can be specified with -w and -c.\n" +msgid "-l ,,." msgstr "" -#: plugins/check_nt.c:663 -#, c-format +#: plugins/check_nt.c:661 +msgid " should be less than 24*60." +msgstr "" + +#: plugins/check_nt.c:662 msgid "" -" SERVICESTATE = Check the state of one or several services.\n" -" Request a -l parameters with the following syntax:\n" -" -l ,,,...\n" -" You can specify -d SHOWALL in case you want to see working services\n" -"\t\t in the returned string.\n" +"Thresholds are percentage and up to 10 requests can be done in one shot." +msgstr "" + +#: plugins/check_nt.c:665 +msgid "Get the uptime of the machine." +msgstr "" + +#: plugins/check_nt.c:666 +msgid "No specific parameters. No warning or critical threshold" +msgstr "" + +#: plugins/check_nt.c:668 +msgid "Size and percentage of disk use." msgstr "" #: plugins/check_nt.c:669 -#, c-format -msgid "" -" PROCSTATE = Check if one or several process are running.\n" -" Same syntax as SERVICESTATE.\n" +msgid "Request a -l parameter containing the drive letter only." +msgstr "" + +#: plugins/check_nt.c:670 plugins/check_nt.c:673 +msgid "Warning and critical thresholds can be specified with -w and -c." msgstr "" #: plugins/check_nt.c:672 -#, c-format -msgid "" -" COUNTER = Check any performance counter of Windows NT/2000.\n" -" Request a -l parameters with the following syntax:\n" -"\t\t -l \"\\\\\\\\counter\",\"\n" -" The parameter is optional and \n" -" is given to a printf output command which requires a float parameter.\n" -" If does not include \"%%\", it is used as a label.\n" -" Some examples:\n" -" \"Paging file usage is %%.2f %%%%\"\n" -" \"%%.f %%%% paging file used.\"\n" +msgid "Memory use." +msgstr "" + +#: plugins/check_nt.c:675 +msgid "Check the state of one or several services." +msgstr "" + +#: plugins/check_nt.c:676 plugins/check_nt.c:685 +msgid "Request a -l parameters with the following syntax:" +msgstr "" + +#: plugins/check_nt.c:677 +msgid "-l ,,,..." +msgstr "" + +#: plugins/check_nt.c:678 +msgid "You can specify -d SHOWALL in case you want to see working services" +msgstr "" + +#: plugins/check_nt.c:679 +msgid "in the returned string." +msgstr "" + +#: plugins/check_nt.c:681 +msgid "Check if one or several process are running." msgstr "" #: plugins/check_nt.c:682 -#, c-format -msgid "" -"Notes:\n" -" - The NSClient service should be running on the server to get any " -"information\n" -" (http://nsclient.ready2run.nl).\n" -" - Critical thresholds should be lower than warning thresholds\n" +msgid "Same syntax as SERVICESTATE." msgstr "" -#: plugins/check_nwstat.c:146 +#: plugins/check_nt.c:684 +msgid "Check any performance counter of Windows NT/2000." +msgstr "" + +#: plugins/check_nt.c:686 +msgid "-l \"\\\\\\\\counter\",\"" +msgstr "" + +#: plugins/check_nt.c:687 +msgid "The parameter is optional and is given to a printf " +msgstr "" + +#: plugins/check_nt.c:688 +msgid "output command which requires a float parameter." +msgstr "" + +#: plugins/check_nt.c:689 +#, c-format +msgid "If does not include \"%%\", it is used as a label." +msgstr "" + +#: plugins/check_nt.c:690 +msgid "Some examples:" +msgstr "" + +#: plugins/check_nt.c:694 +msgid "" +"- The NSClient service should be running on the server to get any information" +msgstr "" + +#: plugins/check_nt.c:696 +msgid "- Critical thresholds should be lower than warning thresholds" +msgstr "" + +#: plugins/check_nt.c:697 +msgid "- Default port 1248 is sometimes in use by other services. The error" +msgstr "" + +#: plugins/check_nt.c:698 +msgid "" +"output when this happens contains \"Cannot map xxxxx to protocol number\"." +msgstr "" + +#: plugins/check_nt.c:699 +msgid "One fix for this is to change the port to something else on check_nt " +msgstr "" + +#: plugins/check_nt.c:700 +msgid "and on the client service it's connecting to." +msgstr "" + +#: plugins/check_ntp.c:720 +msgid "Critical offset should be larger than warning offset" +msgstr "" + +#: plugins/check_ntp.c:724 +msgid "Critical jitter should be larger than warning jitter" +msgstr "" + +#: plugins/check_ntp.c:810 +msgid "Offset unknown" +msgstr "" + +#: plugins/check_ntp.c:813 +msgid "Unable to fully sample sync server" +msgstr "" + +#: plugins/check_ntp.c:836 +msgid "This plugin checks the selected ntp server" +msgstr "" + +#: plugins/check_ntp.c:844 +msgid "Offset to result in warning status (seconds)" +msgstr "" + +#: plugins/check_ntp.c:846 +msgid "Offset to result in critical status (seconds)" +msgstr "" + +#: plugins/check_ntp.c:848 +msgid "Warning value for jitter" +msgstr "" + +#: plugins/check_ntp.c:850 +msgid "Critical value for jitter" +msgstr "" + +#: plugins/check_nwstat.c:198 #, c-format msgid "NetWare %s: " msgstr "" -#: plugins/check_nwstat.c:184 +#: plugins/check_nwstat.c:236 #, c-format msgid "Up %s," msgstr "" -#: plugins/check_nwstat.c:192 +#: plugins/check_nwstat.c:244 #, c-format -msgid "Load %s - %s %s-min load average = %lu%%" +msgid "Load %s - %s %s-min load average = %lu%%|load%s=%lu;%lu;%lu;0;100" msgstr "" -#: plugins/check_nwstat.c:216 +#: plugins/check_nwstat.c:272 #, c-format -msgid "Conns %s - %lu current connections" +msgid "Conns %s - %lu current connections|Conns=%lu;%lu;%lu;;" msgstr "" -#: plugins/check_nwstat.c:238 +#: plugins/check_nwstat.c:297 #, c-format msgid "%s: Long term cache hits = %lu%%" msgstr "" -#: plugins/check_nwstat.c:260 +#: plugins/check_nwstat.c:319 #, c-format -msgid "%s: Total cache buffers = %lu" +msgid "%s: Total cache buffers = %lu|Cachebuffers=%lu;%lu;%lu;;" msgstr "" -#: plugins/check_nwstat.c:282 +#: plugins/check_nwstat.c:344 #, c-format -msgid "%s: Dirty cache buffers = %lu" +msgid "%s: Dirty cache buffers = %lu|Dirty-Cache-Buffers=%lu;%lu;%lu;;" msgstr "" -#: plugins/check_nwstat.c:304 +#: plugins/check_nwstat.c:369 #, c-format msgid "%s: LRU sitting time = %lu minutes" msgstr "" -#: plugins/check_nwstat.c:321 plugins/check_nwstat.c:349 -#: plugins/check_nwstat.c:494 plugins/check_nwstat.c:518 -#: plugins/check_nwstat.c:556 plugins/check_nwstat.c:580 +#: plugins/check_nwstat.c:386 plugins/check_nwstat.c:414 +#: plugins/check_nwstat.c:441 plugins/check_nwstat.c:474 +#: plugins/check_nwstat.c:654 plugins/check_nwstat.c:680 +#: plugins/check_nwstat.c:711 plugins/check_nwstat.c:757 +#: plugins/check_nwstat.c:781 #, c-format msgid "CRITICAL - Volume '%s' does not exist!" msgstr "" -#: plugins/check_nwstat.c:330 +#: plugins/check_nwstat.c:395 #, c-format -msgid "%s%lu KB free on volume %s" +msgid "%s%lu KB free on volume %s|KBFree%s=%lu;%lu;%lu;;" msgstr "" -#: plugins/check_nwstat.c:331 plugins/check_nwstat.c:502 -#: plugins/check_nwstat.c:564 +#: plugins/check_nwstat.c:396 plugins/check_nwstat.c:424 +#: plugins/check_nwstat.c:451 plugins/check_nwstat.c:663 +#: plugins/check_nwstat.c:689 plugins/check_nwstat.c:765 msgid "Only " msgstr "" -#: plugins/check_nwstat.c:373 +#: plugins/check_nwstat.c:423 #, c-format -msgid "%lu MB (%lu%%) free on volume %s - total %lu MB" +msgid "%s%lu MB free on volume %s|MBFree%s=%lu;%lu;%lu;;" msgstr "" -#: plugins/check_nwstat.c:398 +#: plugins/check_nwstat.c:450 +#, c-format +msgid "%s%lu MB used on volume %s|MBUsed%s=%lu;%lu;%lu;;" +msgstr "" + +#: plugins/check_nwstat.c:498 +#, c-format +msgid "" +"%lu MB (%lu%%) free on volume %s - total %lu MB|FreeMB%s=%lu;%lu;%lu;0;100" +msgstr "" + +#: plugins/check_nwstat.c:532 #, c-format msgid "Directory Services Database is %s (DS version %s)" msgstr "" -#: plugins/check_nwstat.c:415 +#: plugins/check_nwstat.c:549 #, c-format msgid "Logins are %s" msgstr "" -#: plugins/check_nwstat.c:415 +#: plugins/check_nwstat.c:549 msgid "enabled" msgstr "" -#: plugins/check_nwstat.c:415 +#: plugins/check_nwstat.c:549 msgid "disabled" msgstr "" -#: plugins/check_nwstat.c:454 +#: plugins/check_nwstat.c:564 +msgid "CRITICAL - NRM Status is bad!" +msgstr "" + +#: plugins/check_nwstat.c:569 +msgid "Warning - NRM Status is suspect!" +msgstr "" + +#: plugins/check_nwstat.c:572 +msgid "OK - NRM Status is good!" +msgstr "" + +#: plugins/check_nwstat.c:614 #, c-format msgid "%lu of %lu (%lu%%) packet receive buffers used" msgstr "" -#: plugins/check_nwstat.c:478 +#: plugins/check_nwstat.c:638 #, c-format msgid "%lu entries in SAP table" msgstr "" -#: plugins/check_nwstat.c:480 +#: plugins/check_nwstat.c:640 #, c-format msgid "%lu entries in SAP table for SAP type %d" msgstr "" -#: plugins/check_nwstat.c:502 +#: plugins/check_nwstat.c:662 #, c-format -msgid "%s%lu KB purgeable on volume %s" +msgid "%s%lu KB purgeable on volume %s|Purge%s=%lu;%lu;%lu;;" msgstr "" -#: plugins/check_nwstat.c:541 +#: plugins/check_nwstat.c:688 #, c-format -msgid "%lu MB (%lu%%) purgeable on volume %s" +msgid "%s%lu MB purgeable on volume %s|Purge%s=%lu;%lu;%lu;;" msgstr "" -#: plugins/check_nwstat.c:564 +#: plugins/check_nwstat.c:734 +#, c-format +msgid "%lu MB (%lu%%) purgeable on volume %s|Purgeable%s=%lu;%lu;%lu;0;100" +msgstr "" + +#: plugins/check_nwstat.c:765 #, c-format msgid "%s%lu KB not yet purgeable on volume %s" msgstr "" -#: plugins/check_nwstat.c:603 +#: plugins/check_nwstat.c:804 #, c-format msgid "%lu MB (%lu%%) not yet purgeable on volume %s" msgstr "" -#: plugins/check_nwstat.c:624 +#: plugins/check_nwstat.c:825 #, c-format -msgid "%lu open files" +msgid "%lu open files|Openfiles=%lu;%lu;%lu;0,0" msgstr "" -#: plugins/check_nwstat.c:644 +#: plugins/check_nwstat.c:850 #, c-format -msgid "%lu abended threads" +msgid "%lu abended threads|Abends=%lu;%lu;%lu;;" msgstr "" -#: plugins/check_nwstat.c:675 +#: plugins/check_nwstat.c:885 #, c-format -msgid "%lu current service processes (%lu max)" +msgid "%lu current service processes (%lu max)|Processes=%lu;%lu;%lu;0;%lu" msgstr "" -#: plugins/check_nwstat.c:694 +#: plugins/check_nwstat.c:908 msgid "CRITICAL - Time not in sync with network!" msgstr "" -#: plugins/check_nwstat.c:697 +#: plugins/check_nwstat.c:911 msgid "OK - Time in sync with network!" msgstr "" -#: plugins/check_nwstat.c:716 +#: plugins/check_nwstat.c:934 #, c-format msgid "LRU sitting time = %lu seconds" msgstr "" -#: plugins/check_nwstat.c:735 +#: plugins/check_nwstat.c:953 #, c-format -msgid "Dirty cache buffers = %lu%% of the total" +msgid "Dirty cache buffers = %lu%% of the total|DCB=%lu;%lu;%lu;0;100" msgstr "" -#: plugins/check_nwstat.c:753 +#: plugins/check_nwstat.c:975 #, c-format -msgid "Total cache buffers = %lu%% of the original" +msgid "Total cache buffers = %lu%% of the original|TCB=%lu;%lu;%lu;0;100" msgstr "" -#: plugins/check_nwstat.c:767 +#: plugins/check_nwstat.c:993 #, c-format msgid "NDS Version %s" msgstr "" -#: plugins/check_nwstat.c:783 +#: plugins/check_nwstat.c:1009 #, c-format msgid "Up %s" msgstr "" -#: plugins/check_nwstat.c:797 +#: plugins/check_nwstat.c:1023 #, c-format msgid "Module %s version %s is loaded" msgstr "" -#: plugins/check_nwstat.c:800 +#: plugins/check_nwstat.c:1026 #, c-format msgid "Module %s is not loaded" msgstr "" -#: plugins/check_nwstat.c:805 plugins/check_overcr.c:272 +#: plugins/check_nwstat.c:1037 plugins/check_nwstat.c:1063 +#: plugins/check_nwstat.c:1089 plugins/check_nwstat.c:1115 +#: plugins/check_nwstat.c:1141 plugins/check_nwstat.c:1167 +#: plugins/check_nwstat.c:1193 plugins/check_nwstat.c:1219 +#: plugins/check_nwstat.c:1245 plugins/check_nwstat.c:1271 +#, c-format +msgid "CRITICAL - Value '%s' does not exist!" +msgstr "" + +#: plugins/check_nwstat.c:1046 plugins/check_nwstat.c:1072 +#: plugins/check_nwstat.c:1098 plugins/check_nwstat.c:1124 +#: plugins/check_nwstat.c:1150 plugins/check_nwstat.c:1176 +#: plugins/check_nwstat.c:1202 plugins/check_nwstat.c:1228 +#: plugins/check_nwstat.c:1254 plugins/check_nwstat.c:1280 +#, c-format +msgid "%s is %lu|%s=%lu;%lu;%lu;;" +msgstr "" + +#: plugins/check_nwstat.c:1293 plugins/check_overcr.c:289 msgid "Nothing to check!\n" msgstr "" -#: plugins/check_nwstat.c:887 plugins/check_overcr.c:342 +#: plugins/check_nwstat.c:1375 plugins/check_overcr.c:359 msgid "Server port an integer\n" msgstr "" -#: plugins/check_nwstat.c:1016 -#, c-format -msgid "" -"This plugin attempts to contact the MRTGEXT NLM running on a\n" -"Novell server to gather the requested system information.\n" -"\n" +#: plugins/check_nwstat.c:1605 +msgid "This plugin attempts to contact the MRTGEXT NLM running on a" msgstr "" -#: plugins/check_nwstat.c:1026 -#, c-format -msgid "" -" -v, --variable=STRING\n" -" Variable to check. Valid variables include:\n" -" LOAD1 = 1 minute average CPU load\n" -" LOAD5 = 5 minute average CPU load\n" -" LOAD15 = 15 minute average CPU load\n" -" CSPROCS = number of current service processes (NW 5.x only)\n" -" ABENDS = number of abended threads (NW 5.x only)\n" -" UPTIME = server uptime\n" +#: plugins/check_nwstat.c:1606 +msgid "Novell server to gather the requested system information." msgstr "" -#: plugins/check_nwstat.c:1036 -#, c-format -msgid "" -" LTCH = percent long term cache hits\n" -" CBUFF = current number of cache buffers\n" -" CDBUFF = current number of dirty cache buffers\n" -" DCB = dirty cache buffers as a percentage of the total\n" -" TCB = dirty cache buffers as a percentage of the original\n" +#: plugins/check_nwstat.c:1617 plugins/check_overcr.c:439 +msgid "Variable to check. Valid variables include:" msgstr "" -#: plugins/check_nwstat.c:1043 -#, c-format -msgid "" -" OFILES = number of open files\n" -" VPF = percent free space on volume \n" -" VKF = KB of free space on volume \n" -" VPP = percent purgeable space on volume \n" -" VKP = KB of purgeable space on volume \n" -" VPNP = percent not yet purgeable space on volume \n" -" VKNP = KB of not yet purgeable space on volume \n" +#: plugins/check_nwstat.c:1618 +msgid "LOAD1 = 1 minute average CPU load" msgstr "" -#: plugins/check_nwstat.c:1052 -#, c-format -msgid "" -" LRUM = LRU sitting time in minutes\n" -" LRUS = LRU sitting time in seconds\n" -" DSDB = check to see if DS Database is open\n" -" DSVER = NDS version\n" -" UPRB = used packet receive buffers\n" -" PUPRB = percent (of max) used packet receive buffers\n" -" SAPENTRIES = number of entries in the SAP table\n" -" SAPENTRIES = number of entries in the SAP table for SAP type \n" +#: plugins/check_nwstat.c:1619 +msgid "LOAD5 = 5 minute average CPU load" msgstr "" -#: plugins/check_nwstat.c:1062 -#, c-format -msgid "" -" TSYNC = timesync status \n" -" LOGINS = check to see if logins are enabled\n" -" CONNS = number of currently licensed connections\n" -" NLM: = check if NLM is loaded and report version\n" -" (e.g. \"NLM:TSANDS.NLM\")\n" +#: plugins/check_nwstat.c:1620 +msgid "LOAD15 = 15 minute average CPU load" msgstr "" -#: plugins/check_nwstat.c:1069 -#, c-format -msgid "" -" -w, --warning=INTEGER\n" -" Threshold which will result in a warning status\n" -" -c, --critical=INTEGER\n" -" Threshold which will result in a critical status\n" -" -o, --osversion\n" -" Include server version string in results\n" +#: plugins/check_nwstat.c:1621 +msgid "CSPROCS = number of current service processes (NW 5.x only)" msgstr "" -#: plugins/check_nwstat.c:1079 -#, c-format -msgid "" -"\n" -"Notes:\n" -"- This plugin requres that the MRTGEXT.NLM file from James Drews' MRTG\n" -" extension for NetWare be loaded on the Novell servers you wish to check.\n" -" (available from http://www.engr.wisc.edu/~drews/mrtg/)\n" -"- Values for critical thresholds should be lower than warning thresholds\n" -" when the following variables are checked: VPF, VKF, LTCH, CBUFF, DCB, \n" -" TCB, LRUS and LRUM.\n" +#: plugins/check_nwstat.c:1622 +msgid "ABENDS = number of abended threads (NW 5.x only)" msgstr "" -#: plugins/check_overcr.c:110 +#: plugins/check_nwstat.c:1623 +msgid "UPTIME = server uptime" +msgstr "" + +#: plugins/check_nwstat.c:1624 +msgid "LTCH = percent long term cache hits" +msgstr "" + +#: plugins/check_nwstat.c:1625 +msgid "CBUFF = current number of cache buffers" +msgstr "" + +#: plugins/check_nwstat.c:1626 +msgid "CDBUFF = current number of dirty cache buffers" +msgstr "" + +#: plugins/check_nwstat.c:1627 +msgid "DCB = dirty cache buffers as a percentage of the total" +msgstr "" + +#: plugins/check_nwstat.c:1628 +msgid "TCB = dirty cache buffers as a percentage of the original" +msgstr "" + +#: plugins/check_nwstat.c:1629 +msgid "OFILES = number of open files" +msgstr "" + +#: plugins/check_nwstat.c:1630 +msgid " VMF = MB of free space on Volume " +msgstr "" + +#: plugins/check_nwstat.c:1631 +msgid " VMU = MB used space on Volume " +msgstr "" + +#: plugins/check_nwstat.c:1632 +msgid " VMP = MB of purgeable space on Volume " +msgstr "" + +#: plugins/check_nwstat.c:1633 +msgid " VPF = percent free space on volume " +msgstr "" + +#: plugins/check_nwstat.c:1634 +msgid " VKF = KB of free space on volume " +msgstr "" + +#: plugins/check_nwstat.c:1635 +msgid " VPP = percent purgeable space on volume " +msgstr "" + +#: plugins/check_nwstat.c:1636 +msgid " VKP = KB of purgeable space on volume " +msgstr "" + +#: plugins/check_nwstat.c:1637 +msgid " VPNP = percent not yet purgeable space on volume " +msgstr "" + +#: plugins/check_nwstat.c:1638 +msgid " VKNP = KB of not yet purgeable space on volume " +msgstr "" + +#: plugins/check_nwstat.c:1639 +msgid " LRUM = LRU sitting time in minutes" +msgstr "" + +#: plugins/check_nwstat.c:1640 +msgid " LRUS = LRU sitting time in seconds" +msgstr "" + +#: plugins/check_nwstat.c:1641 +msgid " DSDB = check to see if DS Database is open" +msgstr "" + +#: plugins/check_nwstat.c:1642 +msgid " DSVER = NDS version" +msgstr "" + +#: plugins/check_nwstat.c:1643 +msgid " UPRB = used packet receive buffers" +msgstr "" + +#: plugins/check_nwstat.c:1644 +msgid " PUPRB = percent (of max) used packet receive buffers" +msgstr "" + +#: plugins/check_nwstat.c:1645 +msgid " SAPENTRIES = number of entries in the SAP table" +msgstr "" + +#: plugins/check_nwstat.c:1646 +msgid " SAPENTRIES = number of entries in the SAP table for SAP type " +msgstr "" + +#: plugins/check_nwstat.c:1647 +msgid " TSYNC = timesync status" +msgstr "" + +#: plugins/check_nwstat.c:1648 +msgid " LOGINS = check to see if logins are enabled" +msgstr "" + +#: plugins/check_nwstat.c:1649 +msgid " CONNS = number of currently licensed connections" +msgstr "" + +#: plugins/check_nwstat.c:1650 +msgid " NRMH\t= NRM Summary Status" +msgstr "" + +#: plugins/check_nwstat.c:1651 +msgid " NRMP = Returns the current value for a NRM health item" +msgstr "" + +#: plugins/check_nwstat.c:1652 +msgid " NRMM = Returns the current memory stats from NRM" +msgstr "" + +#: plugins/check_nwstat.c:1653 +msgid " NRMS = Returns the current Swapfile stats from NRM" +msgstr "" + +#: plugins/check_nwstat.c:1654 +msgid " NSS1 = Statistics from _Admin:Manage_NSS\\GeneralStats.xml" +msgstr "" + +#: plugins/check_nwstat.c:1655 +msgid " NSS3 = Statistics from _Admin:Manage_NSS\\NameCache.xml" +msgstr "" + +#: plugins/check_nwstat.c:1656 +msgid " NSS4 = Statistics from _Admin:Manage_NSS\\FileStats.xml" +msgstr "" + +#: plugins/check_nwstat.c:1657 +msgid " NSS5 = Statistics from _Admin:Manage_NSS\\ObjectCache.xml" +msgstr "" + +#: plugins/check_nwstat.c:1658 +msgid " NSS6 = Statistics from _Admin:Manage_NSS\\Thread.xml" +msgstr "" + +#: plugins/check_nwstat.c:1659 +msgid "" +" NSS7 = Statistics from _Admin:Manage_NSS\\AuthorizationCache.xml" +msgstr "" + +#: plugins/check_nwstat.c:1660 +msgid " NLM: = check if NLM is loaded and report version" +msgstr "" + +#: plugins/check_nwstat.c:1661 +msgid " (e.g. NLM:TSANDS.NLM)" +msgstr "" + +#: plugins/check_nwstat.c:1668 +msgid "Include server version string in results" +msgstr "" + +#: plugins/check_nwstat.c:1674 +msgid "- This plugin requres that the MRTGEXT.NLM file from James Drews' MRTG" +msgstr "" + +#: plugins/check_nwstat.c:1675 +msgid "" +" extension for NetWare be loaded on the Novell servers you wish to check." +msgstr "" + +#: plugins/check_nwstat.c:1676 +msgid " (available from http://www.engr.wisc.edu/~drews/mrtg/)" +msgstr "" + +#: plugins/check_nwstat.c:1677 +msgid "" +"- Values for critical thresholds should be lower than warning thresholds" +msgstr "" + +#: plugins/check_nwstat.c:1678 +msgid "" +" when the following variables are checked: VPF, VKF, LTCH, CBUFF, DCB, " +msgstr "" + +#: plugins/check_nwstat.c:1679 +msgid " TCB, LRUS and LRUM.\n" +msgstr "" + +#: plugins/check_overcr.c:127 msgid "Unknown error fetching load data\n" msgstr "" -#: plugins/check_overcr.c:114 +#: plugins/check_overcr.c:131 msgid "Invalid response from server - no load information\n" msgstr "" -#: plugins/check_overcr.c:120 +#: plugins/check_overcr.c:137 msgid "Invalid response from server after load 1\n" msgstr "" -#: plugins/check_overcr.c:126 +#: plugins/check_overcr.c:143 msgid "Invalid response from server after load 5\n" msgstr "" -#: plugins/check_overcr.c:151 +#: plugins/check_overcr.c:168 #, c-format msgid "Load %s - %s-min load average = %0.2f" msgstr "" -#: plugins/check_overcr.c:161 +#: plugins/check_overcr.c:178 msgid "Unknown error fetching disk data\n" msgstr "" -#: plugins/check_overcr.c:171 plugins/check_overcr.c:223 -#: plugins/check_overcr.c:227 +#: plugins/check_overcr.c:188 plugins/check_overcr.c:240 +#: plugins/check_overcr.c:244 msgid "Invalid response from server\n" msgstr "" -#: plugins/check_overcr.c:198 +#: plugins/check_overcr.c:215 msgid "Unknown error fetching network status\n" msgstr "" -#: plugins/check_overcr.c:208 +#: plugins/check_overcr.c:225 #, c-format msgid "Net %s - %d connection%s on port %d" msgstr "" -#: plugins/check_overcr.c:219 +#: plugins/check_overcr.c:236 msgid "Unknown error fetching process status\n" msgstr "" -#: plugins/check_overcr.c:237 +#: plugins/check_overcr.c:254 #, c-format msgid "Process %s - %d instance%s of %s running" msgstr "" -#: plugins/check_overcr.c:264 +#: plugins/check_overcr.c:281 #, c-format msgid "Uptime %s - Up %d days %d hours %d minutes" msgstr "" -#: plugins/check_overcr.c:406 -#, c-format +#: plugins/check_overcr.c:423 msgid "" -"This plugin attempts to contact the Over-CR collector daemon running on the\n" -"remote UNIX server in order to gather the requested system information.\n" -"\n" +"This plugin attempts to contact the Over-CR collector daemon running on the" msgstr "" -#: plugins/check_overcr.c:416 -#, c-format -msgid "" -"-v, --variable=STRING\n" -" Variable to check. Valid variables include:\n" -" LOAD1 = 1 minute average CPU load\n" -" LOAD5 = 5 minute average CPU load\n" -" LOAD15 = 15 minute average CPU load\n" -" DPU = percent used disk space on filesystem \n" -" PROC = number of running processes with name \n" -" NET = number of active connections on TCP port \n" -" UPTIME = system uptime in seconds\n" -msgstr "" - -#: plugins/check_overcr.c:427 -#, c-format -msgid "" -" -w, --warning=INTEGER\n" -" Threshold which will result in a warning status\n" -" -c, --critical=INTEGER\n" -" Threshold which will result in a critical status\n" -msgstr "" - -#: plugins/check_overcr.c:435 -#, c-format -msgid "" -"Notes:\n" -" - For the available options, the critical threshold value should always be\n" -" higher than the warning threshold value, EXCEPT with the uptime variable\n" -"\n" +#: plugins/check_overcr.c:424 +msgid "remote UNIX server in order to gather the requested system information." msgstr "" #: plugins/check_overcr.c:440 -#, c-format -msgid "" -" - This plugin requres that Eric Molitors' Over-CR collector daemon be\n" -" running on the remote server. Over-CR can be downloaded from\n" -" http://www.molitor.org/overcr (This plugin was tested with version\n" -" 0.99.53 of the Over-CR collector)\n" -"\n" +msgid "LOAD1 = 1 minute average CPU load" msgstr "" -#: plugins/check_pgsql.c:157 +#: plugins/check_overcr.c:441 +msgid "LOAD5 = 5 minute average CPU load" +msgstr "" + +#: plugins/check_overcr.c:442 +msgid "LOAD15 = 15 minute average CPU load" +msgstr "" + +#: plugins/check_overcr.c:443 +msgid "DPU = percent used disk space on filesystem " +msgstr "" + +#: plugins/check_overcr.c:444 +msgid "PROC = number of running processes with name " +msgstr "" + +#: plugins/check_overcr.c:445 +msgid "NET = number of active connections on TCP port " +msgstr "" + +#: plugins/check_overcr.c:446 +msgid "UPTIME = system uptime in seconds" +msgstr "" + +#: plugins/check_overcr.c:454 +msgid "" +"For the available options, the critical threshold value should always be" +msgstr "" + +#: plugins/check_overcr.c:455 +msgid "" +"higher than the warning threshold value, EXCEPT with the uptime variable" +msgstr "" + +#: plugins/check_overcr.c:457 +msgid "This plugin requres that Eric Molitors' Over-CR collector daemon be" +msgstr "" + +#: plugins/check_overcr.c:458 +msgid "running on the remote server." +msgstr "" + +#: plugins/check_overcr.c:460 +msgid "This plugin was tested with version 0.99.53 of the Over-CR collector" +msgstr "" + +#: plugins/check_pgsql.c:173 #, c-format msgid "CRITICAL - no connection to '%s' (%s).\n" msgstr "" -#: plugins/check_pgsql.c:172 +#: plugins/check_pgsql.c:188 #, c-format msgid " %s - database %s (%d sec.)|%s\n" msgstr "" -#: plugins/check_pgsql.c:227 plugins/check_tcp.c:458 plugins/check_time.c:265 -#: plugins/check_time.c:277 plugins/check_udp.c:166 plugins/check_users.c:152 +#: plugins/check_pgsql.c:243 plugins/check_time.c:281 plugins/check_time.c:293 +#: plugins/check_users.c:168 msgid "Critical threshold must be a positive integer" msgstr "" -#: plugins/check_pgsql.c:233 plugins/check_tcp.c:468 plugins/check_time.c:246 -#: plugins/check_time.c:270 plugins/check_udp.c:173 plugins/check_users.c:158 -#: plugins/check_users.c:168 plugins/check_users.c:175 +#: plugins/check_pgsql.c:249 plugins/check_time.c:262 plugins/check_time.c:286 +#: plugins/check_users.c:174 plugins/check_users.c:184 +#: plugins/check_users.c:191 msgid "Warning threshold must be a positive integer" msgstr "" -#: plugins/check_pgsql.c:251 +#: plugins/check_pgsql.c:267 msgid "Database name is not valid" msgstr "" -#: plugins/check_pgsql.c:257 +#: plugins/check_pgsql.c:273 msgid "User name is not valid" msgstr "" -#: plugins/check_pgsql.c:394 +#: plugins/check_pgsql.c:410 #, c-format -msgid "" -"Test whether a PostgreSQL Database is accepting connections.\n" -"\n" +msgid "Test whether a PostgreSQL Database is accepting connections." msgstr "" -#: plugins/check_pgsql.c:404 -#, c-format -msgid "" -" -d, --database=STRING\n" -" Database to check (default: %s)\n" -" -l, --logname = STRING\n" -" Login name of user\n" -" -p, --password = STRING\n" -" Password (BIG SECURITY ISSUE)\n" +#: plugins/check_pgsql.c:423 +msgid "Database to check " msgstr "" -#: plugins/check_pgsql.c:418 +#: plugins/check_pgsql.c:424 #, c-format -msgid "" -"\n" -"All parameters are optional.\n" -"\n" -"This plugin tests a PostgreSQL DBMS to determine whether it is active and\n" -"accepting queries. In its current operation, it simply connects to the\n" -"specified database, and then disconnects. If no database is specified, it\n" -"connects to the template1 database, which is present in every functioning \n" -"PostgreSQL DBMS.\n" +msgid "(default: %s)" msgstr "" -#: plugins/check_pgsql.c:425 -#, c-format -msgid "" -"\n" -"The plugin will connect to a local postmaster if no host is specified. To\n" -"connect to a remote host, be sure that the remote postmaster accepts TCP/IP\n" -"connections (start the postmaster with the -i option).\n" +#: plugins/check_pgsql.c:426 +msgid "Login name of user" msgstr "" -#: plugins/check_pgsql.c:429 -#, c-format -msgid "" -"\n" -"Typically, the nagios user (unless the --logname option is used) should be\n" -"able to connect to the database without a password. The plugin can also " -"send\n" -"a password, but no effort is made to obsure or encrypt the password.\n" +#: plugins/check_pgsql.c:428 +msgid "Password (BIG SECURITY ISSUE)" msgstr "" -#: plugins/check_ping.c:124 +#: plugins/check_pgsql.c:437 +msgid "All parameters are optional." +msgstr "" + +#: plugins/check_pgsql.c:438 +msgid "" +"This plugin tests a PostgreSQL DBMS to determine whether it is active and" +msgstr "" + +#: plugins/check_pgsql.c:439 +msgid "accepting queries. In its current operation, it simply connects to the" +msgstr "" + +#: plugins/check_pgsql.c:440 +msgid "" +"specified database, and then disconnects. If no database is specified, it" +msgstr "" + +#: plugins/check_pgsql.c:441 +msgid "" +"connects to the template1 database, which is present in every functioning" +msgstr "" + +#: plugins/check_pgsql.c:442 +msgid "PostgreSQL DBMS." +msgstr "" + +#: plugins/check_pgsql.c:443 +msgid "" +"The plugin will connect to a local postmaster if no host is specified. To" +msgstr "" + +#: plugins/check_pgsql.c:444 +msgid "" +"connect to a remote host, be sure that the remote postmaster accepts TCP/IP" +msgstr "" + +#: plugins/check_pgsql.c:445 +msgid "connections (start the postmaster with the -i option)." +msgstr "" + +#: plugins/check_pgsql.c:446 +msgid "" +"Typically, the nagios user (unless the --logname option is used) should be" +msgstr "" + +#: plugins/check_pgsql.c:447 +msgid "" +"able to connect to the database without a password. The plugin can also send" +msgstr "" + +#: plugins/check_pgsql.c:448 +msgid "a password, but no effort is made to obsure or encrypt the password." +msgstr "" + +#: plugins/check_ping.c:145 msgid "CRITICAL - Could not interpret output from ping command\n" msgstr "" -#: plugins/check_ping.c:140 +#: plugins/check_ping.c:161 #, c-format msgid "PING %s - %sPacket loss = %d%%" msgstr "" -#: plugins/check_ping.c:143 +#: plugins/check_ping.c:164 #, c-format msgid "PING %s - %sPacket loss = %d%%, RTA = %2.2f ms" msgstr "" -#: plugins/check_ping.c:231 +#: plugins/check_ping.c:252 msgid "Could not realloc() addresses\n" msgstr "" -#: plugins/check_ping.c:246 plugins/check_ping.c:326 +#: plugins/check_ping.c:267 plugins/check_ping.c:347 #, c-format msgid " (%s) must be a non-negative number\n" msgstr "" -#: plugins/check_ping.c:280 +#: plugins/check_ping.c:301 #, c-format msgid " (%s) must be an integer percentage\n" msgstr "" -#: plugins/check_ping.c:291 +#: plugins/check_ping.c:312 #, c-format msgid " (%s) must be an integer percentage\n" msgstr "" -#: plugins/check_ping.c:302 +#: plugins/check_ping.c:323 #, c-format msgid " (%s) must be a non-negative number\n" msgstr "" -#: plugins/check_ping.c:313 +#: plugins/check_ping.c:334 #, c-format msgid " (%s) must be a non-negative number\n" msgstr "" -#: plugins/check_ping.c:346 +#: plugins/check_ping.c:367 #, c-format msgid "" "%s: Warning threshold must be integer or percentage!\n" "\n" msgstr "" -#: plugins/check_ping.c:359 +#: plugins/check_ping.c:380 #, c-format msgid " was not set\n" msgstr "" -#: plugins/check_ping.c:363 +#: plugins/check_ping.c:384 #, c-format msgid " was not set\n" msgstr "" -#: plugins/check_ping.c:367 +#: plugins/check_ping.c:388 #, c-format msgid " was not set\n" msgstr "" -#: plugins/check_ping.c:371 +#: plugins/check_ping.c:392 #, c-format msgid " was not set\n" msgstr "" -#: plugins/check_ping.c:375 +#: plugins/check_ping.c:396 #, c-format msgid " (%f) cannot be larger than (%f)\n" msgstr "" -#: plugins/check_ping.c:379 +#: plugins/check_ping.c:400 #, c-format msgid " (%d) cannot be larger than (%d)\n" msgstr "" -#: plugins/check_ping.c:415 +#: plugins/check_ping.c:436 #, c-format msgid "Cannot open stderr for %s\n" msgstr "" -#: plugins/check_ping.c:464 plugins/check_ping.c:466 +#: plugins/check_ping.c:485 plugins/check_ping.c:487 msgid "System call sent warnings to stderr " msgstr "" -#: plugins/check_ping.c:491 +#: plugins/check_ping.c:514 #, c-format -msgid "CRITICAL - Network unreachable (%s)" +msgid "CRITICAL - Network Unreachable (%s)" msgstr "" -#: plugins/check_ping.c:493 +#: plugins/check_ping.c:516 #, c-format msgid "CRITICAL - Host Unreachable (%s)" msgstr "" -#: plugins/check_ping.c:495 +#: plugins/check_ping.c:518 +#, c-format +msgid "CRITICAL - Bogus ICMP: Port Unreachable (%s)" +msgstr "" + +#: plugins/check_ping.c:520 +#, c-format +msgid "CRITICAL - Bogus ICMP: Protocol Unreachable (%s)" +msgstr "" + +#: plugins/check_ping.c:522 +#, c-format +msgid "CRITICAL - Network Prohibited (%s)" +msgstr "" + +#: plugins/check_ping.c:524 +#, c-format +msgid "CRITICAL - Host Prohibited (%s)" +msgstr "" + +#: plugins/check_ping.c:526 +#, c-format +msgid "CRITICAL - Packet Filtered (%s)" +msgstr "" + +#: plugins/check_ping.c:528 #, c-format msgid "CRITICAL - Host not found (%s)" msgstr "" -#: plugins/check_ping.c:497 +#: plugins/check_ping.c:530 #, c-format msgid "CRITICAL - Time to live exceeded (%s)" msgstr "" -#: plugins/check_ping.c:504 +#: plugins/check_ping.c:537 msgid "Unable to realloc warn_text" msgstr "" -#: plugins/check_ping.c:521 +#: plugins/check_ping.c:554 #, c-format -msgid "" -"Use ping to check connection statistics for a remote host.\n" -"\n" +msgid "Use ping to check connection statistics for a remote host." msgstr "" -#: plugins/check_ping.c:529 -#, c-format -msgid "" -"-H, --hostname=HOST\n" -" host to ping\n" -"-w, --warning=THRESHOLD\n" -" warning threshold pair\n" -"-c, --critical=THRESHOLD\n" -" critical threshold pair\n" -"-p, --packets=INTEGER\n" -" number of ICMP ECHO packets to send (Default: %d)\n" -"-L, --link\n" -" show HTML in the plugin output (obsoleted by urlize)\n" +#: plugins/check_ping.c:565 +msgid "host to ping" msgstr "" -#: plugins/check_ping.c:544 -#, c-format -msgid "" -"THRESHOLD is ,%% where is the round trip average travel\n" -"time (ms) which triggers a WARNING or CRITICAL state, and is the\n" -"percentage of packet loss to trigger an alarm state.\n" -"\n" +#: plugins/check_ping.c:571 +msgid "number of ICMP ECHO packets to send" msgstr "" -#: plugins/check_ping.c:549 +#: plugins/check_ping.c:572 #, c-format +msgid "(Default: %d)\n" +msgstr "" + +#: plugins/check_ping.c:574 +msgid "show HTML in the plugin output (obsoleted by urlize)" +msgstr "" + +#: plugins/check_ping.c:578 +msgid "THRESHOLD is ,% where is the round trip average travel" +msgstr "" + +#: plugins/check_ping.c:579 +msgid "time (ms) which triggers a WARNING or CRITICAL state, and is the" +msgstr "" + +#: plugins/check_ping.c:580 +msgid "percentage of packet loss to trigger an alarm state." +msgstr "" + +#: plugins/check_ping.c:584 +msgid "" +"This plugin uses the ping command to probe the specified host for packet loss" +msgstr "" + +#: plugins/check_ping.c:585 msgid "" -"This plugin uses the ping command to probe the specified host for packet " -"loss\n" "(percentage) and round trip average (milliseconds). It can produce HTML " -"output\n" -"linking to a traceroute CGI contributed by Ian Cass. The CGI can be found " -"in\n" -"the contrib area of the downloads section at http://www.nagios.org\n" -"\n" +"output" msgstr "" -#: plugins/check_procs.c:140 +#: plugins/check_ping.c:586 +msgid "" +"linking to a traceroute CGI contributed by Ian Cass. The CGI can be found in" +msgstr "" + +#: plugins/check_ping.c:587 +msgid "the contrib area of the downloads section at http://www.nagios.org/" +msgstr "" + +#: plugins/check_procs.c:155 #, c-format msgid "CMD: %s\n" msgstr "" -#: plugins/check_procs.c:249 +#: plugins/check_procs.c:261 #, c-format msgid "Not parseable: %s" msgstr "" -#: plugins/check_procs.c:258 +#: plugins/check_procs.c:270 #, c-format msgid "System call sent warnings to stderr\n" msgstr "" -#: plugins/check_procs.c:265 +#: plugins/check_procs.c:277 #, c-format msgid "System call returned nonzero status\n" msgstr "" -#: plugins/check_procs.c:270 plugins/check_users.c:101 +#: plugins/check_procs.c:282 #, c-format msgid "Unable to read output\n" msgstr "" -#: plugins/check_procs.c:287 +#: plugins/check_procs.c:299 #, c-format msgid "%d warn out of " msgstr "" -#: plugins/check_procs.c:292 +#: plugins/check_procs.c:304 #, c-format msgid "%d crit, %d warn out of " msgstr "" -#: plugins/check_procs.c:298 +#: plugins/check_procs.c:310 #, c-format msgid " with %s" msgstr "" -#: plugins/check_procs.c:373 +#: plugins/check_procs.c:385 msgid "Critical Process Count must be an integer!" msgstr "" -#: plugins/check_procs.c:385 +#: plugins/check_procs.c:397 msgid "Warning Process Count must be an integer!" msgstr "" -#: plugins/check_procs.c:393 +#: plugins/check_procs.c:405 msgid "Parent Process ID must be an integer!" msgstr "" -#: plugins/check_procs.c:399 plugins/check_procs.c:501 +#: plugins/check_procs.c:411 plugins/check_procs.c:513 #, c-format msgid "%s%sSTATE = %s" msgstr "" -#: plugins/check_procs.c:408 +#: plugins/check_procs.c:420 #, c-format msgid "UID %s was not found" msgstr "" -#: plugins/check_procs.c:414 +#: plugins/check_procs.c:426 #, c-format msgid "User name %s was not found" msgstr "" -#: plugins/check_procs.c:429 +#: plugins/check_procs.c:441 #, c-format msgid "%s%scommand name '%s'" msgstr "" -#: plugins/check_procs.c:448 +#: plugins/check_procs.c:460 msgid "RSS must be an integer!" msgstr "" -#: plugins/check_procs.c:455 +#: plugins/check_procs.c:467 msgid "VSZ must be an integer!" msgstr "" -#: plugins/check_procs.c:463 +#: plugins/check_procs.c:475 msgid "PCPU must be a float!" msgstr "" -#: plugins/check_procs.c:487 +#: plugins/check_procs.c:499 msgid "Metric must be one of PROCS, VSZ, RSS, CPU, ELAPSED!" msgstr "" -#: plugins/check_procs.c:520 +#: plugins/check_procs.c:532 #, c-format msgid "wmax (%d) cannot be greater than cmax (%d)\n" msgstr "" -#: plugins/check_procs.c:524 +#: plugins/check_procs.c:536 #, c-format msgid "wmin (%d) cannot be less than cmin (%d)\n" msgstr "" -#: plugins/check_procs.c:661 -#, c-format +#: plugins/check_procs.c:673 msgid "" "Checks all processes and generates WARNING or CRITICAL states if the " -"specified\n" -"metric is outside the required threshold ranges. The metric defaults to " -"number\n" -"of processes. Search filters can be applied to limit the processes to " -"check.\n" -"\n" +"specified" msgstr "" -#: plugins/check_procs.c:668 -#, c-format +#: plugins/check_procs.c:674 msgid "" -"\n" -"Required Arguments:\n" -" -w, --warning=RANGE\n" -" Generate warning state if metric is outside this range\n" -" -c, --critical=RANGE\n" -" Generate critical state if metric is outside this range\n" +"metric is outside the required threshold ranges. The metric defaults to " +"number" msgstr "" #: plugins/check_procs.c:675 -#, c-format msgid "" -"\n" -"Optional Arguments:\n" -" -m, --metric=TYPE\n" -" Check thresholds against metric. Valid types:\n" -" PROCS - number of processes (default)\n" -" VSZ - virtual memory size\n" -" RSS - resident set memory size\n" -" CPU - percentage cpu\n" +"of processes. Search filters can be applied to limit the processes to check." +msgstr "" + +#: plugins/check_procs.c:681 +msgid "Required Arguments:" +msgstr "" + +#: plugins/check_procs.c:683 +msgid "Generate warning state if metric is outside this range" msgstr "" #: plugins/check_procs.c:685 -#, c-format -msgid " ELAPSED - time elapsed in seconds\n" +msgid "Generate critical state if metric is outside this range" +msgstr "" + +#: plugins/check_procs.c:687 +msgid "Optional Arguments:" +msgstr "" + +#: plugins/check_procs.c:689 +msgid "Check thresholds against metric. Valid types:" msgstr "" #: plugins/check_procs.c:690 -#, c-format -msgid "" -" -v, --verbose\n" -" Extra information. Up to 3 verbosity levels\n" +msgid "PROCS - number of processes (default)" msgstr "" -#: plugins/check_procs.c:694 -#, c-format -msgid "" -"\n" -"Optional Filters:\n" -" -s, --state=STATUSFLAGS\n" -" Only scan for processes that have, in the output of `ps`, one or\n" -" more of the status flags you specify (for example R, Z, S, RS,\n" -" RSZDT, plus others based on the output of your 'ps' command).\n" -" -p, --ppid=PPID\n" -" Only scan for children of the parent process ID indicated.\n" -" -z, --vsz=VSZ\n" -" Only scan for processes with vsz higher than indicated.\n" -" -r, --rss=RSS\n" -" Only scan for processes with rss higher than indicated.\n" +#: plugins/check_procs.c:691 +msgid "VSZ - virtual memory size" +msgstr "" + +#: plugins/check_procs.c:692 +msgid "RSS - resident set memory size" +msgstr "" + +#: plugins/check_procs.c:693 +msgid "CPU - percentage cpu" +msgstr "" + +#: plugins/check_procs.c:696 +msgid "ELAPSED - time elapsed in seconds" +msgstr "" + +#: plugins/check_procs.c:701 +msgid "Extra information. Up to 3 verbosity levels" +msgstr "" + +#: plugins/check_procs.c:705 +msgid "Only scan for processes that have, in the output of `ps`, one or" +msgstr "" + +#: plugins/check_procs.c:706 +msgid "more of the status flags you specify (for example R, Z, S, RS," msgstr "" #: plugins/check_procs.c:707 -#, c-format -msgid "" -" -P, --pcpu=PCPU\n" -" Only scan for processes with pcpu higher than indicated.\n" -" -u, --user=USER\n" -" Only scan for processes with user name or ID indicated.\n" -" -a, --argument-array=STRING\n" -" Only scan for processes with args that contain STRING.\n" -" -C, --command=COMMAND\n" -" Only scan for exact matches of COMMAND (without path).\n" +msgid "RSZDT, plus others based on the output of your 'ps' command)." +msgstr "" + +#: plugins/check_procs.c:709 +msgid "Only scan for children of the parent process ID indicated." +msgstr "" + +#: plugins/check_procs.c:711 +msgid "Only scan for processes with vsz higher than indicated." +msgstr "" + +#: plugins/check_procs.c:713 +msgid "Only scan for processes with rss higher than indicated." +msgstr "" + +#: plugins/check_procs.c:715 +msgid "Only scan for processes with pcpu higher than indicated." msgstr "" #: plugins/check_procs.c:717 +msgid "Only scan for processes with user name or ID indicated." +msgstr "" + +#: plugins/check_procs.c:719 +msgid "Only scan for processes with args that contain STRING." +msgstr "" + +#: plugins/check_procs.c:721 +msgid "Only scan for exact matches of COMMAND (without path)." +msgstr "" + +#: plugins/check_procs.c:723 #, c-format msgid "" "\n" @@ -2684,7 +3232,7 @@ msgid "" "\n" msgstr "" -#: plugins/check_procs.c:722 +#: plugins/check_procs.c:728 #, c-format msgid "" "This plugin checks the number of currently running processes and\n" @@ -2695,1101 +3243,1232 @@ msgid "" "\n" msgstr "" -#: plugins/check_procs.c:729 -#, c-format -msgid "" -"Examples:\n" -" check_procs -w 2:2 -c 2:1024 -C portsentry\n" -" Warning if not two processes with command name portsentry. Critical\n" -" if < 2 or > 1024 processes\n" -"\n" -" check_procs -w 10 -a '/usr/local/bin/perl' -u root\n" -" Warning alert if > 10 processes with command arguments containing \n" -" '/usr/local/bin/perl' and owned by root\n" -"\n" -" check_procs -w 50000 -c 100000 --metric=VSZ\n" -" Alert if vsz of any processes over 50K or 100K\n" -" check_procs -w 10 -c 20 --metric=CPU\n" -" Alert if cpu of any processes over 10%% or 20%%\n" -"\n" +#: plugins/check_procs.c:737 +msgid "Warning if not two processes with command name portsentry." msgstr "" -#: plugins/check_radius.c:122 +#: plugins/check_procs.c:738 +msgid "Critical if < 2 or > 1024 processes" +msgstr "" + +#: plugins/check_procs.c:740 +msgid "Warning alert if > 10 processes with command arguments containing" +msgstr "" + +#: plugins/check_procs.c:741 +msgid "'/usr/local/bin/perl' and owned by root" +msgstr "" + +#: plugins/check_procs.c:743 +msgid "Alert if vsz of any processes over 50K or 100K" +msgstr "" + +#: plugins/check_procs.c:745 +#, c-format +msgid "Alert if cpu of any processes over 10%% or 20%%" +msgstr "" + +#: plugins/check_radius.c:138 msgid "Config file error" msgstr "" -#: plugins/check_radius.c:130 +#: plugins/check_radius.c:147 msgid "Out of Memory?" msgstr "" -#: plugins/check_radius.c:151 +#: plugins/check_radius.c:168 msgid "Timeout" msgstr "" -#: plugins/check_radius.c:153 +#: plugins/check_radius.c:170 msgid "Auth Error" msgstr "" -#: plugins/check_radius.c:155 +#: plugins/check_radius.c:172 msgid "Auth Failed" msgstr "" -#: plugins/check_radius.c:159 +#: plugins/check_radius.c:176 msgid "Auth OK" msgstr "" -#: plugins/check_radius.c:202 plugins/check_radius.c:262 +#: plugins/check_radius.c:219 plugins/check_radius.c:279 msgid "Number of retries must be a positive integer" msgstr "" -#: plugins/check_radius.c:288 -#, c-format -msgid "" -"Tests to see if a radius server is accepting connections.\n" -"\n" +#: plugins/check_radius.c:305 +msgid "Tests to see if a radius server is accepting connections." msgstr "" -#: plugins/check_radius.c:296 -#, c-format -msgid "" -" -u, --username=STRING\n" -" The user to authenticate\n" -" -p, --password=STRING\n" -" Password for autentication (SECURITY RISK)\n" -" -n, --nas-id=STRING\n" -" NAS identifier\n" -" -F, --filename=STRING\n" -" Configuration file\n" -" -e, --expect=STRING\n" -" Response string to expect from the server\n" -" -r, --retries=INTEGER\n" -" Number of times to retry a failed connection\n" +#: plugins/check_radius.c:316 +msgid "The user to authenticate" msgstr "" -#: plugins/check_radius.c:312 -#, c-format -msgid "" -"\n" -"This plugin tests a radius server to see if it is accepting connections.\n" -"\n" -"The server to test must be specified in the invocation, as well as a user\n" -"name and password. A configuration file may also be present. The format of\n" -"the configuration file is described in the radiusclient library sources.\n" -"\n" +#: plugins/check_radius.c:318 +msgid "Password for autentication (SECURITY RISK)" msgstr "" -#: plugins/check_radius.c:319 -#, c-format -msgid "" -"The password option presents a substantial security issue because the\n" -"password can be determined by careful watching of the command line in\n" -"a process listing. This risk is exacerbated because nagios will\n" -"run the plugin at regular prdictable intervals. Please be sure that\n" -"the password used does not allow access to sensitive system resources,\n" -"otherwise compormise could occur.\n" +#: plugins/check_radius.c:320 +msgid "NAS identifier" msgstr "" -#: plugins/check_real.c:79 +#: plugins/check_radius.c:322 +msgid "Configuration file" +msgstr "" + +#: plugins/check_radius.c:324 +msgid "Response string to expect from the server" +msgstr "" + +#: plugins/check_radius.c:326 +msgid "Number of times to retry a failed connection" +msgstr "" + +#: plugins/check_radius.c:330 +msgid "" +"This plugin tests a radius server to see if it is accepting connections." +msgstr "" + +#: plugins/check_radius.c:331 +msgid "" +"The server to test must be specified in the invocation, as well as a user" +msgstr "" + +#: plugins/check_radius.c:332 +msgid "" +"name and password. A configuration file may also be present. The format of" +msgstr "" + +#: plugins/check_radius.c:333 +msgid "" +"the configuration file is described in the radiusclient library sources." +msgstr "" + +#: plugins/check_radius.c:334 +msgid "The password option presents a substantial security issue because the" +msgstr "" + +#: plugins/check_radius.c:335 +msgid "password can be determined by careful watching of the command line in" +msgstr "" + +#: plugins/check_radius.c:336 +msgid "a process listing. This risk is exacerbated because nagios will" +msgstr "" + +#: plugins/check_radius.c:337 +msgid "run the plugin at regular prdictable intervals. Please be sure that" +msgstr "" + +#: plugins/check_radius.c:338 +msgid "the password used does not allow access to sensitive system resources," +msgstr "" + +#: plugins/check_radius.c:339 +msgid "otherwise compormise could occur." +msgstr "" + +#: plugins/check_real.c:96 #, c-format msgid "Unable to connect to %s on port %d\n" msgstr "" -#: plugins/check_real.c:101 +#: plugins/check_real.c:118 #, c-format msgid "No data received from %s\n" msgstr "" -#: plugins/check_real.c:106 plugins/check_real.c:179 -#, c-format -msgid "Invalid REAL response received from host\n" +#: plugins/check_real.c:123 plugins/check_real.c:196 +msgid "Invalid REAL response received from host" msgstr "" -#: plugins/check_real.c:108 plugins/check_real.c:181 +#: plugins/check_real.c:125 plugins/check_real.c:198 #, c-format msgid "Invalid REAL response received from host on port %d\n" msgstr "" -#: plugins/check_real.c:172 plugins/check_tcp.c:278 -#, c-format -msgid "No data received from host\n" -msgstr "" - -#: plugins/check_real.c:235 +#: plugins/check_real.c:252 #, c-format msgid "REAL %s - %d second response time\n" msgstr "" -#: plugins/check_real.c:324 plugins/check_smtp.c:584 plugins/check_ups.c:525 +#: plugins/check_real.c:341 plugins/check_smtp.c:618 plugins/check_ups.c:535 msgid "Warning time must be a positive integer" msgstr "" -#: plugins/check_real.c:333 plugins/check_smtp.c:575 plugins/check_ups.c:516 +#: plugins/check_real.c:350 plugins/check_smtp.c:609 plugins/check_ups.c:526 msgid "Critical time must be a positive integer" msgstr "" -#: plugins/check_real.c:369 +#: plugins/check_real.c:386 msgid "You must provide a server to check" msgstr "" -#: plugins/check_real.c:401 -#, c-format -msgid "" -"This plugin tests the REAL service on the specified host.\n" -"\n" +#: plugins/check_real.c:418 +msgid "This plugin tests the REAL service on the specified host." msgstr "" -#: plugins/check_real.c:409 -#, c-format -msgid "" -" -u, --url=STRING\n" -" Connect to this url\n" -" -e, --expect=STRING\n" -" String to expect in first line of server response (default: %s)\n" +#: plugins/check_real.c:429 +msgid "Connect to this url" msgstr "" -#: plugins/check_real.c:422 +#: plugins/check_real.c:431 #, c-format -msgid "" -"This plugin will attempt to open an RTSP connection with the host.\n" -"Successul connects return STATE_OK, refusals and timeouts return\n" -"STATE_CRITICAL, other errors return STATE_UNKNOWN. Successful connects,\n" -"but incorrect reponse messages from the host result in STATE_WARNING return\n" -"values." +msgid "String to expect in first line of server response (default: %s)\n" msgstr "" -#: plugins/check_smtp.c:172 +#: plugins/check_real.c:440 +msgid "This plugin will attempt to open an RTSP connection with the host." +msgstr "" + +#: plugins/check_real.c:441 plugins/check_smtp.c:767 +msgid "Successul connects return STATE_OK, refusals and timeouts return" +msgstr "" + +#: plugins/check_real.c:442 +msgid "" +"STATE_CRITICAL, other errors return STATE_UNKNOWN. Successful connects," +msgstr "" + +#: plugins/check_real.c:443 +msgid "" +"but incorrect reponse messages from the host result in STATE_WARNING return" +msgstr "" + +#: plugins/check_real.c:444 +msgid "values." +msgstr "" + +#: plugins/check_smtp.c:186 plugins/check_swap.c:268 plugins/check_swap.c:274 #, c-format msgid "malloc() failed!\n" msgstr "" -#: plugins/check_smtp.c:176 +#: plugins/check_smtp.c:190 #, c-format msgid "gethostname() failed!\n" msgstr "" -#: plugins/check_smtp.c:213 plugins/check_smtp.c:237 +#: plugins/check_smtp.c:225 plugins/check_smtp.c:249 #, c-format msgid "recv() failed\n" msgstr "" -#: plugins/check_smtp.c:224 +#: plugins/check_smtp.c:236 #, c-format msgid "Invalid SMTP response received from host\n" msgstr "" -#: plugins/check_smtp.c:226 +#: plugins/check_smtp.c:238 #, c-format msgid "Invalid SMTP response received from host on port %d\n" msgstr "" -#: plugins/check_smtp.c:248 +#: plugins/check_smtp.c:260 #, c-format msgid "WARNING - TLS not supported by server\n" msgstr "" -#: plugins/check_smtp.c:260 +#: plugins/check_smtp.c:272 #, c-format msgid "Server does not support STARTTLS\n" msgstr "" -#: plugins/check_smtp.c:266 +#: plugins/check_smtp.c:278 #, c-format msgid "CRITICAL - Cannot create SSL context.\n" msgstr "" -#: plugins/check_smtp.c:277 plugins/check_tcp.c:226 -#, c-format -msgid "CRITICAL - Cannot retrieve server certificate.\n" +#: plugins/check_smtp.c:298 +msgid "SMTP UNKNOWN - Cannot send EHLO command via TLS." msgstr "" -#: plugins/check_smtp.c:316 plugins/check_snmp.c:556 +#: plugins/check_smtp.c:303 +#, c-format +msgid "sent %s" +msgstr "" + +#: plugins/check_smtp.c:305 +msgid "SMTP UNKNOWN - Cannot read EHLO response via TLS." +msgstr "" + +#: plugins/check_smtp.c:318 +msgid "CRITICAL - Cannot retrieve server certificate." +msgstr "" + +#: plugins/check_smtp.c:356 plugins/check_snmp.c:568 #, c-format msgid "Could Not Compile Regular Expression" msgstr "" -#: plugins/check_smtp.c:325 plugins/check_smtp.c:335 +#: plugins/check_smtp.c:365 #, c-format msgid "SMTP %s - Invalid response '%s' to command '%s'\n" msgstr "" -#: plugins/check_smtp.c:329 plugins/check_snmp.c:301 +#: plugins/check_smtp.c:369 plugins/check_snmp.c:318 #, c-format msgid "Execute Error: %s\n" msgstr "" -#: plugins/check_smtp.c:349 +#: plugins/check_smtp.c:383 msgid "no authuser specified, " msgstr "" -#: plugins/check_smtp.c:354 +#: plugins/check_smtp.c:388 msgid "no authpass specified, " msgstr "" -#: plugins/check_smtp.c:361 plugins/check_smtp.c:383 plugins/check_smtp.c:404 +#: plugins/check_smtp.c:395 plugins/check_smtp.c:417 plugins/check_smtp.c:438 #, c-format msgid "sent %s\n" msgstr "" -#: plugins/check_smtp.c:364 -msgid "recv() failed after AUTH LOGIN, \n" +#: plugins/check_smtp.c:398 +msgid "recv() failed after AUTH LOGIN, " msgstr "" -#: plugins/check_smtp.c:370 plugins/check_smtp.c:392 plugins/check_smtp.c:413 +#: plugins/check_smtp.c:404 plugins/check_smtp.c:426 plugins/check_smtp.c:447 #, c-format msgid "received %s\n" msgstr "" -#: plugins/check_smtp.c:374 +#: plugins/check_smtp.c:408 msgid "invalid response received after AUTH LOGIN, " msgstr "" -#: plugins/check_smtp.c:387 +#: plugins/check_smtp.c:421 msgid "recv() failed after sending authuser, " msgstr "" -#: plugins/check_smtp.c:396 +#: plugins/check_smtp.c:430 msgid "invalid response received after authuser, " msgstr "" -#: plugins/check_smtp.c:408 +#: plugins/check_smtp.c:442 msgid "recv() failed after sending authpass, " msgstr "" -#: plugins/check_smtp.c:417 +#: plugins/check_smtp.c:451 msgid "invalid response received after authpass, " msgstr "" -#: plugins/check_smtp.c:424 +#: plugins/check_smtp.c:458 msgid "only authtype LOGIN is supported, " msgstr "" -#: plugins/check_smtp.c:448 +#: plugins/check_smtp.c:482 #, c-format msgid "SMTP %s - %s%.3f sec. response time%s%s|%s\n" msgstr "" -#: plugins/check_smtp.c:554 plugins/check_smtp.c:564 +#: plugins/check_smtp.c:588 plugins/check_smtp.c:598 #, c-format msgid "Could not realloc() units [%d]\n" msgstr "" -#: plugins/check_smtp.c:611 +#: plugins/check_smtp.c:645 msgid "SSL support not available - install OpenSSL and recompile" msgstr "" -#: plugins/check_smtp.c:681 -#, c-format -msgid "" -"This plugin will attempt to open an SMTP connection with the host.\n" -"\n" +#: plugins/check_smtp.c:724 +msgid "This plugin will attempt to open an SMTP connection with the host." msgstr "" -#: plugins/check_smtp.c:691 +#: plugins/check_smtp.c:737 #, c-format -msgid "" -" -e, --expect=STRING\n" -" String to expect in first line of server response (default: '%s')\n" -" -n, nocommand\n" -" Suppress SMTP command\n" -" -C, --command=STRING\n" -" SMTP command (may be used repeatedly)\n" -" -R, --command=STRING\n" -" Expected response to command (may be used repeatedly)\n" -" -f, --from=STRING\n" -" FROM-address to include in MAIL command, required by Exchange 2000\n" +msgid " String to expect in first line of server response (default: '%s')\n" msgstr "" -#: plugins/check_smtp.c:704 -#, c-format -msgid "" -" -D, --certificate=INTEGER\n" -" Minimum number of days a certificate has to be valid.\n" -" -S, --starttls\n" -" Use STARTTLS for the connection.\n" +#: plugins/check_smtp.c:739 +msgid "Suppress SMTP command" msgstr "" -#: plugins/check_smtp.c:726 -#, c-format -msgid "" -"\n" -"Successul connects return STATE_OK, refusals and timeouts return\n" -"STATE_CRITICAL, other errors return STATE_UNKNOWN. Successful\n" -"connects, but incorrect reponse messages from the host result in\n" -"STATE_WARNING return values.\n" +#: plugins/check_smtp.c:741 +msgid "SMTP command (may be used repeatedly)" msgstr "" -#: plugins/check_snmp.c:278 +#: plugins/check_smtp.c:743 +msgid "Expected response to command (may be used repeatedly)" +msgstr "" + +#: plugins/check_smtp.c:745 +msgid "FROM-address to include in MAIL command, required by Exchange 2000" +msgstr "" + +#: plugins/check_smtp.c:748 plugins/check_tcp.c:638 +msgid "Minimum number of days a certificate has to be valid." +msgstr "" + +#: plugins/check_smtp.c:750 +msgid "Use STARTTLS for the connection." +msgstr "" + +#: plugins/check_smtp.c:754 +msgid "SMTP AUTH type to check (default none, only LOGIN supported)" +msgstr "" + +#: plugins/check_smtp.c:756 +msgid "SMTP AUTH username" +msgstr "" + +#: plugins/check_smtp.c:758 +msgid "SMTP AUTH password" +msgstr "" + +#: plugins/check_smtp.c:768 +msgid "STATE_CRITICAL, other errors return STATE_UNKNOWN. Successful" +msgstr "" + +#: plugins/check_smtp.c:769 +msgid "connects, but incorrect reponse messages from the host result in" +msgstr "" + +#: plugins/check_smtp.c:770 +msgid "STATE_WARNING return values." +msgstr "" + +#: plugins/check_snmp.c:296 msgid "No valid data returned" msgstr "" -#: plugins/check_snmp.c:349 plugins/negate.c:113 +#: plugins/check_snmp.c:364 plugins/negate.c:128 #, c-format msgid "" "%s problem - No data received from host\n" "CMD: %s\n" msgstr "" -#: plugins/check_snmp.c:487 +#: plugins/check_snmp.c:502 #, c-format msgid "Invalid critical threshold: %s\n" msgstr "" -#: plugins/check_snmp.c:498 +#: plugins/check_snmp.c:513 #, c-format msgid "Invalid warning threshold: %s\n" msgstr "" -#: plugins/check_snmp.c:510 +#: plugins/check_snmp.c:525 msgid "Retries interval must be a positive integer" msgstr "" -#: plugins/check_snmp.c:562 -#, c-format -msgid "call for regex which was not a compiled option" -msgstr "" - -#: plugins/check_snmp.c:581 +#: plugins/check_snmp.c:589 #, c-format msgid "Could not reallocate labels[%d]" msgstr "" -#: plugins/check_snmp.c:593 +#: plugins/check_snmp.c:601 msgid "Could not reallocate labels\n" msgstr "" -#: plugins/check_snmp.c:610 +#: plugins/check_snmp.c:618 #, c-format msgid "Could not reallocate units [%d]\n" msgstr "" -#: plugins/check_snmp.c:622 +#: plugins/check_snmp.c:630 msgid "Could not realloc() units\n" msgstr "" -#: plugins/check_snmp.c:707 -#, c-format -msgid "Missing secname (%s) or authpassword (%s) ! \n" -msgstr "" - #: plugins/check_snmp.c:715 #, c-format +msgid "Missing secname (%s) or authpassword (%s) ! \n" +msgstr "" + +#: plugins/check_snmp.c:723 +#, c-format msgid "Missing secname (%s), authpassword (%s), or privpasswd (%s)! \n" msgstr "" -#: plugins/check_snmp.c:724 +#: plugins/check_snmp.c:732 msgid "Invalid SNMP version" msgstr "" -#: plugins/check_snmp.c:852 +#: plugins/check_snmp.c:860 msgid "Unbalanced quotes\n" msgstr "" -#: plugins/check_snmp.c:901 -#, c-format -msgid "" -"Check status of remote machines and obtain sustem information via SNMP\n" -"\n" +#: plugins/check_snmp.c:909 +msgid "Check status of remote machines and obtain sustem information via SNMP" msgstr "" -#: plugins/check_snmp.c:911 -#, c-format -msgid "" -" -n, --next\n" -" Use SNMP GETNEXT instead of SNMP GET\n" -" -P, --protocol=[1|2c|3]\n" -" SNMP protocol version\n" -" -L, --seclevel=[noAuthNoPriv|authNoPriv|authPriv]\n" -" SNMPv3 securityLevel\n" -" -a, --authproto=[MD5|SHA]\n" -" SNMPv3 auth proto\n" +#: plugins/check_snmp.c:921 +msgid "Use SNMP GETNEXT instead of SNMP GET" msgstr "" -#: plugins/check_snmp.c:922 +#: plugins/check_snmp.c:923 +msgid "SNMP protocol version" +msgstr "" + +#: plugins/check_snmp.c:925 +msgid "SNMPv3 securityLevel" +msgstr "" + +#: plugins/check_snmp.c:927 +msgid "SNMPv3 auth proto" +msgstr "" + +#: plugins/check_snmp.c:931 +msgid "Optional community string for SNMP communication" +msgstr "" + +#: plugins/check_snmp.c:932 #, c-format -msgid "" -" -C, --community=STRING\n" -" Optional community string for SNMP communication\n" -" (default is \"%s\")\n" -" -U, --secname=USERNAME\n" -" SNMPv3 username\n" -" -A, --authpassword=PASSWORD\n" -" SNMPv3 authentication password\n" -" -X, --privpasswd=PASSWORD\n" -" SNMPv3 crypt passwd (DES)\n" +msgid "(default is \"%s\")" msgstr "" #: plugins/check_snmp.c:934 -#, c-format -msgid "" -" -o, --oid=OID(s)\n" -" Object identifier(s) or SNMP variables whose value you wish to query\n" -" -m, --miblist=STRING\n" -" List of MIBS to be loaded (default = none if using numeric oids or " -"'ALL'\n" -"\t\tfor symbolic oids.)\n" -" -d, --delimiter=STRING\n" -" Delimiter to use when parsing returned data. Default is \"%s\"\n" -" Any data on the right hand side of the delimiter is considered\n" -" to be the data that should be used in the evaluation.\n" +msgid "SNMPv3 username" msgstr "" -#: plugins/check_snmp.c:946 -#, c-format +#: plugins/check_snmp.c:936 +msgid "SNMPv3 authentication password" +msgstr "" + +#: plugins/check_snmp.c:938 +msgid "SNMPv3 crypt passwd (DES)" +msgstr "" + +#: plugins/check_snmp.c:942 +msgid "Object identifier(s) or SNMP variables whose value you wish to query" +msgstr "" + +#: plugins/check_snmp.c:944 msgid "" -" -w, --warning=INTEGER_RANGE(s)\n" -" Range(s) which will not result in a WARNING status\n" -" -c, --critical=INTEGER_RANGE(s)\n" -" Range(s) which will not result in a CRITICAL status\n" +"List of MIBS to be loaded (default = none if using numeric oids or 'ALL'" +msgstr "" + +#: plugins/check_snmp.c:945 +msgid "for symbolic oids.)" +msgstr "" + +#: plugins/check_snmp.c:947 +#, c-format +msgid " Delimiter to use when parsing returned data. Default is \"%s\"" +msgstr "" + +#: plugins/check_snmp.c:948 +msgid "Any data on the right hand side of the delimiter is considered" +msgstr "" + +#: plugins/check_snmp.c:949 +msgid "to be the data that should be used in the evaluation." msgstr "" #: plugins/check_snmp.c:953 -#, c-format -msgid "" -" -s, --string=STRING\n" -" Return OK state (for that OID) if STRING is an exact match\n" -" -r, --ereg=REGEX\n" -" Return OK state (for that OID) if extended regular expression REGEX " -"matches\n" -" -R, --eregi=REGEX\n" -" Return OK state (for that OID) if case-insensitive extended REGEX " -"matches\n" -" -l, --label=STRING\n" -" Prefix label for output from plugin (default -s 'SNMP')\n" +msgid "Range(s) which will not result in a WARNING status" msgstr "" -#: plugins/check_snmp.c:964 -#, c-format -msgid "" -" -u, --units=STRING\n" -" Units label(s) for output data (e.g., 'sec.').\n" -" -D, --output-delimiter=STRING\n" -" Separates output on multiple OID requests\n" +#: plugins/check_snmp.c:955 +msgid "Range(s) which will not result in a CRITICAL status" msgstr "" -#: plugins/check_snmp.c:974 -#, c-format +#: plugins/check_snmp.c:959 +msgid "Return OK state (for that OID) if STRING is an exact match" +msgstr "" + +#: plugins/check_snmp.c:961 msgid "" -"\n" -"- This plugin uses the 'snmpget' command included with the NET-SNMP " -"package.\n" -" If you don't have the package installed, you will need to download it " -"from\n" -" http://net-snmp.sourceforge.net before you can use this plugin.\n" +"Return OK state (for that OID) if extended regular expression REGEX matches" +msgstr "" + +#: plugins/check_snmp.c:963 +msgid "" +"Return OK state (for that OID) if case-insensitive extended REGEX matches" +msgstr "" + +#: plugins/check_snmp.c:965 +msgid "Prefix label for output from plugin (default -s 'SNMP')" +msgstr "" + +#: plugins/check_snmp.c:969 +msgid "Units label(s) for output data (e.g., 'sec.')." +msgstr "" + +#: plugins/check_snmp.c:971 +msgid "Separates output on multiple OID requests" +msgstr "" + +#: plugins/check_snmp.c:977 +msgid "" +"This plugin uses the 'snmpget' command included with the NET-SNMP package." +msgstr "" + +#: plugins/check_snmp.c:978 +msgid "" +"if you don't have the package installed, you will need to download it from" msgstr "" #: plugins/check_snmp.c:979 -#, c-format -msgid "" -"- Multiple OIDs may be indicated by a comma- or space-delimited list (lists " -"with\n" -" internal spaces must be quoted) [max 8 OIDs]\n" +msgid "http://net-snmp.sourceforge.net before you can use this plugin." msgstr "" -#: plugins/check_snmp.c:983 -#, c-format +#: plugins/check_snmp.c:981 msgid "" -"- Ranges are inclusive and are indicated with colons. When specified as\n" -" 'min:max' a STATE_OK will be returned if the result is within the " -"indicated\n" -" range or is equal to the upper or lower bound. A non-OK state will be\n" -" returned if the result is outside the specified range.\n" +"- Multiple OIDs may be indicated by a comma- or space-delimited list (lists " +"with" +msgstr "" + +#: plugins/check_snmp.c:982 +msgid " internal spaces must be quoted) [max 8 OIDs]" +msgstr "" + +#: plugins/check_snmp.c:984 +msgid "- Ranges are inclusive and are indicated with colons. When specified as" +msgstr "" + +#: plugins/check_snmp.c:985 +msgid "" +" 'min:max' a STATE_OK will be returned if the result is within the indicated" +msgstr "" + +#: plugins/check_snmp.c:986 +msgid " range or is equal to the upper or lower bound. A non-OK state will be" +msgstr "" + +#: plugins/check_snmp.c:987 +msgid " returned if the result is outside the specified range." msgstr "" #: plugins/check_snmp.c:989 -#, c-format msgid "" -"- If specified in the order 'max:min' a non-OK state will be returned if " -"the\n" -" result is within the (inclusive) range.\n" +"- If specified in the order 'max:min' a non-OK state will be returned if the" +msgstr "" + +#: plugins/check_snmp.c:990 +msgid " result is within the (inclusive) range." +msgstr "" + +#: plugins/check_snmp.c:992 +msgid "" +"- Upper or lower bounds may be omitted to skip checking the respective limit." msgstr "" #: plugins/check_snmp.c:993 -#, c-format +msgid "- Bare integers are interpreted as upper limits." +msgstr "" + +#: plugins/check_snmp.c:994 msgid "" -"- Upper or lower bounds may be omitted to skip checking the respective " -"limit.\n" -"- Bare integers are interpreted as upper limits.\n" "- When checking multiple OIDs, separate ranges by commas like '-w " -"1:10,1:,:20'\n" -"- Note that only one string and one regex may be checked at present\n" -"- All evaluation methods other than PR, STR, and SUBSTR expect that the " -"value\n" -" returned from the SNMP query is an unsigned integer.\n" +"1:10,1:,:20'" msgstr "" -#: plugins/check_ssh.c:152 +#: plugins/check_snmp.c:995 +msgid "- Note that only one string and one regex may be checked at present" +msgstr "" + +#: plugins/check_snmp.c:996 +msgid "" +"- All evaluation methods other than PR, STR, and SUBSTR expect that the value" +msgstr "" + +#: plugins/check_snmp.c:997 +msgid " returned from the SNMP query is an unsigned integer." +msgstr "" + +#: plugins/check_ssh.c:170 msgid "Port number must be a positive integer" msgstr "" -#: plugins/check_ssh.c:217 -#, c-format -msgid "Server answer: %s" -msgstr "" - #: plugins/check_ssh.c:235 #, c-format +msgid "Server answer: %s" +msgstr "" + +#: plugins/check_ssh.c:253 +#, c-format msgid "SSH WARNING - %s (protocol %s) version mismatch, expected '%s'\n" msgstr "" -#: plugins/check_ssh.c:241 +#: plugins/check_ssh.c:259 #, c-format msgid "SSH OK - %s (protocol %s)\n" msgstr "" -#: plugins/check_ssh.c:261 -#, c-format -msgid "" -"Try to connect to an SSH server at specified server and port\n" -"\n" +#: plugins/check_ssh.c:279 +msgid "Try to connect to an SSH server at specified server and port" msgstr "" -#: plugins/check_ssh.c:273 -#, c-format +#: plugins/check_ssh.c:294 msgid "" -" -r, --remote-version=STRING\n" -" Warn if string doesn't match expected server version (ex: " -"OpenSSH_3.9p1)\n" +"Warn if string doesn't match expected server version (ex: OpenSSH_3.9p1)" msgstr "" -#: plugins/check_swap.c:149 +#: plugins/check_swap.c:172 #, c-format msgid "Command: %s\n" msgstr "" -#: plugins/check_swap.c:151 +#: plugins/check_swap.c:174 #, c-format msgid "Format: %s\n" msgstr "" -#: plugins/check_swap.c:187 +#: plugins/check_swap.c:210 #, c-format msgid "total=%.0f, used=%.0f, free=%.0f\n" msgstr "" -#: plugins/check_swap.c:201 +#: plugins/check_swap.c:224 #, c-format msgid "total=%.0f, free=%.0f\n" msgstr "" -#: plugins/check_swap.c:246 plugins/check_swap.c:288 +#: plugins/check_swap.c:256 +msgid "Error getting swap devices\n" +msgstr "" + +#: plugins/check_swap.c:259 +msgid "SWAP OK: No swap devices defined\n" +msgstr "" + +#: plugins/check_swap.c:280 plugins/check_swap.c:322 msgid "swapctl failed: " msgstr "" -#: plugins/check_swap.c:326 +#: plugins/check_swap.c:281 plugins/check_swap.c:323 +msgid "Error in swapctl call\n" +msgstr "" + +#: plugins/check_swap.c:360 #, c-format msgid "SWAP %s - %d%% free (%d MB out of %d MB) %s|" msgstr "" -#: plugins/check_swap.c:476 +#: plugins/check_swap.c:438 +msgid "Warning threshold must be integer or percentage!" +msgstr "" + +#: plugins/check_swap.c:456 +msgid "Critical threshold must be integer or percentage!" +msgstr "" + +#: plugins/check_swap.c:510 msgid "Warning percentage should be more than critical percentage" msgstr "" -#: plugins/check_swap.c:480 +#: plugins/check_swap.c:514 msgid "Warning free space should be more than critical free space" msgstr "" -#: plugins/check_swap.c:494 -#, c-format -msgid "" -"Check swap space on local machine.\n" -"\n" +#: plugins/check_swap.c:528 +msgid "Check swap space on local machine." msgstr "" -#: plugins/check_swap.c:500 -#, c-format +#: plugins/check_swap.c:537 msgid "" -"\n" -" -w, --warning=INTEGER\n" -" Exit with WARNING status if less than INTEGER bytes of swap space are " -"free\n" -" -w, --warning=PERCENT%%\n" -" Exit with WARNING status if less than PERCENT of swap space is free\n" -" -c, --critical=INTEGER\n" -" Exit with CRITICAL status if less than INTEGER bytes of swap space are " -"free\n" -" -c, --critical=PERCENT%%\n" -" Exit with CRITCAL status if less than PERCENT of swap space is free\n" -" -a, --allswaps\n" -" Conduct comparisons for all swap partitions, one by one\n" -" -v, --verbose\n" -" Verbose output. Up to 3 levels\n" +"Exit with WARNING status if less than INTEGER bytes of swap space are free" msgstr "" -#: plugins/check_swap.c:514 -#, c-format -msgid "" -"\n" -"On AIX, if -a is specified, uses lsps -a, otherwise uses lsps -s.\n" +#: plugins/check_swap.c:539 +msgid "Exit with WARNING status if less than PERCENT of swap space is free" msgstr "" -#: plugins/check_tcp.c:186 +#: plugins/check_swap.c:541 +msgid "" +"Exit with CRITICAL status if less than INTEGER bytes of swap space are free" +msgstr "" + +#: plugins/check_swap.c:543 +msgid "Exit with CRITCAL status if less than PERCENT of swap space is free" +msgstr "" + +#: plugins/check_swap.c:545 +msgid "Conduct comparisons for all swap partitions, one by one" +msgstr "" + +#: plugins/check_swap.c:547 +msgid "Verbose output. Up to 3 levels" +msgstr "" + +#: plugins/check_swap.c:550 +msgid "On AIX, if -a is specified, uses lsps -a, otherwise uses lsps -s.\n" +msgstr "" + +#: plugins/check_tcp.c:199 msgid "CRITICAL - Generic check_tcp called with unknown service\n" msgstr "" -#: plugins/check_tcp.c:207 +#: plugins/check_tcp.c:220 msgid "With UDP checks, a send/expect string must be specified." msgstr "" -#: plugins/check_tcp.c:332 +#: plugins/check_tcp.c:239 #, c-format -msgid "%s %s - " +msgid "CRITICAL - Cannot retrieve server certificate.\n" msgstr "" -#: plugins/check_tcp.c:405 +#: plugins/check_tcp.c:428 msgid "No arguments found" msgstr "" -#: plugins/check_tcp.c:513 +#: plugins/check_tcp.c:530 msgid "Maxbytes must be a positive integer" msgstr "" -#: plugins/check_tcp.c:530 +#: plugins/check_tcp.c:548 msgid "Refuse must be one of ok, warn, crit" msgstr "" -#: plugins/check_tcp.c:540 +#: plugins/check_tcp.c:558 msgid "Mismatch must be one of ok, warn, crit" msgstr "" -#: plugins/check_tcp.c:546 +#: plugins/check_tcp.c:564 msgid "Delay must be a positive integer" msgstr "" -#: plugins/check_tcp.c:571 +#: plugins/check_tcp.c:589 msgid "You must provide a server address" msgstr "" -#: plugins/check_tcp.c:573 +#: plugins/check_tcp.c:591 msgid "Invalid hostname, address or socket" msgstr "" -#: plugins/check_tcp.c:587 +#: plugins/check_tcp.c:605 #, c-format msgid "" "This plugin tests %s connections with the specified host (or unix socket).\n" "\n" msgstr "" -#: plugins/check_tcp.c:598 -#, c-format +#: plugins/check_tcp.c:617 msgid "" -" -E, --escape\n" -" Can use \\n, \\r, \\t or \\ in send or quit string.\n" -" Default: nothing added to send, \\r\\n added to end of quit\n" -" -s, --send=STRING\n" -" String to send to the server\n" -" -e, --expect=STRING\n" -" String to expect in server response\n" -" -q, --quit=STRING\n" -" String to send server to initiate a clean close of the connection\n" +"Can use \\n, \\r, \\t or \\ in send or quit string. Must come before send or " +"quit option" msgstr "" -#: plugins/check_tcp.c:609 -#, c-format -msgid "" -" -r, --refuse=ok|warn|crit\n" -" Accept tcp refusals with states ok, warn, crit (default: crit)\n" -" -M, --mismatch=ok|warn|crit\n" -" Accept expected string mismatches with states ok, warn, crit (default: " -"warn)\n" -" -j, --jail\n" -" Hide output from TCP socket\n" -" -m, --maxbytes=INTEGER\n" -" Close connection once more than this number of bytes are received\n" -" -d, --delay=INTEGER\n" -" Seconds to wait between sending string and polling for response\n" +#: plugins/check_tcp.c:618 +msgid "Default: nothing added to send, \\r\\n added to end of quit" +msgstr "" + +#: plugins/check_tcp.c:620 +msgid "String to send to the server" msgstr "" #: plugins/check_tcp.c:622 -#, c-format -msgid "" -" -D, --certificate=INTEGER\n" -" Minimum number of days a certificate has to be valid.\n" -" -S, --ssl\n" -" Use SSL for the connection.\n" +msgid "String to expect in server response" msgstr "" -#: plugins/check_time.c:90 +#: plugins/check_tcp.c:624 +msgid "String to send server to initiate a clean close of the connection" +msgstr "" + +#: plugins/check_tcp.c:626 +msgid "Accept tcp refusals with states ok, warn, crit (default: crit)" +msgstr "" + +#: plugins/check_tcp.c:628 +msgid "" +"Accept expected string mismatches with states ok, warn, crit (default: warn)" +msgstr "" + +#: plugins/check_tcp.c:630 +msgid "Hide output from TCP socket" +msgstr "" + +#: plugins/check_tcp.c:632 +msgid "Close connection once more than this number of bytes are received" +msgstr "" + +#: plugins/check_tcp.c:634 +msgid "Seconds to wait between sending string and polling for response" +msgstr "" + +#: plugins/check_tcp.c:640 +msgid "Use SSL for the connection." +msgstr "" + +#: plugins/check_time.c:106 #, c-format msgid "TIME UNKNOWN - could not connect to server %s, port %d\n" msgstr "" -#: plugins/check_time.c:103 +#: plugins/check_time.c:119 #, c-format msgid "TIME UNKNOWN - could not send UDP request to server %s, port %d\n" msgstr "" -#: plugins/check_time.c:127 +#: plugins/check_time.c:143 #, c-format msgid "TIME UNKNOWN - no data received from server %s, port %d\n" msgstr "" -#: plugins/check_time.c:140 +#: plugins/check_time.c:156 #, c-format msgid "TIME %s - %d second response time|%s\n" msgstr "" -#: plugins/check_time.c:158 +#: plugins/check_time.c:174 #, c-format msgid "TIME %s - %lu second time difference|%s %s\n" msgstr "" -#: plugins/check_time.c:242 +#: plugins/check_time.c:258 msgid "Warning thresholds must be a positive integer" msgstr "" -#: plugins/check_time.c:261 +#: plugins/check_time.c:277 msgid "Critical thresholds must be a positive integer" msgstr "" -#: plugins/check_time.c:327 -#, c-format -msgid "" -"This plugin will check the time on the specified host.\n" -"\n" +#: plugins/check_time.c:343 +msgid "This plugin will check the time on the specified host." msgstr "" -#: plugins/check_time.c:335 -#, c-format -msgid "" -" -u, --udp\n" -" Use UDP to connect, not TCP\n" -" -w, --warning-variance=INTEGER\n" -" Time difference (sec.) necessary to result in a warning status\n" -" -c, --critical-variance=INTEGER\n" -" Time difference (sec.) necessary to result in a critical status\n" -" -W, --warning-connect=INTEGER\n" -" Response time (sec.) necessary to result in warning status\n" -" -C, --critical-connect=INTEGER\n" -" Response time (sec.) necessary to result in critical status\n" +#: plugins/check_time.c:354 +msgid "Use UDP to connect, not TCP" msgstr "" -#: plugins/check_udp.c:70 -#, c-format -msgid "No response from host on port %d\n" +#: plugins/check_time.c:356 +msgid "Time difference (sec.) necessary to result in a warning status" msgstr "" -#: plugins/check_udp.c:79 -#, c-format -msgid "Invalid response received from host on port %d\n" +#: plugins/check_time.c:358 +msgid "Time difference (sec.) necessary to result in a critical status" msgstr "" -#: plugins/check_udp.c:95 -#, c-format -msgid "Connection %s on port %d - %d second response time\n" +#: plugins/check_time.c:360 +msgid "Response time (sec.) necessary to result in warning status" msgstr "" -#: plugins/check_udp.c:96 -msgid "accepted" +#: plugins/check_time.c:362 +msgid "Response time (sec.) necessary to result in critical status" msgstr "" -#: plugins/check_udp.c:96 -msgid "problem" -msgstr "" - -#: plugins/check_udp.c:225 -#, c-format -msgid "" -"\tThis plugin tests an UDP connection with the specified host.\n" -"\n" -msgstr "" - -#: plugins/check_udp.c:234 -#, c-format -msgid "" -" -e, --expect=STRING \n" -" String to expect in first line of server response\n" -" -s, --send=STRING \n" -" String to send to the server when initiating the connection\n" -msgstr "" - -#: plugins/check_udp.c:246 -#, c-format -msgid "" -"This plugin will attempt to connect to the specified port on the host.\n" -"Successful connects return STATE_OK, refusals and timeouts return\n" -"STATE_CRITICAL, other errors return STATE_UNKNOWN.\n" -"\n" -msgstr "" - -#: plugins/check_ups.c:137 +#: plugins/check_ups.c:147 msgid "On Battery, Low Battery" msgstr "" -#: plugins/check_ups.c:142 +#: plugins/check_ups.c:152 msgid "Online" msgstr "" -#: plugins/check_ups.c:145 +#: plugins/check_ups.c:155 msgid "On Battery" msgstr "" -#: plugins/check_ups.c:149 +#: plugins/check_ups.c:159 msgid ", Low Battery" msgstr "" -#: plugins/check_ups.c:153 +#: plugins/check_ups.c:163 msgid ", Calibrating" msgstr "" -#: plugins/check_ups.c:156 +#: plugins/check_ups.c:166 msgid ", Replace Battery" msgstr "" -#: plugins/check_ups.c:160 +#: plugins/check_ups.c:170 msgid ", On Bypass" msgstr "" -#: plugins/check_ups.c:163 +#: plugins/check_ups.c:173 msgid ", Overload" msgstr "" -#: plugins/check_ups.c:166 +#: plugins/check_ups.c:176 msgid ", Trimming" msgstr "" -#: plugins/check_ups.c:169 +#: plugins/check_ups.c:179 msgid ", Boosting" msgstr "" -#: plugins/check_ups.c:172 +#: plugins/check_ups.c:182 msgid ", Charging" msgstr "" -#: plugins/check_ups.c:175 +#: plugins/check_ups.c:185 msgid ", Discharging" msgstr "" -#: plugins/check_ups.c:178 +#: plugins/check_ups.c:188 msgid ", Unknown" msgstr "" -#: plugins/check_ups.c:317 +#: plugins/check_ups.c:327 msgid "UPS does not support any available options\n" msgstr "" -#: plugins/check_ups.c:341 plugins/check_ups.c:401 -#, c-format -msgid "Invalid response received from host\n" -msgstr "" - -#: plugins/check_ups.c:409 -#, c-format -msgid "CRITICAL - no such ups '%s' on that host\n" +#: plugins/check_ups.c:351 plugins/check_ups.c:411 +msgid "Invalid response received from host" msgstr "" #: plugins/check_ups.c:419 #, c-format -msgid "CRITICAL - UPS data is stale\n" +msgid "CRITICAL - no such ups '%s' on that host\n" msgstr "" -#: plugins/check_ups.c:424 +#: plugins/check_ups.c:429 +msgid "CRITICAL - UPS data is stale" +msgstr "" + +#: plugins/check_ups.c:434 #, c-format msgid "Unknown error: %s\n" msgstr "" -#: plugins/check_ups.c:431 -#, c-format -msgid "Error: unable to parse variable\n" +#: plugins/check_ups.c:441 +msgid "Error: unable to parse variable" msgstr "" -#: plugins/check_ups.c:538 +#: plugins/check_ups.c:548 msgid "Unrecognized UPS variable" msgstr "" -#: plugins/check_ups.c:576 -#, c-format -msgid "Error : no ups indicated\n" -msgstr "" - -#: plugins/check_ups.c:596 -#, c-format -msgid "" -"This plugin tests the UPS service on the specified host.\n" -"Network UPS Tools from www.networkupstools.org must be running for this\n" -"plugin to work.\n" -"\n" +#: plugins/check_ups.c:586 +msgid "Error : no ups indicated" msgstr "" #: plugins/check_ups.c:606 -#, c-format msgid "" -" -u, --ups=STRING\n" -" Name of UPS\n" +"This plugin tests the UPS service on the specified host.Network UPS Tools " msgstr "" -#: plugins/check_ups.c:610 -#, c-format -msgid "" -" -T, --temperature\n" -" Output of temperatures in Celsius\n" +#: plugins/check_ups.c:607 +msgid "from www.networkupstools.org must be running for thisplugin to work." +msgstr "" + +#: plugins/check_ups.c:618 +msgid "Name of UPS" msgstr "" #: plugins/check_ups.c:620 -#, c-format -msgid "" -"This plugin attempts to determine the status of a UPS (Uninterruptible " -"Power\n" -"Supply) on a local or remote host. If the UPS is online or calibrating, the\n" -"plugin will return an OK state. If the battery is on it will return a " -"WARNING\n" -"state. If the UPS is off or has a low battery the plugin will return a " -"CRITICAL\n" -"state.\n" -"\n" +msgid "Output of temperatures in Celsius" msgstr "" -#: plugins/check_ups.c:627 -#, c-format +#: plugins/check_ups.c:631 msgid "" -"You may also specify a variable to check [such as temperature, utility " -"voltage,\n" -"battery load, etc.] as well as warning and critical thresholds for the " -"value of\n" -"that variable. If the remote host has multiple UPS that are being monitored " -"you\n" -"will have to use the [ups] option to specify which UPS to check.\n" -"\n" +"This plugin attempts to determine the status of a UPS (Uninterruptible Power" +msgstr "" + +#: plugins/check_ups.c:632 +msgid "" +"Supply) on a local or remote host. If the UPS is online or calibrating, the" msgstr "" #: plugins/check_ups.c:633 -#, c-format msgid "" -"Notes:\n" -"\n" -"This plugin requires that the UPSD daemon distributed with Russel Kroll's\n" -"Smart UPS Tools be installed on the remote host. If you do not have the\n" -"package installed on your system, you can download it from\n" -"http://www.networkupstools.org\n" -"\n" +"plugin will return an OK state. If the battery is on it will return a WARNING" msgstr "" -#: plugins/check_users.c:78 +#: plugins/check_ups.c:634 +msgid "" +"state.If the UPS is off or has a low battery the plugin will return a " +"CRITICAL" +msgstr "" + +#: plugins/check_ups.c:635 +msgid "state." +msgstr "" + +#: plugins/check_ups.c:637 +msgid "" +"You may also specify a variable to check [such as temperature, utility " +"voltage," +msgstr "" + +#: plugins/check_ups.c:638 +msgid "" +"battery load, etc.] as well as warning and critical thresholds for the " +"value of" +msgstr "" + +#: plugins/check_ups.c:639 +msgid "" +"that variable. If the remote host has multiple UPS that are being monitored " +"you" +msgstr "" + +#: plugins/check_ups.c:640 +msgid "will have to use the [ups] option to specify which UPS to check." +msgstr "" + +#: plugins/check_ups.c:642 +msgid "" +"This plugin requires that the UPSD daemon distributed with Russel Kroll's" +msgstr "" + +#: plugins/check_ups.c:643 +msgid "" +"Smart UPS Tools be installed on the remote host. If you do not have the" +msgstr "" + +#: plugins/check_ups.c:644 +msgid "" +"package installed on your system, you can download it from http://www." +"networkupstools.org" +msgstr "" + +#: plugins/check_users.c:94 #, c-format msgid "# users=%d" msgstr "" -#: plugins/check_users.c:108 +#: plugins/check_users.c:117 +msgid "Unable to read output" +msgstr "" + +#: plugins/check_users.c:124 #, c-format msgid "USERS %s - %d users currently logged in |%s\n" msgstr "" -#: plugins/check_users.c:193 -#, c-format -msgid "" -"This plugin checks the number of users currently logged in on the local\n" -"system and generates an error if the number exceeds the thresholds " -"specified.\n" +#: plugins/check_users.c:209 +msgid "This plugin checks the number of users currently logged in on the local" msgstr "" -#: plugins/check_users.c:201 -#, c-format +#: plugins/check_users.c:210 msgid "" -" -w, --warning=INTEGER\n" -" Set WARNING status if more than INTEGER users are logged in\n" -" -c, --critical=INTEGER\n" -" Set CRITICAL status if more than INTEGER users are logged in\n" +"system and generates an error if the number exceeds the thresholds specified." msgstr "" -#: plugins/check_ide_smart.c:230 +#: plugins/check_users.c:219 +msgid "Set WARNING status if more than INTEGER users are logged in" +msgstr "" + +#: plugins/check_users.c:221 +msgid "Set CRITICAL status if more than INTEGER users are logged in" +msgstr "" + +#: plugins/check_ide_smart.c:231 #, c-format msgid "CRITICAL - Couldn't open device %s: %s\n" msgstr "" -#: plugins/check_ide_smart.c:235 +#: plugins/check_ide_smart.c:236 #, c-format msgid "CRITICAL - SMART_CMD_ENABLE\n" msgstr "" -#: plugins/check_ide_smart.c:296 +#: plugins/check_ide_smart.c:297 #, c-format msgid "CRITICAL - SMART_READ_VALUES: %s\n" msgstr "" -#: plugins/check_ide_smart.c:365 +#: plugins/check_ide_smart.c:366 #, c-format msgid "CRITICAL - %d Harddrive PreFailure%cDetected! %d/%d tests failed.\n" msgstr "" -#: plugins/check_ide_smart.c:373 +#: plugins/check_ide_smart.c:374 #, c-format msgid "WARNING - %d Harddrive Advisor%s Detected. %d/%d tests failed.\n" msgstr "" -#: plugins/check_ide_smart.c:381 +#: plugins/check_ide_smart.c:382 #, c-format msgid "OK - Operational (%d/%d tests passed)\n" msgstr "" -#: plugins/check_ide_smart.c:385 +#: plugins/check_ide_smart.c:386 #, c-format msgid "ERROR - Status '%d' unkown. %d/%d tests passed\n" msgstr "" -#: plugins/check_ide_smart.c:418 +#: plugins/check_ide_smart.c:419 #, c-format msgid "OffLineStatus=%d {%s}, AutoOffLine=%s, OffLineTimeout=%d minutes\n" msgstr "" -#: plugins/check_ide_smart.c:424 +#: plugins/check_ide_smart.c:425 #, c-format msgid "OffLineCapability=%d {%s %s %s}\n" msgstr "" -#: plugins/check_ide_smart.c:430 +#: plugins/check_ide_smart.c:431 #, c-format msgid "SmartRevision=%d, CheckSum=%d, SmartCapability=%d {%s %s}\n" msgstr "" -#: plugins/check_ide_smart.c:468 +#: plugins/check_ide_smart.c:469 #, c-format msgid "CRITICAL - %s: %s\n" msgstr "" -#: plugins/check_ide_smart.c:487 +#: plugins/check_ide_smart.c:488 #, c-format msgid "CRITICAL - SMART_READ_THRESHOLDS: %s\n" msgstr "" -#: plugins/check_ide_smart.c:504 +#: plugins/check_ide_smart.c:505 #, c-format msgid "" "This plugin checks a local hard drive with the (Linux specific) SMART " -"interface [http://smartlinux.sourceforge.net/smart/index.php].\n" -"\n" +"interface [http://smartlinux.sourceforge.net/smart/index.php]." msgstr "" -#: plugins/negate.c:242 -#, c-format +#: plugins/check_ide_smart.c:514 +msgid "Select device DEVICE" +msgstr "" + +#: plugins/check_ide_smart.c:515 msgid "" -"Negates the status of a plugin (returns OK for CRITICAL, and vice-versa).\n" -"\n" +"Note: if the device is selected with this option, _no_ other options are " +"accepted" msgstr "" -#: plugins/negate.c:251 -#, c-format -msgid " [keep timeout than the plugin timeout to retain CRITICAL status]\n" +#: plugins/check_ide_smart.c:517 +msgid "Perform immediately offline tests" msgstr "" -#: plugins/negate.c:254 -#, c-format +#: plugins/check_ide_smart.c:519 +msgid "Returns the number of failed tests" +msgstr "" + +#: plugins/check_ide_smart.c:521 +msgid "Turn on automatic offline tests" +msgstr "" + +#: plugins/check_ide_smart.c:523 +msgid "Turn off automatic offline tests" +msgstr "" + +#: plugins/check_ide_smart.c:525 +msgid "Output suitable for Nagios" +msgstr "" + +#: plugins/negate.c:257 msgid "" -" negate \"/usr/local/nagios/libexec/check_ping -H host\"\n" -" Run check_ping and invert result. Must use full path to plugin\n" -" negate \"/usr/local/nagios/libexec/check_procs -a 'vi negate.c'\"\n" -" Use single quotes if you need to retain spaces\n" +"Negates the status of a plugin (returns OK for CRITICAL, and vice-versa)." msgstr "" -#: plugins/negate.c:260 -#, c-format +#: plugins/negate.c:267 +msgid "[keep timeout than the plugin timeout to retain CRITICAL status]" +msgstr "" + +#: plugins/negate.c:271 +msgid "Run check_ping and invert result. Must use full path to plugin" +msgstr "" + +#: plugins/negate.c:273 +msgid "Use single quotes if you need to retain spaces" +msgstr "" + +#: plugins/negate.c:277 +msgid "" +"This plugin is a wrapper to take the output of another plugin and invert it." +msgstr "" + +#: plugins/negate.c:278 msgid "" -"This plugin is a wrapper to take the output of another plugin and invert " -"it.\n" "If the wrapped plugin returns STATE_OK, the wrapper will return " -"STATE_CRITICAL.\n" +"STATE_CRITICAL." +msgstr "" + +#: plugins/negate.c:279 +msgid "" "If the wrapped plugin returns STATE_CRITICAL, the wrapper will return " -"STATE_OK.\n" -"Otherwise, the output state of the wrapped plugin is unchanged.\n" +"STATE_OK." +msgstr "" + +#: plugins/negate.c:280 +msgid "Otherwise, the output state of the wrapped plugin is unchanged." msgstr "" #: plugins/netutils.c:49 @@ -3803,31 +4482,23 @@ msgid "CRITICAL - Abnormal timeout after %d seconds\n" msgstr "" #: plugins/netutils.c:79 plugins/netutils.c:270 -#, c-format -msgid "Send failed\n" +msgid "Send failed" msgstr "" #: plugins/netutils.c:96 plugins/netutils.c:285 -#, c-format -msgid "No data was received from host!\n" +msgid "No data was received from host!" msgstr "" -#: plugins/netutils.c:193 -#, c-format -msgid "Socket creation failed\n" +#: plugins/netutils.c:193 plugins/netutils.c:229 +msgid "Socket creation failed" msgstr "" #: plugins/netutils.c:222 msgid "Supplied path too long unix domain socket" msgstr "" -#: plugins/netutils.c:229 -msgid "Socket creation failed" -msgstr "" - #: plugins/netutils.c:294 -#, c-format -msgid "Receive failed\n" +msgid "Receive failed" msgstr "" #: plugins/netutils.c:320 @@ -3835,358 +4506,450 @@ msgstr "" msgid "Invalid hostname/address - %s" msgstr "" -#: plugins/popen.c:124 -#, c-format -msgid "Could not malloc argv array in popen()\n" +#: plugins/popen.c:148 +msgid "Could not malloc argv array in popen()" msgstr "" -#: plugins/popen.c:134 -#, c-format -msgid "CRITICAL - You need more args!!!\n" +#: plugins/popen.c:158 +msgid "CRITICAL - You need more args!!!" msgstr "" -#: plugins/popen.c:183 +#: plugins/popen.c:207 msgid "Cannot catch SIGCHLD" msgstr "" -#: plugins/popen.c:278 plugins/utils.c:147 +#: plugins/popen.c:302 plugins/utils.c:146 #, c-format msgid "CRITICAL - Plugin timed out after %d seconds\n" msgstr "" -#: plugins/popen.c:281 -#, c-format -msgid "CRITICAL - popen timeout received, but no child process\n" +#: plugins/popen.c:305 +msgid "CRITICAL - popen timeout received, but no child process" msgstr "" -#: plugins/popen.c:297 +#: plugins/popen.c:321 msgid "sysconf error for _SC_OPEN_MAX" msgstr "" -#: plugins/urlize.c:113 +#: plugins/urlize.c:137 #, c-format msgid "" "%s UNKNOWN - No data received from host\n" "CMD: %s\n" msgstr "" -#: plugins/urlize.c:152 -#, c-format -msgid "" -"\n" -"This plugin wraps the text output of another command (plugin) in HTML\n" -" tags, thus displaying the plugin output in as a clickable link in\n" -"the Nagios status screen. The return status is the same as the invoked\n" -"plugin.\n" -"\n" +#: plugins/urlize.c:176 +msgid "This plugin wraps the text output of another command (plugin)" msgstr "" -#: plugins/urlize.c:160 -#, c-format +#: plugins/urlize.c:177 msgid "" -"\n" -"Pay close attention to quoting to ensure that the shell passes the expected\n" -"data to the plugin. For example, in:\n" -"\n" -" urlize http://example.com/ check_http -H example.com -r 'two words'\n" -"\n" -"the shell will remove the single quotes and urlize will see:\n" -"\n" -" urlize http://example.com/ check_http -H example.com -r two words\n" -"\n" -"You probably want:\n" -"\n" -" urlize http://example.com/ \"check_http -H example.com -r 'two words'\"\n" +"in HTML tags, thus displaying the plugin output in as a clickable link in" msgstr "" -#: plugins/utils.c:592 +#: plugins/urlize.c:178 +msgid "" +"the Nagios status screen. The return status is the same as the invoked " +"plugin." +msgstr "" + +#: plugins/urlize.c:188 +msgid "" +"Pay close attention to quoting to ensure that the shell passes the expected" +msgstr "" + +#: plugins/urlize.c:189 +msgid "data to the plugin. For example, in:" +msgstr "" + +#: plugins/urlize.c:190 +msgid "urlize http://example.com/ check_http -H example.com -r 'two words'" +msgstr "" + +#: plugins/urlize.c:191 +msgid "the shell will remove the single quotes and urlize will see:" +msgstr "" + +#: plugins/urlize.c:192 +msgid "urlize http://example.com/ check_http -H example.com -r two words" +msgstr "" + +#: plugins/urlize.c:193 +msgid "You probably want:" +msgstr "" + +#: plugins/urlize.c:194 +msgid "urlize http://example.com/ \"check_http -H example.com -r 'two words'\"" +msgstr "" + +#: plugins/utils.c:441 msgid "failed realloc in strpcpy\n" msgstr "" -#: plugins/utils.c:634 +#: plugins/utils.c:483 msgid "failed malloc in strscat\n" msgstr "" -#: plugins-root/check_dhcp.c:293 +#: plugins-root/check_dhcp.c:298 #, c-format msgid "Error: Could not get hardware address of interface '%s'\n" msgstr "" -#: plugins-root/check_dhcp.c:315 +#: plugins-root/check_dhcp.c:320 #, c-format msgid "Error: if_nametoindex error - %s.\n" msgstr "" -#: plugins-root/check_dhcp.c:320 +#: plugins-root/check_dhcp.c:325 #, c-format msgid "Error: Couldn't get hardware address from %s. sysctl 1 error - %s.\n" msgstr "" -#: plugins-root/check_dhcp.c:325 +#: plugins-root/check_dhcp.c:330 #, c-format msgid "" "Error: Couldn't get hardware address from interface %s. malloc error - %s.\n" msgstr "" -#: plugins-root/check_dhcp.c:330 +#: plugins-root/check_dhcp.c:335 #, c-format msgid "Error: Couldn't get hardware address from %s. sysctl 2 error - %s.\n" msgstr "" -#: plugins-root/check_dhcp.c:355 +#: plugins-root/check_dhcp.c:361 #, c-format msgid "" "Error: can't find unit number in interface_name (%s) - expecting TypeNumber " "eg lnc0.\n" msgstr "" -#: plugins-root/check_dhcp.c:360 plugins-root/check_dhcp.c:372 +#: plugins-root/check_dhcp.c:366 plugins-root/check_dhcp.c:378 #, c-format msgid "" "Error: can't read MAC address from DLPI streams interface for device %s unit " "%d.\n" msgstr "" -#: plugins-root/check_dhcp.c:378 +#: plugins-root/check_dhcp.c:384 #, c-format msgid "Error: can't get MAC address for this architecture.\n" msgstr "" -#: plugins-root/check_dhcp.c:383 +#: plugins-root/check_dhcp.c:389 #, c-format msgid "Hardware address: " msgstr "" -#: plugins-root/check_dhcp.c:458 +#: plugins-root/check_dhcp.c:464 #, c-format msgid "DHCPDISCOVER to %s port %d\n" msgstr "" -#: plugins-root/check_dhcp.c:509 +#: plugins-root/check_dhcp.c:517 #, c-format msgid "Result=ERROR\n" msgstr "" -#: plugins-root/check_dhcp.c:515 +#: plugins-root/check_dhcp.c:523 #, c-format msgid "Result=OK\n" msgstr "" -#: plugins-root/check_dhcp.c:521 +#: plugins-root/check_dhcp.c:538 #, c-format -msgid "DHCPOFFER from IP address %s\n" +msgid "DHCPOFFER from IP address %s" msgstr "" -#: plugins-root/check_dhcp.c:528 +#: plugins-root/check_dhcp.c:539 +#, c-format +msgid " via %s\n" +msgstr "" + +#: plugins-root/check_dhcp.c:546 #, c-format msgid "" "DHCPOFFER XID (%lu) did not match DHCPDISCOVER XID (%lu) - ignoring packet\n" msgstr "" -#: plugins-root/check_dhcp.c:550 +#: plugins-root/check_dhcp.c:568 #, c-format msgid "DHCPOFFER hardware address did not match our own - ignoring packet\n" msgstr "" -#: plugins-root/check_dhcp.c:568 +#: plugins-root/check_dhcp.c:586 #, c-format msgid "Total responses seen on the wire: %d\n" msgstr "" -#: plugins-root/check_dhcp.c:569 +#: plugins-root/check_dhcp.c:587 #, c-format msgid "Valid responses for this machine: %d\n" msgstr "" -#: plugins-root/check_dhcp.c:585 +#: plugins-root/check_dhcp.c:603 #, c-format msgid "send_dhcp_packet result: %d\n" msgstr "" -#: plugins-root/check_dhcp.c:614 +#: plugins-root/check_dhcp.c:632 #, c-format msgid "No (more) data received\n" msgstr "" -#: plugins-root/check_dhcp.c:633 +#: plugins-root/check_dhcp.c:651 #, c-format msgid "recvfrom() failed, " msgstr "" -#: plugins-root/check_dhcp.c:640 +#: plugins-root/check_dhcp.c:658 #, c-format msgid "receive_dhcp_packet() result: %d\n" msgstr "" -#: plugins-root/check_dhcp.c:641 +#: plugins-root/check_dhcp.c:659 #, c-format msgid "receive_dhcp_packet() source: %s\n" msgstr "" -#: plugins-root/check_dhcp.c:670 +#: plugins-root/check_dhcp.c:688 #, c-format msgid "Error: Could not create socket!\n" msgstr "" -#: plugins-root/check_dhcp.c:680 +#: plugins-root/check_dhcp.c:698 #, c-format msgid "Error: Could not set reuse address option on DHCP socket!\n" msgstr "" -#: plugins-root/check_dhcp.c:686 +#: plugins-root/check_dhcp.c:704 #, c-format msgid "Error: Could not set broadcast option on DHCP socket!\n" msgstr "" -#: plugins-root/check_dhcp.c:694 +#: plugins-root/check_dhcp.c:712 #, c-format msgid "" "Error: Could not bind socket to interface %s. Check your privileges...\n" msgstr "" -#: plugins-root/check_dhcp.c:704 +#: plugins-root/check_dhcp.c:722 #, c-format msgid "" "Error: Could not bind to DHCP socket (port %d)! Check your privileges...\n" msgstr "" -#: plugins-root/check_dhcp.c:737 +#: plugins-root/check_dhcp.c:756 #, c-format msgid "Requested server address: %s\n" msgstr "" -#: plugins-root/check_dhcp.c:796 +#: plugins-root/check_dhcp.c:812 #, c-format msgid "Lease Time: Infinite\n" msgstr "" -#: plugins-root/check_dhcp.c:798 +#: plugins-root/check_dhcp.c:814 #, c-format msgid "Lease Time: %lu seconds\n" msgstr "" -#: plugins-root/check_dhcp.c:800 +#: plugins-root/check_dhcp.c:816 #, c-format msgid "Renewal Time: Infinite\n" msgstr "" -#: plugins-root/check_dhcp.c:802 +#: plugins-root/check_dhcp.c:818 #, c-format msgid "Renewal Time: %lu seconds\n" msgstr "" -#: plugins-root/check_dhcp.c:804 +#: plugins-root/check_dhcp.c:820 #, c-format msgid "Rebinding Time: Infinite\n" msgstr "" -#: plugins-root/check_dhcp.c:805 +#: plugins-root/check_dhcp.c:821 #, c-format msgid "Rebinding Time: %lu seconds\n" msgstr "" -#: plugins-root/check_dhcp.c:821 +#: plugins-root/check_dhcp.c:837 #, c-format msgid "Added offer from server @ %s" msgstr "" -#: plugins-root/check_dhcp.c:822 +#: plugins-root/check_dhcp.c:838 #, c-format msgid " of IP address %s\n" msgstr "" -#: plugins-root/check_dhcp.c:889 +#: plugins-root/check_dhcp.c:905 #, c-format msgid "DHCP Server Match: Offerer=%s" msgstr "" -#: plugins-root/check_dhcp.c:890 +#: plugins-root/check_dhcp.c:906 #, c-format -msgid " Requested=%s\n" +msgid " Requested=%s" msgstr "" -#: plugins-root/check_dhcp.c:929 +#: plugins-root/check_dhcp.c:908 +#, c-format +msgid " (duplicate)" +msgstr "" + +#: plugins-root/check_dhcp.c:909 +#, c-format +msgid "\n" +msgstr "" + +#: plugins-root/check_dhcp.c:957 #, c-format msgid "No DHCPOFFERs were received.\n" msgstr "" -#: plugins-root/check_dhcp.c:933 +#: plugins-root/check_dhcp.c:961 #, c-format msgid "Received %d DHCPOFFER(s)" msgstr "" -#: plugins-root/check_dhcp.c:936 +#: plugins-root/check_dhcp.c:964 #, c-format msgid ", %s%d of %d requested servers responded" msgstr "" -#: plugins-root/check_dhcp.c:939 +#: plugins-root/check_dhcp.c:967 #, c-format msgid ", requested address (%s) was %soffered" msgstr "" -#: plugins-root/check_dhcp.c:939 +#: plugins-root/check_dhcp.c:967 msgid "not " msgstr "" -#: plugins-root/check_dhcp.c:941 +#: plugins-root/check_dhcp.c:969 #, c-format msgid ", max lease time = " msgstr "" -#: plugins-root/check_dhcp.c:943 +#: plugins-root/check_dhcp.c:971 #, c-format msgid "Infinity" msgstr "" -#: plugins-root/check_dhcp.c:1125 +#: plugins-root/check_dhcp.c:1148 #, c-format msgid "Error: DLPI stream API failed to get MAC in check_ctrl: %s.\n" msgstr "" -#: plugins-root/check_dhcp.c:1136 +#: plugins-root/check_dhcp.c:1160 #, c-format msgid "Error: DLPI stream API failed to get MAC in put_ctrl/putmsg(): %s.\n" msgstr "" -#: plugins-root/check_dhcp.c:1148 +#: plugins-root/check_dhcp.c:1173 #, c-format msgid "Error: DLPI stream API failed to get MAC in put_both/putmsg().\n" msgstr "" -#: plugins-root/check_dhcp.c:1159 +#: plugins-root/check_dhcp.c:1185 #, c-format msgid "" "Error: DLPI stream API failed to get MAC in dl_attach_req/open(%s..): %s.\n" msgstr "" -#: plugins-root/check_dhcp.c:1183 +#: plugins-root/check_dhcp.c:1209 #, c-format msgid "Error: DLPI stream API failed to get MAC in dl_bind/check_ctrl(): %s.\n" msgstr "" -#: plugins-root/check_dhcp.c:1231 -#, c-format -msgid "" -"This plugin tests the availability of DHCP servers on a network.\n" -"\n" +#: plugins-root/check_dhcp.c:1257 +msgid "This plugin tests the availability of DHCP servers on a network." msgstr "" -#: plugins-root/check_dhcp.c:1235 -#, c-format -msgid "" -" -s, --serverip=IPADDRESS\n" -" IP address of DHCP server that we must hear from\n" -" -r, --requestedip=IPADDRESS\n" -" IP address that should be offered by at least one DHCP server\n" -" -t, --timeout=INTEGER\n" -" Seconds to wait for DHCPOFFER before timeout occurs\n" -" -i, --interface=STRING\n" -" Interface to to use for listening (i.e. eth0)\n" -" -v, --verbose\n" -" Print extra information (command-line use only)\n" -" -h, --help\n" -" Print detailed help screen\n" -" -V, --version\n" -" Print version information\n" +#: plugins-root/check_dhcp.c:1268 +msgid "IP address of DHCP server that we must hear from" +msgstr "" + +#: plugins-root/check_dhcp.c:1270 +msgid "IP address that should be offered by at least one DHCP server" +msgstr "" + +#: plugins-root/check_dhcp.c:1272 +msgid "Seconds to wait for DHCPOFFER before timeout occurs" +msgstr "" + +#: plugins-root/check_dhcp.c:1274 +msgid "Interface to to use for listening (i.e. eth0)" +msgstr "" + +#: plugins-root/check_icmp.c:1227 +msgid "specify a target" +msgstr "" + +#: plugins-root/check_icmp.c:1229 +msgid "warning threshold (currently " +msgstr "" + +#: plugins-root/check_icmp.c:1232 +msgid "critical threshold (currently " +msgstr "" + +#: plugins-root/check_icmp.c:1235 +msgid "number of packets to send (currently " +msgstr "" + +#: plugins-root/check_icmp.c:1238 +msgid "max packet interval (currently " +msgstr "" + +#: plugins-root/check_icmp.c:1241 +msgid "max target interval (currently " +msgstr "" + +#: plugins-root/check_icmp.c:1244 +msgid "number of alive hosts required for success" +msgstr "" + +#: plugins-root/check_icmp.c:1247 +msgid "TTL on outgoing packets (currently " +msgstr "" + +#: plugins-root/check_icmp.c:1250 +msgid "timeout value (seconds, currently " +msgstr "" + +#: plugins-root/check_icmp.c:1253 +msgid "icmp packet size (currenly ignored)" +msgstr "" + +#: plugins-root/check_icmp.c:1255 +msgid "verbose" +msgstr "" + +#: plugins-root/check_icmp.c:1258 +msgid "The -H switch is optional. Naming a host (or several) to check is not." +msgstr "" + +#: plugins-root/check_icmp.c:1259 +msgid "" +"Threshold format for -w and -c is 200.25,60% for 200.25 msec RTA and 60%" +msgstr "" + +#: plugins-root/check_icmp.c:1260 +msgid "packet loss. The default values should work well for most users." +msgstr "" + +#: plugins-root/check_icmp.c:1261 +msgid "" +"You can specify different RTA factors using the standardized abbreviations" +msgstr "" + +#: plugins-root/check_icmp.c:1262 +msgid "" +"us (microseconds), ms (milliseconds, default) or just plain s for seconds." +msgstr "" + +#: plugins-root/check_icmp.c:1267 +msgid "The -v switch can be specified several times for increased verbosity." msgstr ""